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c,IAAN/xE,GAAgBA,KAAM,MAAQk3B,EAAIj0D,EAAExlB,QAAQw+C,MAAM81E,EAAG7+G,KAAKgkE,EAAE53E,MAQxE,CAPA,MACOiF,GAASsR,EAAI,CAAEtR,MAAOA,EAAS,SAElC,IACQ2yE,IAAMA,EAAEj7B,OAASlM,EAAI9sB,EAAE+uG,SAAYjiF,EAAEnnC,KAAKqa,EAElB,CADhC,QACU,GAAIpN,EAAG,MAAMA,EAAEtR,KAAO,CACpC,CACA,OAAOwtH,CACX,EAKIopB,GAA4B,WAC5B,SAASA,IACT,CACAA,SAAWpD,kBAAoB,CAC3B,aACA,kBACA,cACA,iBACA,oBACA,YACA,UACA,QACA,OACA,cACA,QACA,OACA,mBACA,eACA,gBACA,YACA,eACA,SACA,iBACA,iBACA,UACA,SACA,gBACA,gBACA,2BAEJoD,EAAWnD,kBAAoB,CAC3B,uBACA,gCACA,6BACA,YACA,eACA,qBACA,wBACA,aACA,sBACA,mBACA,iCACA,8BACA,kBACA,eACA,mBACA,kBACA,2BACA,wBACA,0BACA,gCACA,mCACA,0BACA,mBACA,yBACA,4BACA,UACA,qBAEJmD,EAAWlD,iBAAmB,CAC1B,WACA,eACA,kBACA,WACA,sBACA,iBACA,SAEJkD,EAAWjD,kBAAoB,CAC3B,WACA,YACA,mBACA,OACA,cACA,QACA,eACA,WACA,WACA,gBACA,uBACA,aACA,qBAEJiD,EAAWhD,mBAAqB,CAC5B,oBACA,2BACA,2BACA,gBACA,gBACA,OACA,cACA,WACA,kBACA,QACA,eACA,oBACA,0BACA,sCACA,eACA,kBACA,eACA,cACA,aACA,aACA,oBACA,mBACA,iBACA,cACA,cACA,WACA,gBACA,oBACA,wBACA,UACA,YACA,aACA,WACA,WACA,YACA,kBACA,iBACA,kBACA,sBAgCJgD,EAAW/C,eA9JuC,WAClD,QAASrmB,EAAK,GAAI9uG,EAAI,EAAGA,EAAIk2D,UAAUjpE,OAAQ+S,IAAK8uG,EAAKA,EAAG5yD,OAAO+7E,GA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IAAW09hB,GAAiBG,cAAW,EAAG5khB,MAAK,IACjEtd,UAAU,KACXqD,GAAM,EAEd,EA+M4BogiB,CAAoBpriB,GAAQ,KAGxBoxB,GAAQ,EAAI,GAEhBnV,EAAS/X,IAAIk5hB,IAAuBM,mBAAqB,KAIrDtsgB,GAAQ,GACD84gB,GAActvhB,UAAS7P,YAAG,GAAUm/hB,IAE/ClqiB,GAAOiliB,mBAAiB,GAE/B,KA0Z8B9pF,gBACvC,GAEZ,CAQA,MAAM+vF,GAAqB,IAAI9wgB,MAAek+d,GAAc,qBAAuB","names":["AuthGuard","constructor","authenticationService","logger","router","this","canActivate","route","state","currentUserValue","navigate","queryParams","returnUrl","url","core","factory","JwtInterceptor","intercept","request","next","currentUser","token","clone","setHeaders","Authorization","handle","UsersJwtDto","isInRole","role","roles","split","some","item","AuthenticationService","config","http","json","localStorage","getItem","tokenName","obj","JSON","parse","currentUserSubject","BehaviorSubject","asObservable","loggedIn","hasUser","value","hasToken","user","setGuestToken","setItem","stringify","login","email","password","bankSlug","creds","getConfig","api","post","pipe","map","info","logout","removeItem","isLoggedIn","AppConfigService","loadAppConfig","get","toPromise","then","data","appConfig","getVersion","ExportMappingDiagnosticService","ApiBaseService","feature","super","serviceName","name","LogAPIService","endpoint","detail","schema","count","ApiModule","ActionService","ApiServerInfoService","AppsService","AvatarService","DashboardService","DefaultsService","DocsService","EmailService","ExportMappingService","IntegrationService","FormsService","LicenseServiceService","ListService","OrgsService","PDFService","SchemaService","TwoFactorAuthService","UsersService","WebClientLoggerService","CoreModule","CommonModule","ReactiveFormsModule","RouterModule","ApplicantAuthGuard","applicantService","path","getBankSlug","window","location","pathname","_angular_core__WEBPACK_IMPORTED_MODULE_2__","ApplicantService","listSvc","svc","getUserID","userID","setUserID","users","getUser","subscribe","userData","error","getOrgSlug","orgSlug","setOrgSlug","orgs","bySlug","bankInfo","forOrg","lists","getLoggedIn","getAbsInfo","abs","companyInfo","FastAppApiService","actions","apiServerInfo","apps","avatar","dashboard","dev","defaults","docs","exportMappingService","forms","integration","key","license","pdf","twoFactorAuth","webClientLoggerService","logger2","feature2","doLogging","formatGetParams","paramObject","URLSearchParams","toString","logAll","log","ALL","logSpecific","logNone","NONE","canLog","debug","handleCatchError","err","empty","errors","message","of","action","executeAction","actionName","appData","serverInfo","getInfo","AppDataStatusChangeModel","keyService","timestampService","newAppData","bankID","schemaID","newEncodedKey","clientTime","nowFormatAsString","tap","result","method","call","delete","id","undelete","getDeletedCount","purge","getAppData","x","jsonData","Object","prototype","hasOwnProperty","hide","lookup","getAppDataByExportID","exportID","getSignatures","saveAppData","submitAppData","pagedApps","status","pageIndex","pageSize","undefined","deny","who","text","reviewed","getAppPDFData","appID","getDetail","getReport2","saveReviewNote","reviewNoteJson","getLookupData","setStatus","body","put","changeApplicant","newUserEmail","getList","getBarAppStatusForBank","startDate","endDate","assignedTo","pStartDate","encodeURIComponent","pEndDate","getPieLoanOfficersForBank","getAppsForCurrentLoanOfficer","userNumber","getRawData","DevService","customerInfo","getDocs","emails","requestEmailVerification","newApp","encodedEmail","getCustomConfig","orgID","insert","sendTest","getTemplateList","sendTestToCurrentConfiguration","responseType","list","forBank","enabled","byID","formSlug","byAppDataID","appDataID","update","getByIdOrSlug","formIdentifier","setSlug","formID","clearSlug","getCoPilotApp","history","report","byName","listName","save","slug","catchError","orgType","street","city","zip","verificationMinutes","verificationAttempts","bankAppsBySlug","getMyData","bankUsersBySlug","hasValue","customer","productName","serialNumber","expirationDateAsString","currentDate","hasExpired","daysTillExpiration","daysSinceExpiration","notifyDays","libraries","functions","licenseKeyCode","upload","jsonString","header","headers","saveAs","getUserByEmail","hasAccount","searchParams","getUserApps","length","create","changePassword","verificationCode","passwordConfirm","adminChangePassword","needPasswordReset","verifyEmail","code","setEnabled","changeUser","userKind","webClientLogger","setup","verify","inputCode","resetUser","_angular_core__WEBPACK_IMPORTED_MODULE_3__","KeyInfoModel","raw","clearText","instance","dateTime","Date","expired","valid","reason","KeyService","utilService","configData","newKey","keyInfo","newDecodedKey","Base64Encode","decodeKey","encoded","ListsLookup","ListProviderService","convertList","workList","element","record","toLowerCase","filter","sort","a","b","orderby","push","label","find","SessionService","privOrgSlug","privLists","_angular_core__WEBPACK_IMPORTED_MODULE_0__","ThemeService","setBankTheme","bankTheme","theme","colors","setProperty","main","background","foreground","sidebar","button","activeMenu","setTheme","keys","forEach","k","document","documentElement","style","SharedService","dateFormatter","listProvider","session","timestamp","titleSvc","util","setPageTitle2","theTitle","theClass","setPageTitle","title","webAppName","setTitle","href","logIFTrace","doLog","e","trace","TimestampService","dateFormatAsString","date","dt","toLocaleString","str","substring","indexOf","setSubmitTime","model","time","submitted","getSubmitTime","setCreatedTime","created","getCreatedTime","i0","BulmaCardComponent","selectors","BulmaModalCardComponent","EventEmitter","ngOnInit","cancel","closed","emit","ctx","BulmaModalComponent","BulmaNotificationComponent","BulmaModule","StatusMessage","clear","isError","isLoading","isInfo","isSuccess","hasMessage","setError","msg","setLoading","setInfo","setSuccess","DisplayStatusMessageComponent","AppInjector","static","injector","console","FeatureFlagService","viewCoPilot","viewAppJson","showHidden","diagnostic","logModel","showPagesInfo","adminButtonComponents","FastTrackEntryComponent","DynamicAppFormComponent","FastTrackUserComponent","DynamicAppNavService","changeType","individualPurge","showBankForms","showExportMappingMenu","form","access","myData","reviewNotes","appReport","canToggleDebugView","proofOfConcept","bankListWithChildren","fileUpload","view","tech","todo","note","downLoadCSV","ABSService","phone","fax","tollFree","afterHours","website","copyrightYear","currentYear","getFullYear","FormlyFieldCheckboxComponent","FieldType","templateOptions","indeterminate","hideLabel","formCheck","t","FormlyWrapperFormFieldComponent","FieldWrapper","FormlyBulmaFormFieldModule","FormlyModule","wrappers","component","FormlyBulmaCheckboxModule","types","extends","FormlyFieldColorComponent","FormlyBulmaColorModule","FileValueAccessorDirective","writeValue","registerOnChange","fn","onChange","registerOnTouched","onTouched","provide","NG_VALUE_ACCESSOR","useExisting","multi","FormlyFieldFileComponent","FormlyBulmaFileModule","FormlyWrapperFormFieldComponentHorizontalComponent","FormlyBulmaFormFieldHorizontalModule","FormlyWrapperFormFieldComponentTableDataComponent","FormlyBulmaFormFieldTableDataModule","FormlyFieldInputComponent","type","to","FormlyBulmaInputModule","defaultOptions","FormlySelectOptionsPipe","transform","options","field","Observable","dispose","observableOf","toOptions","ngOnDestroy","gOptions","groups","_flatOptions","option","getGroupProp","group","toOption","getLabelProp","getValueProp","disabled","getDisabledProp","labelProp","shouldUseLegacyOption","warn","valueProp","disabledProp","groupProp","_options","complete","_subscription","unsubscribe","f","fieldChanges","property","Array","isArray","ɵfac","ɵpipe","ɵngcc0","pure","FormlySelectModule","ɵmod","ɵinj","FormlyFieldMultiCheckboxComponent","checked","formControl","patchValue","o","M","markAsTouched","isChecked","FormlyBulmaMultiCheckboxModule","PanelWrapperComponent","FormlyBulmaPanelWrapperModule","FormlyFieldRadioComponent","FormlyBulmaRadioModule","FormlyFieldSelectComponent","selectAccessor","s","bind","_getOptionId","_idCounter","ngZone","onStable","take","_elementRef","nativeElement","selectedIndex","compareWith","o1","o2","SelectControlValueAccessor","FormlyBulmaSelectModule","FormlyStaticTextComponent","FormlyBulmaStaticTextModule","FormlyFieldTextAreaComponent","rows","FormlyBulmaTextAreaModule","RepeatComponent","FieldArrayType","min","max","updateCount","fieldGroup","add","remove","i","confirm","FormlyRepeatModule","RepeatTableComponent","names","descs","showCount","required","desc","description","FormlyRepeatTableModule","FormlyFieldPasswordComponent","toggle","fieldType","FormlyBulmaPasswordModule","minlengthValidationMessage","minLength","maxlengthValidationMessage","maxLength","minValidationMessage","maxValidationMessage","requiredMessage","patternValidationMessage","passwordMatchValidator","control","fieldMatch","emailMatchValidator","emailConfirm","FormlyBulmaModule","validators","validation","validationMessages","PageFooterComponent","version","now","urlAbs","urlAbsFastApp","getYear","_angular_core__WEBPACK_IMPORTED_MODULE_1__","PagesInfoViewComponent","SharedModule","AgGridModule","AngularBillboardModule","FormsModule","BLANK_JSON_ARRAY","BLANK_JSON_OBJECT","UtilFunctionsService","jsonToString","indent","seen","WeakSet","has","strToFunction","fx","eval","isDefined","logBrowserSize","object","innerWidth","innerHeight","jsonIsEqual","obj1","obj2","keys1","keys2","every","input","btoa","Base64Decode","atob","getDefaultVerbiage","padTo2Digits","num","padStart","validDateDelimiter","delim","_formatDateAsMMDDYYYY","DEFAULT_DATE_DELIMITER","getMonth","getDate","join","formatDateAsMMDDYYYY","_formatDateAsYYYYMMDD","formatDateAsYYYYMMDD","makeList_WYSIWYG","listSort","convertYYYYMMDD_MMDDYY","piece","JSONPath","root","parts","part","AppComponent","Portal","attach","host","_attachedHost","detach","isAttached","setAttachedHost","ComponentPortal","viewContainerRef","componentFactoryResolver","projectableNodes","TemplatePortal","templateRef","context","origin","elementRef","DomPortal","ElementRef","BasePortalOutlet","_isDisposed","attachDomPortal","hasAttached","_attachedPortal","portal","attachComponentPortal","attachTemplatePortal","_invokeDisposeFn","setDisposeFn","_disposeFn","DomPortalOutlet","outletElement","_componentFactoryResolver","_appRef","_defaultInjector","_document","anchorNode","createComment","parentNode","insertBefore","appendChild","replaceChild","componentFactory","resolveComponentFactory","componentRef","createComponent","destroy","Injector","attachView","hostView","viewCount","detachView","_getComponentRootNode","viewContainer","viewRef","createEmbeddedView","rootNodes","rootNode","detectChanges","index","coerceArray","coerceCssPixelValue","AnimationFrameScheduler","AsyncScheduler","flush","active","scheduled","shift","execute","delay","AnimationFrameAction","AsyncAction","scheduler","work","requestAsyncId","requestAnimationFrame","recycleAsyncId","cancelAnimationFrame","nextHandle","RESOLVED","Promise","resolve","activeHandles","findAndClearHandle","Immediate","setImmediate","cb","clearImmediate","AsapScheduler","AsapAction","AuditOperator","durationSelector","subscriber","source","AuditSubscriber","SimpleOuterSubscriber","destination","_next","throttled","duration","innerSubscription","innerSubscribe","SimpleInnerSubscriber","clearThrottle","notifyNext","notifyComplete","isNumeric","val","parseFloat","dispatch","period","schedule","auditTime","async","audit","lift","timer","dueTime","periodOrScheduler","Number","isScheduler","due","hasV8BreakIterator","Intl","v8BreakIterator","scrollBehaviorSupported","Platform","_platformId","isBrowser","isPlatformBrowser","EDGE","test","navigator","userAgent","TRIDENT","BLINK","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","PLATFORM_ID","ɵprov","supportsScrollBehavior","Element","scrollToFunction","scrollTo","_getEventTarget","event","composedPath","target","_isTestEnvironment","__karma__","jasmine","jest","Mocha","ScrollDispatcher","_ngZone","_platform","_scrolled","Subject","_globalSubscription","_scrolledCount","scrollContainers","Map","register","scrollable","set","elementScrolled","deregister","scrollableReference","scrolled","auditTimeInMs","observer","_addGlobalListener","subscription","_removeGlobalListener","_","container","ancestorScrolled","elementOrElementRef","ancestors","getAncestorScrollContainers","scrollingContainers","_scrollableContainsElement","_getWindow","defaultView","coerceElement","elementOrRef","scrollableElement","getElementRef","parentElement","runOutsideAngular","fromEvent","i1","DOCUMENT","ViewportRuler","_change","_changeListener","addEventListener","change","_viewportSize","removeEventListener","getViewportSize","_updateViewportSize","output","width","height","getViewportRect","scrollPosition","getViewportScrollPosition","top","left","bottom","right","documentRect","getBoundingClientRect","scrollTop","scrollY","scrollLeft","scrollX","throttleTime","DIR_DOCUMENT","InjectionToken","providedIn","DIR_DOCUMENT_FACTORY","inject","RTL_LOCALE_PATTERN","Directionality","_resolveDirectionality","rawValue","language","dir","BlockScrollStrategy","_viewportRuler","_previousHTMLStyles","_isEnabled","enable","_canBeEnabled","_previousScrollPosition","classList","disable","html","htmlStyle","bodyStyle","previousHtmlScrollBehavior","scrollBehavior","previousBodyScrollBehavior","scroll","contains","viewport","scrollHeight","scrollWidth","CloseScrollStrategy","_scrollDispatcher","_config","_scrollSubscription","_detach","_overlayRef","run","overlayRef","stream","overlayElement","threshold","_initialScrollPosition","Math","updatePosition","NoopScrollStrategy","isElementScrolledOutsideView","containerBounds","isElementClippedByScrolling","scrollContainerRect","RepositionScrollStrategy","scrollThrottle","autoClose","overlayRect","ScrollStrategyOptions","noop","close","block","reposition","OverlayConfig","scrollStrategy","panelClass","hasBackdrop","backdropClass","disposeOnNavigation","configKeys","ConnectedOverlayPositionChange","connectionPair","scrollableViewProperties","BaseOverlayDispatcher","_attachedOverlays","splice","OverlayKeyboardDispatcher","_keydownListener","overlays","_keydownEvents","observers","keydownEvents","_isAttached","OverlayOutsideClickDispatcher","_cursorStyleIsSet","_pointerDownListener","_pointerDownEventTarget","_clickListener","slice","_outsidePointerEvents","outsidePointerEvents","_addEventListeners","_cursorOriginalValue","cursor","i1$1","OverlayContainer","_containerElement","getContainerElement","_createContainer","containerClass","oppositePlatformContainers","querySelectorAll","createElement","setAttribute","OverlayRef","_portalOutlet","_host","_pane","_keyboardDispatcher","_location","_outsideClickDispatcher","_animationsDisabled","_backdropElement","_backdropClick","_attachments","_detachments","_locationChanges","Subscription","_backdropClickHandler","_backdropTransitionendHandler","_disposeBackdrop","_scrollStrategy","_positionStrategy","positionStrategy","backdropElement","hostElement","_previousHostParent","attachResult","_updateStackingOrder","_updateElementSize","_updateElementDirection","_togglePointerEvents","_attachBackdrop","_toggleClasses","onDestroy","detachBackdrop","detachmentResult","_detachContentWhenStable","_disposeScrollStrategy","backdropClick","attachments","detachments","apply","updatePositionStrategy","strategy","updateSize","sizeConfig","setDirection","direction","addPanelClass","classes","removePanelClass","getDirection","updateScrollStrategy","minWidth","minHeight","maxWidth","maxHeight","enablePointer","pointerEvents","showingClass","nextSibling","backdropToDetach","_backdropTimeout","setTimeout","cssClasses","isAdd","c","takeUntil","merge","children","backdrop","clearTimeout","boundingBoxClass","cssUnitPattern","FlexibleConnectedPositionStrategy","positions","_preferredPositions","connectedTo","_overlayContainer","_lastBoundingBoxSize","_isPushed","_canPush","_growAfterOpen","_hasFlexibleDimensions","_positionLocked","_viewportMargin","_scrollables","_positionChanges","_resizeSubscription","_offsetX","_offsetY","_appliedPanelClasses","positionChanges","setOrigin","_validatePositions","_boundingBox","_isInitialRender","_lastPosition","reapplyLastPosition","_clearPanelClasses","_resetOverlayElementStyles","_resetBoundingBoxStyles","_viewportRect","_getNarrowedViewportRect","_originRect","_getOriginRect","_overlayRect","_containerRect","originRect","viewportRect","containerRect","flexibleFits","fallback","pos","originPoint","_getOriginPoint","overlayPoint","_getOverlayPoint","overlayFit","_getOverlayFit","isCompletelyWithinViewport","_applyPosition","_canFitWithFlexibleDimensions","position","boundingBoxRect","_calculateBoundingBoxRect","visibleArea","bestFit","bestScore","fit","score","weight","_previousPushAmount","extendStyles","alignItems","justifyContent","lastPosition","withScrollableContainers","scrollables","withPositions","withViewportMargin","margin","withFlexibleDimensions","flexibleDimensions","withGrowAfterOpen","growAfterOpen","withPush","canPush","withLockedPosition","isLocked","_origin","withDefaultOffsetX","offset","withDefaultOffsetY","withTransformOriginOn","selector","_transformOriginSelector","y","originX","startX","_isRtl","endX","originY","overlayStartX","overlayStartY","overlayX","overlayY","point","rawOverlayRect","overlay","getRoundedBoundingClientRect","offsetX","_getOffset","offsetY","topOverflow","bottomOverflow","visibleWidth","_subtractOverflows","visibleHeight","fitsInViewportVertically","fitsInViewportHorizontally","availableHeight","availableWidth","getPixelValue","horizontalFit","_pushOverlayOnScreen","start","overflowRight","overflowBottom","overflowTop","overflowLeft","pushX","pushY","_setTransformOrigin","_setOverlayElementStyles","_setBoundingBoxStyles","_addPanelClasses","_getScrollVisibility","changeEvent","elements","xOrigin","yOrigin","transformOrigin","isRtl","smallestDistanceToViewportEdge","previousHeight","previousWidth","styles","_hasExactPosition","hasExactPosition","hasFlexibleDimensions","_getExactOverlayY","_getExactOverlayX","transformString","trim","clientHeight","horizontalStyleProperty","clientWidth","originBounds","overlayBounds","scrollContainerBounds","isOriginClipped","isOriginOutsideView","isOverlayClipped","isOverlayOutsideView","overflows","reduce","currentValue","currentOverflow","axis","cssClass","units","clientRect","floor","wrapperClass","GlobalPositionStrategy","_cssPosition","_topOffset","_bottomOffset","_alignItems","_xPosition","_xOffset","_width","_height","end","centerHorizontally","centerVertically","parentStyles","shouldBeFlushHorizontally","shouldBeFlushVertically","xPosition","xOffset","marginLeft","marginRight","marginTop","marginBottom","parent","OverlayPositionBuilder","global","flexibleConnectedTo","nextUniqueId","Overlay","scrollStrategies","_positionBuilder","_injector","_directionality","_animationsModuleType","_createHostElement","pane","_createPaneElement","portalOutlet","_createPortalOutlet","overlayConfig","ApplicationRef","i5","i6","ANIMATION_MODULE_TYPE","ContextmenuComponent","cancelDialog","open","userMenu","$implicit","sub","sendto","KeyDevComponent","base64","encode1","decode1","PageAboutComponent","PageNotFoundComponent","PublicModule","globalResolver","NGXLogger","features","resolvers","resolver","tenantResolver","params","BankId","basicResolverGroup","section","routes","pathMatch","redirectTo","loadChildren","m","PrivateModule","tenant","ApplicantModule","RepeatPageComponent","UntypedFormGroup","listKey","addText","headerText","fieldArray","focus","placeholder","submit","alert","RepeatTablePageComponent","AppRoutingModule","scrollPositionRestoration","scrollOffset","anchorScrolling","BrowserModule","AnimationBuilder","AnimationFactory","AUTO_STYLE","sequence","steps","tokens","scheduleMicroTask","NoopAnimationPlayer","_onDoneFns","_onStartFns","_onDestroyFns","_originalOnDoneFns","_originalOnStartFns","_started","_destroyed","_finished","_position","parentPlayer","totalTime","_onFinish","onStart","onDone","hasStarted","init","play","_onStart","triggerMicrotask","pause","restart","finish","reset","setPosition","getPosition","triggerCallback","phaseName","methods","AnimationGroupPlayer","_players","players","doneCount","destroyCount","startCount","total","player","_onDestroy","p","timeAtPosition","longestPlayer","longestSoFar","beforeDestroy","ɵPRE_STYLE","invalidTimingValue","exp","ɵRuntimeError","ngDevMode","isNode","process","optimizeGroupPlayer","ɵAnimationGroupPlayer","normalizeKeyframes$1","driver","normalizer","keyframes","preStyles","postStyles","normalizedKeyframes","previousOffset","previousKeyframe","kf","isSameOffset","normalizedKeyframe","prop","normalizedProp","normalizedValue","normalizePropertyName","normalizeStyleValue","animationFailed","listenOnPlayer","eventName","callback","copyAnimationEvent","makeAnimationEvent","triggerName","fromState","toState","_data","getOrSetDefaultValue","defaultValue","parseTimelineCommand","command","separatorPos","_contains","elm1","elm2","_query","_documentElement","getParentElement","from","elem","querySelector","_CACHED_BODY","_IS_WEBKIT","containsElement","invokeQuery","NoopAnimationDriver","validateStyleProperty","getBodyNode","containsVendorPrefix","charAt","toUpperCase","matchesElement","_element","_selector","query","computeStyle","animate","easing","previousPlayers","scrubberAccessRequested","AnimationDriver","NOOP","ONE_SECOND","ENTER_CLASSNAME","LEAVE_CLASSNAME","NG_TRIGGER_CLASSNAME","NG_TRIGGER_SELECTOR","NG_ANIMATING_CLASSNAME","NG_ANIMATING_SELECTOR","resolveTimingValue","matches","match","_convertTimeValueToMS","unit","resolveTiming","timings","allowNegativeValues","parseTimeExpression","delayMatch","easingVal","containsErrors","startIndex","negativeStepValue","negativeDelayValue","copyObj","convertToMap","styleMap","copyStyles","backfill","getStyleAttributeString","writeStyleAttribute","styleAttrValue","getPropertyValue","startsWith","camelCaseToDashCase","setStyles","formerStyles","camelProp","dashCaseToCamelCase","eraseStyles","normalizeAnimationEntry","PARAM_REGEX","RegExp","extractStyleParams","exec","lastIndex","interpolateParams","original","replace","varName","localVal","invalidParamValue","iteratorToArray","iterator","arr","done","DASH_CASE_REGEXP","visitDslNode","visitor","node","visitTrigger","visitState","visitTransition","visitSequence","visitGroup","visitAnimate","visitKeyframes","visitStyle","visitReference","visitAnimateChild","visitAnimateRef","visitQuery","visitStagger","invalidNodeType","nodeType","getComputedStyle","ANY_STATE","parseTransitionExpr","transitionValue","expressions","parseInnerTransitionStr","eventStr","parseAnimationAlias","alias","invalidTransitionAlias","invalidExpression","expr","separator","makeLambdaFromStates","TRUE_BOOLEAN_VALUES","Set","FALSE_BOOLEAN_VALUES","lhs","rhs","LHS_MATCH_BOOLEAN","RHS_MATCH_BOOLEAN","lhsMatch","rhsMatch","SELF_TOKEN_REGEX","buildAnimationAst","metadata","warnings","AnimationAstBuilderVisitor","build","_driver","AnimationAstBuilderContext","_resetContextStyleTimingState","currentQuerySelector","collectedStyles","currentTime","queryCount","depCount","states","transitions","invalidTrigger","definitions","def","stateDef","n","transition","invalidDefinition","styleAst","astParams","containsDynamicStyles","missingSubs","size","values","invalidState","metadataName","animation","matchers","normalizeAnimationOptions","furthestTime","step","innerAst","timingAst","constructTimingAst","makeTimingAst","strValue","v","ast","dynamic","currentAnimateTimings","styleMetadata","isEmpty","newStyleData","_styleAst","isEmptyStep","_makeStyleAst","_validateStyleAst","metadataStyles","styleTuple","collectedEasing","styleData","endTime","startTime","tuple","collectedEntry","updateCollectedStyle","invalidParallelAnimation","firstStart","firstEnd","secondStart","secondEnd","validateStyleParams","invalidStyleParams","invalidKeyframes","totalKeyframesWithOffsets","offsets","offsetsOutOfOrder","keyframesOutOfRange","offsetVal","consumeOffset","invalidOffset","keyframeOffsetsOutOfOrder","generatedOffset","keyframesMissingOffsets","limit","animateDuration","durationUpToThisFrame","parentSelector","currentQuery","includeSelf","normalizeSelector","hasAmpersand","optional","originalSelector","invalidStagger","currentTransition","unsupportedCSSPropertiesFound","normalizeParams","createTimelineInstruction","preStyleProps","postStyleProps","subTimeline","ElementInstructionMap","_map","append","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","startingTime","_enterClassName","_leaveClassName","initialTimeline","TimelineBuilder","skipIfExists","newOptions","optionsToUpdate","newParams","paramsToUpdate","_copyOptions","oldParams","newTime","fork","updatedTimings","builder","SubTimelineBuilder","stretchStartingKeyframe","results","invalidQuery","_elementTimelineStylesLookup","_previousKeyframe","_currentKeyframe","_keyframes","_styleSummary","_localTimelineStyles","_pendingStyles","_backFill","_currentEmptyStepKeyframe","_globalTimelineStyles","_loadKeyframe","hasPreStyleStep","_updateStyle","flattenStyles","allStyles","allProperties","getFinalKeyframe","properties","details1","details0","finalKeyframes","keyframe","finalKeyframe","preProps","postProps","kf0","kf1","_stretchStartingKeyframe","newKeyframes","startingGap","newFirstKeyframe","oldFirstKeyframe","roundOffset","oldOffset","decimalPoints","mult","pow","round","AnimationStyleNormalizer","DIMENSIONAL_PROP_SET","WebAnimationsStyleNormalizer","propertyName","userProvidedProperty","normalizedProperty","strVal","valAndSuffixMatch","invalidCssUnitValue","createTransitionInstruction","isRemovalTransition","fromStyles","toStyles","queriedElements","EMPTY_OBJECT","AnimationTransitionFactory","_triggerName","_stateStyles","currentState","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","key2","EMPTY_INSTRUCTION_MAP","TimelineAnimationEngine","bodyNode","_animations","_playersById","registerFailed","_buildPlayer","autoStylesMap","inst","missingOrDestroyedAnimation","createAnimationFailed","_getPlayer","missingPlayer","listen","baseEvent","args","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","_engine","_triggers","_queue","_elementListeners","_hostClassName","addClass","phase","missingTrigger","missingEvent","isTriggerEventValid","unsupportedTriggerEvent","listeners","triggersWithStates","statesByElement","afterFlush","_getTrigger","trigger","unregisteredTrigger","defaultToFallback","TransitionAnimationPlayer","objEquals","k1","k2","reportError","playersOnElement","playersByElement","queued","isFallbackTransition","totalQueuedPlayers","removeClass","entry","clearElementCache","elementPlayers","_signalRemovalForInnerTriggers","namespaces","fetchNamespacesByElement","ns","triggerLeaveAnimation","afterFlushAnimationsDone","destroyAfterComplete","triggerStates","previousTriggersValues","markElementAsRemoved","processLeaveNode","prepareLeaveAnimationListeners","elementStates","visitedTriggers","listener","removeNode","engine","childElementCount","containsPotentialParentTransition","totalAnimations","currentPlayers","playersByQueriedElement","removalFlag","destroyInnerAnimations","_onRemovalComplete","insertNode","drainQueuedTransitions","microtaskId","destroyed","markedForDestroy","d0","d1","elementContainsData","containsData","TransitionAnimationEngine","onRemovalComplete","newHostElements","disabledNodes","_namespaceLookup","_namespaceList","_flushFns","_whenQuietFns","namespacesByHostElement","collectedEnterElements","collectedLeaveElements","queuedPlayers","createNamespace","_balanceNamespaceList","collectEnterElement","namespaceList","found","ancestor","ancestorNs","unshift","registerTrigger","_fetchNamespace","stateValue","isElementNode","details","markElementAsDisabled","isHostElement","hostNS","_buildInstruction","subTimelines","skipBuildAst","containerElement","destroyActiveAnimationsForElement","finishActiveQueriedAnimationOnElement","whenRenderingDone","cleanupFns","_flushAnimations","quietFns","triggerTransitionsFailed","skippedPlayers","skippedPlayersMap","queuedInstructions","allPreStyleElements","allPostStyleElements","disabledElementsSet","nodesThatAreDisabled","allTriggerElements","enterNodeMap","buildRootMap","enterNodeMapIds","nodes","className","allLeaveNodes","mergedLeaveNodes","leaveNodesWithoutAnimations","leaveNodeMapIds","leaveNodeMap","allPlayers","erroneousTransitions","previousValue","nodeIsOrphaned","stringMap","setVal","transitionFailed","allPreviousPlayersMap","animationElementMap","_beforeAnimationBuild","_getPreviousPlayers","prevPlayer","replaceNodes","replacePostStylesAsPre","postStylesMap","cloakAndComputeStyles","preStylesMap","pre","entries","rootPlayers","subPlayers","NO_PARENT_ANIMATION_ELEMENT_DETECTED","overrideTotalTime","parentWithAnimation","parentsToAdd","detectedParent","innerPlayer","_buildAnimation","setRealPlayer","parentPlayers","playersForElement","syncPlayerEvents","queriedPlayerResults","queriedInnerElements","j","queriedPlayers","activePlayers","removeNodesAfterAnimationDone","isQueriedElement","toStateValue","queriedElementPlayers","isRemovalAnimation","targetNameSpaceId","targetTriggerName","timelineInstruction","realPlayer","getRealPlayer","allQueriedPlayers","allConsumedElements","allSubElements","allNewPlayers","flattenGroupPlayers","finalPlayers","_flattenGroupPlayersRecur","wrappedPlayer","deleteOrUnsetInMap","currentValues","_player","_containsRealPlayer","_queuedCallbacks","callbacks","_queueEvent","cloakElement","oldValue","display","valuesMap","elementPropsMap","defaultStyle","cloakVals","failedElements","props","roots","rootMap","NULL_NODE","nodeSet","localRootMap","getRoot","postEntry","preEntry","AnimationEngine","_triggerCache","_transitionEngine","_timelineEngine","componentId","cacheKey","triggerBuildFailed","buildTrigger","onInsert","onRemove","disableAnimations","eventPhase","concat","SpecialCasedStyles","_startStyles","_endStyles","_state","initialStyles","initialStylesByElement","_initialStyles","WeakMap","filterNonAnimatableStyles","isNonAnimatableStyle","WebAnimationsPlayer","_specialStyles","_initialized","currentSnapshot","_duration","_delay","_preparePlayerBeforeStart","domPlayer","_triggerWebAnimation","_finalKeyframe","_resetDomPlayerState","_convertKeyframesToObject","kfs","frame","fromEntries","WebAnimationsDriver","validateAnimatableStyleProperty","playerOptions","fill","previousStyles","previousWebAnimationPlayers","allowPreviousPlayerStylesMerge","normalizeKeyframes","balancePreviousStylesIntoKeyframes","startingKeyframe","missingStyleProps","specialStyles","packageNonAnimatableStyles","startStyles","endStyles","BrowserAnimationBuilder","rootRenderer","doc","_nextAnimationId","_renderer","createRenderer","encapsulation","ViewEncapsulation","issueAnimationCommand","BrowserAnimationFactory","_id","RendererAnimationPlayer","_command","_listen","renderer","DISABLE_ANIMATIONS_FLAG","AnimationRendererFactory","delegate","_zone","_currentId","_microtaskId","_animationCallbacksBuffer","_rendererCache","_cdRecurDepth","promise","removeChild","BaseAnimationRenderer","animationTriggers","AnimationRenderer","begin","_scheduleCountTask","scheduleListenerCallback","destroyNode","namespace","createText","newChild","refChild","isMove","oldChild","selectRootElement","selectorOrNode","preserveContent","el","removeAttribute","setStyle","flags","removeStyle","setValue","resolveElementFromTarget","parseTriggerCallbackName","dotIndex","SHARED_ANIMATION_PROVIDERS","useClass","ɵAnimationStyleNormalizer","useFactory","instantiateDefaultStyleNormalizer","ɵWebAnimationsStyleNormalizer","ɵAnimationEngine","InjectableAnimationEngine","appRef","RendererFactory2","instantiateRendererFactory","zone","deps","ɵDomRendererFactory2","NgZone","BROWSER_ANIMATIONS_PROVIDERS","ɵWebAnimationsDriver","useValue","BROWSER_NOOP_ANIMATIONS_PROVIDERS","ɵNoopAnimationDriver","BrowserAnimationsModule","ngModule","providers","imports","Utility","file","defaultObject","onError","XMLHttpRequest","onerror","overrideMimeType","send","responseText","appInitializerFn","AppModule","bootstrap","HttpClientModule","HTTP_INTERCEPTORS","APP_INITIALIZER","LoggerConfig","level","NgxLoggerLevel","enableSourceMaps","DatePipe","DecimalPipe","ClipboardModule","LoggerModule","__NgCli_bootstrap_1","bootstrapModule","catch","DistinctUntilChangedOperator","compare","keySelector","DistinctUntilChangedSubscriber","Subscriber","hasKey","DebounceTimeOperator","DebounceTimeSubscriber","debouncedSubscription","lastValue","clearDebounce","dispatchNext","_complete","debouncedNext","isObservable","_c0","FormlyForm_formly_field_0_Template","rf","field_r2","_c1","_c2","FormlyField_ng_template_0_Template","_c3","FormlyGroup_formly_field_0_Template","getFieldId","formId","template","isFunction","getKeyPath","_keyPath","FORMLY_VALIDATORS","assignFieldValue","paths","resetOnHide","pop","assignModelValue","isObject","getFieldValue","reverseDeepMerge","dest","src","srcArg","isNullOrUndefined","isBlankString","objAndSameType","isUndefined","getPrototypeOf","TemplateRef","changingThisBreaksApplicationSecurity","_isAMomentObject","AbstractControl","getTime","proto","setPrototypeOf","newVal","propDesc","getOwnPropertyDescriptor","defineProperty","defineHiddenProp","enumerable","writable","configurable","wrapProperty","setFn","_observers","fns","firstChange","changeFn","FORMLY_CONFIG","FormlyConfig","messages","templateManipulators","preWrapper","postWrapper","extras","checkExpressionOn","lazyRender","showError","invalid","touched","parentForm","show","extensions","addConfig","setType","validator","setValidator","wrapper","setWrapper","manipulators","manipulator","setManipulator","addValidatorMessage","extension","assign","getType","Error","mergeExtendedType","getMergedField","extendDefaults","optionsTypes","resolveFieldTypeRef","_componentRef","_resolver","setTypeWrapper","getWrapper","getValidator","getValidatorMessage","class","extendedType","ngInjectableDef","defineInjectable","FormlyFormBuilder","formlyConfig","buildForm","_setOptions","disableTreeValidityCall","_updateTreeValidity","_buildForm","_checkField","getExtensions","prePopulate","onPopulate","postPopulate","formState","_hiddenFieldsForCheck","_markForCheck","_componentRefs","ref","ChangeDetectorRef","markForCheck","_buildField","unregisterControl","emitEvent","fieldIndex","_fields","opts","FormArray","controls","findIndex","updateControl","removeAt","FormGroup","removeControl","setParent","findControl","shareFormControl","registerControl","setValidators","setAsyncValidators","registerOnDisabledChange","___$disabled","FormControl","setControl","_hide","updateValidity","onlySelf","updateValueAndValidity","statusChanges","valueChanges","__patchForEachChild","_forEachChild","clearControl","ComponentFactoryResolver","INJECTOR","FormlyForm","formlyBuilder","immutable","parentFormGroup","modelChange","_modelChangeValue","modelChangeSubs","modelChange$","modelChangeSub","switchMap","runGuarded","checkExpressionChange","_model","fields","content","hasContent","Node","ELEMENT_NODE","TEXT_NODE","textContent","ngDoCheck","ngOnChanges","changes","setOptions","updateInitialValue","clearModelSubscriptions","trackModelChanges","changeModel","resetModel","_initialModel","resetForm","emitModelChange","_trackModelChanges","rootKey","distinctUntilChanged","updateOn","debounce","modelOptions","default","debounceTime","parsers","parserFn","ɵngcc1","ɵcmp","viewQuery","_t","first","inputs","outputs","ngContentSelectors","decls","vars","consts","dependencies","ɵngcc2","FormlyField","hideDeprecation","warnDeprecation","hostObservers","componentRefs","hooksObservers","detectFieldBuild","ngAfterContentInit","triggerHook","ngAfterContentChecked","ngAfterViewInit","ngAfterViewChecked","render","resetRefs","renderField","containerRef","wps","attachComponentRef","_lContainer","changeDetectorRef","hooks","r","lifecycle","ViewContainerRef","FormlyAttributes","uiAttributesCache","uiAttributes","uiEvents","events","$event","onFocus","onBlur","fieldAttrElements","_elementRefs","attributes","attr","detachElementRef","attachElementRef","toggleFocus","hasAttribute","isFocused","activeElement","blur","___$focus","onHostChange","Event","markAsDirty","ɵdir","hostBindings","initialModel","_build","ɵFieldWrapper_BaseFactory","fieldComponent","FormlyGroup","arguments","ɵFormlyGroup_BaseFactory","hostVars","fieldGroupClassName","FormlyValidationMessage","EXPR_VALIDATORS","errorMessage$","startWith","errorMessage","fieldForm","errorPath","asyncValidators","changeDetection","FormlyTemplateType","sanitizer","innerHtml","safeHtml","bypassSecurityTrustHtml","ɵngcc3","evalExpression","expression","thisArg","argVal","Function","FieldExpressionExtension","checkLocked","ignoreCache","checkField","_expressionProperties","expressionProperties","expressionProperty","_evalExpression","setExprValue","onInit","hideExpression","parentExpression","evalStringExpression","argNames","_evalExpressionPath","expressionPaths","arrayPath","fieldChanged","toggleFormControl","checkFieldExpressionChange","checkFieldVisibilityChange","expressionValue","hideExpressionResult","hidden","setDisabledState","emitExpressionChanges","FieldValidationExtension","initFieldValidation","getPredefinedFieldValidation","validatorName","wrapNgValidatorFn","VALIDATORS","opt","Validators","validatorOption","__rest","isPromise","handleAsyncResult","handleResult","Re","ctrl","_childrenErrors","childCtrl","setErrors","Cn","childErrors","FieldFormExtension","addFormControl","controlOptions","componentType","createControl","asyncValidator","mergeValidators","CoreExtension","getFieldComponentInstance","fieldTransforms","fieldTransform","initFieldOptions","resetFieldOnHide","setDefaultValue","initFieldWrappers","fieldTemplateManipulators","defaultFormlyConfig","configService","configs","ANALYZE_FOR_ENTRY_COMPONENTS","AgGridColumn_1","AgGridColumn","hasChildColumns","childColumns","toColDef","colDef","createColDefFromGridColumn","getChildColDefs","column","contentQueries","dirIndex","filterFramework","filterParams","floatingFilterComponent","floatingFilterComponentParams","floatingFilterComponentFramework","floatingFilterFramework","headerName","headerValueGetter","headerTooltip","headerClass","suppressHeaderKeyboardEvent","columnGroupShow","toolPanelClass","suppressColumnsToolPanel","suppressFiltersToolPanel","tooltipComponent","tooltipComponentFramework","tooltipComponentParams","groupId","openByDefault","marryChildren","headerGroupComponent","headerGroupComponentFramework","headerGroupComponentParams","colId","valueGetter","valueFormatter","refData","keyCreator","equals","tooltipField","tooltipValueGetter","checkboxSelection","icons","suppressNavigable","suppressKeyboardEvent","suppressPaste","suppressFillHandle","initialHide","lockVisible","lockPosition","suppressMovable","editable","valueSetter","valueParser","cellEditor","cellEditorFramework","cellEditorParams","cellEditorSelector","singleClickEdit","newValueHandler","cellEditorPopup","cellEditorPopupPosition","onCellValueChanged","onCellClicked","onCellDoubleClicked","onCellContextMenu","getQuickFilterText","filterValueGetter","floatingFilter","headerComponent","headerComponentFramework","headerComponentParams","menuTabs","columnsMenuParams","suppressMenu","headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","chartDataType","pinned","initialPinned","lockPinned","pinnedRowCellRenderer","pinnedRowCellRendererFramework","pinnedRowCellRendererParams","pinnedRowValueFormatter","pivot","initialPivot","pivotIndex","initialPivotIndex","pivotComparator","enablePivot","cellStyle","cellClass","cellClassRules","cellRenderer","cellRendererFramework","cellRendererParams","cellRendererSelector","autoHeight","wrapText","enableCellChangeFlash","suppressCellFlash","rowDrag","rowDragText","dndSource","dndSourceOnRowDrag","rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex","enableRowGroup","enableValue","aggFunc","initialAggFunc","defaultAggFunc","allowedAggFuncs","showRowGroup","sortable","initialSort","sortIndex","initialSortIndex","sortingOrder","comparator","unSortIcon","sortedAt","colSpan","rowSpan","initialWidth","flex","initialFlex","resizable","suppressSizeToFit","suppressAutoSize","__decorate","ContentChildren","__metadata","QueryList","Input","String","Boolean","AngularFrameworkOverrides","VanillaFrameworkOverrides","setEmitterUsedCallback","isEmitterUsed","timeout","setInterval","interval","AgPromise","eventType","useCapture","isOutsideAngular","dispatchEvent","isFrameworkComponent","comp","AngularFrameworkComponentWrapper","BaseComponentWrapper","setViewContainerRef","setComponentFactoryResolver","createWrapper","OriginalConstructor","that","DynamicAgNg2Component","BaseGuiComponent","hasMethod","getFrameworkComponentInstance","callMethod","addMethod","ɵAngularFrameworkComponentWrapper_BaseFactory","_params","_agAwareComponent","_frameworkComponentInstance","_eGui","agInit","getGui","AgGridAngular","elementDef","angularFrameworkOverrides","frameworkComponentWrapper","_initialised","_fullyReady","statusBar","sideBar","suppressContextMenu","preventDefaultOnContextMenu","allowContextMenuWithControlKey","suppressMenuHide","enableBrowserTooltips","tooltipShowDelay","tooltipHideDelay","tooltipMouseTrack","popupParent","copyHeadersToClipboard","copyGroupHeadersToClipboard","clipboardDelimiter","suppressCopyRowsToClipboard","suppressCopySingleCellRanges","suppressLastEmptyLineOnPaste","suppressClipboardPaste","suppressClipboardApi","columnDefs","defaultColDef","defaultColGroupDef","columnTypes","maintainColumnOrder","suppressFieldDotNotation","deltaColumnMode","applyColumnDefOrder","immutableColumns","suppressSetColumnStateEvents","suppressColumnStateEvents","colWidth","minColWidth","maxColWidth","headerHeight","groupHeaderHeight","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","allowDragFromColumnsToolPanel","suppressMovableColumns","suppressColumnMoveAnimation","suppressDragLeaveHidesColumns","colResizeDefault","autoSizePadding","skipHeaderOnAutoSize","components","frameworkComponents","editType","suppressClickEdit","readOnlyEdit","stopEditingWhenCellsLoseFocus","enterMovesDown","enterMovesDownAfterEdit","undoRedoCellEditing","undoRedoCellEditingLimit","stopEditingWhenGridLosesFocus","defaultCsvExportParams","suppressCsvExport","defaultExcelExportParams","suppressExcelExport","excelStyles","defaultExportParams","quickFilterText","cacheQuickFilter","excludeChildrenWhenTreeDataFiltering","enableCharts","chartThemes","customChartThemes","chartThemeOverrides","loadingCellRenderer","loadingCellRendererFramework","loadingCellRendererParams","loadingCellRendererSelector","localeText","masterDetail","keepDetailRows","keepDetailRowsCount","detailCellRenderer","detailCellRendererFramework","detailCellRendererParams","detailRowHeight","detailRowAutoHeight","alignedGrids","tabIndex","rowBuffer","valueCache","valueCacheNeverExpires","enableCellExpressions","suppressParentsInRowNodes","suppressTouch","suppressFocusAfterRefresh","suppressAsyncEvents","suppressBrowserResizeObserver","suppressPropertyNamesCheck","suppressChangeDetection","overlayLoadingTemplate","loadingOverlayComponent","loadingOverlayComponentFramework","loadingOverlayComponentParams","suppressLoadingOverlay","overlayNoRowsTemplate","noRowsOverlayComponent","noRowsOverlayComponentFramework","noRowsOverlayComponentParams","suppressNoRowsOverlay","pagination","paginationPageSize","paginationAutoPageSize","paginateChildRows","suppressPaginationPanel","pivotMode","pivotPanelShow","pivotColumnGroupTotals","pivotRowTotals","pivotSuppressAutoColumn","suppressExpandablePivotGroups","functionsReadOnly","aggFuncs","suppressAggFuncInHeader","suppressAggAtRootLevel","aggregateOnlyChangedColumns","suppressAggFilteredOnly","removePivotHeaderRowWhenSingleValueColumn","animateRows","cellFlashDelay","cellFadeDelay","domLayout","ensureDomOrder","enableRtl","suppressColumnVirtualisation","suppressMaxRenderedRowRestriction","suppressRowVirtualisation","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragEntireRow","rowDragMultiRow","fullWidthCellRenderer","fullWidthCellRendererFramework","fullWidthCellRendererParams","embedFullWidthRows","deprecatedEmbedFullWidthRows","groupDisplayType","groupDefaultExpanded","autoGroupColumnDef","groupMaintainOrder","groupSelectsChildren","groupAggFiltering","groupIncludeFooter","groupIncludeTotalFooter","groupSuppressBlankHeader","groupSelectsFiltered","showOpenedGroup","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupHideOpenParents","rowGroupPanelShow","groupRowRenderer","groupRowRendererFramework","groupRowRendererParams","suppressMakeColumnVisibleAfterUnGroup","treeData","groupRowInnerRenderer","groupRowInnerRendererFramework","groupMultiAutoColumn","groupUseEntireRow","groupSuppressAutoColumn","rememberGroupStateWhenNewData","pinnedTopRowData","pinnedBottomRowData","rowModelType","rowData","immutableData","asyncTransactionWaitMillis","suppressModelUpdateAfterUpdateTransaction","deltaRowDataMode","batchUpdateWaitMillis","datasource","cacheOverflowSize","infiniteInitialRowCount","serverSideStoreType","cacheBlockSize","maxBlocksInCache","maxConcurrentDatasourceRequests","blockLoadDebounceMillis","purgeClosedRowNodes","serverSideDatasource","serverSideSortingAlwaysResets","serverSideFilteringAlwaysResets","suppressEnterpriseResetOnNewColumns","viewportDatasource","viewportRowModelPageSize","viewportRowModelBufferSize","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debounceVerticalScrollbar","suppressHorizontalScroll","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","suppressAnimationFrame","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","scrollbarWidth","rowSelection","rowMultiSelectWithClick","suppressRowDeselection","suppressRowClickSelection","suppressCellSelection","suppressCellFocus","suppressMultiRangeSelection","enableCellTextSelection","enableRangeSelection","enableRangeHandle","enableFillHandle","fillHandleDirection","suppressClearOnFillReduction","accentedSort","suppressMultiSort","alwaysMultiSort","multiSortKey","suppressMaintainUnsortedOrder","rowHeight","rowStyle","rowClass","rowClassRules","suppressRowHoverHighlight","suppressRowTransform","columnHoverHighlight","deltaSort","treeDataDisplayType","angularCompileRows","angularCompileFilters","functionsPassive","enableGroupEdit","getContextMenuItems","getMainMenuItems","postProcessPopup","processCellForClipboard","processHeaderForClipboard","processGroupHeaderForClipboard","processCellFromClipboard","sendToClipboard","processDataFromClipboard","isExternalFilterPresent","doesExternalFilterPass","getChartToolbarItems","createChartContainer","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","localeTextFunc","getLocaleText","getDocument","paginationNumberFormatter","groupRowAggNodes","getGroupRowAgg","isGroupOpenByDefault","initialGroupOrderComparator","defaultGroupOrderComparator","processSecondaryColDef","processSecondaryColGroupDef","getDataPath","defaultGroupSortComparator","getChildCount","getServerSideStoreParams","isServerSideGroupOpenByDefault","isApplyServerSideTransaction","isServerSideGroup","getServerSideGroupKey","getBusinessKeyForNode","getRowNodeId","getRowId","resetRowDataOnUpdate","processRowPostCreate","isRowSelectable","isRowMaster","fillOperation","postSort","postSortRows","getRowStyle","getRowClass","getRowHeight","isFullWidthCell","isFullWidthRow","toolPanelVisibleChanged","pasteStart","pasteEnd","columnVisible","columnPinned","columnResized","columnMoved","columnValueChanged","columnPivotModeChanged","columnPivotChanged","columnGroupOpened","newColumnsLoaded","gridColumnsChanged","displayedColumnsChanged","virtualColumnsChanged","columnEverythingChanged","componentStateChanged","cellValueChanged","cellEditRequest","rowValueChanged","cellEditingStarted","cellEditingStopped","rowEditingStarted","rowEditingStopped","filterOpened","filterChanged","filterModified","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","cellKeyDown","cellKeyPress","gridReady","firstDataRendered","gridSizeChanged","modelUpdated","virtualRowRemoved","viewportChanged","bodyScroll","bodyScrollEnd","dragStarted","dragStopped","paginationChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","columnRowGroupChanged","rowGroupOpened","expandOrCollapseAll","pinnedRowDataChanged","rowDataChanged","rowDataUpdated","asyncTransactionsFlushed","cellClicked","cellDoubleClicked","cellFocused","cellMouseOver","cellMouseOut","cellMouseDown","rowClicked","rowDoubleClicked","rowSelected","selectionChanged","cellContextMenu","rangeSelectionChanged","sortChanged","columnRowGroupChangeRequest","columnPivotChangeRequest","columnValueChangeRequest","columnAggFuncChangeRequest","_nativeElement","gridOptions","ComponentUtil","gridParams","globalEventListener","frameworkOverrides","providedBeanInstances","modules","columns","Grid","columnApi","resolveNow","emitter","hasEmitter","asEventName","HTMLElement","Output","AgGridModule_1","makeNull","exists","allowEmptyString","missing","missingOrEmpty","toStringOrNull","attrToNumber","isNaN","valueParsed","parseInt","attrToBoolean","arr_1","GenericUtils","freeze","attrToString","referenceCompare","jsonEquals","val1","val2","defaultComparator","valueA","valueB","accentedCompare","valueAMissing","valueBMissing","toNumber","doQuickCompare","localeCompare","ColumnKeyCreator","existingKeys","addExistingKeys","getUniqueKey","colField","idToTry","iterateObject","cloneObject","copy","deepCloneDefinition","keysToSkip","res","sourceIsSimpleObject","isNonNullObject","getProperty","copyPropertyIfPresent","getAllKeysInObjects","objects","allValues","getAllValuesInObject","anyObject","ret","propertyIsEnumerable","mergeDeep","copyUndefined","makeCopyOfSimpleObjects","sourceValue","destValue","getValueUsingField","fieldContainsDots","currentObject","removeAllReferences","objectName","defineProperties","ObjectUtils","deepCloneObject","copyPropertiesIfPresent","_i","missingOrEmptyObject","objectToRead","objectToUpdate","deepFreeze","FUNCTION_STRIP_COMMENTS","FUNCTION_ARGUMENT_NAMES","doOnceFlags","doOnce","func","getFunctionName","funcConstructor","executeInAWhile","funcs","executeAfter","executeNextVMTurnFuncs","executeNextVMTurnPending","executeNextVMTurn","funcsCopy","milliseconds","wait","immediate","callNow","throttle","previousCall","currentCall","waitUntil","condition","timeoutMessage","timeStamp","executed","internalCallback","reachedTimeout","clearInterval","callIfPresent","FunctionUtils","getFunctionParameters","fnStr","compose","arg","composed","Context","beanWrappers","beanClasses","contextParams","createBeans","beanInstances","getBeanInstances","wireBeans","beanEntry","beanInstance","createBean","bean","afterPreCreateCallback","autoWireBeans","methodWireBeans","callLifeCycleMethods","_this","createBeanWrapper","constructorParamsMeta","__agBeanMetaData","autowireMethods","agConstructor","constructorParams","getBeansForParameters","newInstance","applyToConstructor","argArray","createdBeanNames","BeanClass","metaData","beanName","forEachMetaDataInHierarchy","agClassAttributes","attribute","otherBean","lookupBeanInstance","attributeName","methodName","wireParams","initParams","getBeanName","constructorString","parameters","beansList","paramIndex","otherBeanName","wiringBean","lifeCycleMethod","callLifeCycleMethodsOnBean","methodToIgnore","allMethods","getBean","destroyBeans","destroyBean","beans","PreConstruct","descriptor","getOrCreateProps","preConstructMethods","PostConstruct","postConstructMethods","PreDestroy","preDestroyMethods","Bean","classConstructor","Autowired","propertyKey","autowiredFunc","Optional","classPrototype","methodOrAttributeName","Qualifier","ModuleNames","decorators","d","Reflect","decorate","__param","decorator","EventService","allSyncListeners","allAsyncListeners","globalSyncListeners","globalAsyncListeners","asyncFunctionsQueue","firedEvents","setBeans","loggerFactory","gridOptionsWrapper","useAsyncEvents","addGlobalListener","getListeners","autoCreateListenerCollection","listenerMap","noRegisteredListenersExist","removeGlobalListener","dispatchToListeners","dispatchEventOnce","dispatchAsync","flushAsyncQueue","queueCopy","Constants","ROW_BUFFER_SIZE","LAYOUT_INTERVAL","BATCH_WAIT_MILLIS","EXPORT_TYPE_DRAG_COPY","EXPORT_TYPE_CLIPBOARD","EXPORT_TYPE_EXCEL","EXPORT_TYPE_CSV","ROW_MODEL_TYPE_INFINITE","ROW_MODEL_TYPE_VIEWPORT","ROW_MODEL_TYPE_CLIENT_SIDE","ROW_MODEL_TYPE_SERVER_SIDE","ALWAYS","ONLY_WHEN_GROUPING","PINNED_TOP","PINNED_BOTTOM","DOM_LAYOUT_NORMAL","DOM_LAYOUT_PRINT","DOM_LAYOUT_AUTO_HEIGHT","GROUP_AUTO_COLUMN_ID","SOURCE_PASTE","PINNED_RIGHT","PINNED_LEFT","SORT_ASC","SORT_DESC","INPUT_SELECTOR","FOCUSABLE_SELECTOR","FOCUSABLE_EXCLUDE","exports","CommunityCoreModule","CommunityAllModules","InfiniteRowModelModule","ClientSideRowModelModule","CsvExportModule","EnterpriseCoreModule","EnterpriseAllModules","RowGroupingModule","ColumnToolPanelModule","FiltersToolPanelModule","MenuModule","SetFilterModule","MultiFilterModule","StatusBarModule","SideBarModule","RangeSelectionModule","MasterDetailModule","RichSelectModule","GridChartsModule","ViewportRowModelModule","ServerSideRowModelModule","ExcelExportModule","SparklinesModule","AngularModule","ReactModule","VueModule","PolymerModule","ModuleRegistry","module","moduleBased","modulesMap","moduleName","registerModules","assertRegistered","isRegistered","warningMessage","getRegisteredModules","isPackageBased","__decorate$1","instanceIdSequence","Column","userProvidedColDef","primary","instanceId","moving","menuVisible","filterActive","eventService","rowGroupActive","pivotActive","aggregationActive","setState","getInstanceId","visible","setPinned","setColDef","initMinAndMaxWidths","initDotNotation","getUserProvidedColDef","getParent","setOriginalParent","originalParent","getOriginalParent","initialise","resetActualWidth","validate","suppressDotNotation","isSuppressFieldDotNotation","tooltipFieldContainsDots","columnUtils","calculateColMinWidth","calculateColMaxWidth","calculateColInitialWidth","setActualWidth","isEmptyGroup","isRowGroupDisplayed","isPrimary","isFilterAllowed","isFieldContainsDots","isTooltipFieldContainsDots","colDefAny","warnOnce","isRowModelDefault","isTreeData","pinnedRowValueGetter","createColumnFunctionCallbackParams","rowNode","getContext","getApi","getColumnApi","isSuppressNavigable","userFunc","isCellEditable","isEnableGroupEdit","isColumnFunc","isSuppressFillHandle","isAutoHeight","isRowDrag","isDndSource","isCellCheckboxSelection","isSuppressPaste","isResizable","setMoving","createColumnEvent","EVENT_MOVING_CHANGED","gridApi","isMoving","getSort","setSort","EVENT_SORT_CHANGED","setMenuVisible","EVENT_MENU_VISIBLE_CHANGED","isMenuVisible","isSortAscending","isSortDescending","isSortNone","isSorting","getSortIndex","setSortIndex","sortOrder","setAggFunc","getAggFunc","getLeft","getOldLeft","oldLeft","getRight","actualWidth","setLeft","EVENT_LEFT_CHANGED","isFilterActive","setFilterActive","additionalEventAttributes","EVENT_FILTER_ACTIVE_CHANGED","filterChangedEvent","EVENT_FILTER_CHANGED","setFirstRightPinned","firstRightPinned","EVENT_FIRST_RIGHT_PINNED_CHANGED","setLastLeftPinned","lastLeftPinned","EVENT_LAST_LEFT_PINNED_CHANGED","isFirstRightPinned","isLastLeftPinned","isPinned","isPinnedLeft","isPinnedRight","getPinned","setVisible","newValue","EVENT_VISIBLE_CHANGED","isVisible","getColDef","getColumnGroupShow","getColId","getId","getUniqueId","getDefinition","getActualWidth","createBaseColDefParams","getColSpan","getRowSpan","silent","fireColumnWidthChangedEvent","EVENT_WIDTH_CHANGED","isGreaterThanMax","getMinWidth","getMaxWidth","getFlex","setFlex","setMinimum","setRowGroupActive","EVENT_ROW_GROUP_CHANGED","isRowGroupActive","setPivotActive","EVENT_PIVOT_CHANGED","isPivotActive","isAnyFunctionActive","isValueActive","isAnyFunctionAllowed","isAllowPivot","isAllowRowGroup","isAllowValue","setValueActive","EVENT_VALUE_CHANGED","getMenuTabs","defaultValues","isLockPosition","isLockVisible","isLockPinned","firstExistingValue","last","areEqual","sortNumerically","array","removeFromArray","removeAllFromArray","toRemove","insertIntoArray","toIndex","moveInArray","objectsToMove","reverse","includes","pushAll","ArrayUtils","existsAndNotEmpty","compareArrays","array1","array2","shallowCompare","arr1","arr2","removeRepeatsFromArray","insertArrayIntoArray","flatten","arrayOfArrays","toStrings","forEachReverse","ColumnGroup","providedColumnGroup","displayedChildren","localEventService","createUniqueId","allLeafColumns","getProvidedColumnGroup","getLeafColumns","col","checkLeft","child","isEnableRtl","lastChildLeft","firstChildLeft","createAgEvent","getGroupId","isChildInThisGroupDeepSearch","wantedChild","foundChild","groupActualWidth","groupChild","addChild","getDisplayedChildren","addLeafColumns","getDisplayedLeafColumns","addDisplayedLeafColumns","getColGroupDef","isPadding","isExpandable","isExpanded","setExpanded","expanded","leafColumns","getChildren","getOriginalColumnGroup","getPaddingLevel","calculateDisplayedColumns","parentWithExpansion","EVENT_DISPLAYED_CHILDREN_CHANGED","HEADER_GROUP_SHOW_OPEN","HEADER_GROUP_SHOW_CLOSED","__decorate$2","ProvidedColumnGroup","colGroupDef","padding","expandable","getLevel","EVENT_EXPANDED_CHANGED","setChildren","setupExpandable","setExpandable","onColumnVisibilityChanged","atLeastOneShowingWhenOpen","atLeastOneShowingWhenClosed","atLeastOneChangeable","findChildrenRemovingPadding","abstractColumn","headerGroupShow","EVENT_EXPANDABLE_CHANGED","items","DefaultColumnTypes","numericColumn","rightAligned","AG_GRID_STOP_PROPAGATION","PASSIVE_EVENTS","supports","stopPropagationForAgGrid","isStopPropagationForAgGrid","isEventSupported","tags","select","load","abort","getCtrlForEvent","sourceElement","renderedComp","getDomData","isElementInEventPath","getEventPath","createEventPath","pointer","eventNoType","__agGridEventPath","addSafePassiveEventListener","eElement","isPassive","passive","EventUtils","addChangeListener","addAgGridEventPath","__decorate$3","BeanStub","destroyFunctions","__v_skip","isAlive","getFrameworkOverrides","EVENT_DESTROYED","dispatchEventAsync","addManagedListener","destroyFunc","addDestroyFunc","createManagedBean","__extends","extendStatics","__proto__","__","__decorate$4","__param$1","ColumnFactory","_super","createColumnTree","defs","primaryColumns","existingTree","columnKeyCreator","_a","extractExistingTreeData","existingCols","existingGroups","existingColKeys","unbalancedTree","recursivelyCreateColumns","treeDept","findMaxDept","columnTree","balanceColumnTree","depthFirstOriginalTreeSearch","createForAutoGroups","autoGroupCols","gridBalancedTree","createAutoGroupTreeItem","balancedColumnTree","nextChild","findDepth","autoGroup","dept","currentDept","columnDept","originalGroup","newChildren","firstPaddedGroup","currentPaddedGroup","newColId","colGroupDefMerged","createMergedColGroupDef","paddedGroup","leaf","treeChildren","maxDeptThisLevel","newDept","existingColsCopy","isColumnGroup","createColumnGroup","createColumn","existingColumns","providedGroup","existingGroup","findExistingGroup","getDefaultColGroupDef","checkForDeprecatedItems","colDefMerged","mergeColDefs","findExistingColumn","applyColumnState","widthBeforeUpdate","newColDef","existingCol","existingColDef","newHasField","newGroupDef","getDefaultColDef","columnType","assignColumnTypes","typeKeys","allColumnTypes","getColumnTypes","typeColDef","colDefNoType","headerGroup","suppressRowGroup","suppressAggregation","displayName","abstractColDef","Events","EVENT_COLUMN_EVERYTHING_CHANGED","EVENT_NEW_COLUMNS_LOADED","EVENT_COLUMN_PIVOT_MODE_CHANGED","EVENT_COLUMN_ROW_GROUP_CHANGED","EVENT_EXPAND_COLLAPSE_ALL","EVENT_COLUMN_PIVOT_CHANGED","EVENT_GRID_COLUMNS_CHANGED","EVENT_COLUMN_VALUE_CHANGED","EVENT_COLUMN_MOVED","EVENT_COLUMN_VISIBLE","EVENT_COLUMN_PINNED","EVENT_COLUMN_GROUP_OPENED","EVENT_COLUMN_RESIZED","EVENT_DISPLAYED_COLUMNS_CHANGED","EVENT_VIRTUAL_COLUMNS_CHANGED","EVENT_ASYNC_TRANSACTIONS_FLUSHED","EVENT_ROW_GROUP_OPENED","EVENT_ROW_DATA_CHANGED","EVENT_ROW_DATA_UPDATED","EVENT_PINNED_ROW_DATA_CHANGED","EVENT_RANGE_SELECTION_CHANGED","EVENT_CHART_CREATED","EVENT_CHART_RANGE_SELECTION_CHANGED","EVENT_CHART_OPTIONS_CHANGED","EVENT_CHART_DESTROYED","EVENT_TOOL_PANEL_VISIBLE_CHANGED","EVENT_COLUMN_PANEL_ITEM_DRAG_START","EVENT_COLUMN_PANEL_ITEM_DRAG_END","EVENT_MODEL_UPDATED","EVENT_PASTE_START","EVENT_PASTE_END","EVENT_FILL_START","EVENT_FILL_END","EVENT_CELL_CLICKED","EVENT_CELL_DOUBLE_CLICKED","EVENT_CELL_MOUSE_DOWN","EVENT_CELL_CONTEXT_MENU","EVENT_CELL_VALUE_CHANGED","EVENT_CELL_EDIT_REQUEST","EVENT_ROW_VALUE_CHANGED","EVENT_CELL_FOCUSED","EVENT_FULL_WIDTH_ROW_FOCUSED","EVENT_ROW_SELECTED","EVENT_SELECTION_CHANGED","EVENT_CELL_KEY_DOWN","EVENT_CELL_KEY_PRESS","EVENT_CELL_MOUSE_OVER","EVENT_CELL_MOUSE_OUT","EVENT_FILTER_MODIFIED","EVENT_FILTER_OPENED","EVENT_VIRTUAL_ROW_REMOVED","EVENT_ROW_CLICKED","EVENT_ROW_DOUBLE_CLICKED","EVENT_GRID_READY","EVENT_GRID_SIZE_CHANGED","EVENT_VIEWPORT_CHANGED","EVENT_SCROLLBAR_WIDTH_CHANGED","EVENT_FIRST_DATA_RENDERED","EVENT_DRAG_STARTED","EVENT_DRAG_STOPPED","EVENT_CHECKBOX_CHANGED","EVENT_ROW_EDITING_STARTED","EVENT_ROW_EDITING_STOPPED","EVENT_CELL_EDITING_STARTED","EVENT_CELL_EDITING_STOPPED","EVENT_BODY_SCROLL","EVENT_BODY_SCROLL_END","EVENT_HEIGHT_SCALE_CHANGED","EVENT_PAGINATION_CHANGED","EVENT_COMPONENT_STATE_CHANGED","EVENT_BODY_HEIGHT_CHANGED","EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED","EVENT_SCROLL_VISIBILITY_CHANGED","EVENT_COLUMN_HOVER_CHANGED","EVENT_FLASH_CELLS","EVENT_PAGINATION_PIXEL_OFFSET_CHANGED","EVENT_DISPLAYED_ROWS_CHANGED","EVENT_LEFT_PINNED_WIDTH_CHANGED","EVENT_RIGHT_PINNED_WIDTH_CHANGED","EVENT_ROW_CONTAINER_HEIGHT_CHANGED","EVENT_ROW_DRAG_ENTER","EVENT_ROW_DRAG_MOVE","EVENT_ROW_DRAG_LEAVE","EVENT_ROW_DRAG_END","EVENT_POPUP_TO_FRONT","EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST","EVENT_COLUMN_PIVOT_CHANGE_REQUEST","EVENT_COLUMN_VALUE_CHANGE_REQUEST","EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST","EVENT_KEYBOARD_FOCUS","EVENT_MOUSE_FOCUS","EVENT_STORE_UPDATED","GroupInstanceIdCreator","existingIds","getInstanceIdForKey","lastResult","reUnescapedHtml","HTML_ESCAPES","camelCaseToHyphen","g","hyphenToCamelCase","capitalise","substr","escapeString","toEscape","chr","camelCaseToHumanText","camelCase","word","StringUtils","utf8_encode","stringFromCharCode","fromCharCode","createByte","encodeCodePoint","symbol","checkScalarValue","codePoints","ucs2decode","string","extra","len","counter","charCodeAt","byteString","pair","MapUtils","mapById","__extends$1","__decorate$5","__param$2","__values","Symbol","TypeError","__read","ar","return","__spread","ColumnModel","primaryHeaderRowCount","secondaryHeaderRowCount","gridHeaderRowCount","displayedColumnsLeft","displayedColumnsRight","displayedColumnsCenter","displayedColumns","displayedColumnsAndGroupsMap","viewportColumns","viewportColumnsCenter","autoHeightActiveAtLeastOnce","rowGroupColumns","valueColumns","pivotColumns","ready","autoGroupsNeedBuilding","forceRecreateAutoGroups","bodyWidth","leftWidth","rightWidth","bodyWidthDirty","colDefVersion","flexColsCalculatedAtLestOnce","isSuppressColumnVirtualisation","isPivotMode","isPivotSettingAllowed","usingTreeData","onAutoGroupColumnDefChanged","onDefaultColDefChanged","updateGridColumns","updateDisplayedColumns","createColumnsFromColumnDefs","getColDefVersion","setColumnDefs","colsPreviouslyExisted","raiseEventsFunc","compareColumnStatesAndRaiseEvents","expire","oldPrimaryColumns","balancedTreeResult","columnFactory","primaryColumnTree","getColumnsFromTree","primaryColumnsMap","extractRowGroupColumns","extractPivotColumns","extractValueColumns","gridColsArePrimary","isMaintainColumnOrder","orderGridColumnsLikePrimary","checkViewportColumns","dispatchEverythingChanged","dispatchNewColumnsLoaded","gridColumns","colA","colB","primaryIndexA","primaryIndexB","indexAPresent","indexBPresent","getAllDisplayedAutoHeightCols","displayedAutoHeightCols","setViewport","viewportLeft","viewportRight","getDisplayedColumnsStartingAt","currentColumn","getDisplayedColAfter","hashBefore","extractViewport","setViewportPosition","setPivotMode","getSecondaryPivotColumn","pivotKeys","valueColKey","secondaryColumns","valueColumnToFind","getPrimaryColumn","foundColumn","thisPivotKeys","pivotValueColumn","setFirstRightAndLastLeftPinned","lastLeft","firstRight","autoSizeColumns","skipHeader","skipHeaderGroups","stopAtGroup","animationFrameService","flushAllFrames","columnsAutosized","changesThisTimeAround","shouldSkipHeader","isSkipHeaderOnAutoSize","shouldSkipHeaderGroups","actionOnGridColumns","preferredWidth","autoWidthCalculator","getPreferredWidthForColumn","newWidth","normaliseColumnWidth","autoSizeColumnGroupsByColumns","fireColumnResizedEvent","finished","flexColumns","autoSizeColumn","e_1","e_2","_b","headerGroupCtrl","columnGroups","getGridColumns","columnGroups_1","columnGroups_1_1","columnGroup","_c","ctrlsService","getHeaderRowContainerCtrls","_d","getHeaderCtrlForColumn","e_2_1","resizeLeafColumnsToFit","e_1_1","autoSizeAllColumns","allDisplayedColumns","getAllDisplayedColumns","rootColumns","recursiveFindColumns","getAllDisplayedTrees","displayedTreeLeft","displayedTreeRight","displayedTreeCentre","getPrimaryColumnTree","getHeaderRowCount","getDisplayedTreeLeft","getDisplayedTreeRight","getDisplayedTreeCentre","isColumnDisplayed","getViewportColumns","getDisplayedLeftColumnsForRow","colSpanActive","getDisplayedColumnsForRow","getDisplayedRightColumnsForRow","filterCallback","emptySpaceBeforeColumn","out_i_1","lastConsideredCol","_loop_1","filterPasses","maxAllowedColSpan","columnsToCheckFilter","colsToRemove","colForFilter","getViewportCenterColumnsForRow","isColumnInViewport","getAriaColumnIndex","getAllGridColumns","columnLeft","columnRight","leftBounds","rightBounds","getDisplayedColumnsLeftWidth","getWidthOfColsInList","getDisplayedColumnsRightWidth","updatePrimaryColumnList","masterList","actionIsAdd","columnCallback","atLeastOne","columnToAdd","setRowGroupColumns","colKeys","setPrimaryColumnList","isSuppressMakeColumnVisibleAfterUnGroup","addRowGroupColumn","addRowGroupColumns","removeRowGroupColumns","removeRowGroupColumn","addPivotColumns","setPivotColumns","added","addPivotColumn","removePivotColumns","removePivotColumn","fireColumnEvent","setValueColumns","aggFuncService","getDefaultAggFunc","addValueColumns","addValueColumn","colKey","removeValueColumn","removeValueColumns","getPrimaryOrGridColumn","getGridColumn","setColumnWidths","columnWidths","shiftKey","sets","columnWidth","ratios","getColResizeDefault","otherCol","widthDiff","otherColWidth","resizeColumnSets","resizeSets","checkMinAndMaxWidthsForSet","columnResizeSet","minWidthAccumulated","maxWidthAccumulated","maxWidthActive","changedCols","allResizedCols","newWidths","finishedCols","finishedColsGrew","loopCount","_loop_2","subsetCols","subsetRatioTotal","pixelsToDistribute","ratioScale","colNewWidth","atLeastOneColChanged","flexedCols","refreshFlexedColumns","resizingCols","skipSetLeft","setLeftValues","updateBodyWidths","colsForEvent","setColumnAggFunc","moveRowGroupColumn","fromIndex","moveColumns","columnsToMoveKeys","columnAnimationService","columnsToMove","doesMovePassRules","proposedColumnOrder","doesMovePassMarryChildren","doesMovePassLockedPositions","sortColumnsLikeGridColumns","cols","lastPlacement","rulePassed","placement","lockPositionToPlacement","allColumnsCopy","newIndexes","newColIndex","moveColumn","moveColumnByIndex","getColumnDefs","lastPrimaryOrder","columnDefFactory","buildColumnDefs","getBodyContainerWidth","getContainerWidth","newBodyWidth","newLeftWidth","newRightWidth","getValueColumns","getPivotColumns","getRowGroupColumns","getDisplayedCenterColumns","getDisplayedLeftColumns","getDisplayedRightColumns","getDisplayedColumns","getAllPrimaryColumns","getSecondaryColumns","getAllColumnsForQuickFilter","columnsForQuickFilter","isRowGroupEmpty","setColumnVisible","setColumnsVisible","setColumnPinned","setColumnsPinned","actualPinned","getDomLayout","createEvent","updatedColumns","event_4","getDisplayedColBefore","oldIndex","getDisplayedGroupAfter","getDisplayedGroupAtDirection","getDisplayedGroupBefore","requiredLevel","colGroupLeafColumns","getDisplayColMethod","groupPointer","getColumnGroupAtLevel","isPinningLeft","isPinningRight","getPrimaryAndSecondaryAndAutoColumns","groupAutoColumns","getPrimaryAndAutoGroupCols","getPrimaryAndSecondaryColumns","createStateItemFromColumn","getColumnState","orderColumnStateList","columnStateList","colIdToGridIndexMap","itemA","itemB","resetColumnState","columnStates","letRowGroupIndex","letPivotIndex","colsToProcess","getValueOrNull","stateItem","applyOrder","applyStates","getById","columnsWithNoState","rowGroupIndexes","pivotIndexes","autoGroupColumnStates","unmatchedAndAutoStates","unmatchedCount","previousRowGroupCols","previousPivotCols","syncColumnWithStateItem","defaultState","applyDefaultsFunc","indexes","oldList","indexA","indexB","aHasIndex","bHasIndex","oldIndexA","oldIndexB","aHasOldIndex","autoGroupColsCopy","autoCol","getAutoColumn","applyOrderAfterApplyState","getSecondaryColumn","newOrder","processedColIds","gridColumnsMap","autoGroupInsertIndex","placeLockedColumns","startState","columnStateBefore","columnStateBeforeMap","isSuppressColumnStateEvents","colsForState","raiseWhenListsDifferent","colsBefore","colsAfter","idMapper","getChangedColumns","changedPredicate","changedColumns","colStateBefore","columnIdMapper","cs","oldActive","activeChanged","aggFuncChanged","raiseColumnPinnedEvent","raiseColumnVisibleEvent","sortController","dispatchSortChangedEvents","raiseColumnMovedEvent","getCommonValue","firstValue","colStateAfter","colStateAfterMapped","colsIntersectIds","beforeFiltered","afterFiltered","movedColumns","csAfter","csBefore","gridCol","getValue","value1","value2","calculated","getColumns","columnLookupCallback","foundColumns","getColumnWithValidation","getColumn","secondaryColumnsMap","columnList","columnMap","columnsMatch","groupCol","columnMatches","colDefMatches","idMatches","getDisplayNameForColumn","includeAggFunc","getHeaderName","wrapHeaderNameWithAggFunc","getDisplayNameForProvidedColumnGroup","getDisplayNameForColumnGroup","expressionService","evaluate","isSuppressAggFuncInHeader","aggFuncFound","isCollapsedHeaderEnabled","isRemovePivotHeaderRowWhenSingleValueColumn","isTotalColumn","pivotTotalColumnIds","measureActive","aggregationPresent","aggFuncString","getLocaleTextFunc","getColumnGroup","allColumnGroups","checkInstanceId","depthFirstAllColumnTreeSearch","isReady","extractColumns","flag","previousCols","setFlagFunc","getIndexFunc","getInitialIndexFunc","getValueFunc","getInitialValueFunc","colsWithIndex","colsWithValue","colIsNew","initialValue","initialIndex","getIndexForCol","defaultIndex","resetColumnGroupState","stateItems","groupState","setColumnGroupState","getColumnGroupState","columnGroupState","impactedGroups","updateGroupsAndDisplayedColumns","setColumnGroupOpened","keyAsString","calculateColumnsForDisplay","isAutoGroupCol","isValueCol","checkColSpanActiveInCols","calculateColumnsForGroupDisplay","groupDisplayColumns","checkFunc","getGroupDisplayColumns","columnsForDisplay","buildDisplayedTrees","isSecondaryColumnsPresent","setSecondaryColumns","colDefs","newColsPresent","processSecondaryColumnDefinitions","secondaryBalancedTree","previousSecondaryColumns","getProcessSecondaryColDefFunc","groupCallback","getProcessSecondaryColGroupDefFunc","searchForColDefs","colDefs2","lastSecondaryOrder","hasSameColumns","orderGridColsLike","addAutoGroupToGridColumns","setupQuickFilterColumns","clearDisplayedAndViewportColumns","setAutoHeightActive","autoHeightActive","rowModel","colsOrder","lastOrderMapped","noColsFound","gridColsMap","oldColsOrdered","oldColsMap","newColsOrdered","newGridColumns","newCol","siblings","leafCol","presentInNewGriColumns","noYetInSiblings","isPrimaryColumnGroupsPresent","normal","createGroupAutoColumnsIfNeeded","autoColBalancedTree","viewportRowLeft","viewportRowRight","viewportRowCenter","updateOpenClosedVisibilityInColumnGroups","deriveDisplayedColumns","derivedDisplayedColumnsFromDisplayedTree","joinDisplayedColumns","isAutoRowHeightActive","wasAutoRowHeightEverActive","setLeftValuesOfColumns","setLeftValuesOfGroups","allColumns","doingRtl","left_1","left_2","tree","depthFirstDisplayedColumnTreeSearch","extractViewportColumns","filterOutColumnsWithinViewport","getVirtualHeaderGroupRow","extractViewportRows","virtualColIds","testGroup","returnValue","addThisItem","viewportWidth","flexViewportWidth","flexAfterDisplayIndex","indexOfCol","isColFlex","afterResizingCols","knownWidthColumns","flexingColumns","spaceForFlexingColumns","flexingColumnSizes","outer","totalFlex","widthByFlexRule","constrainedWidth","remainingSpace","fireResizedEvent","resetRowHeights","sizeColumnsToFit","gridWidth","colsToSpread","colsToNotSpread","colsToFireEventFor","finishedResizing","moveToNotSpread","availablePixels","scale","pixelsForLastCol","visibleColumns","leftVisibleColumns","rightVisibleColumns","centerVisibleColumns","groupInstanceIdCreator","displayedGroupCreator","createDisplayedGroups","updateDisplayedMap","isDisplayed","getGroupAutoColumns","groupFullWidthRow","isGroupUseEntireRow","suppressAutoColumn","isPivotSuppressAutoColumn","isGroupSuppressAutoColumn","newAutoGroupCols","autoGroupColService","createAutoGroupColumns","autoColsEqual","colsA","colsB","getGridBalancedTree","hasFloatingFilters","getFirstDisplayedColumn","queryOrder","__extends$2","ColumnUtils","getMinColWidth","getMaxColWidth","MAX_SAFE_INTEGER","colDefWidth","colDefInitialWidth","getColWidth","getOriginalPathForColumn","originalBalancedTree","recursePath","__decorate$6","__extends$3","DisplayedGroupCreator","sortedVisibleColumns","oldDisplayedGroups","previousRealPath","previousOriginalPath","oldColumnsMapped","mapOldGroupsById","currentOriginalPath","currentRealPath","firstColumn","newGroup","setupParentsIntoColumns","displayedGroups","recursive","columnsOrGroups","columnOrGroup","columnsOrGroup","__decorate$7","__read$1","PropertyKeys","STRING_PROPERTIES","OBJECT_PROPERTIES","ARRAY_PROPERTIES","NUMBER_PROPERTIES","BOOLEAN_PROPERTIES","ALL_PROPERTIES","__spread$1","FUNCTION_PROPERTIES","FRAMEWORK_PROPERTIES","__assign","__read$2","__spread$2","getEventCallbacks","EVENT_CALLBACKS","EVENTS","getCallbackForEvent","copyAttributesToGridOptions","skipEventDeprecationCheck","pGridOptions","keyExists","toBoolean","processOnChange","changesToApply","setRowClass","setEnableCellTextSelection","setQuickFilter","setAutoGroupColumnDef","setDefaultColDef","paginationSetPageSize","setGroupRemoveSingleChildren","setSuppressRowDrag","setSuppressMoveWhenRowDragging","setSuppressRowClickSelection","setSuppressClipboardPaste","setHeaderHeight","dynamicApi","setterName","PUBLIC_EVENTS","EXCLUDED_INTERNAL_EVENTS","__extends$4","AgStackComponentsRegistry","componentsMappedByName","setupComponents","componentMeta","addComponent","classUpperCase","componentName","componentClass","getComponentClass","htmlTag","__decorate$8","__read$3","ColDefUtil","__spread$3","__read$4","Color","fromString","fromHexString","hex","nameToHex","fromRgbaString","parseHex","stringToRgba","NaN","po","pc","contents","rgba","fromArray","fromHSB","h","alpha","rgb","HSBtoRGB","padHex","toHexString","toRgbaString","fractionDigits","toHSB","RGBtoHSB","H","delta","rc","gc","bc","S","B","q","derive","hueShift","saturationFactor","brightnessFactor","opacityFactor","hsb","brighter","darker","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","isSafari","isIE","isEdge","isChrome","isFirefox","isIOS","invisibleScrollbar","browserScrollbarWidth","CsvUtils","stringToArray","strData","delimiter","isNewline","char","insideQuotedField","out_row_1","out_column_1","out_position_1","row","previousChar","currentChar","nextChar","ensureDataExists","isBrowserEdge","isBrowserIE","documentMode","StyleMedia","isBrowserSafari","isBrowserChrome","win","webstore","runtime","vendor","isBrowserFirefox","InstallTrigger","isIOSUserAgent","platform","maxTouchPoints","MSStream","getTabIndex","numberTabIndex","getAttribute","getMaxDivHeight","testUpTo","div","getScrollbarWidth","initScrollbarWidthAndVisibility","opacity","overflow","msOverflowStyle","offsetWidth","isInvisibleScrollbar","getBodyWidth","getBodyHeight","rtlNegativeScroll","BrowserUtils","hasOverflowScrolling","prefixes","getElementsByTagName","prefix","computedStyle","overflowScrolling","prefixes_1","__values$1","prefixes_1_1","isFocusableFormField","msMatchesSelector","isFocusable","isNotFocusable","isElementVisible","setDisplayed","displayed","setDisabled","addOrRemoveDisabledAttribute","nodeListForEach","isElementChildOfClass","cls","maxNest","getElementSize","paddingTop","paddingRight","paddingBottom","paddingLeft","boxSizing","getInnerHeight","getInnerWidth","getAbsoluteHeight","ceil","offsetHeight","getAbsoluteWidth","isRtlNegativeScroll","innerHTML","getScrollLeft","rtl","setScrollLeft","clearElement","firstChild","removeFromParent","offsetParent","loadTemplate","DOMParser","parseFromString","tempDiv","eContainer","eChild","eChildBefore","insertAdjacentElement","setDomChildOrder","orderedChildren","correctCellAtIndex","actualCellAtIndex","insertWithDomOrder","eToInsert","addStylesToElement","keyCamelCase","isHorizontalScrollShowing","isVerticalScrollShowing","setElementWidth","removeProperty","setFixedWidth","formatSize","setFixedHeight","nodeName","isElement","isNodeOrElement","copyNodeList","nodeList","iterateNamedNodeMap","addOrRemoveAttribute","DomUtils","radioCssClass","elementClass","otherElementClass","sibling","removeElement","cssSelector","appendHtml","htmlTemplate","lastChild","insertAdjacentHTML","getElementAttribute","prependDC","documentFragment","setElementHeight","setCheckboxState","eCheckbox","GeneralUtils","getNameOfClass","funcAsString","findLineByLeastSquares","maxDecimals","splitExponent","sum_x","sum_y","sum_xy","sum_xx","toFixed","cssStyleObjectToMarkup","stylesToUse","resParts","styleKey","styleValue","styleKeyDashed","eMessage","eBox","bindCellRendererToHtmlElement","cellRendererPromise","eTarget","gui","setAriaAttribute","ariaAttributeName","removeAriaAttribute","setAriaRole","getAriaSortState","getAriaLevel","getAriaPosInSet","setAriaLabel","setAriaLabelledBy","labelledBy","setAriaDescription","setAriaDescribedBy","describedby","setAriaLevel","setAriaDisabled","setAriaExpanded","removeAriaExpanded","setAriaSetSize","setsize","setAriaPosInSet","setAriaMultiSelectable","multiSelectable","setAriaRowCount","rowCount","setAriaRowIndex","rowIndex","setAriaColCount","colCount","setAriaColIndex","colIndex","setAriaColSpan","setAriaSort","removeAriaSort","setAriaSelected","selected","setAriaChecked","AriaUtils","getAriaDescribedBy","padStartWidthZeros","totalStringSize","createArrayOfNumbers","isFinite","formatNumberCommas","thousandSeparator","decimalSeparator","NumberUtils","cleanNumber","decToHex","number","bytes","formatNumberTwoDecimalPlacesAndCommas","sum","__read$5","serialiseDate","includeTime","serialised","getHours","getMinutes","getSeconds","parseDateTimeFromString","dateStr","timeStr","year","month","day","hours","minutes","seconds","setHours","setMinutes","setSeconds","DateUtils","fuzzyCheckStrings","inputValues","validValues","allSuggestions","fuzzyMatches","invalidInputs","inputValue","validValue","invalidInput","fuzzySuggestions","hideIrrelevant","weighted","search","string_weighted_distances","string_distances","thisSuggestions","relevance","toLocaleLowerCase","suggestion","get_bigrams","str1","str2","pairs1","pairs2","union","hit_count","len1","idx","FuzzyMatchUtils","iconNameClassMap","columnGroupClosed","columnSelectClosed","columnSelectOpen","columnSelectIndeterminate","columnMovePin","columnMoveHide","columnMoveMove","columnMoveLeft","columnMoveRight","columnMoveGroup","columnMoveValue","columnMovePivot","dropNotAllowed","groupContracted","groupExpanded","chart","check","previous","linked","unlinked","colorPicker","groupLoading","menu","maximize","minimize","menuPin","menuValue","menuAddRowGroup","menuRemoveRowGroup","clipboardCopy","clipboardPaste","pivotPanel","rowGroupPanel","valuePanel","columnDrag","csvExport","excelExport","smallDown","smallLeft","smallRight","smallUp","sortAscending","sortDescending","sortUnSort","createIcon","iconName","iconContents","createIconNoSpan","eResult","forceCreate","userProvidedIcon","optionsIcons","getIcons","span","rendererResult","IconUtils","NUMPAD_DEL_NUMLOCK_ON_KEY","NUMPAD_DEL_NUMLOCK_ON_CHARCODE","isEventFromPrintableCharacter","altKey","ctrlKey","metaKey","printableCharacter","numpadDelWithNumlockOnForEdgeOrIe","isNumpadDelWithNumLockOnForEdge","charCode","isUserSuppressingKeyboardEvent","keyboardEvent","editing","gridOptionsFunc","getSuppressKeyboardEventFunc","colDefFunc","isUserSuppressingHeaderKeyboardEvent","headerRowIndex","KeyboardUtils","areEventsNear","e1","e2","pixelCount","diffX","clientX","diffY","clientY","MouseUtils","RowNodeUtils","sortRowNodesByOrder","rowNodes","rowNodeOrder","nodeA","nodeB","positionA","positionB","__objectId","atLeastOneOutOfOrder","traverseNodesWithKey","keyParts","recursiveSearchNodes","currentNodes","hasChildren","childrenAfterGroup","convertToSet","SetUtils","__assign$1","NumberSequence","initValue","nextValue","valToReturn","peek","skip","AgPromiseStatus","IN_PROGRESS","resolution","waiters","onReject","all","promises","remainingToResolve","combinedValues","ifNotResolvedValue","ifResolved","waiter","__extends$5","Timer","print","__assign$2","__decorate$9","TooltipStates","NOTHING","WAITING_TO_SHOW","SHOWING","CustomTooltipFeature","parentComp","DEFAULT_SHOW_TOOLTIP_DELAY","DEFAULT_HIDE_TOOLTIP_DELAY","SHOW_QUICK_TOOLTIP_DIFF","FADE_OUT_TOOLTIP_TIMEOUT","tooltipInstanceCount","postConstruct","getTooltipDelay","isTooltipMouseTrack","onMouseEnter","onMouseLeave","onMouseMove","onMouseDown","onKeyDown","setToDoNothing","isLastTooltipHiddenRecently","showTooltipTimeoutId","showTooltip","lastMouseEvent","hideTooltip","clearTimeouts","tooltipComp","positionTooltipUnderLastMouseEvent","destroyTooltipComp","lastTooltipHideTime","tooltipPopupDestroyFunc","getTooltipParams","newTooltipComponentCallback","userComponentFactory","getTooltipCompDetails","newAgStackInstance","tooltipInstanceCopy","eGui","translate","addPopupRes","popupService","addPopup","ariaLabel","hideFunc","hideTooltipTimeoutId","positionPopupUnderMouseEvent","mouseEvent","ePopup","nudgeY","__extends$6","__decorate$a","compIdSequence","CssClassManager","cssClassStates","addCssClass","removeCssClass","containsCssClass","addOrRemoveCssClass","addOrRemove","Component","compId","cssClassManager","setTemplate","preConstructOnComponent","usingBrowserTooltips","isEnableBrowserTooltips","getCompId","tooltipText","setTooltip","newTooltipText","tooltipFeature","createChildComponentsFromTags","paramsMap","childNodes","childNode","childComp","createComponentFromElement","copyAttributesFromNode","addItems","swapComponentForNode","componentParams","ComponentClass","agStackComponentsRegistry","elementGettingCreated","newComponent","setParentComponent","eComponent","swapInComponentForQuerySelectors","thisNoType","iterateOverQuerySelectors","thisPrototype","__agComponentMetaData","currentProtoName","querySelectors","setTemplateFromElement","__agComponent","wireQuerySelectors","createChildComponentsPreConstruct","setResult","refSelector","resultOfQuery","getFocusableElement","parentComponent","getParentComponent","setGui","queryForHtmlElement","queryForHtmlInputElement","childComponent","EVENT_DISPLAYED_CHANGED","addGuiEventListener","getRefElement","refName","RefSelector","querySelectorFunc","addToObjectProps","getOrCreateProps$1","instanceName","__extends$7","__decorate$b","ReadOnlyFloatingFilter","columnModel","eFloatingFilterText","setInputAriaLabel","onParentModelChanged","parentModel","parentFilterInstance","filterInstance","getModelAsString","modelAsString","DateCompWrapper","dateComponentParams","eParent","alive","getDateCompDetails","dateComp","afterGuiAttached","tempValue","setDate","setDateCompDisabled","setInputPlaceholder","__assign$3","OptionsFactory","customFilterOptions","filterOptions","mapCustomOptions","selectDefaultItem","checkForDeprecatedParams","hideFilterInput","getFilterOptions","filterOption","mutatedFilterOptions","predicate","cv","numberOfInputs","displayKey","defaultOption","firstFilterOption","getDefaultOption","getCustomOption","DEFAULT_FILTER_LOCALE_TEXT","applyFilter","clearFilter","resetFilter","cancelFilter","textFilter","numberFilter","dateFilter","setFilter","filterOoo","notEqual","lessThan","greaterThan","inRange","inRangeStart","inRangeEnd","lessThanOrEqual","greaterThanOrEqual","notContains","endsWith","blank","notBlank","andCondition","orCondition","dateFormatOoo","KeyCode","BACKSPACE","TAB","ENTER","ESCAPE","SPACE","LEFT","UP","RIGHT","DOWN","DELETE","F2","PAGE_UP","PAGE_DOWN","PAGE_HOME","PAGE_END","A","C","V","D","Z","Y","__extends$8","__assign$4","__decorate$c","ManagedFocusFeature","eFocusableElement","shouldStopEventPropagation","onTabKeyDown","defaultPrevented","nextRoot","focusService","findNextFocusableElement","preventDefault","FOCUS_MANAGED_CLASS","addKeyDownListeners","onFocusIn","onFocusOut","handleKeyDown","__extends$9","__decorate$d","ProvidedFilter","filterNameKey","applyActive","hidePopup","appliedModel","resetTemplate","getFilterTitle","templateString","getCssIdentifier","createBodyTemplate","isReadOnly","providedFilterParams","readOnly","setParams","resetUiToDefaults","updateUiVisibility","setupOnBtApplyDebounce","isUseApplyButton","createButtonPanel","buttons","eButtonsPanel","clickListener","onBtApply","onBtClear","onBtReset","onBtCancel","addButton","getDefaultDebounceMs","debounceMs","getDebounceMs","onBtApplyDebounce","getModel","setModel","setModelIntoUi","applyModel","currentModel","afterAppliedFunc","onUiChanged","closeOnApply","newModel","getModelFromUi","isModelValid","previousModel","areModelsEqual","afterFloatingFilter","afterDataChange","filterChangedCallback","onNewRowsLoaded","fromFloatingFilter","filterModifiedCallback","isValid","debounceDefault","getCellValue","__extends$a","AgAbstractLabel","labelSeparator","labelAlignment","eLabel","labelWidth","setLabelSeparator","setLabel","setLabelWidth","setLabelAlignment","refreshLabel","innerText","getLabelId","getLabel","alignment","eGuiClassList","__decorate$e","__extends$b","AgAbstractField","onValueChange","callbackFn","EVENT_CHANGED","getWidth","setWidth","getPreviousValue","isDisabled","__extends$c","__decorate$f","AgPickerField","pickerIcon","ariaRole","isPickerDisplayed","isDestroyingPicker","skipClick","displayId","eDisplayField","eWrapper","clickHandler","pickerComponent","showPicker","icon","eIcon","setInputWidth","__extends$d","AgList","cssIdentifier","itemEls","highlightedEl","setValueByIndex","isDown","itemToHighlight","nextPos","highlightItem","addOptions","listOptions","listOption","addOption","sanitisedText","renderOption","updateIndices","itemEl","clearHighlighted","fireItemSelected","displayValue","fireChangeEvent","getDisplayValue","refreshHighlighted","ACTIVE_CLASS","EVENT_ITEM_SELECTED","__decorate$g","__extends$e","__decorate$h","AgSelect","listComponent","hideList","listGui","eDocument","destroyMouseWheelFunc","destroyFocusOutFunc","relatedTarget","modal","closeOnEsc","closedCallback","getPopupParent","positionPopupUnderComponent","eventSource","keepWithinBounds","fromPicker","__extends$f","__decorate$i","AgAbstractInputField","inputType","displayFieldTag","setInputType","eInput","addInputListeners","getInputElement","setInputName","setMaxLength","__extends$g","__decorate$j","ConditionPosition","One","Two","SimpleFilter","getNumberOfInputs","customOpts","optionsFactory","EMPTY","NOT_BLANK","BLANK","IN_RANGE","onFloatingFilterChanged","setTypeFromFloatingFilter","setValueFromFloatingFilter","eType1","eType2","isDefaultOperator","eJoinOperatorAnd","eJoinOperatorOr","isConditionUiComplete","isAllowTwoConditions","filterType","getFilterType","operator","getJoinOperator","condition1","createCondition","condition2","getConditionTypes","aIsSimple","bIsSimple","areSimpleModelsEqual","aCombined","bCombined","combinedModel","orChecked","setConditionIntoUi","simpleModel","doesFilterPass","models","individualConditionPasses","getDefaultFilterOptions","allowTwoConditions","suppressAndOrCondition","alwaysShowBothConditions","defaultJoinOperator","getDefaultJoinOperator","putOptionsIntoDropdown","addChangedListeners","eTypes","createBoilerplateListOption","createCustomListOption","eType","customOption","createValueTemplate","elementBodies","eCondition1Body","eCondition2Body","eJoinOperatorPanel","isConditionVisible","isConditionDisabled","isConditionBodyVisible","forEachInput","setElementDisplayed","setElementDisabled","resetPlaceholder","suppressFocus","firstInput","getInputs","globalTranslate","setElementValue","attachElementOnChange","getValues","filteringLabel","uniqueGroupId","setName","mapValuesFromModel","elPosition","filterModel","cellValue","customFilterOption","evaluateCustomFilter","evaluateNullValue","evaluateNonNullValue","isBlank","EQUALS","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","__extends$h","ScalarFilter","scalarFilterParams","includeBlanksInEquals","includeBlanksInGreaterThan","includeBlanksInLessThan","includeBlanksInRange","compareResult","compareToResult","inRangeInclusive","__extends$i","__assign$5","__decorate$k","DEFAULT_MIN_YEAR","DEFAULT_MAX_YEAR","Infinity","DateFilter","minValidYear","maxValidYear","dateCondition1FromComp","dateFrom","dateTo","dateFilterParams","filterDate","yearParser","param","createDateComponents","createDateCompWrapper","onDateChanged","eCondition1PanelFrom","dateCondition1ToComp","eCondition1PanelTo","dateCondition2FromComp","eCondition2PanelFrom","dateCondition2ToComp","eCondition2PanelTo","DEFAULT_FILTER_OPTIONS","getUTCFullYear","isValidDate","aSimple","bSimple","__extends$j","SimpleFloatingFilter","getTextFromModel","customOption1","customOption2","conditionToString","isEventFromFloatingFilter","getLastType","lastType","setLastTypeFromModel","canWeEditAfterModelFromParentFilter","isTypeEditable","setEditable","doesFilterHaveSingleInput","uneditableTypes","__extends$k","__decorate$l","DateFloatingFilter","isRange","createDateComponent","eReadOnlyText","eDateWrapper","allowEditing","filterValueText","__extends$l","DefaultDateComponent","inputElement","eDateInput","shouldUseBrowserDatePicker","browserDatePicker","__decorate$m","__extends$m","__decorate$n","NumberFilter","filterTo","numberFilterParams","allowedCharPattern","getAllowedCharPattern","agElementTag","stringToFloat","filterText","numberParser","eValueFrom1","eValueTo1","eValueFrom2","eValueTo2","__extends$n","__assign$6","__decorate$o","TextFilter","trimInput","trimmedInput","textFilterParams","matcher","getTextMatcher","formatter","textFormatter","caseSensitive","DEFAULT_FORMATTER","DEFAULT_LOWERCASE_FORMATTER","legacyComparator","textCustomComparator","textMatcher","DEFAULT_MATCHER","cleanValue","formattedValues","cellValueFormatted","matcherParams","lastIndexOf","__extends$o","__decorate$p","TextInputFloatingFilter","eFloatingFilterInput","toDebounce","syncUpWithParentFilter","filterGui","columnDef","__extends$p","NumberFloatingFilter","__extends$q","TextFloatingFilter","TouchListener","preventMouseClick","destroyFuncs","touching","startListener","onTouchStart","moveListener","onTouchMove","endListener","onTouchEnd","getActiveTouch","touchList","identifier","touchStart","touchEvent","touches","moved","touchStartCopy","EVENT_LONG_TAP","touch","EVENT_TAP","checkForDoubleTap","lastTapTime","DOUBLE_TAP_MILLIS","EVENT_DOUBLE_TAP","__extends$r","__decorate$q","HeaderComp","lastMovingChanged","refresh","workOutTemplate","currentTemplate","workOutShowMenu","currentShowMenu","workOutSort","currentSort","setDisplayName","TEMPLATE","setupTap","setupIcons","setMenu","setupSort","setupFilterIcon","currentDisplayName","displayNameSanitised","eText","addInIcon","eSortAsc","eSortDesc","eSortNone","eMenu","eFilter","isSuppressTouch","touchListener","isSuppressMenuHide","tapMenuButton","menuTouchListener","enableMenu","showColumnMenuAfterMouseClick","enableSorting","progressSort","menuHides","onIpadAndMenuHides","showMenu","menuFactory","showMenuAfterButtonClick","removeSortIcons","eSortOrder","sortUsingCtrl","isMultiSortKeyCtrl","nowTime","onSortChanged","setMultiSortOrder","alwaysHideNoSort","isUnSortIcon","allColumnsWithSorting","getColumnsWithSortingOrdered","indexThisCol","moreThanOneColSorting","showIndex","onFilterChanged","filterPresent","__extends$s","__decorate$r","HeaderGroupComp","checkWarnings","setupLabel","addGroupExpandIcon","setupExpandIcons","expandAction","newExpandedValue","addTouchAndClickListeners","eCloseIcon","eOpenIcon","stopPropagationAction","updateIconVisibility","__extends$t","PopupComponent","isPopup","__extends$u","LargeTextCellEditor","focusAfterAttached","cellStartedEdit","eTextArea","setCols","setRows","stopPropagation","parseValue","__decorate$s","__extends$v","__decorate$t","SelectCellEditor","startedByEnter","eventKey","valueFormatted","valueFormatterService","formatValue","eSelect","isFullRowEdit","stopEditing","focusIn","__extends$w","PopupSelectCellEditor","__extends$x","TextCellEditor","startValue","charPress","getStartValue","highlightAllOnFocus","inputEl","setSelectionRange","focusEl","useFormatter","__decorate$u","__extends$y","PopupTextCellEditor","__extends$z","AnimateShowChangeCellRenderer","refreshCount","eValue","eDelta","showDelta","absDelta","valueToUse","deltaUp","setTimerToRemoveDelta","refreshCountCopy","hideDeltaValue","filterManager","isSuppressFlashingCellsBecauseFiltering","__decorate$v","__extends$A","AnimateSlideCellRenderer","eCurrent","addSlideAnimation","ePrevious","__decorate$w","RowHighlightPosition","Above","Below","RowNode","childrenMapped","rowTop","oldRowTop","selectable","OBJECT_ID_SEQUENCE","__autoHeights","alreadyRendered","highlighted","onRowHeightChangedDebounced","onRowHeightChanged","setData","setDataCommon","updateData","oldData","onDataChanged","updateDataOnDetailNode","checkRowSelectable","createDataChangedEvent","dispatchLocalEvent","detailNode","newData","EVENT_DATA_CHANGED","createLocalRowEvent","getRowIndexString","rowPinned","createDaemonNode","oldNode","daemon","setDataAndId","setId","selectionService","syncInRowNode","isRowSelectableFunc","getIsRowSelectableFunc","setRowSelectable","EVENT_SELECTABLE_CHANGED","getRowIdFunc","parentKeys","getGroupKeys","ID_PREFIX_ROW_GROUP","excludeSelf","isPixelInRange","pixel","setFirstChild","EVENT_FIRST_CHILD_CHANGED","setLastChild","EVENT_LAST_CHILD_CHANGED","setChildIndex","childIndex","EVENT_CHILD_INDEX_CHANGED","setRowTop","EVENT_TOP_CHANGED","clearRowTopAndRowIndex","setRowIndex","setDragging","dragging","EVENT_DRAGGING_CHANGED","setHighlighted","EVENT_HIGHLIGHT_CHANGED","setAllChildrenCount","allChildrenCount","EVENT_ALL_CHILDREN_COUNT_CHANGED","setMaster","master","EVENT_MASTER_CHANGED","setGroup","updateHasChildren","EVENT_GROUP_CHANGED","setRowHeight","estimated","rowHeightEstimated","EVENT_HEIGHT_CHANGED","setRowAutoHeight","cellHeight","checkAutoHeightsDebounced","checkAutoHeights","notAllPresent","nonePresent","newRowHeight","autoHeights","getRowHeightForNode","EVENT_ROW_INDEX_CHANGED","setUiLevel","uiLevel","EVENT_UI_LEVEL_CHANGED","createGlobalRowEvent","rowNodeEventThrottle","dispatchExpanded","isGroupIncludeFooter","rowRenderer","refreshCells","setDataValue","valueService","valueChanged","dispatchCellChangedEvent","setGroupValue","groupData","columnId","setAggData","newAggData","colIds","aggData","oldAggData","footer","__hasChildren","EVENT_HAS_CHILDREN_CHANGED","isEmptyRowGroupNode","EVENT_CELL_CHANGED","resetQuickFilterAggregateText","quickFilterAggregateText","isSelected","depthFirstSearch","calculateSelectedFromChildren","atLeastOneSelected","atLeastOneDeSelected","atLeastOneMixed","selectThisNode","setSelectedInitialValue","setSelected","clearSelection","suppressFinishActions","setSelectedParams","rangeSelect","isRowPinned","isGroupSelectsChildren","getLastSelectedNode","newRowClicked","allowMultiSelect","isRowSelectionMulti","nodesChanged","doRowRangeSelection","setLastSelectedNode","updatedCount","selectChildNodes","clearOtherNodes","updateGroupsFromChildrenSelections","groupsSelectChildren","lastSelectedNode","nodesToSelect","getNodesInRangeForSelection","isParentOfNode","potentialParent","childrenAfterAggFilter","EVENT_MOUSE_ENTER","EVENT_MOUSE_LEAVE","getFirstChildOfFirstChild","rowGroupColumn","currentRowNode","isCandidate","foundFirstChildPath","nodeToSwapIn","parentRowNode","isFullWidthCellFunc","getIsFullWidthCellFunc","getRoute","ID_PREFIX_TOP_PINNED","ID_PREFIX_BOTTOM_PINNED","__extends$B","__decorate$x","CheckboxSelectionComponent","setPassive","getCheckboxId","onSelectionChanged","onSelectableChanged","showOrHideSelect","onCheckedClicked","isGroupSelectsFiltered","onUncheckedClicked","checkboxCallbackExists","showOrHideSelectListener","__extends$C","__decorate$y","__values$2","DragSourceType","ToolPanel","HeaderCell","RowDrag","ChartPanel","VerticalDirection","Up","Down","HorizontalDirection","Left","Right","DragAndDropService","dragSourceAndParamsList","dropTargets","DragAndDropService_1","ePinnedIcon","eHideIcon","eMoveIcon","eLeftIcon","eRightIcon","eGroupIcon","eAggregateIcon","ePivotIcon","eDropNotAllowedIcon","addDragSource","dragSource","allowTouch","dragStartPixels","onDragStart","onDragStop","onDragging","dragService","removeDragSource","sourceAndParams","clearDragSourceParamsList","nudge","eventLastTime","dragItem","getDragItem","lastDropTarget","dragSourceDropTarget","onDragStarted","createGhost","onDragStopped","draggingEvent","createDropTargetEvent","removeGhost","fromNudge","hDirection","getHorizontalDirection","vDirection","getVerticalDirection","positionGhost","validDropTargets","isMouseOnDropTarget","dropTarget","prevTarget","currTarget","prevContainer","getContainer","currContainer","leaveLastTargetIfExists","enterDragTargetIfExists","onDragEnter","dragEnterEvent","setGhostIcon","getIconName","onDragLeave","dragLeaveEvent","getAllContainersFromDropTarget","secondaryContainers","getSecondaryContainers","containers","allContainersIntersect","containers_1","containers_1_1","rect","allContainersFromDropTarget","mouseOverTarget","allContainersFromDropTarget_1","allContainersFromDropTarget_1_1","targetContainsSource","isInterestedIn","addDropTarget","removeDropTarget","hasExternalDropZones","zones","external","findExternalZone","eClientX","eClientY","dropZoneTarget","ghost","eGhost","ghostHeight","browserWidth","browserHeight","pageY","pageX","windowScrollY","pageYOffset","windowScrollX","pageXOffset","eGhostParent","GHOST_TEMPLATE","environment","getTheme","eGhostIcon","dragItemName","targetEl","fullscreenElement","shake","defaultIconName","ICON_NOT_ALLOWED","ICON_PINNED","ICON_MOVE","ICON_LEFT","ICON_RIGHT","ICON_GROUP","ICON_AGGREGATE","ICON_PIVOT","ICON_HIDE","isSuppressDragLeaveHidesColumns","__extends$D","__decorate$z","RowDragComp","cellValueFn","customGui","suppressVisibilityChange","isCustomGui","setDragElement","checkCompatibility","isRowDragManaged","ManagedVisibilityStrategy","NonManagedVisibilityStrategy","dragElement","getSelectedCount","isRowDragMultiRow","selection","getSelectedNodes","managed","defaultTextValue","dragItemCount","dragSourceDomDataKey","getDomDataKey","dragAndDropService","VisibilityStrategy","setDisplayedOrVisible","neverDisplayed","shown","isShownSometimes","onSuppressRowDrag","workOutVisibility","isSuppressRowDrag","rowDragFeature","getGridBodyCtrl","getRowDragFeature","shouldPreventRowMove","__extends$E","__assign$7","__decorate$A","GroupCellRendererCtrl","eExpanded","eContracted","compClass","topLevelFooter","isTopLevelFooter","embeddedRowMismatch","isEmbeddedRowMismatch","nullValue","skipCell","isGroupHideOpenParents","rowGroupColumnId","cellIsBlank","setupShowingValueForOpenedParent","findDisplayedGroupNode","addFullWidthRowDraggerIfNeeded","addExpandAndContract","addCheckboxIfNeeded","addValueElement","setupIndent","refreshAriaExpanded","expandListener","eParentOfValue","isGroupIncludeTotalFooter","rowGroupCols","fullWidth","isEmbedFullWidthRows","pinnedLeftCell","pinnedRightCell","bodyCell","showingValueForOpenedParent","displayedGroupNode","keyOfGroupingColumn","valPresent","addFooterValue","addGroupValue","addChildCount","paramsAdjusted","adjustParamsWithDetailsFromRelatedColumn","innerCompDetails","getInnerCompDetails","setInnerRenderer","relatedColumn","footerValueGetter","footerValue","paramsClone","getFullWidthGroupRowInnerCellRenderer","getInnerRendererDetails","isGroupRowRenderer","relatedColDef","relatedCompDetails","getCellRendererDetails","innerRenderer","suppressCount","updateChildCount","showingGroupForThisNode","isShowRowGroupForThisRow","setChildCount","eExpandedIcon","eContractedIcon","eGroupCell","eGridCell","suppressDoubleClickExpand","onCellDblClicked","onExpandClicked","showExpandAndContractIcons","expandableChangedListener","onRowNodeIsExpandableChanged","onExpandOrContract","reducedLeafNode","leafGroup","displayedGroup","setExpandedDisplayed","setContractedDisplayed","pivotModeAndLeafGroup","addExpandableCss","isTotalFooterNode","setIndent","suppressPadding","fullWithRow","paddingCount","indentClass","rowDragComp","isUserWantsSelected","paramsCheckbox","checkbox","checkboxNeeded","cbSelectionComponent_1","setCheckboxVisible","suppressEnterExpand","__extends$F","__decorate$B","GroupCellRenderer","compProxy","compDetails","valueToDisplay","setRenderDetails","eChildCount","componentPromise","destroyComp","innerCellRenderer","__extends$G","__decorate$C","LoadingCellRenderer","failedLoad","setupFailed","setupLoading","eLoadingText","eLoadingIcon","__extends$H","LoadingOverlayComponent","getOverlayLoadingTemplate","DEFAULT_LOADING_OVERLAY_TEMPLATE","localisedTemplate","__extends$I","NoRowsOverlayComponent","getOverlayNoRowsTemplate","DEFAULT_NO_ROWS_TEMPLATE","__extends$J","TooltipComponent","__extends$K","__decorate$D","UserComponentRegistry","agGridDefaults","agDateInput","agColumnHeader","agColumnGroupHeader","agTextColumnFloatingFilter","agNumberColumnFloatingFilter","agDateColumnFloatingFilter","agReadOnlyFloatingFilter","agAnimateShowChangeCellRenderer","agAnimateSlideCellRenderer","agGroupCellRenderer","agGroupRowRenderer","agLoadingCellRenderer","agCellEditor","agTextCellEditor","agSelectCellEditor","agPopupTextCellEditor","agPopupSelectCellEditor","agLargeTextCellEditor","agTextColumnFilter","agNumberColumnFilter","agDateColumnFilter","agLoadingOverlay","agNoRowsOverlay","agTooltipComponent","agDeprecatedNames","newComponentName","propertyHolder","animateShowChange","animateSlide","largeText","popupSelect","popupText","richSelect","jsComps","fwComps","registerJsComponent","registerFwComponent","registerDefaultComponent","rawName","translateIfDeprecated","retrieve","createResult","componentFromFramework","registeredViaFrameworkComp","frameworkComponent","jsComponent","defaultComponent","deprecatedInfo","DateComponent","HeaderComponent","HeaderGroupComponent","CellRendererComponent","CellEditorComponent","InnerRendererComponent","LoadingOverlayComponent$1","NoRowsOverlayComponent$1","TooltipComponent$1","FilterComponent","FloatingFilterComponent","ToolPanelComponent","StatusPanelComponent","FullWidth","FullWidthLoading","FullWidthGroup","FullWidthDetail","FloatingFilterMapper","getFloatingFilterType","filterToFloatingFilterMapping","agSetColumnFilter","agMultiColumnFilter","__extends$L","__decorate$E","UserComponentFactory","getHeaderCompDetails","getCompDetails","getHeaderGroupCompDetails","getFullWidthCellRendererDetails","getFullWidthLoadingCellRendererDetails","getFullWidthGroupCellRendererDetails","getFullWidthDetailCellRendererDetails","getCellEditorDetails","getFilterDetails","defaultFilter","getLoadingOverlayCompDetails","getNoRowsOverlayCompDetails","getSetFilterCellRendererDetails","getFloatingFilterCompDetails","defaultFloatingFilter","getToolPanelCompDetails","toolPanelDef","getStatusPanelCompDetails","defObject","defaultName","mandatory","getCompKeys","compName","jsComp","fwComp","paramsFromSelector","popupFromSelector","popupPositionFromSelector","lookupFromRegistry","userComponentRegistry","agComponentUtils","doesImplementIComponent","adaptFunction","paramsMerged","mergeParamsWithApplicationProvidedParams","defObjectAny","selectorFunc","selectorRes","assignComp","providedJsComp","providedFwComp","xxxFrameworkDeprecatedWarn","warningMessage_1","popup","popupPosition","thisComponentConfig","componentMetadataProvider","wrap","mandatoryMethodList","optionalMethodList","deferredInit","initComponent","paramsFromGrid","getDefaultFloatingFilterType","defaultFloatingFilterType","ExcelFactoryMode","SINGLE_SHEET","MULTI_SHEET","__extends$M","__decorate$F","DragService","dragEndFunctions","dragSources","removeAllListeners","removeListener","dragSourceAndListener","mouseDownListener","touchEnabled","touchStartListener","isDragging","includeTouch","mouseListener","cancelable","currentDragParams","touchLastTime","touchEndEvent","onTouchUp","addTemporaryEvents","onCommonMove","skipMouseEvent","_alreadyProcessedByDragService","mouseStartEvent","onMouseUp","currentEvent","isEventNearStartEvent","startEvent","getFirstActiveTouch","mouseEventService","isEventFromThisGrid","isOverFormFieldElement","tagName","changedTouches","onUpCommon","eventOrTouch","__extends$N","__assign$8","__decorate$G","FilterManager","allColumnFilters","activeAggregateFilters","activeColumnFilters","quickFilter","quickFilterParts","processingFilterChange","FilterManager_1","onColumnsChanged","refreshFiltersForAggregations","parseQuickFilter","setQuickFilterParts","allowShowChangeAfterFilter","isAllowShowChangeAfterFilter","setFilterModel","allPromises","getFilterModel","modelKeys_1","filterWrapper","setModelOnFilterWrapper","filterPromise","getOrCreateFilterWrapper","promiseFilter","isColumnFilterPresent","isAggregateFilterPresent","doAggregateFiltersPass","filterToSkip","doColumnFiltersPass","updateActiveFilters","groupFilterEnabled","getGroupAggFiltering","filterComp","isShowingPrimaryColumns","isAggFilter","updateFilterFlagInColumns","isAnyFilterPresent","isQuickFilterPresent","targetAggregates","targetedFilters","targetedData","newFilter","parsedFilter","callOnFilterChangedOutsideRenderCycle","isRefreshInProgress","onAnyFilterChanged","doesRowPassOtherFilters","doesRowPassFilter","filterInstanceToSkip","doesRowPassQuickFilterNoCache","filterPart","getQuickFilterTextForColumn","doesRowPassQuickFilterCache","aggregateRowForQuickFilter","doesRowPassQuickFilter","usingCache","isCacheQuickFilter","doesRowPassAggregateFilters","stringParts","QUICK_FILTER_SEPARATOR","createValueGetter","getFilterComponent","createIfDoesNotExist","cachedFilter","putIntoGui","createFilterWrapper","createFilterInstance","createFilterParams","doesRowPassOtherFilter","compiledElement","guiPromise","eFilterGui","guiFromFilter","disposeFilterWrapper","destroyFilter","__extends$O","AbstractHeaderCellComp","getCtrl","__extends$P","__decorate$H","HeaderFilterCellComp","setComp","cssClassName","on","addOrRemoveBodyCssClass","eFloatingFilterBody","addOrRemoveButtonWrapperCssClass","eButtonWrapper","setCompDetails","getFloatingFilterComp","compPromise","setMenuIcon","eButtonShowMainFilter","afterCompCreated","SideBarDefParser","toParse","toolPanels","DEFAULT_COLUMN_COMP","DEFAULT_FILTER_COMP","defaultToolPanel","comps_1","lookupResult","DEFAULT_BY_KEY","parseComponents","hiddenByDefault","it","toAdd","labelDefault","labelKey","iconKey","toolPanel","filters","__assign$9","__decorate$I","__param$3","__read$6","__spread$4","isTrue","oneOrGreater","valueNumber","GridOptionsWrapper","propertyEventService","domDataKey","random","GridOptionsWrapper_1","agWire","checkForDeprecated","checkForViolations","checkGridOptionsProperties","checkColumnDefProperties","globalEventHandler","isSuppressParentsInRowNodes","isRowModelServerSide","isGroupRemoveSingleChildren","isEnableRangeSelection","isEnableRangeHandle","isEnableFillHandle","warnOfDeprecaredIcon","userProperties","getOwnPropertyNames","validProperties","checkProperties","validPropertiesAndExceptions","containerName","docsUrl","invalidProperties","mergeGridCommonParams","callbackParams","mergedParams","domData","setDomData","isRowSelection","isSuppressRowDeselection","isRowMultiSelectWithClick","isSuppressExpandablePivotGroups","getPivotColumnGroupTotals","getPivotRowTotals","isRowModelInfinite","isRowModelViewport","isSuppressFocusAfterRefresh","isSuppressBrowserResizeObserver","isSuppressMaintainUnsortedOrder","isSuppressClearOnFillReduction","isShowToolPanel","getSideBar","isSuppressRowTransform","isAllowDragFromColumnsToolPanel","isEnableCellChangeFlash","getCellFlashDelay","getCellFadeDelay","isSuppressRowHoverHighlight","isColumnHoverHighlight","isGroupMaintainOrder","getAutoGroupColumnDef","isGroupMultiAutoColumn","matchesGroupDisplayType","matchesTreeDataDisplayType","isGroupRemoveLowestSingleChildren","isGroupSuppressBlankHeader","isSuppressRowClickSelection","isSuppressCellFocus","isSuppressMultiSort","isAlwaysMultiSort","isSuppressScrollOnNewData","isSuppressScrollWhenPopupsAreOpen","isRowDragEntireRow","isSuppressMoveWhenRowDragging","isSuppressHorizontalScroll","isSuppressMaxRenderedRowRestriction","isExcludeChildrenWhenTreeDataFiltering","isAlwaysShowHorizontalScroll","isAlwaysShowVerticalScroll","isDebounceVerticalScrollbar","isSuppressLoadingOverlay","isSuppressNoRowsOverlay","getPinnedTopRowData","getPinnedBottomRowData","isFunctionsPassive","isSuppressChangeDetection","isSuppressAnimationFrame","isEnterMovesDownAfterEdit","isEnterMovesDown","isUndoRedoCellEditing","getUndoRedoCellEditingLimit","getRowStyleFunc","getRowClassFunc","getServerSideStoreType","getServerSideStoreParamsFunc","getCreateChartContainerFunc","getBlockLoadDebounceMillis","getPostProcessPopupFunc","getPaginationNumberFormatterFunc","getChildCountFunc","getIsApplyServerSideTransactionFunc","getInitialGroupOrderComparator","getFullWidthCellRendererParams","isDetailRowAutoHeight","getBusinessKeyForNodeFunc","isReadOnlyEdit","isImmutableData","getRowIdProvided","isEnsureDomOrder","isEnableCharts","isSingleClickEdit","isSuppressClickEdit","isStopEditingWhenCellsLoseFocus","getGroupDefaultExpanded","getMaxConcurrentDatasourceRequests","getMaxBlocksInCache","getCacheOverflowSize","getPaginationPageSize","isPaginateChildRows","getCacheBlockSize","getInfiniteInitialRowCount","isPurgeClosedRowNodes","isSuppressPaginationPanel","getRowData","getRowGroupPanelShow","getPivotPanelShow","isAngularCompileRows","isAngularCompileFilters","isDebug","getDatasource","getViewportDatasource","getServerSideDatasource","isAccentedSort","isEnableCellExpressions","isSuppressMiddleClickScrolls","isPreventDefaultOnContextMenu","isSuppressPreventDefaultOnMouseWheel","isSuppressRowVirtualisation","isSuppressContextMenu","isAllowContextMenuWithControlKey","isSuppressCopyRowsToClipboard","isSuppressCopySingleCellRanges","isCopyHeadersToClipboard","isCopyGroupHeadersToClipboard","isSuppressClipboardPaste","isSuppressLastEmptyLineOnPaste","isPagination","isSuppressEnterpriseResetOnNewColumns","getProcessDataFromClipboardFunc","getAsyncTransactionWaitMillis","isSuppressMovableColumns","isAnimateRows","isSuppressColumnMoveAnimation","isSuppressAggAtRootLevel","isSuppressAggFilteredOnly","isShowOpenedGroup","isReactUi","reactUi","isSuppressReactUi","suppressReactUi","getFillHandleDirection","getFillOperation","isSuppressMultiRangeSelection","isPaginationAutoPageSize","isRememberGroupStateWhenNewData","userValue","getAggFuncs","getSortingOrder","getAlignedGrids","isMasterDetail","isKeepDetailRows","getKeepDetailRowsCount","getIsRowMasterFunc","getGroupRowRendererParams","isSuppressAutoSize","isEnableCellTextSelection","isSuppressClipboardApi","isFunctionsReadOnly","isEnableCellTextSelect","getDefaultExportParams","isSuppressCsvExport","isSuppressExcelExport","getDataPathFunc","getIsServerSideGroupFunc","getIsServerSideGroupOpenByDefaultFunc","getIsGroupOpenByDefaultFunc","getServerSideGroupKeyFunc","getGroupRowAggFunc","getContextMenuItemsFunc","getMainMenuItemsFunc","getNavigateToNextHeaderFunc","getTabToNextHeaderFunc","getNavigateToNextCellFunc","getTabToNextCellFunc","getGridTabIndex","isValueCache","isValueCacheNeverExpires","isDeltaSort","isAggregateOnlyChangedColumns","getSendToClipboardFunc","getProcessRowPostCreateFunc","getProcessCellForClipboardFunc","getProcessHeaderForClipboardFunc","getProcessGroupHeaderForClipboardFunc","getProcessCellFromClipboardFunc","getViewportRowModelPageSize","getViewportRowModelBufferSize","zeroOrGreater","isServerSideSortingAlwaysResets","isServerSideFilteringAlwaysResets","getPostSortFunc","getChartToolbarItemsFunc","getChartThemeOverrides","getCustomChartThemes","getChartThemes","getClipboardDelimiter","force","gridOptionsNoType","getAutoSizePadding","getHeaderHeight","getFromTheme","getFloatingFiltersHeight","getGroupHeaderHeight","getPivotHeaderHeight","getPivotGroupHeaderHeight","capitalisedType","isSuppressModelUpdateAfterUpdateTransaction","eGridDiv","ownerDocument","MIN_COL_WIDTH","measuredMin","getRowBuffer","getRowBufferInPixels","getRowHeightAsNumber","rowDeselection","enableMultiRowDragging","checkRenamedProperty","oldProp","newProp","groupRowInnerRendererParams","innerRendererParams","innerRendererFramework","clipboardDeliminator","treeDataViolations","variableValues","localisedText","callbackMethodName","setRowHeightVariable","getDefaultRowHeight","isGetRowHeightFunction","allowEstimate","defaultRowHeight","isDynamicRowHeight","getListItemHeight","chartMenuPanelWidth","sassVariableName","getSassVariable","toMatch","supplied","groupDisplayTypeValues","treeDataDisplayTypeValues","PROP_HEADER_HEIGHT","PROP_GROUP_REMOVE_SINGLE_CHILDREN","PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN","PROP_PIVOT_HEADER_HEIGHT","PROP_SUPPRESS_CLIPBOARD_PASTE","PROP_GROUP_HEADER_HEIGHT","PROP_PIVOT_GROUP_HEADER_HEIGHT","PROP_NAVIGATE_TO_NEXT_CELL","PROP_TAB_TO_NEXT_CELL","PROP_NAVIGATE_TO_NEXT_HEADER","PROP_TAB_TO_NEXT_HEADER","PROP_IS_EXTERNAL_FILTER_PRESENT","PROP_DOES_EXTERNAL_FILTER_PASS","PROP_FLOATING_FILTERS_HEIGHT","PROP_SUPPRESS_ROW_CLICK_SELECTION","PROP_SUPPRESS_ROW_DRAG","PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG","PROP_GET_ROW_CLASS","PROP_GET_ROW_STYLE","PROP_GET_ROW_HEIGHT","PROP_POPUP_PARENT","PROP_DOM_LAYOUT","PROP_ROW_CLASS","PROP_FILL_HANDLE_DIRECTION","PROP_GROUP_ROW_AGG_NODES","PROP_GET_GROUP_ROW_AGG","PROP_GET_BUSINESS_KEY_FOR_NODE","PROP_GET_CHILD_COUNT","PROP_PROCESS_ROW_POST_CREATE","PROP_GET_ROW_NODE_ID","PROP_GET_ROW_ID","PROP_IS_FULL_WIDTH_CELL","PROP_IS_FULL_WIDTH_ROW","PROP_IS_ROW_SELECTABLE","PROP_IS_ROW_MASTER","PROP_POST_SORT","PROP_POST_SORT_ROWS","PROP_GET_DOCUMENT","PROP_POST_PROCESS_POPUP","PROP_DEFAULT_GROUP_ORDER_COMPARATOR","PROP_INITIAL_GROUP_ORDER_COMPARATOR","PROP_PAGINATION_NUMBER_FORMATTER","PROP_GET_CONTEXT_MENU_ITEMS","PROP_GET_MAIN_MENU_ITEMS","PROP_PROCESS_CELL_FOR_CLIPBOARD","PROP_PROCESS_CELL_FROM_CLIPBOARD","PROP_SEND_TO_CLIPBOARD","PROP_PROCESS_TO_SECONDARY_COLDEF","PROP_PROCESS_SECONDARY_COL_GROUP_DEF","PROP_GET_CHART_TOOLBAR_ITEMS","PROP_GET_SERVER_SIDE_STORE_PARAMS","PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT","PROP_IS_APPLY_SERVER_SIDE_TRANSACTION","PROP_IS_SERVER_SIDE_GROUP","PROP_GET_SERVER_SIDE_GROUP_KEY","__extends$Q","__decorate$J","LayoutCssClasses","AUTO_HEIGHT","NORMAL","PRINT","LayoutFeature","updateLayoutClasses","__extends$R","__decorate$K","GridBodyScrollFeature","eBodyViewport","nextScrollTop","resetLastHorizontalScrollElementDebounced","resetLastHorizontalScrollElement","onDisplayedColumnsWidthChanged","whenReady","centerRowContainerCtrl","addScrollListener","fakeHScroll","getFakeHScrollCtrl","getViewportElement","onCenterViewportScroll","getViewport","onFakeHorizontalScroll","onVerticalScroll","horizontallyScrollHeaderCenterAndFloatingCenter","getCenterViewportScrollLeft","topCenterContainer","getTopCenterRowContainerCtrl","bottomCenterContainer","getBottomCenterRowContainerCtrl","getHeaderRowContainerCtrl","setHorizontalScroll","setContainerTranslateX","lastHorizontalScrollElement","isControllingScroll","eDiv","fakeHScrollViewport","onBodyHorizontalScroll","centerContainerViewport","eSource","shouldBlockScrollUpdate","doHorizontalScroll","setScrollTop","redrawRowsAfterScroll","fakeScrollLeft","fireScrollEvent","onHorizontalViewportChanged","bodyScrollEvent","scrollTimer","bodyScrollEndEvent","touchOnly","getCenterWidth","checkScrollLeft","executeAnimationFrameScroll","frameNeeded","setHorizontalScrollPosition","hScrollPosition","maxScrollLeft","setVerticalScrollPosition","vScrollPosition","getVScrollPosition","getHScrollPosition","scrollHorizontally","pixels","oldScrollPosition","scrollToTop","ensureNodeVisible","getRowCount","comparatorIsAFunction","indexToSelect","getRow","ensureIndexVisible","paginationProxy","goToPageWithIndex","rowGotShiftedDuringOperation","startingRowTop","startingRowHeight","paginationOffset","getPixelOffset","rowTopPixel","rowBottomPixel","heightOffset","heightScaler","getDivStretchOffset","vScrollTop","vScrollBottom","viewportHeight","pxTop","getScrollPositionForPixel","pxBottom","pxMiddle","newScrollPosition","redrawAfterScroll","ensureColumnVisible","newHorizontalScroll","getPositionedHorizontalScroll","setCenterViewportScrollLeft","isColumnOutsideViewport","columnBeforeStart","columnAfterEnd","viewportTooSmallForColumn","alignColToStart","alignColToEnd","isMiddle","getColumnBounds","colLeft","colRight","colMiddle","getViewportBounds","viewportStart","viewportEnd","multiplier","colLeftPixel","AutoScrollService","tickingInterval","onScrollCallback","scrollContainer","scrollAxis","scrollVertically","scrollByTick","getVerticalPosition","setVerticalPosition","getHorizontalPosition","setHorizontalPosition","shouldSkipVerticalScroll","shouldSkipHorizontalScroll","forceSkipVerticalScroll","skipVerticalScroll","scrollTick","tickLeft","tickRight","tickUp","tickDown","ensureTickingStarted","ensureCleared","doTick","tickCount","tickAmount","__extends$S","__assign$a","__decorate$L","__read$7","RowDragFeature","isMultiRowDrag","isGridSorted","isGridFiltered","clientSideRowModel","refreshStatus","onRowGroupChanged","gridBodyCon","autoScrollService","getBodyViewportElement","getScrollFeature","lastDraggingEvent","isSortActive","rowGroups","getRowNodes","isFromThisGrid","selectedNodes","__spread$5","getRowIndexNumber","currentNode","dispatchGridEvent","onEnterOrDragging","isDropZoneWithinThisGrid","getNormalisedPosition","doManagedDrag","managedDrag","highlightRowAtPixel","moveRows","moveRowAndClearHighlight","lastHighlightedRowNode","getLastHighlightedRowNode","isBelow","increment","getRowIdFunc_1","addIndex","getRowIndexAtPixel","getHighlightPosition","updateRowData","getRowNode","clearRowHighlight","ensureRowsAtPixel","clearFocusedCell","rangeService","removeAllCellRanges","addRowDropZone","processedParams","fromGrid","draggingToRowDragEvent","getRowDropZone","overNode","vDirectionString","yNormalised","overIndex","getCurrentPageHeight","stopDragging","__extends$T","__decorate$M","RowAnimationCssClasses","ANIMATION_ON","ANIMATION_OFF","CSS_CLASS_CELL_SELECTABLE","CSS_CLASS_FORCE_VERTICAL_SCROLL","CSS_CLASS_COLUMN_MOVING","GridBodyCtrl","bodyScrollFeature","eGridBody","eTop","eBottom","setCellTextSelection","addRowDragListener","setupRowAnimationCssClass","addEventListeners","addFocusListeners","onGridColumnsChanged","addBodyViewportListener","setFloatingHeights","disableBrowserDragging","addStopEditingWhenGridLosesFocus","registerGridBodyCtrl","getComp","onScrollVisibilityChanged","setColumnMovingCss","setCellSelectableCss","scrollVisibleService","setVerticalScrollPaddingVisible","setColumnCount","HTMLImageElement","focusOutListener","elementWithFocus","clickInsideGrid","viewports","isElementInThisGrid","getActivePopups","isElementWithinCustomPopup","updateRowCount","headerCount","headerNavigationService","modelType","forEachNode","setRowCount","registerBodyViewportResizeListener","setPinnedTopBottomOverflowY","setAlwaysVerticalScrollClass","rowContainerHeightService","isStretching","setRowAnimationCssOnBodyViewport","getGridBodyElement","getCenterRowContainerCtrl","contextMenuFactory","onContextMenu","onWheel","hasAnchoredPopup","pinnedRowModel","floatingTopHeight","getPinnedTopTotalHeight","floatingBottomHeight","getPinnedBottomTotalHeight","setTopHeight","setBottomHeight","setTopDisplay","setBottomDisplay","nextTimeout","scrollWidthToRemove","addScrollEventListener","removeScrollEventListener","SelectionHandleType","FILL","RANGE","CellRangeType","VALUE","DIMENSION","CSS_CELL_RANGE_SELECTED","CellRangeFeature","cellCtrl","cellComp","onRangeSelectionChanged","rangeCount","getCellRangeCount","getCellPosition","hasChartRange","getHasChartRange","isSingleCell","updateRangeBorders","refreshHandle","rangeBorders","getRangeBorders","isRight","isBottom","isLeft","isMoreThanOneCell","cellRanges","getCellRanges","range","updateRangeBordersIfRangeCount","leftCol","rightCol","thisCol","ranges","isCellInSpecificRange","startRow","getRangeStartRow","endRow","getRangeEndRow","rowPositionUtils","sameRow","shouldHaveSelectionHandle","selectionHandle","addSelectionHandle","rangesLen","cellRange","cellPosition","isFillHandleAvailable","isRangeHandleAvailable","handleIsAvailable","isEditing","isCategoryCell","isContiguousRange","isBottomRightCell","cellRangeType","selectionHandleFactory","createSelectionHandle","__extends$U","CellPositionFeature","setupColSpan","setupRowSpan","onLeftChanged","onWidthChanged","applyRowSpan","onDisplayColumnsChanged","colsSpanning","getColSpanningList","getCellWidth","modifyLeftForPrintLayout","getCellLeft","leftPosition","isPrintLayout","singleRowHeight","zIndex","__extends$V","CellCustomStyleFeature","staticClasses","applyUserStyles","applyCellClassRules","applyClassesFromColDef","cellClassParams","stylingService","processClassRules","cellStyleParams","cellStyleFunc","setUserStyles","getStaticCellClasses","__extends$W","TooltipFeature","setupTooltip","browserTooltips","updateTooltipText","tooltip","createTooltipFeatureIfNeeded","getTooltipValue","genericTooltipFeature","refreshToolTip","getLocation","getRowIndex","getTooltipText","getValueFormatted","__decorate$N","Beans","doingMasterDetail","serverSideRowModel","__extends$X","CellMouseListenerFeature","onMouseEvent","onMouseOut","onMouseOver","isDoubleClickOnIPad","cellClickedEvent","startRowOrCellEdit","nowMillis","lastIPadMouseClickEvent","cellDoubleClickedEvent","isRightClickInExistingRange","forceBrowserFocus","focusCell","containsWidget","thisCell","extendLatestRangeToCell","setRangeToCell","isCellInAnyRange","mouseStayingInsideCell","cellMouseOutEvent","columnHoverService","clearMouseOver","cellMouseOverEvent","setMouseOver","cellContainsTarget","cellContainsRelatedTarget","__extends$Y","CellKeyboardListenerFeature","rowCtrl","onEnterKeyDown","onF2KeyDown","onEscapeKeyDown","onBackspaceOrDeleteKeyPressed","onNavigationKeyPressed","isRangeSelectionEnabled","onShiftRangeSelect","navigationService","endCell","extendLatestRangeInDirection","ensureCellVisible","stopEditingAndFocus","stopRowOrCellEdit","onKeyPress","pressedChar","onSpaceKeyPressed","currentSelection","newSelection","__extends$Z","DndSourceComp","eCell","checkVisibility","dragEvent","providedOnRowDrag","dataTransfer","setDragImage","defaultOnRowDrag","__decorate$O","__extends$_","__assign$b","CSS_CELL_NOT_INLINE_EDITING","instanceIdSequence$1","CellCtrl","suppressRefreshCell","createCellPosition","addFeatures","cellPositionFeature","cellCustomStyleFeature","cellMouseListenerFeature","cellKeyboardListenerFeature","cellRangeFeature","addTooltipFeature","eCellWrapper","printLayout","startEditing","gow","updateAndFormatValue","addDomData","onCellFocused","applyStaticCssClasses","setWrapText","onFirstRightPinnedChanged","onLastLeftPinnedChanged","onColumnHover","setupControlComps","setupAutoHeight","setTabIndex","colIdSanitised","setColId","setRole","showValue","eAutoHeightContainer","eParentCell","minRowHeight","measureHeight","timesCalled","newHeight","destroyResizeObserver","resizeObserverService","observeResize","forceNewCellRendererInstance","createCellRendererParams","includeSelection","isIncludeControl","includeRowDrag","includeDndSource","setIncludeSelection","setIncludeDndSource","setIncludeRowDrag","isForceWrapper","refreshShouldDestroy","rowDragChanged","dndSourceChanged","editorParams","createCellEditorParams","setEditing","setEditDetails","inPopup","editingInPopup","setInlineEditingClass","stopRowEditing","onPopupEditorClosed","takeValueFromCellEditor","noValueResult","newValueExists","getCellEditor","isCancelAfterEnd","saveNewValue","dispatchEventForSaveValueReadOnly","getValueFromValueService","refreshCell","forceRefresh","suppressFlash","dispatchEditingStoppedEvent","editingStoppedEvent","editingInline","popupEditorShowing","setInlineEditingCss","hackSayEditingInPopup","getParentOfValue","registerRowDragger","rowDraggerElement","addRowCompListener","setFocusOutOnEditor","focusOut","setFocusInOnEditor","onCellChanged","valuesDifferent","flashCell","suppressNavigateAfterEdit","navigateAfterEdit","delays","animateCell","flashDelay","fadeDelay","cssName","fullName","animationFullName","onFlashCells","cellId","cellPositionUtils","createId","cells","callValueFormatter","oldValueFormatted","valuesAreEqual","lockedClosedGroup","isOpenGroup","groupFootersEnabled","groupAlwaysShowAggData","DOM_DATA_KEY_CELL_CTRL","domEvent","onDisplayedColumnsChanged","colIdx","getBeans","htmlElement","startRowEditing","getRowCtrl","getRowPosition","setFocusedCell","onRowIndexChanged","isCellFocused","fullRowEdit","isHovered","onNewColumnsLoaded","dispatchCellContextMenuEvent","cellContextMenuEvent","getCellRenderer","createSelectionCheckbox","cbSelectionComponent","createDndSource","dndSourceComp","customElement","customRowDragComp","newComp","createRowDragComp","clientSideRowModelActive","__extends$$","__read$8","RowType","Normal","instanceIdSequence$2","RowCtrl","animateIn","useAnimationFrameForCreate","allRowGuis","centerCellCtrls","leftCellCtrls","rightCellCtrls","lastMouseDownOnDragger","updateColumnListsPending","paginationPage","getCurrentPage","setAnimateFlags","rowFocused","isRowFocused","rowLevel","rowCssClassCalculator","calculateRowLevel","setRowType","addListeners","setInitialRowTop","rowComp","containerType","leftGui","rightGui","fullWidthGui","centerGui","initialiseRowComps","isCacheable","rowType","setCached","cached","rg","updateRowIndexes","setFocusedClasses","setStylesFromGridOptions","onRowSelected","updateColumnLists","slideRowIn","onTopChanged","fadeRowIn","businessKey","getRowBusinessKey","rowIdSanitised","businessKeySanitised","getInitialRowClasses","setRowId","setRowBusinessKey","isFullWidth","DOM_DATA_KEY_ROW_CTRL","createTask","addHoverFunctionality","setupFullWidth","addRowDraggerToRow","addDestroyTask","executeProcessRowPostCreateFunc","getPinnedForContainer","createFullWidthParams","masterDetailModuleLoaded","showFullWidth","getCellElement","getCellCtrl","eRow","ePinnedLeftRow","ePinnedRightRow","addRenderedRowListener","isStub","stub","isDetailCell","isFullWidthGroup","updateColumnListsImpl","createCellCtrls","prev","addCell","colInstanceId","prevCellCtrl","isCellEligibleToBeRemoved","centerCols","leftCols","rightCols","setCellCtrls","nextContainerPinned","REMOVE_CELL","focused","column_1","oldRowTopExists","editingRow","getRowType","refreshFullWidth","tryRefresh","getFullWidthCellRenderer","fullWidthSuccess","centerSuccess","leftSuccess","rightSuccess","updateExpandedCss","onRowNodeDataChanged","onRowNodeCellChanged","onRowNodeHighlightChanged","onRowNodeDraggingChanged","onUiLevelChanged","onPaginationPixelOffsetChanged","onVirtualColumnsChanged","onCellFocusChanged","onPaginationChanged","onModelUpdated","onColumnMoved","addListenersForCellComps","getAllCellCtrls","postProcessCss","postProcessClassesFromGridOptions","postProcessRowClassRules","postProcessRowDragging","belowOn","onKeyboardNavigate","currentFullWidthComp","lastFocusedCell","getFocusedCell","currentFullWidthContainer","isFullWidthContainerFocused","nextEl","onFullWidthRowFocused","preventScroll","removeCellCtrl","cellCtrlToRemove","onRowDblClick","onRowClick","onRowMouseDown","createRowEvent","createRowEventWithSource","agEvent","multiSelectKeyPressed","shiftKeyPressed","multiSelectOnClick","rowDeselectionWithCtrl","setupDetailRowAutoHeight","eDetailGui","checkRowSizeFunc","resizeObserverDestroyFunc","addFullWidthRowDragging","newLevel","classToAdd_1","classToRemove_1","isFirstRowOnPage","getPageFirstRow","isLastRowOnPage","getPageLastRow","refreshFirstAndLastRowStyles","newFirst","newLast","firstRowOnPage","lastRowOnPage","cellEdits","edit","event_1","setEditingRow","sourceRenderedCell","__spread$6","processClassesFromGridOptions","classStr","processRowClassRules","rowStyles","processStylesFromGridOptions","businessKeyForNodeFunc","rowContainerType","rowIsEven","fullWidthRow","rowStyleFuncResult","rowStyleFunc","createAriaLabel","isUseAnimationFrameForCreate","roundRowTopToBounds","minPixel","applyPaginationOffset","maxPixel","heightFromFunc","lineHeight","destroyFirstPass","setupRemoveAnimation","destroySecondPass","destroyCellCtrls","ctrls","currentPage","topPx","afterPaginationPixels","afterScalingPixels","getRealPixelPosition","setRowTopStyle","getInitialRowTop","initialTop","getInitialTransform","initialTransform","setTop","setTransform","rowIndexStr","headerRowCount","ariaRowIndex","getPinnedLeftRowElement","getPinnedRightRowElement","getBodyRowElement","getFullWidthRowElement","__extends$10","__decorate$P","RowContainerEventsFeature","addMouseListeners","mockContextMenuForIPad","addKeyboardEvents","processKeyboardEvent","processMouseEvent","getRowForEvent","getRenderedCellForEvent","handleContextMenuMouseEvent","rowCon","anchorToElement","processCellKeyboardEvent","processFullWidthRowKeyboardEvent","handlePageScrollingKey","doGridOperations","cellKeyDownEvent","cellKeyPressEvent","focusedCell","onCtrlAndA","onCtrlAndC","onCtrlAndV","onCtrlAndD","undoRedoService","redo","undo","isRowsToRender","__read$9","floatingStart","floatingEnd","rowEnd","setCellRange","rowStartIndex","rowStartPinned","rowEndIndex","rowEndPinned","columnStart","columnEnd","clipboardService","copyToClipboard","pasteFromClipboard","copyRangeDown","__extends$11","__decorate$Q","ViewportSizeFeature","centerContainerCtrl","gridBodyCtrl","listenForResize","onScrollbarWidthChanged","onCenterViewportResized","registerViewportResizeListener","checkViewportAndScrolls","isViewportVisible","centerWidth","bodyHeight","updateScrollVisibleService","checkBodyHeight","updateScrollVisibleServiceImpl","horizontalScrollShowing","verticalScrollShowing","setScrollsVisible","isViewportHScrollShowing","getViewportScrollLeft","__extends$12","__decorate$R","SetPinnedLeftWidthFeature","onPinnedLeftWidthChanged","pinnedWidthService","getPinnedLeftWidth","__extends$13","__decorate$S","SetPinnedRightWidthFeature","onPinnedRightWidthChanged","getPinnedRightWidth","__extends$14","__decorate$T","SetHeightFeature","onHeightChanged","maxDivHeightScaler","getUiContainerHeight","heightString","__extends$15","__decorate$U","DragListenerFeature","__extends$16","__decorate$V","CenterWidthFeature","__extends$17","__decorate$W","__read$a","RowContainerName","CENTER","FULL_WIDTH","TOP_LEFT","TOP_RIGHT","TOP_CENTER","TOP_FULL_WIDTH","BOTTOM_LEFT","BOTTOM_RIGHT","BOTTOM_CENTER","BOTTOM_FULL_WIDTH","RowContainerType","ContainerCssClasses","ViewportCssClasses","WrapperCssClasses","RowContainerCtrl","getRowContainerCssClasses","forContainers","viewportSizeFeature","registerWithCtrlsService","registerCenterRowContainerCtrl","registerLeftRowContainerCtrl","registerRightRowContainerCtrl","registerTopCenterRowContainerCtrl","registerTopLeftRowContainerCon","registerTopRightRowContainerCtrl","registerBottomCenterRowContainerCtrl","registerBottomLeftRowContainerCtrl","registerBottomRightRowContainerCtrl","getViewportSizeFeature","eViewport","addPreventScrollWhileDragging","listenOnDomOrder","stopHScrollOnPinnedRows","allNoFW","__spread$7","allMiddle","allCenter","allRight","setContainerWidth","onDisplayedRowsChanged","setDomOrder","setViewportHeight","unsubscribeFromResize","amount","fullWithContainer","rowsThisContainer","getRowCtrls","embedFW","setRowCtrls","getTopRowCtrls","getBottomRowCtrls","__extends$18","__decorate$X","GRID_BODY_TEMPLATE","GridBodyComp","setHeight","bodyViewportClassList","overflowY","ct","getFloatingTopBottom","__extends$19","__decorate$Y","ScrollVisibleService","updateImpl","centerRowCtrl","__extends$1a","__decorate$Z","MouseEventService","gridInstanceId","MouseEventService_1","gridInstanceSequence","stampTopLevelGridCompWithGridInstance","GRID_DOM_KEY","getCellPositionForEvent","gridPanelHasScrolls","vRange","__extends$1b","__assign$c","__decorate$_","NavigationService","onPageDown","onPageUp","alt","rangeServiceShouldHandleShift","currentCell","processed","onHomeOrEndKey","onCtrlUpDownLeftRight","navigateTo","navigateParams","scrollIndex","scrollType","scrollColumn","focusIndex","focusColumn","gridCell","pixelsInOnePage","getViewportHeight","pagingPixelOffset","currentPageBottomRow","navigateToNextPageWithAutoHeight","navigateToNextPage","currentPageTopRow","up","firstRow","lastRow","rowPixelDiff","nextCellPixel","isRowTallerThanView","getNextFocusIndexForAutoHeight","lastRowIndex","pixelSum","currentIndex","currentCellHeight","cellToFocus","cellNavigationService","getNextCellToFocus","homeKey","columnToSelect","backwards","tabToNextCellCommon","focusLastHeader","focusNextGridCoreContainer","cellOrRow","getCellByPosition","getRowByPosition","moveToNextEditingRow","moveToNextEditingCell","moveToNextCellNotEditing","getFocusedHeader","previousCell","previousPos","nextCell","findNextCellToFocusOn","previousEditable","nextEditable","rowsMatch","cellPos","tryToFocusFullWidthRow","previousPosition","nextPosition","getLastCellOfColSpan","getNextTabbedCell","userCell","previousCellPosition","nextCellPosition","floating","headerLen","focusHeaderPosition","headerPosition","cell","lookupRowNodeForCell","getPinnedTopRow","getPinnedBottomRow","allowUserOverride","hitEdgeOfGrid","isValidNavigateCell","normalisedPosition","focusPosition","currentCellFocused","fromBelow","before","colSpanningList","__extends$1c","PopupEditorWrapper","DOM_KEY_POPUP_EDITOR_WRAPPER","addKeyDownListener","__decorate$$","__extends$1d","CellComp","rendererVersion","editorVersion","forceWrapper","refreshWrapper","actualElement","include","eCellValue","cellEditorPopupWrapper","firstRender","controlWrapperChanged","refreshCellRenderer","destroyRenderer","createCellRendererInstance","insertValueWithoutCellRenderer","createCellEditorInstance","destroyEditor","removeControls","checkboxSelectionComp","rowDraggingComp","providingControls","usingWrapper","putWrapperIn","takeWrapperOut","usingCellValue","putCellValueIn","takeCellValueOut","templateChanged","addControls","describedByIds","versionCopy","cellEditorPromise","afterCellEditorCreated","escapedValue","destroyEditorAndRenderer","cellRendererGui","hideEditorPopup","cellEditorGui","compClassAndParams","cellRendererClass","displayComponentVersionCopy","createCellRendererFunc","afterCellRendererCreated","cellRendererVersion","requestVersion","isCancelBeforeStart","addPopupCellEditor","addInCellEditor","clearParentOfValue","ePopupGui","useModelPopup","positionToUse","getPopupPosition","positionParams","positionCallback","positionPopupOverComponent","__extends$1e","RowComp","cellComps","getInitialStyle","domOrder","cellCtrls","rowId","setFullWidthRowComp","cellsToRemove","newCellComp","cellCompsToRemove","destroyCells","elementsInOrder","destroyAllCells","cellsToDestroy","cp","fullWidthRowComponent","__extends$1f","__assign$d","__decorate$10","RowContainerComp","templateFactory","rowComps","getRowContainerTypeForName","rowCtrls","preDestroy","oldRows","lastPlacedElement","existingRowComp","newRowComp","appendRow","oldRowComp","__decorate$11","BodyDropPivotTarget","columnsToAggregate","columnsToGroup","columnsToPivot","clearColumnsList","dragColumns","__decorate$12","MoveColumnFeature","needToMoveLeft","needToMoveRight","centerContainer","visibleState_1","visibleState","ensureIntervalCleared","allowedCols","normaliseX","checkCenterForScrolling","xAdjustedForScroll","firstVisiblePixel","lastVisiblePixel","ensureIntervalStarted","fromEnter","mouseXNormalised","hDirectionNormalised","normaliseDirection","dragSourceType","attemptMoveColumns","calculateOldIndex","movingCols","gridCols","firstIndex","allMovingColumns","mouseX","draggingLeft","draggingRight","allMovingColumnsOrdered","validMoves","calculateValidMoves","firstValidMove","constrainDirection","move","allDisplayedCols","allGridCols","movingDisplayedCols","otherDisplayedCols","otherGridCols","displayIndex","widthOfMovingDisplayedCols_1","numberComparator","displacedCol","isColumnHidden","movingIntervalId","intervalCount","failedMoveAttempts","moveInterval","pixelsToMove","pixelsMoved","scrollFeature","columnsThatCanPin","__extends$1g","__decorate$13","BodyDropTarget","eSecondaryContainers","leftRowContainerCtrl","bottomLeftRowContainerCtrl","topLeftRowContainerCtrl","rightRowContainerCtrl","bottomRightRowContainerCtrl","topRightRowContainerCtrl","bottomCenterRowContainerCtrl","topCenterRowContainerCtrl","moveColumnFeature","bodyDropPivotTarget","currentDropListener","isDropColumnInPivotMode","__read$b","CssClassApplier","getHeaderClassesFromColDef","getColumnClassesFromCollDef","getToolPanelClassesFromColDef","getClassParams","classesOrFunc","classToUse","__spread$8","__extends$1h","__decorate$14","HeaderCellComp","headerCompVersion","getColumnGroupChild","setUserCompDetails","getUserCompInstance","headerComp","eResize","selectAllGui","getSelectAllGui","destroyHeaderComp","headerCompGui","setDragSource","__extends$1i","__decorate$15","HeaderGroupCellComp","addOrRemoveResizableCssClass","afterHeaderCompCreated","headerGroupComp","__extends$1j","__decorate$16","HeaderRowType","COLUMN_GROUP","COLUMN","FLOATING_FILTER","HeaderRowComp","headerComps","extraClass","setHeaderCtrls","destroyHeaderCtrls","oldComps","createHeaderComp","comps","headerCtrl","__extends$1k","instanceIdSequence$3","AbstractHeaderCellCtrl","columnGroupChild","parentRowCtrl","lastFocusEvent","DOM_DATA_KEY_HEADER_CTRL","getParentRowCtrl","__decorate$17","ClientSideRowModelSteps","EVERYTHING","FILTER","SORT","MAP","AGGREGATE","FILTER_AGGREGATES","PIVOT","__decorate$18","unwrapUserComp","GridApi","detailGridInfoMap","destroyCalled","registerOverlayWrapperComp","overlayWrapperComp","registerSideBarComp","sideBarComp","infiniteRowModel","__getAlignedGridService","alignedGridsService","__getContext","addDetailGridInfo","gridInfo","removeDetailGridInfo","getDetailGridInfo","forEachDetailGridInfo","getDataAsCsv","csvCreator","exportDataAsCsv","getExcelExportMode","baseParams","exportMode","getDataAsExcel","excelCreator","getFactoryMode","exportDataAsExcel","getSheetDataForExcel","setFactoryMode","getMultipleSheetsAsExcel","exportMultipleSheetsAsExcel","setEnterpriseDatasource","setServerSideDatasource","setGridAriaProperty","eGrid","ariaProperty","setDatasource","setViewportDatasource","setRowData","immutableService","isActive","setFloatingTopRowData","setPinnedTopRowData","setFloatingBottomRowData","setPinnedBottomRowData","getFloatingTopRowCount","getPinnedTopRowCount","getFloatingBottomRowCount","getPinnedBottomRowCount","getFloatingTopRow","getFloatingBottomRow","expireValueCache","getVerticalPixelRange","getHorizontalPixelRange","setAlwaysShowHorizontalScroll","setAlwaysShowVerticalScroll","refreshToolPanel","flashCells","redrawRows","setFunctionsReadOnly","refreshHeader","setRowNodeExpanded","onGroupExpandedOrCollapsed","deprecated_refreshFromIndex","refreshModel","refreshInMemoryRowModel","refreshClientSideRowModel","paramsStep","stepsMapped","aggregate","keepRenderedRows","keepEditingRows","isAnimationFrameQueueEmpty","isQueueEmpty","flushAllAnimationFrames","getSizesForCurrentTheme","expandAll","collapseAll","getToolPanelInstance","addVirtualRowListener","selectIndex","tryMulti","suppressEvents","deselectIndex","selectNode","deselectNode","selectAll","selectAllRowNodes","deselectAll","deselectAllRowNodes","selectAllFiltered","deselectAllFiltered","recomputeAggregates","showLoadingOverlay","showNoRowsOverlay","hideOverlay","isNodeSelected","getSelectedNodesById","getSelectedRows","getBestCostNodeSelection","getRenderedNodes","ensureColIndexVisible","forEachLeafNode","forEachNodeAfterFilter","forEachNodeAfterFilterAndSort","getFilterInstance","getFilterInstanceImpl","unwrapped","getStatusPanel","statusBarService","getColumnDef","removeRowDropZone","activeDropTarget","getRowDropZoneParams","setDomLayout","setFillHandleDirection","setGroupHeaderHeight","setFloatingFiltersHeight","setPivotHeaderHeight","setPivotGroupHeaderHeight","setIsExternalFilterPresent","isExternalFilterPresentFunc","setDoesExternalFilterPass","doesExternalFilterPassFunc","setNavigateToNextCell","navigateToNextCellFunc","setTabToNextCell","tabToNextCellFunc","setTabToNextHeader","tabToNextHeaderFunc","setNavigateToNextHeader","navigateToNextHeaderFunc","setGroupRowAggNodes","groupRowAggNodesFunc","setGetGroupRowAgg","setGetBusinessKeyForNode","setGetChildCount","setProcessRowPostCreate","processRowPostCreateFunc","setGetRowNodeId","getRowNodeIdFunc","setGetRowId","setGetRowClass","rowClassFunc","setIsFullWidthCell","setIsFullWidthRow","isFullWidthRowFunc","setIsRowSelectable","setIsRowMaster","isRowMasterFunc","setPostSort","postSortFunc","setPostSortRows","postSortRowsFunc","setGetDocument","getDocumentFunc","setGetContextMenuItems","setGetMainMenuItems","setProcessCellForClipboard","processCellForClipboardFunc","setSendToClipboard","sendToClipboardFunc","setProcessCellFromClipboard","processCellFromClipboardFunc","setProcessSecondaryColDef","processSecondaryColDefFunc","setProcessSecondaryColGroupDef","processSecondaryColGroupDefFunc","setPostProcessPopup","postProcessPopupFunc","setDefaultGroupOrderComparator","defaultGroupOrderComparatorFunc","setInitialGroupOrderComparator","initialGroupOrderComparatorFunc","setGetChartToolbarItems","setPaginationNumberFormatter","paginationNumberFormatterFunc","setGetServerSideStoreParams","setIsServerSideGroupOpenByDefault","isServerSideGroupOpenByDefaultFunc","setIsApplyServerSideTransaction","isApplyServerSideTransactionFunc","setIsServerSideGroup","isServerSideGroupFunc","setGetServerSideGroupKey","setGetRowStyle","setGetRowHeight","rowHeightFunc","isSideBarVisible","setSideBarVisible","setSideBarPosition","openToolPanel","closeToolPanel","getOpenedToolPanel","openedItem","setSideBar","isToolPanelShowing","doLayout","setGroupRemoveLowestSingleChildren","gridCtrl","getGridCtrl","destroyGridUi","cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid","warnIfDestroyed","resetQuickFilter","getRangeSelections","camelCaseToHumanReadable","addRangeSelection","deprecatedNoLongerUsed","addCellRange","clearRangeSelection","undoCellEditing","redoCellEditing","getCurrentUndoSize","getCurrentUndoStackSize","getCurrentRedoSize","getCurrentRedoStackSize","getChartModels","chartService","getChartRef","chartId","getChartImageDataURL","createRangeChart","createCrossFilterChart","restoreChart","chartModel","chartContainer","createPivotChart","copySelectedRowsToClipboard","copySelectedRangeToClipboard","copySelectedRangeDown","showColumnMenuAfterButtonClick","buttonElement","showMenuAfterMouseEvent","hidePopupMenu","hideActiveMenu","setPopupParent","ePopupParent","tabToPreviousCell","getCellRendererInstances","getCellEditorInstances","getEditingCells","startEditingCell","addAggFunc","addAggFuncs","clearAggFuncs","applyServerSideTransaction","transaction","serverSideTransactionManager","applyTransaction","applyServerSideTransactionAsync","applyTransactionAsync","retryServerSideLoads","retryLoads","flushServerSideAsyncTransactions","flushAsyncTransactions","rowDataTransaction","refreshFullWidthRows","setDeltaSort","batchUpdateRowData","insertItemsAtIndex","skipRefresh","removeItems","dataToRemove","refreshVirtualPageCache","refreshInfiniteCache","refreshInfinitePageCache","refreshCache","purgeVirtualPageCache","purgeInfinitePageCache","purgeInfiniteCache","purgeCache","purgeEnterpriseCache","purgeServerSideCache","refreshServerSideStore","refreshStore","getServerSideStoreState","getStoreState","getVirtualRowCount","getInfiniteRowCount","isMaxRowFound","isLastRowIndexKnown","setVirtualRowCount","maxRowFound","setInfiniteRowCount","getVirtualPageState","getCacheBlockState","getInfinitePageState","rowNodeBlockLoader","getBlockState","checkGridSize","getFirstRenderedRow","getFirstDisplayedRow","getFirstVirtualRenderedRow","getLastRenderedRow","getLastDisplayedRow","getLastVirtualRenderedRow","getDisplayedRowAtIndex","getDisplayedRowCount","paginationIsLastPageFound","isLastPageFound","paginationGetPageSize","getPageSize","paginationGetCurrentPage","paginationGetTotalPages","getTotalPages","paginationGetRowCount","getMasterRowCount","paginationGoToNextPage","goToNextPage","paginationGoToPreviousPage","goToPreviousPage","paginationGoToFirstPage","goToFirstPage","paginationGoToLastPage","goToLastPage","paginationGoToPage","page","goToPage","__extends$1l","SetLeftFeature","ariaEl","setColsSpanning","getColumnOrGroup","setLeftFirstTime","suppressMoveAnimation","oldLeftExists","animateInLeft","colOrGroup","oldActualLeft","actualLeft","indexColumn","__decorate$19","__extends$1m","__decorate$1a","HoverFeature","addMouseHoverListeners","__extends$1n","__decorate$1b","HeaderFilterCellCtrl","setupWidth","setupLeft","setupHover","setupFocus","setupUserComp","setupSyncWithFilter","setupUi","showParentFilter","suppressFilterButton","eMenuIcon","nextFocusableEl","scrollToColumn","nextFocusableColumn","findNextColumnWithFloatingFilter","columModel","nextCol","wrapperHasFocus","focusInto","notFromHeaderWrapper","fromWithinHeader","setFocusedHeader","hovered","setLeftFeature","finalFilterParams","currentParentModel","filterComponent","syncWithFilter","__extends$1o","__decorate$1c","ResizeFeature","canResize","canAutosize","destroyResizeFuncs","removeResize","resize","autoSize","finishedWithResizeFunc","horizontalResizeService","addResizeBar","eResizeBar","onResizeStart","onResizing","onResizeEnd","skipHeaderOnAutoSize_1","autoSizeColListener_1","touchListener_1","addResize","addRefreshFunction","resizeAmount","resizeAmountNormalised","normaliseResizeAmount","resizeStartWidth","resizeWithShiftKey","dragChange","notPinningLeft","pinningRight","__extends$1p","AgCheckbox","onCheckboxClick","getNextValue","setReadOnly","dispatchChange","refreshSelectedClass","__extends$1q","__decorate$1d","SelectAllFeature","cbSelectAllVisible","processingEventFromCheckbox","filteredOnly","cbSelectAll","getCheckboxGui","headerCellCtrl","showOrHideSelectAll","onModelChanged","onCbSelectAll","refreshSelectAllLabel","isCheckboxSelection","checkRightRowModelType","updateStateOfCheckbox","getNextCheckboxState","selectionCount","notSelected","getSelectionCount","allSelected","ariaStatus","setAriaDescriptionProperty","refreshAriaDescription","selectedCount","notSelectedCount","__extends$1r","__decorate$1e","HeaderCellCtrl","refreshFunctions","userHeaderClasses","ariaDescriptionProperties","updateState","setupMovingCss","setupMenuClass","setupSortableClass","addColumnHoverListener","setupFilterCss","setupColId","setupClassesFromColDef","addActiveHeaderMouseListeners","setupSelectAll","refreshAria","onColumnValueChanged","onColumnRowGroupChanged","onColumnPivotChanged","lookupUserCompDetails","userCompDetails","createParams","menuEnabled","showColumnMenu","multiSort","setSortForColumn","eGridHeader","selectAllFeature","onEnterKeyPressed","isMenuEnabled","setActiveHeader","refreshHeaderClasses","oldClasses","dragSourceElement","draggable","moveDragSource","createDragItem","colDefVersionNow","calculateDisplayName","workOutDraggable","refreshHeaderComp","newCompDetails","attemptHeaderCompRefresh","checkDisplayName","updateSortableCssClass","refreshAriaSort","refreshAriaMenu","descriptionArray","__extends$1s","__decorate$1f","GroupResizeFeature","calculateInitialValues","takeFromGroup","takeFromLeafCols","resizeTakeFromCols","resizeTakeFromStartWidth","resizeTakeFromRatios","normaliseDragChange","resizeColumns","preferredSize","getPreferredWidthForColumnGroup","totalWidth","resizeCols","resizeRatios","leafCols","__extends$1t","GroupWidthFeature","removeChildListenersFuncs","addListenersToChildrenColumns","onDisplayedChildrenChanged","removeListenersOnChildrenColumns","widthChangedListener","__decorate$1g","__extends$1u","__decorate$1h","HeaderGroupCellCtrl","addClasses","addAttributes","groupResizeFeature","tooltipCtrl","providedColGroup","refreshExpanded","eHeaderGroup","isSuppressMoving","getDragItemForGroup","allColumnsOriginalOrder","allColumnsCurrentOrder","childSuppressesMoving","__extends$1v","__decorate$1i","instanceIdSequence$4","HeaderRowCtrl","headerCellCtrls","onColumnResized","getHeaderCellCtrl","getWidthForRow","groupHeight","sizes","numberOfFloating","numberOfGroups","oldCtrls","getColumnsInViewport","idOfChild","oldCtrl","keepCtrl","isHeaderWrapperFocused","isFocusedAndDisplayed","ctrlsToDisplay","destroyCtrls","getColumnsInViewportPrintLayout","getColumnsInViewportNormalLayout","actualDepth","getActualDepth","focusHeader","__extends$1w","__decorate$1j","__read$c","HeaderRowContainerCtrl","groupsRowCtrls","setupCenterWidth","setupPinnedWidth","setupDragAndDrop","registerHeaderContainer","dropContainer","bodyDropTarget","keepColumns","focusedHeaderPosition","getFocusHeaderToUseAfterRefresh","groupRowCount","refreshColumnGroups","columnsRowCtrl","destroyPreviousComp","filtersRowCtrl","rowIndexMismatch","refreshFilters","allCtrls","getAllCtrls","setCtrls","restoreFocusOnHeader","__spread$9","setCenterWidth","setContainerTransform","pinningLeft","addPaddingForScrollbar","setPinnedContainerWidth","getHtmlElementForColumnHeader","__extends$1x","__decorate$1k","HeaderRowContainerComp","headerRowComps","rowCompsList","selectAndSetTemplate","eCenterContainer","PINNED_LEFT_TEMPLATE","PINNED_RIGHT_TEMPLATE","CENTER_TEMPLATE","eRowContainer","destroyRowComps","destroyRowComp","prevGui","oldRowComps","ctrlId","existingComp","appendEnsuringDomOrder","__extends$1y","__decorate$1l","HeaderNavigationDirection","HeaderNavigationService","centerHeaderContainer","getHeaderRowType","navigateVertically","fromHeader","rowLen","isUp","nextRow","nextFocusColumn","skipColumn","currentRowType","navigateHorizontally","fromTab","nextHeader","normalisedDirection","focusedHeader","headerPositionUtils","findHeader","focusNextHeaderRow","findColAtEdgeForHeaderRow","columnToScrollTo","__extends$1z","__decorate$1m","GridHeaderCtrl","onPivotModeChanged","setupHeaderHeight","registerGridHeaderCtrl","totalHeaderHeight","setHeightAndMinHeight","clearFocusedHeader","__extends$1A","GridHeaderComp","addContainer","__decorate$1n","__extends$1B","__decorate$1o","HorizontalResizeService","dragStartX","setResizeIcons","MouseEvent","setResizeCursor","disableUserSelect","resetIcons","__extends$1C","__decorate$1p","StandardMenuFactory","showPopup","tabListener","trapFocusWithin","isKeyboardEvent","KeyboardEvent","focusableEl","findTabbableParent","__extends$1D","__decorate$1q","__extends$1E","TabbedLayout","getTemplate","tabbedItemScrollMap","addItem","eHeader","currentPosition","activeItem","nextItem","showItemWrapper","eHeaderButton","eBody","isFocusUnderManagedComponent","setAfterAttachedParams","afterAttachedParams","showFirstItem","titleLabel","tabbedItem","showItem","itemWrapper","onItemClicked","lastScrollListener","bodyPromise","onlyUnmanaged","isKeyboardMode","afterAttachedCallback","keepScrollPosition","scrollableContainer_1","getScrollableContainer","scrollPosition_1","onActiveItemClicked","ResizeObserverService","polyfillFunctions","resizeObserver","debouncedCallback","suppressResize","ResizeObserver","observe","disconnect","widthLastTime","heightLastTime","running","periodicallyCheckWidthAndHeight","doNextPolyfillTurn","usePolyfill","schedulePolyfill","polyfillScheduled","__decorate$1r","__extends$1F","__decorate$1s","AnimationFrameService","createTasksP1","sorted","createTasksP2","destroyTasks","ticking","scrollGoingDown","lastScrollTop","taskCount","cancelledTasks","useAnimationFrame","isOn","verifyAnimationFrameOn","task","taskItem","createOrder","addTaskToList","cancelTask","taskList","sortTaskList","sortDirection","executeFrame","millis","p1TaskList","p1Tasks","p2TaskList","p2Tasks","frameStart","noMaxMillis","requestFrame","stopTicking","webkitRequestAnimationFrame","pending","__extends$1G","__decorate$1t","RESIZE_CONTAINER_STYLE","RESIZE_TEMPLATE","PositionableFeature","dragStartPosition","lastSize","positioned","resizersAdded","resizeListeners","boundaryEl","isResizing","movable","currentResizer","center","getHeight","offsetElement","initialisePosition","centered","forcePopupParentAsOffsetParent","setOffsetParent","computedMinHeight","computedMinWidth","findBoundaryElement","offsetParentComputedStyles","paddingWidth","paddingHeight","refreshSize","top_1","isPositioned","setMovable","moveElement","moveElementDragListener","onMoveStart","onMove","onMoveEnd","setResizable","clearResizeListeners","addResizers","removeResizers","topLeft","topRight","bottomRight","bottomLeft","side","resizerEl","getResizerElement","onResize","removeSizeFromEl","restoreLastSize","isPercent","elRect","parentRect","yPosition","positionPopup","updateDragStartPosition","calculateMouseMovement","isTop","topBuffer","xDiff","yDiff","movementX","shouldSkipX","anywhereWithin","movementY","shouldSkipY","diff","boundaryElRect","skipX","skipY","createResizeMap","resizerMap","resizers","applySizeToSiblings","getSiblings","getMinSizeOfSiblings","currentEl","nextHeight","nextWidth","vertical","containerToFlex","isHorizontal","isVertical","offsetLeft","offsetTop","oldWidth","skipWidth","oldHeight","skipHeight","calculateTopBuffer","__extends$1H","__decorate$1u","AutoWidthCalculator","eHeaderCell","getHeaderCellForColumn","getAllCellsForColumn","addElementsToContainerAndGetWidth","eDummyContainer","eBodyContainer","cloneItemIntoDummy","dummyContainerWidth","eCellClone","cloneNode","eCloneParent","eCloneParentClassList","__extends$1I","__decorate$1v","__read$d","__spread$a","RowRenderer","destroyFuncsForColumnListeners","rowCtrlsByRowIndex","zombieRowCtrls","allRowCtrls","topRowCtrls","bottomRowCtrls","refreshInProgress","onPageLoaded","onPinnedRowDataChanged","onDomLayoutChanged","registerCellEventListeners","initialiseCache","redrawAfterModelUpdate","countProp","cachedRowCtrls","RowCtrlCache","updateAllRowCtrls","liveList","zombieList","cachedList","getEntries","getFullWidthRowCtrls","refreshListenersToColumnsForCellComps","removeGridColumnListeners","forEachCellWithThisCol","leftChangedListener","firstRightPinnedChangedListener","lastLeftPinnedChangedListener","destroyRows","datasourceChanged","firstRenderedRow","lastRenderedRow","rowIndexesToRemove","removeRowCtrls","recycleRows","newPage","onlyBody","getAllRowCtrls","refreshFloatingRowComps","refreshFloatingRows","getRenderedIndexesForRowNodes","renderedRow","partialRefresh","indexesToRemove","getCellToRestoreFocusToAfterRefresh","suppressKeepFocus","getFocusCellToUseAfterRefresh","cellDomData","rowDomData","getLockOnRefresh","updateContainerHeights","scrollToTopIfNewData","rowsToRecycle","removeAllRowComps","focusedCellRecycled","isFocusedCellGettingRecycled","redraw","dispatchDisplayedRowsChanged","restoreFocusedCell","releaseLockOnRefresh","suppressScrollToTop","setModelHeight","containerHeight","getCellCtrls","refreshCellParams","fullWidthRowCtrl","mapRowNodes","isRowInMap","rowIdsMap","colIdsMap","processRow","stubNodeIndexes","nodesByIdMap","rowsToRemove","indexToRemove","removeRowCompsNotToDraw","indexesToDraw","indexesToDrawMap","indexesNotToDraw","calculateIndexesToDraw","checkRowToDraw","indexStr","doNotUnVirtualiseRow","afterScroll","updateOffset","workOutFirstAndLastRowsToRender","createOrUpdateRowCtrl","destroyRowCtrls","redrawFullWidthEmbeddedRows","fullWidthCtrl","rowNodesMap","rowNodesToRefresh","selectivelyRefreshing","idsToRefresh","createRowCon","rowCtrlsMap","executeInAWhileFuncs","nodeId","addRow","bufferPixels","rowHeightsChanged","firstPixel","lastPixel","getCurrentPagePixelRange","pageFirstPixel","pageLastPixel","divStretchOffset","bodyVRange","bodyBottomPixel","ensureAllRowsInRangeHaveHeightsCalculated","firstRowIndex","pageFirstRow","pageLastRow","rowLayoutNormal","suppressRowCountRestriction","rowBufferMaxSize","event_2","topPixel","bottomPixel","ensureRowHeightsValid","rowHasFocus","isRowNodeFocused","rowIsEditing","isRowPresent","rowCtrlFromCache","renderedRows","rowPosition","rowComponent","gridRow","isRangeInRenderedViewport","endIndex","maxCount","entriesMap","entriesList","rowCtrlToDestroy","removeFromCache","rowNodeId","__extends$1J","__decorate$1w","ValueFormatterService","suppliedFormatter","useFormatterFromColumn","__extends$1K","__decorate$1x","PinnedRowModel","pinnedTopRows","pinnedBottomRows","getRowAtPixel","createNodesFromData","allData","nextRowTop_1","dataItem","getTotalHeight","forEachPinnedTopRow","forEachPinnedBottomRow","lastNode","ServerSideTransactionResultStatus","Applied","StoreNotFound","StoreLoading","StoreWaitingToLoad","StoreLoadingFailed","StoreWrongType","Cancelled","ChangedPath","keepingColumns","nodeIdsToColumns","mapToItems","pathRoot","setInactive","depthFirstSearchChangedPath","pathItem","depthFirstSearchEverything","traverseEverything","forEachChangedNodeDepthFirst","traverseLeafNodes","executeFromRootNode","createPathItems","newEntryCount","populateColumnsMap","linkPathItems","thisItem","parentItem","addParentNode","canSkip","getValueColumnsForNode","colsForThisNode","getNotValueColumnsForNode","__extends$1L","RowNodeBlock","STATE_WAITING_TO_LOAD","STATE_LOADING","loadFromDatasource","setStateWaitingToLoad","getState","pageLoadFailed","isRequestMostRecentAndLive","STATE_FAILED","processServerFail","dispatchLoadCompleted","success","successCommon","pageLoaded","thisIsMostRecentRequest","weAreNotDestroyed","STATE_LOADED","processServerResult","EVENT_LOAD_COMPLETE","__extends$1M","__decorate$1y","__param$4","RowNodeBlockLoader","activeBlockLoadsCount","blocks","RowNodeBlockLoader_1","maxConcurrentRequests","checkBlockToLoadDebounce","performCheckBlocksToLoad","addBlock","loadComplete","checkBlockToLoad","removeBlock","BLOCK_LOADER_FINISHED_EVENT","printCacheStatus","blockToLoad","getBlockStateJson","isLogging","__extends$1N","__decorate$1z","PaginationProxy","topDisplayedRowIndex","bottomDisplayedRowIndex","pixelOffset","masterRowCount","onPaginationPageSizeChanged","startPixel","endPixel","startLimitIndex","endLimitIndex","calculatePages","modelUpdatedEvent","topRowBounds","bottomRowBounds","firstInRange","lastInRange","getRowBounds","getPageForIndex","pageNumber","isRowInPage","lastPage","totalPages","setPageSize","calculatePagesAllRows","calculatePagesMasterRowsOnly","calculatedPagesNotActive","setPixelOffset","setZeroRows","getTopLevelRowCount","masterLastRowIndex","masterPageEndIndex","getTopLevelRowDisplayedIndex","firstIndexNotToShow","maxRowIndex","__extends$1O","__decorate$1A","StylingService","processAllCellClasses","onApplicableClass","onNotApplicableClass","processStaticCellClasses","classRules","classNames","classesToApply","classesToRemove","resultOfRule","rule","this_1","singleClass","classOrClasses","cssClassItem","__extends$1P","AgRadioButton","__extends$1Q","AgToggleButton","__extends$1R","AgInputTextField","preventDisallowedCharacters","pattern","clipboardData","getData","__extends$1S","AgInputTextArea","__extends$1T","AgInputNumberField","floatedValue","normalizeValue","precision","adjustPrecision","floatString","setMin","setMax","setPrecision","setStep","__extends$1U","AgInputRange","setMinValue","setMaxValue","__extends$1V","__decorate$1B","AgSlider","eSlider","eventChanged","textValue","sliderValue","setSliderWidth","setTextFieldWidth","minValue","maxValue","__extends$1W","__decorate$1C","AgAngleSelect","radius","dragListener","eParentCircle","parentCircleRect","calculateAngleDrag","eAngleValue","degrees","floatValue","updateNumberInput","normalizeNegativeValue","positionChildCircle","radians","eChildCircle","centerY","cos","sin","calculatePolar","atan2","toDegrees","sqrt","calculateCartesian","toRadians","getRadius","setOffsetX","setOffsetY","PI","normalizeAngle180","setRadius","radiansValue","__extends$1X","__decorate$1D","AgColorPanel","isSpectrumDragging","isSpectrumHueDragging","isSpectrumAlphaDragging","colorChanged","picker","initRecentColors","spectrumVal","onSpectrumDraggerDown","onSpectrumDraggerMove","spectrumHue","onSpectrumHueDown","onSpectrumHueMove","spectrumAlpha","onSpectrumAlphaDown","onSpectrumAlphaMove","recentColors","onRecentColorClick","refreshSpectrumRect","spectrumValRect","refreshHueRect","spectrumHueRect","refreshAlphaRect","spectrumAlphaRect","moveDragger","moveHueSlider","moveAlphaSlider","valRect","setSpectrumValue","hueRect","slider","spectrumHueSlider","sliderRect","alphaRect","spectrumAlphaSlider","color","spectrumColor","rgbaColor","backgroundColor","spectrumDragger","saturation","brightness","dragger","draggerRect","__read$e","addRecentColor","currentColor","maxRecentColors","__extends$1Y","__decorate$1E","AgPanel","closable","hideTitleBar","positionableFeature","setBodyComponent","eTitleBar","setClosable","eTitleBarButtons","eContentWrapper","renderComponent","closeButtonComp","CLOSE_BTN_TEMPLATE","addTitleBarButton","onBtClose","bodyComponent","eTitle","__extends$1Z","__assign$e","AgDialog","isMaximizable","isMaximized","maximizeListeners","resizeListenerDestroy","maximizable","bringPopupToFront","setMaximizable","alwaysOnTop","toggleMaximize","refreshMaximizeIcon","maximizeIcon","minimizeIcon","clearMaximizebleListeners","destroyListener","maximizeButtonComp","__decorate$1F","__extends$1_","AgColorPicker","eGuiRect","colorDialog","colorPanel","__extends$1$","__decorate$1G","AgGroupComponent","suppressEnabledCheckbox","suppressOpenCloseIcons","initialItems","cbGroupEnabled","setAlignItems","hideEnabledCheckbox","hideOpenCloseIcons","setupExpandContract","refreshAriaStatus","refreshChildDisplay","eGroupClosedIcon","eGroupOpenedIcon","toggleGroupExpand","showIcon","eToolbar","EVENT_EXPANDED","EVENT_COLLAPSED","hideItem","addCssClassToTitleBar","skipToggle","refreshDisabledStyles","isEnabled","onEnableChange","__extends$20","__decorate$1H","TabGuardCtrl","skipTabGuardFocus","eTopGuard","eBottomGuard","focusInnerElement","providedFocusInnerElement","providedFocusIn","providedFocusOut","providedShouldStopEventPropagation","providedOnTabKeyDown","providedHandleKeyDown","activateTabGuards","guard","tabGuardsAreActive","deactivateTabGuards","fromBottom","getNextFocusableElement","focusable","findFocusableElements","forceFocusOutOfContainer","tabGuardToFocus","__extends$21","__read$f","TabGuardComp","initialiseTabGuard","createTabGuard","tabGuards","tabGuard","addTabGuards","tabGuardCtrl","topTabGuard","bottomTabGuard","removeAllChildrenExceptTabGuards","__spread$b","__extends$22","__assign$f","__decorate$1I","AgMenuList","menuItems","parentGui","closeIfIsChild","handleNavKey","topMenu","findTopMenu","clearActiveItem","activeMenuItem","deactivate","addMenuItems","menuItemOrString","addSeparator","menuItemDef","menuItem","AgMenuItemComponent","isAnotherSubMenuOpen","isSubMenuOpen","EVENT_MENU_ITEM_SELECTED","EVENT_MENU_ITEM_ACTIVATED","activateFirstItem","currentItem","activate","nextParent","findNextItem","openChild","closeSubMenu","openSubMenu","foundCurrent","__extends$23","AgMenuPanel","wrappedComponent","closePanel","__decorate$1J","__extends$24","__decorate$1K","subMenuIsOpen","getClassName","addIcon","addName","addShortcut","addSubMenu","addTooltip","onItemSelected","subMenu","destroySubMenu","currentLevel","nextLevel","childMenu_1","cancelDeactivate","subMenu_1","menuPanel","subMenuGui_1","mouseEvent_1","mouseEnterListener_1","positionPopupForMenu","hideSubMenu","cancelActivate","onItemActivated","isCompact","shortcut","activateTimeoutId","deactivateTimeoutId","ACTIVATION_DELAY","suffix","__extends$25","__decorate$1L","__read$g","FocusService","FocusService_1","addKeyboardModeEvents","controller","docControllers","instancesMonitored","toggleKeyboardMode","removeKeyboardModeEvents","newControllers","__spread$c","currentGridCore","isKeyboardActive","keyboardModeActive","controllersForDoc","clearFocusedCellListener","onColumnEverythingChanged","unregisterGridCompController","gridCompController","focusedCellPosition","colFromColumnModel","isDomDataMissingInHierarchy","eBrowserCell","ePointer","gridColumn","focusedColumn","previousHeaderPosition","nextHeaderPosition","focusGridView","focusFirstHeader","isAnyCellFocused","exclude","excludeString","excludeNodes","focusableElements","toFocus","onlyManaged","activeEl","nextIndex","managedContainers","getLastRow","getFirstRow","focusNextInnerContainer","isDetailGrid","AG_KEYBOARD_FOCUS","__extends$26","__decorate$1M","DIRECTION","horizontal","instanceIdSeq","PopupService","popupList","sourceRect","getParentRect","keepXYWithinBounds","maxX","xRightPosition","xLeftPosition","nudgeX","calculatePointerAlign","callPostProcessPopup","alignSide","getPopupList","bounds","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","sizeProperty","anchorProperty","offsetProperty","scrollPositionProperty","docElement","isBody","offsetSize","sizeOfParent","keepPopupPositionedRelativeTo","initialDiffTop","initialDiffLeft","lastDiffTop","lastDiffLeft","leftPx","pRect","sRect","currentDiffTop","newTop","currentDiffLeft","newLeft","intervalId","click","destroyPositionTracker","stopAnchoringPromise","setAlwaysOnTop","popupHidden","hidePopupOnKeyboardEvent","hidePopupOnMouseEvent","hidePopupOnTouchEvent","popupParams","isEventFromCurrentPopup","isEventSameChainAsOriginalEvent","originalMouseEvent","isAnchored","indexOfThisChild","mouseEventOrTouch","screenY_1","screenY","xMatch","screenX","yMatch","popupLen","alwaysOnTopList","onTopLength","innerEls","innerElsScrollMap","__extends$27","__decorate$1N","OUTSIDE_ANGULAR_EVENTS","VirtualList","isDestroyed","getItemHeight","addResizeObserver","setAriaProperties","drawVirtualRows","destroyObserver","focusRow","lastFocusedRowIndex","getLastFocusedRow","rowNumber","getComponentAt","viewportTopPixel","viewportScrolledBeforeRow","setComponentCreator","componentCreator","getScrollTop","clearVirtualRows","removeRow","ensureRowsRendered","insertRow","isRowSelected","PASSIVE_EVENTS$1","capture","__extends$28","__decorate$1O","CellNavigationService","ctrlPressed","getNextCellToFocusWithCtrlPressed","getNextCellToFocusWithoutCtrlPressed","upKey","leftKey","getCellAbove","getCellBelow","getCellToLeft","getCellToRight","isCellGoodToFocusOn","lastCell","colToLeft","colToRight","getRowBelow","isLastRowInContainer","rowBelow","getRowAbove","getLastBodyCell","getLastFloatingTopRow","rowAbove","getNextTabbedCellBackwards","getNextTabbedCellForwards","newRowIndex","newFloating","newColumn","__extends$29","__decorate$1P","__param$5","AlignedGridsService","consuming","fireEvent","otherGrids","otherGridOptions","alignedGridService","onEvent","onColumnEvent","onScrollEvent","getMasterColumns","getColumnIds","processColumnEvent","processGroupOpenedEvent","groupOpenedEvent","masterColumnGroup","otherColumnGroup","colEvent","masterColumn","otherColumn","masterColumns","movedEvent","destColState","visibleEvent","pinnedEvent","resizedEvent_1","grid","__extends$2a","__decorate$1Q","__param$6","SelectionService","selectedRows","removeGroupsFromSelection","changedPath","getRootNode","getNodeForIdIfSelected","rowNodeToKeepSelected","groupsToRefresh","otherRowNode","syncInOldRowNode","syncInNewRowNode","topLevelNodes","getTopLevelNodes","traverse","l","setRowModel","justFiltered","rowModelClientSide","__decorate$1R","ColumnApi","isPinning","getAllColumns","getAllDisplayedVirtualColumns","setColumnWidth","getLeftDisplayedColumnGroups","getCenterDisplayedColumnGroups","getRightDisplayedColumnGroups","getAllDisplayedColumnGroups","getPrimaryColumns","hideColumns","hideColumn","columnState","setColumnState","resetState","getAggregationColumns","removeAggregationColumn","removeAggregationColumns","addAggregationColumn","addAggregationColumns","setColumnAggFunction","getDisplayNameForCol","__extends$2b","__decorate$1S","ValueService","initialised","cellExpressions","callColumnCellValueChangedHandler","forFilter","ignoreAggData","groupDataExists","aggDataExists","executeFilterValueGetter","executeValueGetter","cellValueGetter","openedGroup","getOpenedGroup","valueWasDifferent","setValueUsingField","fieldPieces","fieldPiece","getValueCallback","valueFromCache","getKeyForNode","__extends$2c","__decorate$1T","__param$7","ExpressionService","expressionToFunctionCache","expressionOrFunc","evaluateExpression","createExpressionFunction","javaScriptFunction","functionBody","createFunctionBody","theFunction","__extends$2d","TemplateService","templateCache","waitingCallbacks","templateFromCache","callbackList","client","onload","handleHttpResult","httpResult","response","__decorate$1U","__extends$2e","__decorate$1V","__param$8","LoggerFactory","logging","Logger","isLoggingFunc","__extends$2f","__decorate$1W","GridCtrl","eGridHostDiv","addRtlSupport","addOrRemoveKeyboardFocusClass","onGridSizeChanged","registerGridCtrl","showDropZones","showSideBar","showStatusBar","showWatermark","setRtlClass","setCursor","setUserSelect","focusableContainers","getFocusableContainers","nextIdx","lastColumn","__extends$2g","__decorate$1X","GridComp","userSelect","webkitUserSelect","createTemplate","insertGridIntoDom","eRootWrapperBodyClassList","eRootWrapperBody","gridBodyComp","__extends$2h","__decorate$1Y","SortController","SortController_1","nextDirection","getNextSortDirection","clearSortBarThisColumn","updateSortIndex","lastColToChange","allSortedCols","sortedCols","columnToSkip","columnToClear","DEFAULT_SORTING_ORDER","allColumnsIncludingAuto","columnsWithSorting","allColsIndexes","iA","iB","getSortModel","getSortOptions","__extends$2i","__decorate$1Z","ColumnHoverService","selectedColumns","__extends$2j","__decorate$1_","ColumnAnimationService","executeNextFuncs","executeLaterFuncs","animationThreadCount","ensureAnimationCssClassPresent","executeLaterVMTurn","animationThreadCountCopy","nowFuncs","waitFuncs","__extends$2k","__decorate$1$","AutoGroupColService","AutoGroupColService_1","doingTreeData","doingMultiAutoColumn","rowGroupCol","createOneAutoGroupColumn","defaultAutoColDef","generateDefaultColDef","GROUP_AUTO_COLUMN_BUNDLE_ID","userDef","__extends$2l","__decorate$20","PaginationAutoPageSizeService","centerRowContainerCon","onBodyHeightChanged","checkPageSize","notActive","newPageSize","__extends$2m","__decorate$21","ValueCache","cacheVersion","neverExpires","__cacheVersion","__cacheData","__extends$2n","__decorate$22","ChangeDetectionService","doChangeDetection","onlyChangedColumns","doAggregate","__extends$2o","__decorate$23","AgComponentUtils","jsCompFunc","functionAdapter","adaptCellRendererFunction","Adapter","callbackResult","candidate","__extends$2p","__decorate$24","ComponentMetadataProvider","componentMetaData","dateComponent","floatingFilterWrapperComponent","statusPanel","__extends$2q","__decorate$25","HARD_CODED_SIZES","headerCellMinWidth","listItemHeight","BASE_GRID_SIZE","MAT_GRID_SIZE","BALHAM_GRID_SIZE","ALPINE_GRID_SIZE","SASS_PROPERTY_BUILDER","CALCULATED_SIZES","Environment","useTheme","calculatedValue","prevEl","currentClass","currentDiv","sizeName","isThemeDark","themeFamily","reg","themeMatch","newTheme_1","__extends$2r","__decorate$26","__param$9","RowContainerHeightService","uiBodyHeight","maxDivHeight","stretching","newScrollY","newBodyHeight","getUiBodyHeight","calculateOffset","setUiContainerHeight","pixelsToShave","modelHeight","uiContainerHeight","maxScrollY","scrollPercent","setDivStretchOffset","clearOffset","newOffset","newOffsetFloor","modelPixel","modelMaxScroll","__extends$2s","__decorate$27","SelectableService","updateSelectableAfterGrouping","recurseDown","nextChildrenFunc","rowSelectable","__extends$2t","__decorate$28","PaginationComp","previousAndFirstButtonsDisabled","nextButtonDisabled","lastButtonDisabled","btFirst","btPrevious","btNext","btLast","onBtFirst","onBtPrevious","onBtNext","onBtLast","enableOrDisableButtons","updateRowLabels","setCurrentPageLabel","setTotalLabels","pagesExist","lbCurrent","formatNumber","strPage","strTo","strOf","strFirst","strPrevious","strNext","strLast","toggleButtonDisabled","zeroPagesToDisplay","isZeroPagesToDisplay","lbFirstRowOnPage","lbLastRowOnPage","lastPageFound","setTotalLabelsToZero","lbTotal","lbRecordCount","moreText","__extends$2u","__decorate$29","LoadingType","Loading","NoRows","OverlayWrapperComponent","inProgress","destroyRequested","manuallyDisplayed","overlayWrapperClassList","eOverlayWrapper","onRowDataChanged","setWrapperTypeClass","loadingType","showOverlay","workItem","destroyActiveOverlay","activeOverlay","showOrHideOverlay","__extends$2v","__decorate$2a","RowPositionUtils","pinnedBottomCount","pinnedTopCount","rowA","rowB","__extends$2w","CellPositionUtils","createIdFromValues","cellA","cellB","__decorate$2b","__extends$2x","UndoRedoAction","cellValueChanges","FillUndoRedoAction","initialRange","finalRange","UndoRedoStack","maxStackSize","actionStack","DEFAULT_STACK_SIZE","getCurrentStackSize","__extends$2y","__decorate$2c","UndoRedoService","activeCellEdit","activeRowEdit","isPasting","isFilling","eventCell","isCellEditing","isRowEditing","cellValueChange","clearStacks","undoStack","redoStack","undoRedoLimit","addRowEditingListeners","addCellEditingListeners","addPasteListeners","addFillListeners","undoAction","processAction","processRangeAndCellFocus","redoAction","valueExtractor","currentRow","startColumn","setLastFocusedCell","pushActionsToUndoStack","__extends$2z","__decorate$2d","HeaderPositionUtils","nextColumn","ColumnDefFactory","colGroupDefs","addToResult","childDef","createDefFromColumn","parentDef","existingParentDef","createDefFromGroup","defCloned","colDefCloned","__decorate$2e","__decorate$2f","RowCssClassCalculator","extraCssClass","preProcessRowClassRules","rowCls","rowClassParams","__decorate$2g","RowNodeSorter","doFullSort","sortOptions","sortedRowNodes","currentPos","compareRowNodes","sortedNodeA","sortedNodeB","comparatorResult","sortOption","isInverted","providedComparator","getComparator","comparatorOnCol","groupLeafField","primaryColumn","__extends$2A","CtrlsService","readyCallbacks","CtrlsService_1","checkReady","centerHeaderRowContainerCtrl","leftHeaderRowContainerCtrl","rightHeaderRowContainerCtrl","fakeHScrollCtrl","gridHeaderCtrl","p_1","createReadyParams","registerFakeHScrollCtrl","getGridHeaderCtrl","NAME","__decorate$2h","__extends$2B","CtrlsFactory","registry","meta","controllerName","controllerClass","getInstance","ControllerClass","__decorate$2i","__extends$2C","__decorate$2j","FakeHScrollCtrl","spacerWidthsListener","setFakeHScrollSpacerWidths","hideAndShowInvisibleScrollAsNeeded","addActiveListenerToggles","setScrollVisible","vScrollShowing","rightSpacing","scrollOnRight","setRightSpacerFixedWidth","includeRightSpacerScrollerCss","leftSpacing","setLeftSpacerFixedWidth","includeLeftSpacerScrollerCss","hScrollShowing","scrollContainerSize","setContainerHeight","__extends$2D","__decorate$2k","FakeHScrollComp","eRightSpacer","eLeftSpacer","__extends$2E","__decorate$2l","PinnedWidthService","checkContainerWidths","__extends$2F","__decorate$2m","RowNodeEventThrottle","dispatchExpandedDebounced","onRowGroupOpened","__read$h","__spread$d","GridCoreCreator","gridComp","createUi","acceptChanges","registeredModules","createBeansList","createProvidedBeans","contextLogger","registerModuleUserComponents","registerStackComponents","registerControllers","setColumnsAndData","dispatchGridReadyEvent","isEnterprise","controllers","ctrlsFactory","agStackComponents","createAgStackComponentsList","passedViaConstructor","registered","allModules","mapNames","addModule","mod","addIndividualModule","currentModule","dependantModules","extractModuleEntity","userComponents","compMeta","seed","moduleAgStackComps","rowModelClass","getRowModelClass","moduleBeans","beansNoDuplicates","moduleEntities","extractor","rowModelClasses","rowModels","createMethod","unwrap","createMethodProxy","BarColumnLabelPlacement","InsideBase","InsideEnd","Center","OutsideEnd","globalObj","HTMLButtonElement","HTMLSelectElement","HTMLInputElement","__read$i","ClientSideNodeManager","nextId","allNodesMap","ROOT_NODE_ID","allLeafChildren","childrenAfterSort","childrenAfterFilter","getCopyOfNodesMap","createNode","TOP_LEVEL","rowDataTran","rowNodeTransaction","nodesToUnselect","executeRemove","executeUpdate","executeAdd","updateSelection","nodesBeforeIndex","nodesAfterIndex","newNodes","allLeafChildren_1","normalizedAddIndex","prevIdx","currNode","currIdx","prevValueAtIndex","__spread$e","rowIdsRemoved","lookupRowNode","setMasterForRow","expandByDefault","__extends$2G","__decorate$2n","RecursionType","AfterFilter","AfterFilterAndSort","PivotNodes","ClientSideRowModel","refreshEverythingFunc","refreshEverythingAfterColsChangedFunc","afterColumnsChanged","onValueChanged","refreshMapListener","nodeManager","atLeastOneChange","rowAtStartPixel","rowAtEndPixel","setRowTopAndRowIndex","nextRowTop","displayedRowsMapped","rowsToDisplay","changedPathActive","clearIfNotDisplayed","recurse","indexAtPixelNow","rowNodeAtPixelNow","highlight","lastHighlightedRow","filteredChildren","topLevelIndex","primaryOrQuickFilterChanged","createChangePath","rowNodeTransactions","noTransactions","transWithAddsOrDeletes","tx","doRowGrouping","doFilter","doPivot","doFilterAggregates","doSort","doRowsToDisplay","displayedNodesMapped","rowsMissing","firstRowHit","lastRowHit","lookingForLastRow","childOfLastRow","pixelToMatch","bottomPointer","topPointer","midPointer","isRowInPixel","recursivelyWalkNodesAndCallback","forEachPivotNode","recursionType","nodeChildren","aggregationStage","filterAggregatesStage","expand","usingPivotMode","recursiveExpandOrCollapse","actionRow","sortStage","groupStage","restoreGroupState","filterStage","pivotStage","getGroupState","res_1","applyAsyncTransactionsTimeout","rowDataTransactionBatch","waitMillis","executeBatchUpdateRowData","callbackFuncsBound","rowNodeTrans","forceRowNodeOrder","tranItem","rowNodeTran","commonUpdateRowData","createRowNodeOrder","orderMap","flattenStage","__extends$2H","__decorate$2o","FilterStage","filterService","__extends$2I","__decorate$2p","SortStage","sortActive","sortContainsGroupColumns","sortService","__extends$2J","__decorate$2q","FlattenStage","skipLeafNodes","showRootNode","recursivelyAddToRowsToDisplay","ensureFooterNodeExists","addRowNodeToRowsToDisplay","rowsToFlatten","hideOpenParents","isParent","isRemovedSingleChildrenGroup","isRemovedLowestSingleChildrenGroup","excludedParent","createDetailNode","groupNode","footerNode","masterNode","__extends$2K","__decorate$2r","SortService","useDeltaSort","groupColumnsPresent","allDirtyNodes","calculateDirtyNodes","pullDownGroupDataForHideOpenParents","childrenToBeSorted","indexedOrders_1","acc","row1","row2","doDeltaSort","rowNodeSorter","updateChildIndexes","updateGroupDataForHideOpenParents","dirtyNodes","addNodesFunc","tran","allTouchedNodes","unsortedRows","oldSortedRows","untouchedRowsMap","touchedRows","sortedUntouchedRows","mapNodeToSortedNode","sortedChangedRows","mergeSortedArrays","listToSort","clearOperation","childRowNode","groupDisplayCol","parentToStealFrom","__extends$2L","__decorate$2s","FilterService","filterNodes","includeChildNodes","passBecauseChildren","passBecauseDataPasses","doingTreeDataFiltering","treeDataDepthFirstFilter_1","alreadyFoundInParent","foundInParent","__extends$2M","__decorate$2t","ImmutableService","transactionAndMap","createTransactionForRowData","__read$j","nodeTransaction","existingNodesMap","existingNode","clientSide","__extends$2N","__decorate$2u","InfiniteBlock","parentCache","blockSize","createRowNodes","blockNumber","getStartRow","getEndRow","pageStatus","createLoadParams","getRows","successCallback","failCallback","sortModel","getLastAccessed","lastAccessed","dontTouchLastAccessed","lastAccessedSequence","destroyRowNodes","__extends$2O","__decorate$2v","__param$a","InfiniteCache","lastRowIndexKnown","blockCount","initialRowCount","dontCreatePage","blockId","createBlock","newBlock","purgeBlocksIfNeeded","getBlocksInOrder","destroyAllBlocks","destroyBlock","checkRowCount","onCacheUpdated","blockToExclude","blocksForPurging","maxBlocksProvided","blocksToKeep","emptyBlocksToKeep","MAX_EMPTY_BLOCKS_TO_KEEP","isBlockCurrentlyDisplayed","isBlockFocused","removeBlockFromCache","blockIndexStart","blockIndexEnd","blockToRemove","lastRowIndexPlusOverflow","overflowSize","forEachNodeDeep","destroyAllBlocksPastVirtualRowCount","blocksToDestroy","getRowNodesInRange","lastBlockId","inActiveRange","numberSequence","foundGapInSelection","hitFirstOrLast","__extends$2P","__decorate$2w","InfiniteRowModel","destroyCache","verifyProps","destroyDatasource","onColumnEverything","cacheParams","isSortModelDifferent","infiniteCache","resetCache","createModelUpdatedEvent","defaultIfInvalid","rowIndexForPixel","infinite","BaseCreator","getFileName","fileName","getDefaultFileExtension","getDefaultFileName","serializingSession","createSerializingSession","gridSerializer","serialize","BaseGridSerializingSession","groupColumns","processCellCallback","processHeaderCallback","processGroupHeaderCallback","processRowGroupCallback","prepare","columnsToExport","extractHeaderValue","extractRowCellValue","accumulatedRowIndex","valueForCell","groupIndex","createValueForGroupNode","processCell","Downloader","download","URL","createObjectURL","bubbles","revokeObjectURL","__extends$2Q","CsvSerializingSession","isFirstLine","columnSeparator","suppressQuotes","addCustomContent","beginNewLine","putInQuotes","mergeAcross","appendEmptyCells","onNewHeaderGroupingRow","onColumn","onNewHeaderGroupingRowColumn","onNewHeaderRow","onNewHeaderRowColumn","onNewBodyRow","onNewBodyRowColumn","stringValue","__extends$2R","__decorate$2x","CsvCreator","getMergedParams","export","isExportSuppressed","packagedFile","Blob","__extends$2S","__decorate$2y","HEADER_GROUPING","HEADER","BODY","GridSerializer","gridSerializingSession","getColumnsToExport","columnKeys","prepareSession","prependContent","exportColumnGroups","exportHeaders","processPinnedTopRows","processRows","processPinnedBottomRows","appendContent","serializeChain","rowSkipper","shouldRowBeSkipped","skipSingleChildrenGroup","skipLowestSingleChildrenGroup","isLeafNode","shouldSkipCurrentGroup","skipGroups","skipRowGroups","onlySelected","skipPinnedTop","skipPinnedBottom","rowAccumulator","getCustomContentBelowRow","customFooter","customHeader","skipColumnGroupHeaders","recursivelyAddHeaderGroups","skipColumnHeaders","gridRowIterator_1","usingCsrm","usingSsrm","onlySelectedNonStandardModel","onlySelectedAllPages","directChildrenHeaderGroups","doAddHeaderHeader","gridRowIterator","columnIndex","collapsibleGroupRanges","collapsibleGroups","currentIdx","lastGroup","crcTable","XmlFactory","createHeader","headerElement","encoding","standalone","headerStart","createXml","xmlElement","booleanTransformer","prefixedAttributes","prefixedSet","returnAttributeIfPopulated","rawMap","textNode","xmlValue","Uint32Array","ZipContainer","addFolders","addFolder","folders","isBase64","addFile","files","getContent","mimeType","textOutput","buildFileStream","uInt8Output","buildUint8Array","clearStream","fData","totalFiles","foData","lL","cL","totalFiles_1","__values$3","totalFiles_1_1","getHeader","fileHeader","folderHeader","buildFolderEnd","currentFile","utfPath","isUTF8","convertTime","convertDate","extraFields","uExtraFieldPath","getFromCrc32Table","getConvertedContent","convertedContent","tLen","cLen","lLen","uint8","Uint8Array","iterable","crc","AngularBillboardComponent","ctorParameters","Renderer2","propDecorators","bb","require","AngularBillboardService","generate","__WEBPACK_EXTERNAL_MODULE__2__","__WEBPACK_EXTERNAL_MODULE__3__","__WEBPACK_EXTERNAL_MODULE__4__","__WEBPACK_EXTERNAL_MODULE__5__","__WEBPACK_EXTERNAL_MODULE__6__","__WEBPACK_EXTERNAL_MODULE__7__","__WEBPACK_EXTERNAL_MODULE__8__","__WEBPACK_EXTERNAL_MODULE__9__","__WEBPACK_EXTERNAL_MODULE__10__","__WEBPACK_EXTERNAL_MODULE__11__","__WEBPACK_EXTERNAL_MODULE__12__","__WEBPACK_EXTERNAL_MODULE__13__","installedModules","__webpack_require__","moduleId","getter","toStringTag","mode","__esModule","__webpack_exports__","_classCallCheck","Constructor","_arrayLikeToArray","_unsupportedIterableToArray","minLen","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_arr","_n","_e","_s","_nonIterableRest","_defineProperties","_createClass","protoProps","staticProps","external_commonjs_d3_time_format_commonjs2_d3_time_format_amd_d3_time_format_root_d3_","external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_","external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_root_d3_","external_commonjs_d3_axis_commonjs2_d3_axis_amd_d3_axis_root_d3_","external_commonjs_d3_scale_commonjs2_d3_scale_amd_d3_scale_root_d3_","config_classes","arc","arcLabelLine","arcs","area","areas","axisX","axisXLabel","axisY","axisY2","axisY2Label","axisYLabel","bar","bars","brush","buttonZoomReset","chartArc","chartArcs","chartArcsBackground","chartArcsGaugeMax","chartArcsGaugeMin","chartArcsGaugeUnit","chartArcsTitle","chartArcsGaugeTitle","chartBar","chartBars","chartLine","chartLines","chartRadar","chartRadars","chartText","chartTexts","circle","circles","colorPattern","colorScale","defocused","dragarea","eventRect","eventRects","eventRectsMultiple","eventRectsSingle","gaugeValue","gridLines","legendBackground","legendItem","legendItemEvent","legendItemFocused","legendItemHidden","legendItemPoint","legendItemTile","levels","line","lines","region","regions","selectedCircle","selectedCircles","shape","shapes","stanfordElements","stanfordLine","stanfordLines","stanfordRegion","stanfordRegions","texts","tooltipContainer","tooltipName","xgrid","xgridFocus","xgridLine","xgridLines","xgrids","ygrid","ygridFocus","ygridLine","ygridLines","ygrids","zoomBrush","zoomRect","EXPANDED","SELECTED","INCLUDED","TextOverlapping","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","iter","_nonIterableSpread","_typeof","external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_","self","globalThis","browser_doc","isValue","isString","isNumber","isBoolean","ceil10","asHalfPixel","diffDomain","isObjectType","notEmpty","getOption","callFn","isFn","_len","_key","sanitise","setTextValue","dy","toMiddle","multiline","getRectSegList","_path$getBBox","getBBox","getBrushSelection","brushSelection","getBoundingRect","getRandom","asStr","brushEmpty","extend","capitalize","toArray","getTranslation","baseVal","numberOfItems","matrix","getUnique","isDate","mergeArray","mergeObj","_mergeObj","_len2","objectN","_key2","sortValue","isAsc","getMinMax","getRange","emulateEvent","mouse","getParams","initMouseEvent","touchObj","Touch","radiusX","radiusY","rotationAngle","TouchEvent","targetTouches","tplProcess","tpl","AxisRendererHelper_AxisRendererHelper","AxisRendererHelper","owner","scaleLinear","noTransition","transition_duration","withoutTransition","rangeExtent","scaleExtent","orgXScale","tickOffset","domain","stop","isYAxes","tickStepSize","ticks","_scale$domain2","tickArguments","newScale","tickFormat","formatted","interrupt","w","_el$node$getBBox","getSizeFor1Char","AxisRenderer_AxisRenderer","AxisRenderer","innerTickSize","outerTickSize","outerTick","orient","tickCentered","tickCulling","tickLength","tickPadding","tickValues","helper","splitTickText","isLeftRight","isTopBottom","tickTransform","getTickTransformSetter","axisPx","sign","rotate","tickTextRotate","tickTextPos","axisShow","tickShow","$g","each","scale0","__chart__","scale1","copyScale","isCategory","dx","enter","transitionise","outerTickSized","generateTicks","tick","tickEnter","tickExit","exit","sizeFor1Char","counts","tspan","tickMultiline","textFormatted","splitted","lineUpdate","textUpdate","setTickLineTextPosition","tickTitle","bandwidth","tickPosition","tickPos","getTickXY","_this$config","textAnchorForText","textTransform","yForText","getTickSize","charWidth","tickText","tickWidth","subtext","spaceIndex","format","isCentered","getTotalLength","culling","$$","forHorizontal","isRotated","axis_rotated","getAxisClassName","Axis_Axis","Axis","setOrient","axis_y2_show","axesList","classAxis","classLabel","axes","clipPathForXAxis","axis_y_inner","clipPathForYAxis","getTranslate","textAnchorForAxisLabel","generateAxes","yInner","y2Inner","axis_y2_inner","xOrient","yOrient","y2Orient","subXOrient","d3Axis","axesConfig","axisLeft","axisBottom","axisTop","axisRight","tickSizeOuter","axisRange","xAxis","noTickTextRotate","isX","isCategorized","xAxisTickFormat","getAxisTickRotate","xAxisTickValues","axisParams","axis_x_tick_multiline","axis_x_tick_width","axis_x_tick_tooltip","categories","zoomScale","isTimeSeries","parseDate","isTimeSeriesY","axis_y_tick_time_value","isStackNormalized","axis_x_tick_centered","axis_x_tick_culling","targets","axis_x_tick_fit","axis_x_tick_count","mapTargetsToUniqueXs","generateTickValues","subXAxis","data_axes","axis_x_tick_format","axisTimeFormat","defaultAxisTimeFormat","categoryName","getLabelOptionByAxisId","defaultPosition","isInner","isOuter","isCenter","getLabelPosition","getAxisLabelPosition","anchor","tickRotate","getHorizontalAxisHeight","maxTickWidth","getMaxTickWidth","xHeight","axis_x_height","y2","withoutRecompute","currentTickMax","currentMaxTickWidths","filterTargetsToShow","svg","isYAxis","targetsToShow","getAxis","updateXAxisTickValues","dummy","selectChart","currentTextWidth","defaultPadding","xAxisTickRotate","widthWithoutCurrentPaddingLeft","currentWidth","getCurrentPaddingLeft","maxOverflow","getXAxisTickMaxOverflow","xAxisTickTextY2Overflow","tickTextWidths","_this$x$padding","remaining","tickIndex","rotatedTickTextWidth","ticksBeforeTickText","getXDomainMax","axis_x_padding","firstX","getXDomainMin","timeDiff","relativeTickWidth","withTransition","_this2","labels","xForAxisLabel","dxForAxisLabel","dyForAxisLabel","getLabelText","domainLength","convertPixelsToAxisPadding","forTimeSeries","targetCount","tickValue","_map2","axisSubX","isHidden","isInit","updateAxes","wth","flow","xDomainForZoom","_this3","hasZoom","updateXDomain","UpdateXDomain","UpdateOrgXDomain","TrimXDomain","axis_x_tick_values","zoom_rescale","orgDomain","getYDomain","hasArcType","updateLabels","Transition","UpdateXAxis","setCulling","subY","subY2","toCull","intervalForCulling","tickSize","cullingMax","clipPath","clipXAxisTickMaxWidth","clipPathForXAxisTickTexts","ChartInternal_ChartInternal","ChartInternal","getOptions","cache","rendered","callPluginHook","onbeforeinit","onafterinit","bindto","classname","classed","initToRender","forced","isLazy","lazy","MutationObserver","mutation","attributeFilter","convertedData","convertData","initWithData","afterInit","datetimeId","initClip","dragStart","flowing","cancelClick","mouseover","transiting","generateColor","levelColor","generateLevelColor","generatePoint","extraLineClasses","generateExtraLineClass","dataTimeFormat","data_xLocaltime","timeParse","utcParse","axis_x_localtime","timeFormat","utcFormat","isDragZoom","zoom_enabled","isZoomed","specifier","getMilliseconds","hiddenTargetIds","hiddenLegendIds","focusedTargetIds","defocusedTargetIds","isLegendRight","legend_position","isLegendInset","isLegendTop","legend_inset_anchor","isLegendLeft","legendStep","legendItemWidth","legendItemHeight","rotated_padding_left","rotated_padding_right","axis_x_show","rotated_padding_top","withoutFadeIn","convertInputType","subx","initZoom","xs","convertDataToTargets","data_filter","data_hide","addHiddenTargetIds","mapToIds","legend_hide","addHiddenLegendIds","updateSizes","updateScales","getXDomain","subX","orgXDomain","interaction_enabled","isTouch","onover","onout","svg_classname","clipChart","appendClip","clipId","clipXAxis","clipIdForXAxis","clipYAxis","clipIdForYAxis","clipGrid","clipIdForGrid","color_tiles","patterns","updateSvgSize","bindResize","subchart_show","initSubchart","initTooltip","initLegend","initTitle","data_empty_label_text","initRegion","initEventRect","initChartElements","initGrid","zoom_privileged","updateTargets","updateDimension","oninit","setBackground","withTransform","withUpdateXDomain","withUpdateOrgXDomain","withTransitionForAxis","initializing","data_onmin","data_onmax","minMax","getMinMaxData","data_labels","initText","$","legend","mainBar","mainLine","mainArea","mainCircle","mainText","bg","imgUrl","setContainerSize","hasArc","getLegendWidth","getLegendHeight","legendHeightForBottom","xAxisHeight","subchartXAxisHeight","subchart_axis_x_show","subchart_axis_x_tick_text_show","subchartHeight","subchart_size_height","getCurrentPaddingTop","getCurrentPaddingRight","getCurrentPaddingBottom","margin2","currentHeight","margin3","updateSizeForLegend","width2","height2","arcWidth","arcHeight","hasType","gauge_fullCircle","getGaugeLabelHeight","updateRadius","radiusExpanded","axis_x_tick_autorotate","updateXAxisTickClip","updateTargetsForText","updateTargetsForBar","updateTargetsForLine","updateTargetsForRadar","updateTargetsForArc","updateTargetsForSubchart","showTargets","isTargetToShow","withOptions","Subchart","EventRect","Dimension","Transform","Legend","TransitionForExit","TransitionForAxis","defVal","transitionsValue","getWithOption","durationForExit","generateTransitions","legend_show","updateLegend","redrawAxis","updateCircleY","updateGrid","updateRegion","updateBar","updateLine","updateArea","updateCircle","hasDataLabel","updateText","redrawTitle","redrawArc","radars","redrawRadar","isBarType","bindZoomEvent","setChartElements","generateRedrawList","withSubchart","getDrawShape","redrawSubchart","flowFn","generateFlow","xv","isTransition","isTabVisible","redrawList","getRedrawList","afterRedraw","onrendered","waitForDraw","generateWait","t1","hasRadar","indices","hasTypeOf","getShapeIndices","isLineType","generateDrawLine","_indices","isAreaType","generateDrawArea","_indices2","generateDrawBar","xForText","generateXYForText","cx","radarCircleX","circleY","circleX","cy","radarCircleY","_shape$pos","_shape$type","grid_x_lines","grid_y_lines","redrawGrid","redrawRegion","redrawLine","redrawArea","redrawBar","updateGridFocus","redrawText","redrawCircle","withLegend","withTransitionForExit","withTransitionForTransform","transformAll","withY","withEventRect","axis_x_type","data_x","data_xs","axis_y_type","hasGauge","getAxisSize","_$$$getRadarSize2","getRadarSize","getBaseValue","opacityForCircle","point_show","isBubbleType","isScatterType","axis_x_categories","yAxis","y2Axis","transformMain","transformContext","transformLegend","brushSize","getXAxisClipX","getXAxisClipY","getXAxisClipWidth","getXAxisClipHeight","getYAxisClipX","getYAxisClipY","getYAxisClipWidth","getYAxisClipHeight","clipIdForSubchart","withoutAxis","resizeFunction","generateResize","onresize","resize_auto","onresized","callResizeFn","transitionsToWait","loop","parsedDate","data_xFormat","isMobile","interaction_inputType_touch","DocumentTouch","interaction_inputType_mouse","plugins","Chart_Chart","Chart","internal","loadConfig","beforeInit","bindThis","argThis","Options_Options","Options","size_width","size_height","padding_left","padding_right","padding_top","padding_bottom","zoom_extent","zoom_onzoom","zoom_onzoomstart","zoom_onzoomend","zoom_resetButton","zoom_x_min","zoom_x_max","interaction_brighten","data_xSort","data_idConverter","data_names","data_classes","data_groups","data_type","data_types","data_labels_colors","data_labels_position","data_order","data_regions","data_color","data_colors","data_stack_normalize","data_selection_enabled","data_selection_grouped","data_selection_isselectable","data_selection_multiple","data_selection_draggable","data_onclick","data_onover","data_onout","data_onselected","data_onunselected","data_url","data_headers","data_json","data_rows","data_columns","data_mimeType","data_keys","subchart_axis_x_tick_show","subchart_onbrush","color_pattern","color_threshold","color_onover","legend_contents_bindto","legend_contents_template","legend_inset_x","legend_inset_y","legend_inset_step","legend_item_onclick","legend_item_onover","legend_item_onout","legend_equally","legend_padding","legend_item_tile_width","legend_item_tile_height","legend_usePoint","axis_x_clipPath","axis_x_tick_culling_max","axis_x_tick_show","axis_x_tick_text_show","axis_x_tick_text_position","axis_x_tick_rotate","axis_x_tick_outer","axis_x_max","axis_x_min","axis_x_extent","axis_x_label","axis_x_axes","axis_y_clipPath","axis_y_show","axis_y_max","axis_y_min","axis_y_inverted","axis_y_center","axis_y_label","axis_y_tick_format","axis_y_tick_culling","axis_y_tick_culling_max","axis_y_tick_outer","axis_y_tick_values","axis_y_tick_rotate","axis_y_tick_count","axis_y_tick_show","axis_y_tick_stepSize","axis_y_tick_text_show","axis_y_tick_text_position","axis_y_padding","axis_y_default","axis_y_axes","axis_y2_max","axis_y2_min","axis_y2_inverted","axis_y2_center","axis_y2_label","axis_y2_tick_format","axis_y2_tick_culling","axis_y2_tick_culling_max","axis_y2_tick_outer","axis_y2_tick_values","axis_y2_tick_rotate","axis_y2_tick_count","axis_y2_tick_show","axis_y2_tick_stepSize","axis_y2_tick_text_show","axis_y2_tick_text_position","axis_y2_padding","axis_y2_default","axis_y2_axes","grid_x_show","grid_x_type","grid_y_show","grid_y_ticks","grid_focus_edge","grid_focus_show","grid_focus_y","grid_front","grid_lines_front","point_r","point_sensitivity","point_focus_expand_enabled","point_focus_expand_r","point_pattern","point_select_r","point_type","line_connectNull","line_step_type","line_zerobased","line_classes","line_point","scatter_zerobased","bar_padding","bar_radius","bar_radius_ratio","bar_sensitivity","bar_width","bar_width_ratio","bar_width_max","bar_zerobased","bubble_maxR","bubble_zerobased","area_zerobased","area_above","area_linearGradient","pie_label_show","pie_label_format","pie_label_threshold","pie_label_ratio","pie_expand","pie_expand_rate","pie_expand_duration","pie_innerRadius","pie_padAngle","pie_padding","pie_startingAngle","gauge_label_show","gauge_label_format","gauge_min","gauge_max","gauge_type","gauge_startingAngle","gauge_label_extents","gauge_title","gauge_units","gauge_width","gauge_arcs_minWidth","gauge_expand","gauge_expand_rate","gauge_expand_duration","donut_label_show","donut_label_format","donut_label_threshold","donut_label_ratio","donut_width","donut_title","donut_expand","donut_expand_rate","donut_expand_duration","donut_padAngle","donut_startingAngle","spline_interpolation_type","radar_axis_max","radar_axis_line_show","radar_axis_text_show","radar_axis_text_position","radar_level_depth","radar_level_show","radar_level_text_format","radar_level_text_show","radar_size_ratio","radar_direction_clockwise","tooltip_show","tooltip_doNotHide","tooltip_grouped","tooltip_format_title","tooltip_format_name","tooltip_format_value","tooltip_position","tooltip_contents","tooltip_init_show","tooltip_init_x","tooltip_init_position","tooltip_linked","tooltip_linked_name","tooltip_onshow","tooltip_onhide","tooltip_onshown","tooltip_onhidden","tooltip_order","title_text","title_padding","title_position","read","thisConfig","getScale","forTimeseries","scaleTime","getX","getCustomizedScale","getY","scaleValue","offsetValue","orgScale","domainValue","getYScale","getSubYScale","xMin","xMax","yMin","yMax","subXMin","subXMax","subYMin","subYMax","xDomain","xSubDomain","getXAxisTickFormat","getTickValues","yAxisTickValues","y2AxisTickValues","updateArc","getYDomainMinMax","isMin","dataGroups","ids","ys","getValuesAsIdKeyed","idsInGroup","_loop","_idsInGroup","baseId","baseAxisId","_loop2","axisId","getYDomainMin","getYDomainMax","isHiddenTargetWithYDomain","pfx","targetsByAxisId","yTargets","filterByXDomain","yDomainMin","yDomainMax","isZeroBased","showHorizontalDataLabel","showVerticalDataLabel","isAllPositive","isAllNegative","yDomainAbs","ratio","getDataLabelLength","lengths","getPadding","getXDomainMinMax","configValue","dataValue","getXDomainPadding","maxDataCount","xPadding","getMaxDataCount","_xDomain2","lastX","withTrim","zoomEnabled","zoom","updateScaleExtent","invert","trimXDomain","_zoomDomain","getZoomDomain","dataKey","existValue","dict","util_hasValue","isNotX","isGrouped","getXKey","getXValuesOfXKey","xValues","getIndexByX","basedX","filterByX","getXValue","getOtherTargetXs","idsForX","getOtherTargetX","addXs","isMultipleX","getAllValuesOnIndex","getValueOnIndex","valueOnIndex","updateTargetX","generateTargetX","updateTargetXs","rawX","isCustomX","cloneTarget","id_org","updateXs","getPrevX","getNextX","isAreaRangeType","getAreaRangeData","isBubbleZType","getBubbleZData","getMinMaxValue","minMaxData","getCache","minData","getFilteredDataByValue","maxData","addCache","getTotalPerIndex","getTotalDataSum","subtractHidden","getHiddenTotalDataSum","getMaxDataCountTarget","mapToTargetIds","hasTarget","targetId","isLegendToShow","targetIds","removeHiddenTargetIds","removeHiddenLegendIds","checkValueInTargets","checker","hasMultiTargets","hasNegativeValueInTargets","hasPositiveValueInTargets","_checkOrder","order","isOrderDesc","isOrderAsc","orderTargets","targetsValue","orderAsc","orderDesc","t2","reducer","t1Sum","t2Sum","filterRemoveNull","dataLabels","dataLabelFormat","isNoneArc","isArc","findSameXOfValues","targetX","sames","findClosestFromTargets","candidates","findClosest","closest","minDist","getTargetSelectorSuffix","isWithinBar","dist","xIndex","yIndex","convertValuesToStep","stepType","converted","convertValuesToRange","updateDataAttributes","attrs","current","getRatio","asPercent","pie","padAngle","endAngle","startAngle","dataValues","hiddenSum","curr","updateDataIndexByX","tickValueMap","out","valueIndex","external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_","convertCsvTsvToData","parser","xsv","convertUrlToData","convertJsonToData","convertRowsToData","convertColumnsToData","req","setRequestHeader","onreadystatechange","readyState","convertCsvToData","csvParseRows","csvParse","convertTsvToData","tsv","tsvParseRows","tsvParse","keysParam","targetKeys","newRows","newRow","findValueInJson","tmp","pathArray","appendXs","xsData","dataKeys","xKey","convertedId","hasCategory","v1","v2","hasNegativeValue","hasPositiveValue","setTargetType","rawTargets","loadFromArgs","unload","rawTargetIds","customDoneCb","selectorTarget","endall","external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_","redrawEventRect","eventRectUpdate","generateEventRectsForMultipleXs","updatePointClass","datum","generateEventRectsForSingleX","updateEventRect","bindTouchOnEventRect","startPx","getEventRect","elementFromPoint","selectRect","selectRectForMultipleXs","getIndex","callOverOutForTouch","unselectRect","selectRectForSingle","isPrevented","preventThreshold","currentXY","preventEvent","toggleShape","xScale","eventRectData","rectW","rectX","getEventRectWidth","getPrevNextX","thisX","classEvent","isSelectionEnabled","isSelectionGrouped","isTooltipGrouped","selectedData","showGridFocus","hideGridFocus","expandCirclesBars","isWithinShape","unexpandCircles","expandCircles","expandBars","_handleLinkedCharts","unexpandBars","setOverOut","isOver","setOverColor","callee","getDraggableSelection","drag","dragstart","dragend","eventRectEnter","clickHandlerForSingleX","isStepType","d2","clickHandlerForMultipleXS","_eventRect$getBoundin","getCurrentWidth","getCurrentHeight","getParentWidth","getParentHeight","getAxisWidthByAxisId","axesLen","getTitlePadding","axisWidth","withoutTickTextOverflow","legendWidthOnRight","xAxisTickTextOverflow","getXAxisTickTextY2Overflow","getParentRectValue","offsetName","getSvgLeft","hasLeftAxisRect","leftAxis","svgRect","chartRect","svgLeft","getLabelPositionById","tickInterval","allowedXAxisTypes","getXAxisPadding","needToRotateXAxisTickTexts","xAxisLength","tickCountWithPadding","external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_","typeFilter","hasXs","ind","_row4","_k4","__max__","getIndices","getIndicesMax","getShapeX","isSub","barPadding","halfWidth","targetsNum","xPos","getShapeY","getShapeYMin","getShapeOffsetData","shapeOffsetTargets","rowValues","rowValueMapByXValue","indexMapByTargetId","_ref","getShapeOffset","_$$$getShapeOffsetDat","y0","dataXAsNumber","isWithin","hasValidPointType","isWithinStep","isWithinCircle","pointSelectR","getInterpolate","interpolation","getInterpolateType","basis","curveBasis","curveBasisClosed","curveBasisOpen","bundle","curveBundle","cardinal","curveCardinal","curveCardinalClosed","curveCardinalOpen","curveCatmullRom","curveCatmullRomClosed","curveCatmullRomOpen","curveMonotoneX","curveMonotoneY","natural","curveNatural","curveLinearClosed","linear","curveLinear","curveStep","curveStepAfter","curveStepBefore","isInterpolationType","isSplineType","external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_","initPie","dataType","startingAngle","sortValues","gaugeArcWidth","hasMultiArcGauge","innerRadiusRatio","innerRadius","getInnerRadius","svgArc","getSvgArc","svgArcExpanded","getSvgArcExpanded","updateAngle","dValue","gStart","isGaugeType","totalSum","gEnd","gMin","gMax","gValue","ir","singleArcWidth","outerRadius","newArc","withoutUpdate","updated","centroid","rate","newRate","expandWidth","getArc","isArcType","transformForArcLabel","y1","convertToArcData","textForArcLabel","shouldShowArcLabel","meetsArcLabelThreshold","getArcLabelFormat","defaultArcValueFormat","textForGaugeMinMax","isMax","getGaugeLabelExtents","expandArc","newTargetIds","selectorTargets","shouldExpand","expandDuration","getExpandConfig","svgArcExpandedSub","unexpandArc","isDonutType","isPieType","getArcTitle","classChartArc","classArcs","classFocus","mainPieUpdate","mainPieEnter","initArc","setArcTitle","hasInteraction","mainArc","arcData","classArc","_current","redrawMultiArcGauge","attrTween","interpolate","interpolated","updateLegendItemColor","bindArcEvent","redrawArcText","arcLabelLines","lineLength","innerLineLength","lineAngle","arcInnerRadius","linePositioningAngle","selectArc","toggleFocusLegend","unselectArc","revert","revertLegend","isMouse","handler","isFullCircle","backgroundArc","initGauge","appendText","initBar","classChartBar","classBars","barData","classBar","initialOpacity","drawBar","getBarW","barTargetsNum","xx","getBars","barIndices","getPoints","generateGetBarPoints","barRadius","barRadiusRatio","points","indexX","indexY","isNegative","pathRadius","barW","barX","barY","barOffset","yScale","posX","posY","_list2","seg0","seg1","_that$getBBox","initBubble","getBaseLength","baseLength","getBubbleR","maxR","mid","maxArea","initLine","classChartLine","classLines","classAreas","classCircles","mainLineEnter","generateClass","lineData","classLine","drawLine","getCurve","orgPoint","pointRotated","_point","_y","_context","lineTo","_x","lineIndices","lineConnectNull","generateGetLinePoints","yScaleGetter","xValue","subxx","yValue","defined","x0","lineWithRegions","curve","isSubValue","lineOffset","_regions","xp","yp","diffx2","isWithinRegions","withinX","withinRegions","dasharray","generateM","sWithRegion","timeseriesDiff","xv0","xv1","otherDiff","prevData","hasPrevData","dd","_j","updateAreaGradient","_$$$config$area_linea","_$$$config$area_linea2","_$$$config$area_linea3","_$$$config$area_linea4","stops","linearGradient","stopColor","updateAreaColor","classArea","orgAreaOpacity","drawArea","areaIndices","generateGetAreaPoints","value0","x1","areaOffset","shouldDrawPointsForLine","labelishData","pointR","initialOpacityForCircle","mainCircles","posAttr","isCirclePoint","getCircles","pointExpandedR","_this$getBBox","selectR","linePoint","hasValidPointDrawMethods","pointType","insertPointInfoDefs","copyAttr","attribs","createElementNS","stroke","pointFromDefs","pointClass","classCircle","pointId","custom","getTransitionName","sizeFn","fillStyleFn","xPosFn","yPosFn","opacityStyleFn","_element$node$getBBox","xPosFn2","transitionName","rectangle","rectSizeFn","rectXPosFn","radar_cacheKey","initRadar","generateRadarPoints","getRadarPosition","edge","isClockwise","_$$$getRadarSize4","_size","updateRadarLevel","updateRadarAxes","updateRadarShape","generateGetRadarPoints","_$$$getRadarSize6","depth","showText","radarLevels","levelData","levelRatio","levelTextFormat","levelEnter","_$$$getRadarSize8","axisEnter","_config$radar_axis_te","_config$radar_axis_te2","_config$radar_axis_te3","bindEvent","noIndex","areasEnter","classChartRadar","classChartText","classTexts","dataFn","classText","isRadarType","updateTextColor","labelColors","forFlow","opacityForText","getTextRect","base","forX","getXForText","getYForText","getCenteredTextPos","textElement","isPositive","getTextPos","_getBoundingRect","yPos","baseY","boxHeight","markOverlapped","textNodes","filteredTextNodes","calcHypo","coordinate","filteredTextNode","nodeForWidth","overlapsX","getComputedTextLength","overlapsY","undoMarkOverlapped","previousSibling","TYPES","Area","AreaRange","Arc","Line","Step","Spline","isTypeOf","barLineBubbleData","getGridTextAnchor","getGridTextDx","getGridTextX","initGridLines","initFocusGrid","clipPathForGrid","updateXGrid","xgridData","generateGridData","xgridAttr","x2","updateYGrid","gridValues","smoothLines","updateXGridLines","updateYGridLines","yv","isFront","dataToShow","xy","isY2","_isRotated","tickNum","gridData","firstYear","lastYear","getGridFilterToRemove","removeGridLines","getTooltipHTML","getYFormat","bindTooltipResizePos","_config$tooltip_conte","_$$","getTooltipContent","defaultTitleFormat","defaultValueFormat","titleFormat","nameFormat","valueFormat","getRowValue","getBgColor","tplStr","i2","getTooltipContentTemplate","CLASS_TOOLTIP","TITLE","high","low","contentValue","CLASS_TOOLTIP_NAME","COLOR","tooltipPosition","tWidth","tHeight","_d3Mouse2","chartRight","chartLeft","dataScale","forArc","_ref$width","_ref$height","dataStr","xPosInPercent","_tooltip$datum","_value","linkedName","charts","isLinked","isInDom","isNotSameIndex","legendItemTextBox","legendHasRendered","optionz","updateLegendTemplate","updateLegendElement","setLegendItem","insetLegendPosition","updateLegendStep","updateLegendItemWidth","updateLegendItemHeight","opacityForLegend","opacityForUnfocusedLegend","targetIdz","showLegend","selectorLegends","hideLegend","clearLegendItemTextBoxCache","xForLegend","yForLegend","tileWidth","totalLength","widths","heights","margins","isLegendRightOrInset","updatePositions","isLast","box","getTextBox","itemWidth","itemHeight","itemLength","areaLength","updateValues","id2","withoutStep","xForLegendText","xForLegendRect","x1ForLegendTile","x2ForLegendTile","yForLegendText","yForLegendRect","yForLegendTile","usePoint","rects","tiles","yOffset","_tiles","isNum","yForTitle","xForTitle","textRectWidth","getClipPath","isIE9","appVersion","getAxisClipX","getAxisClipY","getAxisClipWidth","getAxisClipHeight","newXAxisHeight","clipXAxisTickTexts","clipIdForXAxisTickTexts","setXAxisTickClipWidth","setXAxisTickTextClipPathWidth","sinRotation","xAxisTickClipPathMaxWidth","mainRegion","classRegion","regionX","regionY","regionWidth","regionHeight","getRegionXY","getRegionSize","isWidth","isRegionOnX","altDomain","_$$$dragStart","sx","sy","_mouse","mx","my","minX","minY","maxY","isIncluded","togglePoint","_getPathBox","_path$getBoundingClie","getPathBox","togglePath","setDragStatus","selectPoint","unselectPoint","selectPath","unselectPath","getToggle","toggledShape","initBrush","brushY","brushX","lastDomain","brushHandler","redrawForBrush","updateResize","getSelection","extent","getBrushSize","getExtent","visibility","contextBarUpdate","contextLineUpdate","contextLineEnter","updateBarForSubchart","contextBar","redrawBarForSubchart","drawBarOnSub","updateLineForSubchart","contextLine","redrawLineForSubchart","drawLineOnSub","updateAreaForSubchart","contextArea","redrawAreaForSubchart","drawAreaOnSub","draw","withDimension","external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_","generateZoom","initZoomBehaviour","bindZoomOnEventRect","unzoom","onZoomStart","onZoom","onZoomEnd","orgScaleExtent","updateTransformScale","rescale","sourceEvent","isMousemove","wheelDelta","updateZoom","_$$$orgXDomain","zoomDomain","zoomBehaviour","clickDistance","_event","_ref3","setZoomResetButton","resetButton","resetBtn","onclick","schemeCategory10","getColorFromCss","__colorPattern__","backgroundImage","scaleOrdinal","originalColorPattern","colorizedPatterns","colorizePattern","isLine","asValue","getFormat","typeValue","formatForY","yFormat","formatForY2","y2Format","defaultFormat","removeCache","classShape","classShapes","classTarget","additionalClassSuffix","additionalClass","classFocused","classDefocused","idsValue","selectorLegend","targetIdsValue","defocus","_showHide","api_zoom_zoom","resultDomain","_range","withinRange","enableType","updateAndRedraw","_max","_min","_range2","zoomIdentity","zoomTransform","argsValue","external_commonjs_d3_ease_commonjs2_d3_ease_amd_d3_ease_root_d3_","transformTo","optionsForRedraw","tail","notfoundIds","orgDataCount","_j3","_j4","baseTarget","baseValue","withTrimXDomain","withUpdateXAxis","translateX","scaleX","_args$shape$type","_args$shape$pos","flowIndex","flowLength","flowStart","flowEnd","durationForFlow","gt","ease","easeLinear","setTransition","dataPoint","resetOther","isTargetId","isTargetIndex","unselect","_groups","grids","redrawWithoutRescale","api_region_regions","optionsValue","api_data_data","flat","_names","_colors","_axes","category","_category","_categories","_xs","setMinMax","api_axis_getMinMax","api_axis_axis","_labels","setLabelText","soft","_isFromResize","api_tooltip_tooltip","nodeToSvgDataUrl","serializer","XMLSerializer","cssText","styleSheets","rules","sheet","cssRules","getCssRules","xhtml","nodeXml","serializeToString","createTextNode","styleXml","b64EncodeUnicode","svgDataUrl","img","Image","crosssOrigin","canvas","drawImage","toDataURL","_defaults","plugin","ascendingComparator","ascending","lo","hi","bisector","e10","e5","tickIncrement","power","LN10","tickStep","step0","step1","valueof","initRange","initInterpolator","interpolator","implicit","ordinal","unknown","band","ordinalRange","paddingInner","paddingOuter","align","rangeRound","pointish","identity","normalize","constant","clamper","bimap","r0","r1","polymap","bisect","clamp","transformer","untransform","piecewise","interpolateValue","interpolateNumber","interpolateRound","u","continuous","prefixExponent","re","formatSpecifier","FormatSpecifier","zero","comma","formatDecimalParts","toExponential","coefficient","exponent","toPrecision","formatRounded","X","locale","formatPrefix","precisionPrefix","precisionRound","precisionFixed","linearish","nice","transformLog","transformExp","transformLogn","transformExpn","pow10","reflect","loggish","logs","pows","logp","E","log10","log2","powp","z","transformSymlog","log1p","transformSymexp","expm1","symlogish","symlog","transformPow","transformSqrt","transformSquare","powish","quantile","thresholds","invertExtent","quantiles","quantize","defaultLocale","definition","grouping","thousands","formatGroup","currencyPrefix","currency","currencySuffix","decimal","numerals","formatNumerals","percent","minus","nan","newFormat","formatTypes","formatType","maybeSuffix","valuePrefix","valueSuffix","valueNegative","formatTrim","formatLocale","setMonth","hour","setTime","durationSecond","durationMinute","durationHour","minute","second","getUTCSeconds","millisecond","durationDay","durationWeek","durationMonth","durationYear","calendar","week","formatMillisecond","formatSecond","formatMinute","formatHour","formatDay","formatWeek","formatMonth","formatYear","tickIntervals","t0","timeYear","timeMonth","timeWeek","timeDay","timeHour","timeMinute","timeSecond","timeMillisecond","utcMonth","setUTCDate","setUTCHours","setUTCMonth","getUTCMonth","utcHour","setUTCMinutes","getUTCHours","utcMinute","setUTCSeconds","getUTCMinutes","utcYear","utcWeek","utcDay","utcSecond","utcMillisecond","UTC","k10","sequential","sequentialLog","sequentialSymlog","sequentialPow","sequentialSqrt","sequentialQuantile","k21","diverging","divergingLog","divergingSymlog","divergingPow","divergingSqrt","epsilon","translateY","entering","__axis","tickSizeInner","spacing","range0","range1","nopropagation","MODE_DRAG","MODE_SPACE","MODE_HANDLE","MODE_CENTER","number1","number2","handles","XY","cursors","nw","ne","se","sw","flipX","flipY","signsX","signsY","defaultExtent","ownerSVGElement","viewBox","defaultTouchable","local","__brush","dim","touchending","touchable","handleSize","initialize","started","touchmoved","touchended","clean","Emitter","w0","w1","n0","n1","e0","s0","s1","lockX","lockY","signX","signY","W","N","shifting","toucher","point0","beforestart","ended","keydowned","noevent","keyupped","dragDisable","point1","dragEnable","tween","selection0","selection1","starting","customEvent","BrushEvent","keyModifiers","reI","reN","reP","reHex","reRgbInteger","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","named","color_formatHex","formatHex","color_formatRgb","formatRgb","rgbn","Rgb","hsla","rgbConvert","rgb_formatHex","rgb_formatRgb","Hsl","hslConvert","hsl","hsl2rgb","m1","m2","define","channels","displayable","formatHsl","color_formatHsl","Dispatch","typename","T","parseTypenames","typenames","DragEvent","subject","defaultContainer","defaultSubject","mousedownx","mousedowny","mousemoving","gestures","clickDistance2","mousedowned","touchstarted","gesture","mousemoved","mouseupped","nodrag","yesdrag","sublisteners","p0","__noselect","MozUserSelect","noclick","EOL","EOF","QUOTE","NEWLINE","RETURN","objectConverter","inferColumns","columnSet","pad","reFormat","DELIMITER","parseRows","I","eof","eol","preformatBody","formatRow","formatDate","getUTCMilliseconds","getUTCDate","convert","customConverter","formatBody","formatRows","csv","dsv","csvFormat","csvFormatBody","csvFormatRows","csvFormatRow","csvFormatValue","tsvFormat","tsvFormatBody","tsvFormatRows","tsvFormatRow","tsvFormatValue","autoType","fixtz","cubicIn","cubicOut","cubicInOut","quadIn","quadOut","quadInOut","polyIn","polyOut","polyInOut","pi","halfPi","sinIn","sinOut","sinInOut","tpmt","expIn","expOut","expInOut","circleIn","circleOut","circleInOut","b1","b2","b3","b4","b5","b6","b7","b8","b9","b0","bounceIn","bounceOut","bounceInOut","overshoot","backIn","backOut","backInOut","tau","elasticIn","asin","amplitude","elasticOut","elasticInOut","isNumberArray","numberArray","genericArray","nb","na","v0","v3","t3","hue","gamma","nogamma","exponential","colorHsl","hslLong","deg2rad","rad2deg","Xn","Yn","Zn","labConvert","Lab","Hcl","hcl2lab","rgb2lrgb","xyz2lab","lab","lab2xyz","lrgb2rgb","hcl","hclConvert","colorLab","colorHcl","hclLong","ED","EB","BC_DA","cubehelix","cubehelixConvert","Cubehelix","bl","cubehelixGamma","colorCubehelix","cosh","sinh","cubehelixLong","samples","ArrayBuffer","isView","DataView","rgbGamma","colorRgb","rgbSpline","spline","rgbBasis","rgbBasisClosed","basisClosed","reA","reB","am","bm","bs","bi","one","cssNode","cssRoot","cssView","svgNode","skewX","scaleY","atan","interpolateTransform","pxComma","pxParen","degParen","xa","ya","xb","yb","interpolateTransformCss","parseCss","decompose","interpolateTransformSvg","parseSvg","consolidate","valueOf","rho","SQRT2","rho2","rho4","epsilon2","p1","ux0","uy0","coshr0","tanh","creatorInherit","uri","namespaceURI","creatorFixed","fullname","space","creator","Local","Selection","xlink","xml","xmlns","createSVGPoint","matrixTransform","getScreenCTM","inverse","clientLeft","clientTop","EnterNode","_parent","__data__","keyPrefix","bindIndex","groupLength","dataLength","bindKey","keyValue","nodeByKeyValue","keyValues","attrRemove","attrRemoveNS","removeAttributeNS","attrConstant","attrConstantNS","setAttributeNS","attrFunction","attrFunctionNS","propertyRemove","propertyConstant","propertyFunction","classArray","ClassList","_node","classedAdd","classedRemove","classedTrue","classedFalse","classedFunction","textRemove","textConstant","textFunction","htmlRemove","htmlConstant","htmlFunction","raise","lower","constantNull","selection_cloneShallow","selection_cloneDeep","CustomEvent","initEvent","dispatchConstant","dispatchFunction","parents","_parents","subgroups","subnode","subgroup","selectorAll","enterGroup","updateGroup","_enter","_exit","sparse","onenter","onupdate","onexit","groups0","groups1","m0","merges","group0","group1","compareDocumentPosition","compareNode","sortgroups","sortgroup","getAttributeNS","selection_style","deep","selection_on","filterEvents","filterContextListener","contextListener","related","event1","event0","__on","onAdd","mouseenter","mouseleave","styleRemove","styleConstant","priority","styleFunction","none","tauEpsilon","Path","_x0","_y0","_x1","_y1","moveTo","closePath","quadraticCurveTo","bezierCurveTo","arcTo","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","l01","acos","t01","t21","a0","a1","ccw","cw","da","arcOuterRadius","arcStartAngle","arcEndAngle","arcPadAngle","cornerTangents","ox","oy","x11","y11","x10","y10","x00","y00","cx0","cy0","cx1","cy1","dx0","dy0","dx1","dy1","cornerRadius","padRadius","buffer","a01","a11","a00","a10","da0","da1","ap","rp","rc0","rc1","oc","intersect","x3","y3","x32","y32","ax","ay","bx","by","kc","lc","Linear","pointX","pointY","defined0","lineStart","lineEnd","x0z","y0z","areaStart","areaEnd","arealine","lineX0","lineY0","lineY1","lineX1","descending","pa","_line","curveRadialLinear","curveRadial","Radial","_curve","radial","lineRadial","angle","lineStartAngle","lineEndAngle","lineInnerRadius","lineOuterRadius","linkSource","linkTarget","link","argv","curveHorizontal","curveVertical","pointRadial","p2","p3","linkHorizontal","linkVertical","linkRadial","cross","tan30","tan30_2","kr","kx","ky","square","sqrt3","symbols","diamond","star","triangle","wye","Basis","BasisClosed","BasisOpen","Bundle","beta","_basis","_beta","_x2","_x3","_x4","_y2","_y3","_y4","_k","Cardinal","tension","CardinalClosed","_x5","_y5","CardinalOpen","_l01_a","_l01_2a","_l12_a","_l12_2a","_l23_a","_l23_2a","CatmullRom","_alpha","x23","y23","catmullRom","CatmullRomClosed","CatmullRomOpen","LinearClosed","slope3","h0","h1","slope2","MonotoneX","MonotoneY","ReflectContext","monotoneX","monotoneY","Natural","controlPoints","stepBefore","stepAfter","series","stackValue","orderNone","offsetNone","stack","oz","kz","sz","sij","ki","si","yn","s2","sij0","s3","sk","skj1","peaks","peak","vi","vj","sums","appearance","tops","bottoms","_t0","px","py","periods","days","shortDays","months","shortMonths","isoSpecifier","toISOString","formatIsoNative","isoParse","parseIsoNative","localDate","L","setFullYear","utcDate","setUTCFullYear","newDate","locale_dateTime","locale_date","locale_time","locale_periods","locale_weekdays","locale_shortWeekdays","locale_months","locale_shortMonths","periodRe","formatRe","periodLookup","formatLookup","weekdayRe","weekdayLookup","shortWeekdayRe","shortWeekdayLookup","monthRe","monthLookup","shortMonthRe","shortMonthLookup","formats","formatShortWeekday","getDay","formatWeekday","formatShortMonth","formatDayOfMonth","formatMicroseconds","formatYearISO","G","formatFullYearISO","formatHour24","formatHour12","formatDayOfYear","formatMilliseconds","formatMonthNumber","formatMinutes","formatPeriod","formatQuarter","Q","formatUnixTimestamp","formatUnixTimestampSeconds","formatSeconds","formatWeekdayNumberMonday","U","formatWeekNumberSunday","formatWeekNumberISO","formatWeekdayNumberSunday","formatWeekNumberMonday","formatFullYear","formatZone","formatLiteralPercent","utcFormats","formatUTCShortWeekday","getUTCDay","formatUTCWeekday","formatUTCShortMonth","formatUTCMonth","formatUTCDayOfMonth","formatUTCMicroseconds","formatUTCYearISO","formatUTCFullYearISO","formatUTCHour24","formatUTCHour12","formatUTCDayOfYear","formatUTCMilliseconds","formatUTCMonthNumber","formatUTCMinutes","formatUTCPeriod","formatUTCQuarter","formatUTCSeconds","formatUTCWeekdayNumberMonday","formatUTCWeekNumberSunday","formatUTCWeekNumberISO","formatUTCWeekdayNumberSunday","formatUTCWeekNumberMonday","formatUTCYear","formatUTCFullYear","formatUTCZone","parses","parseShortWeekday","parseWeekday","parseShortMonth","parseMonth","parseLocaleDateTime","parseSpecifier","parseDayOfMonth","parseMicroseconds","parseYear","parseFullYear","parseHour24","parseDayOfYear","parseMilliseconds","parseMonthNumber","parseMinutes","parsePeriod","parseQuarter","parseUnixTimestamp","parseUnixTimestampSeconds","parseSeconds","parseWeekdayNumberMonday","parseWeekNumberSunday","parseWeekNumberISO","parseWeekdayNumberSunday","parseWeekNumberMonday","parseLocaleDate","parseLocaleTime","parseZone","parseLiteralPercent","pads","newParse","utcMonday","timeMonday","numberRe","percentRe","requoteRe","requote","timeSunday","dISO","timeThursday","getTimezoneOffset","dow","utcSunday","UTCdISO","utcThursday","newInterval","floori","offseti","utcWeekday","weekday","sunday","monday","thursday","taskHead","taskTail","pokeDelay","clockLast","clockNow","clockSkew","clock","performance","setFrame","clearNow","_call","_time","wake","timerFlush","nap","sleep","poke","elapsed","emptyOn","emptyTween","CREATED","SCHEDULED","STARTING","STARTED","RUNNING","ENDING","ENDED","timing","schedules","__transition","tweenRemove","tween0","tween1","tweenFunction","tweenValue","interpolateRgb","interpolateString","string00","interpolate0","string1","string0","string10","attrTweenNS","attrInterpolateNS","attrInterpolate","delayFunction","delayConstant","durationFunction","durationConstant","_name","newId","selection_prototype","inherit","id0","id1","onFunction","on0","on1","sit","styleTween","styleNull","styleMaybeRemove","listener0","styleInterpolate","textTween","textInterpolate","removeFunction","easeConstant","reject","defaultTiming","easeCubicInOut","ZoomEvent","applyX","applyY","invertX","invertY","rescaleX","rescaleY","__zoom","SVGElement","defaultTransform","defaultWheelDelta","defaultConstrain","translateExtent","touchstarting","constrain","interpolateZoom","touchDelay","wheelDelay","wheeled","dblclicked","__zooming","Gesture","taps","wheel","wheelidled","touch0","touch1","l0","l1","dp","dl","collection","scaleBy","scaleTo","translateBy","translateTo","WINDOW","ClipboardService","copySubject","copyResponse$","configure","isSupported","pushCopyResponse","copyResult","copyFromContent","queryCommandSupported","isTargetValid","HTMLTextAreaElement","copyFromInputElement","targetElm","isFocus","selectTarget","copyText","isCopySuccessInIE11","tempTextArea","createTempTextArea","toReturn","cleanUpAfterCopy","execCommand","removeAllRanges","isRTL","ta","fontSize","border","pushCopyReponse","RetryOperator","RetrySubscriber","isStopped","_unsubscribeAndRecycle","queue","QueueScheduler","QueueAction","_execute","Notification","kind","do","accept","nextOrObserver","toObservable","throwError","undefinedValueNotification","completeNotification","ObserveOnSubscriber","notification","scheduleMessage","ObserveOnMessage","_error","ReplaySubject","bufferSize","POSITIVE_INFINITY","windowTime","_events","_infiniteTimeWindow","_bufferSize","_windowTime","nextInfiniteTimeWindow","nextTimeWindow","ReplayEvent","_getNow","_trimBufferThenGetEvents","_subscribe","ObjectUnsubscribedError","hasError","SubjectSubscription","thrownError","eventsCount","spliceCount","charToInteger","integerToChar","decode","integer","hasContinuationBit","shouldNegate","NGXLoggerHttpService","httpBackend","logOnServer","HttpRequest","HttpResponse","httpResponse","TRACE","DEBUG","INFO","LOG","WARN","ERROR","FATAL","OFF","NGXLoggerConfigEngine","updateConfig","_clone","cloneConfig","NGXLoggerUtils","logLevel","lineNumber","callerLine","fileLineNumber","additional","LogPosition","columnNumber","NGXMapperService","logPositionRequests","stackLine","positionStartIndex","positionEndIndex","dataArray","locationStartIndex","locationEndIndex","getTranspileLocation","mapFullPath","sourceMap","sourceFileIndex","sourceCodeLine","sourceCodeColumn","mappings","lineIndex","generatedCodeColumn","decodedSection","sources","_getSourceMap","sourceMapLocation","distPosition","logPosition","getMapping","retry","shareReplay","configOrBufferSize","refCount","shareReplayOperator","useRefCount","isComplete","innerSub","getCallerDetails","sourceMapsEnabled","getStackLine","getMapFilePath","Levels","mapperService","httpService","loggerConfig","platformId","datePipe","_withCredentials","_isIE","_logFunc","_logIE","_logModern","_log","fatal","setCustomHttpHeaders","_customHttpHeaders","setCustomParams","_customParams","setWithCredentialsOptionValue","withCredentials","registerMonitor","monitor","_loggerMonitor","getConfigSnapshot","metaString","getColor","isLog2Server","serverLoggingUrl","serverLogLevel","isLogLevelEnabled","logLevelString","prepareMessage","validatedAdditionalParameters","prepareAdditionalParameters","timestampFormat","callerDetails","logObject","onLog","HttpHeaders","HttpParams","httpResponseType","disableConsoleLogging","prepareMetaString","CustomNGXLoggerService","logMonitor","_isScalar","observable","observerOrNext","sink","toSubscriber","rxSubscriberSymbol","emptyObserver","syncErrorThrowable","_trySubscribe","syncErrorThrown","syncErrorValue","canReportError","promiseCtor","getPromiseCtor","Symbol_observable","operations","pipeFromArray","hostReportError","SubjectSubscriber","AnonymousSubject","subscriberIndex","destinationOrNext","SafeSubscriber","_parentOrParents","_parentSubscriber","__tryOrSetError","__tryOrUnsub","useDeprecatedSynchronousErrorHandling","wrappedComplete","_unsubscribe","UnsubscriptionError","UnsubscriptionErrorImpl","_subscriptions","_ctorUnsubscribe","flattenUnsubscriptionErrors","teardown","subscriptions","subscriptionIndex","errs","_enable_super_gross_mode_that_will_cause_bad_things","notifyError","innerValue","innerSubscriber","subscribeTo","ConnectableObservable","subjectFactory","_refCount","_isComplete","getSubject","_subject","connect","connection","_connection","ConnectableSubscriber","higherOrderRefCount","connectableObservableDescriptor","connectableProto","connectable","observables","concatAll","mergeAll","emptyScheduled","isInteropObservable","scheduleObservable","schedulePromise","isArrayLike","scheduleArray","isIterable","Symbol_iterator","scheduleIterable","subscribeToArray","resultSelector","setupSubscription","sourceObj","isEventTarget","isJQueryStyleEventEmitter","off","isNodeStyleEventEmitter","addListener","concurrent","CatchOperator","caught","CatchSubscriber","err2","concatMap","project","mergeMap","FilterOperator","FilterSubscriber","MapOperator","MapSubscriber","ii","MergeMapOperator","MergeMapSubscriber","hasCompleted","_tryNext","_innerSub","ish","RefCountOperator","refCounter","RefCountSubscriber","sharedConnection","SwitchMapOperator","SwitchMapSubscriber","TakeOperator","ArgumentOutOfRangeError","TakeSubscriber","notifier","TakeUntilOperator","takeUntilSubscriber","TakeUntilSubscriber","notifierSubscription","seenValue","DoOperator","TapSubscriber","_tapNext","_tapError","_tapComplete","Action","errorValue","errored","Scheduler","SchedulerAction","getSymbolIterator","rxSubscriber","ArgumentOutOfRangeErrorImpl","ObjectUnsubscribedErrorImpl","obs","subscribeToObservable","subscribeToPromise","subscribeToIterable","Zone","__load_patch","zoneJsInternalStackFramesSymbol","NativeError","zoneJsInternalStackFrames","zoneAwareFrame1","zoneAwareFrame2","zoneAwareFrame1WithoutNew","zoneAwareFrame2WithoutNew","zoneAwareFrame3WithoutNew","ZoneAwareError","stackRewrite","zoneJsInternalStackFramesPolicy","__Zone_Error_BlacklistedStackFrames_policy","__Zone_Error_ZoneJsInternalStackFrames_policy","buildZoneAwareStackFrames","originalStack","zoneFrame","isZoneFrame","frames","zoneName","currentZoneFrame","buildZoneFrameNames","zoneFrameName","parentZoneFrameName","zoneAwareStack","zoneAwareStackSymbol","newStack","specialPropertyNames","nativeErrorProperties","sp","stackTraceLimit","targetObject","constructorOpt","captureStackTrace","prepareStackTrace","structuredStackTrace","childDetectZone","onHandleError","parentZD","runFrame","runGuardedFrame","runTaskFrame","fnName","frameType","onScheduleTask","scheduleTask","onInvokeTask","applyThis","applyArgs","invokeTask","onCancelTask","onInvoke","invoke","originalStackTraceLimit","fakeTransitionTo","scheduleEventTask","scheduleMacroTask","_transitionTo","_DOM","getDOM","setRootDomAdapter","adapter","DomAdapter","PlatformLocation","historyGo","relativePosition","useBrowserPlatformLocation","ɵɵinject","BrowserPlatformLocation","LOCATION_INITIALIZED","_doc","_history","getBaseHrefFromDOM","getBaseHref","onPopState","getGlobalEventTarget","onHashChange","protocol","hostname","port","hash","newPath","pushState","supportsState","replaceState","forward","back","go","createBrowserPlatformLocation","joinWithSlash","slashes","stripTrailingSlash","pathEndIdx","normalizeQueryParams","LocationStrategy","PathLocationStrategy","APP_BASE_HREF","_platformLocation","_removeListenerFns","_baseHref","prepareExternalUrl","includeHash","externalUrl","HashLocationStrategy","Location","locationStrategy","_urlChangeListeners","_urlChangeSubscription","_locationStrategy","baseHref","_basePath","_stripOrigin","_stripIndexHtml","ev","isCurrentPathEqualTo","_stripBasePath","basePath","strippedUrl","_notifyUrlChangeListeners","onUrlChange","fnIndex","onNext","onThrow","onReturn","createLocation","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","getLastDefinedValue","ɵfindLocaleData","ɵLocaleDataIndex","getLocaleTimeFormat","getLocaleDateTimeFormat","dateTimeFormatData","getLocaleNumberSymbol","checkFullData","extractTime","ISO8601_DATE_REGEX","NAMED_FORMATS","DATE_FORMATS_SPLIT","ZoneWidth","ShortGMT","Extended","DateType","FullYear","Month","Hours","Minutes","Seconds","FractionalSeconds","Day","TranslationType","DayPeriods","Days","Months","Eras","timezone","toDate","createDate","parsedNb","isoStringToDate","tzHour","tzMin","dateSetter","timeSetter","ms","getNamedFormat","dateTimezoneOffset","timezoneToOffset","convertTimezoneToLocal","reverseValue","addDateMinutes","getDateFormatter","DATE_FORMATS","dateStrGetter","dateGetter","weekNumberingYearGetter","weekGetter","timeZoneGetter","localeId","getLocaleId","shortTime","shortDate","formatDateTime","mediumTime","mediumDate","longTime","longDate","fullTime","fullDate","opt_values","padNumber","digits","minusSign","negWrap","neg","strNum","getDatePart","formatFractionalSeconds","localeMinus","extended","getDateTranslation","getLocaleMonthNames","formStyle","getLocaleDayNames","currentHours","currentMinutes","getLocaleExtraDayPeriodRules","dayPeriods","getLocaleExtraDayPeriods","afterFrom","beforeTo","getLocaleDayPeriods","amPm","getLocaleEraNames","erasData","JANUARY","THURSDAY","getThursdayThisWeek","datetime","monthBased","nbDaysBefore1stDayOfMonth","today","thisThurs","firstThurs","getFirstThursdayOfYear","firstDayOfYear","requestedTimezoneOffset","NUMBER_FORMAT_REGEXP","MAX_DIGITS","DECIMAL_SEP","ZERO_CHAR","PATTERN_SEP","GROUP_SEP","DIGIT_CHAR","parseIntAutoRadix","parseCookieValue","cookieStr","cookie","eqIndex","cookieName","cookieValue","decodeURIComponent","WS_REGEXP","EMPTY_ARRAY","NgClass","_iterableDiffers","_keyValueDiffers","_ngEl","initialClasses","klass","ngClass","rawClass","_updateState","_applyStateDiff","nextEnabled","changed","stateEntry","_toggleClass","NgForOfContext","ngForOf","even","odd","NgForOf","_ngForOf","_ngForOfDirty","ngForTrackBy","_trackByFn","_viewContainer","_template","_differs","_differ","ngForTemplate","_applyChanges","forEachOperation","adjustedPreviousIndex","previousIndex","applyViewChange","ilen","forEachIdentityChange","NgIf","NgIfContext","_thenTemplateRef","_elseTemplateRef","_thenViewRef","_elseViewRef","ngIf","_updateView","ngIfThen","assertTemplate","ngIfElse","ɵstringify","SwitchView","_viewContainerRef","_templateRef","_created","enforceState","NgSwitch","_defaultViews","_defaultUsed","_caseCount","_lastCaseCheckIndex","_lastCasesMatched","ngSwitch","_ngSwitch","_updateDefaultCases","_addCase","_addDefault","_matchCase","matched","useDefault","NgSwitchCase","_view","ngSwitchCase","NgSwitchDefault","invalidPipeArgumentError","SubscribableStrategy","createSubscription","updateLatestValue","PromiseStrategy","_promiseStrategy","_subscribableStrategy","AsyncPipe","_latestValue","_obj","_strategy","_dispose","_selectStrategy","_updateLatestValue","ɵisPromise","ɵisSubscribable","DATE_PIPE_DEFAULT_TIMEZONE","DATE_PIPE_DEFAULT_OPTIONS","defaultTimezone","dateFormat","LOCALE_ID","JsonPipe","_locale","digitsInfo","formatNumberToLocaleString","groupSymbol","decimalSymbol","formattedText","isZero","parsedNumber","parseNumber","integerLen","zeros","numStr","toPercent","fractionLen","minInt","minFraction","minFrac","maxFraction","maxFrac","minIntPart","minFractionPart","maxFractionPart","roundNumber","fractionSize","roundAt","digit","dropTrailingZeros","carry","reduceRight","decimals","lgSize","gSize","negPre","negSuf","posPre","posSuf","parseNumberFormat","patternParts","positive","negative","positiveParts","fraction","ch","trunkLen","getLocaleNumberFormat","strToNumber","PLATFORM_BROWSER_ID","ViewportScroller","ɵɵdefineInjectable","BrowserViewportScroller","setOffset","getScrollPosition","supportsScrolling","scrollToPosition","scrollToAnchor","elSelected","findAnchorFromDocument","documentResult","getElementById","getElementsByName","createTreeWalker","createShadowRoot","attachShadow","treeWalker","NodeFilter","SHOW_ELEMENT","shadowRoot","nextNode","scrollToElement","setHistoryScrollRestoration","scrollRestoration","supportScrollRestoration","scrollRestorationDescriptor","getScrollRestorationProperty","XhrFactory","HttpHandler","HttpBackend","normalizedNames","lazyUpdate","lazyInit","maybeSetNormalizedName","headerValues","getAll","op","lcName","copyFrom","applyUpdate","other","toDelete","existing","HttpUrlEncodingCodec","encodeKey","standardEncoding","encodeValue","decodeValue","STANDARD_ENCODING_REGEX","STANDARD_ENCODING_REPLACEMENTS","valueToString","updates","cloneFrom","encoder","fromObject","paramParser","rawParams","codec","eqIdx","appendAll","eKey","HttpContext","isArrayBuffer","isBlob","isFormData","FormData","third","fourth","reportProgress","mightHaveBody","urlWithParams","qIdx","serializeBody","isUrlSearchParams","detectContentTypeHeader","HttpEventType","Sent","UploadProgress","ResponseHeader","DownloadProgress","Response","User","HttpResponseBase","defaultStatus","defaultStatusText","statusText","ok","HttpHeaderResponse","HttpErrorResponse","addBody","HttpClient","events$","res$","head","jsonp","callbackParam","patch","interceptorChainEndFn","finalHandlerFn","adaptLegacyInterceptorToChain","chainTailFn","interceptor","initialRequest","downstreamRequest","HTTP_INTERCEPTOR_FNS","legacyInterceptorFnFactory","chain","HttpInterceptorHandler","backend","dedupedInterceptorFns","nextSequencedFn","interceptorFn","chainedInterceptorFn","runInContext","XSSI_PREFIX","HttpXhrBackend","xhrFactory","xhr","detectedType","reqBody","headerResponse","partialFromXhr","getAllResponseHeaders","getResponseUrl","responseURL","getResponseHeader","onLoad","originalBody","sentHeaders","onDownProgress","progressEvent","loaded","lengthComputable","partialText","onUpProgress","progress","DONE","XSRF_ENABLED","XSRF_COOKIE_NAME","XSRF_HEADER_NAME","HttpXsrfTokenExtractor","HttpXsrfCookieExtractor","lastCookieString","lastToken","parseCount","getToken","cookieString","ɵparseCookieValue","xsrfInterceptorFn","lcUrl","HttpFeatureKind","Interceptors","LegacyInterceptors","CustomXsrfConfiguration","NoXsrfProtection","JsonpSupport","RequestsMadeViaParent","makeHttpFeature","ɵkind","ɵproviders","provideHttpClient","makeEnvironmentProviders","LEGACY_INTERCEPTOR_FN","MulticastOperator","shareSubjectFactory","getClosureSafeProperty","objWithPropertyToExtract","fillProperties","overriddenName","newLineIndex","concatStringsWithSpace","after","__forward_ref__","forwardRef","forwardRefFn","resolveForwardRef","isForwardRef","isEnvironmentProviders","XSS_SECURITY_URL","RuntimeError","formatRuntimeError","renderStringify","throwProviderNotFoundError","injectorName","assertDefined","actual","expected","comparison","ɵɵdefineInjector","getInjectableDef","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","isInjectable","getInjectorDef","NG_INJ_DEF","NG_INJECTOR_DEF","ngInjectorDef","InjectFlags","Default","Host","Self","SkipSelf","_injectImplementation","setInjectImplementation","impl","injectRootLimpMode","notFoundValue","injectableDef","_global","WorkerGlobalScope","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","getInjectFlag","attachInjectFlag","noSideEffects","ChangeDetectionStrategy","OnPush","ViewEncapsulation$1","Emulated","None","ShadowDom","EMPTY_OBJ","NG_COMP_DEF","NG_DIR_DEF","NG_PIPE_DEF","NG_MOD_DEF","NG_FACTORY_DEF","NG_ELEMENT_ID","__NG_ELEMENT_ID__","componentDefCount","ɵɵdefineComponent","componentDefinition","baseDef","getNgDirectiveDef","onPush","directiveDefs","pipeDefs","getStandaloneInjector","schemas","tView","initFeatures","extractDefListOrFactory","ɵɵsetComponentScope","directives","pipes","extractDirectiveDef","getComponentDef","getDirectiveDef","nonNull","ɵɵdefineNgModule","declarations","transitiveCompileScopes","ɵɵsetNgModuleScope","scope","ngModuleDef","getNgModuleDef","invertObject","secondary","newLookup","minifiedKey","publicName","declaredName","ɵɵdefineDirective","directiveDefinition","ɵɵdefinePipe","pipeDef","getPipeDef$1","isStandalone","throwNotFound","declaredInputs","providersResolver","hostAttrs","exportAs","setInput","findHostDirectiveDefs","hostDirectives","defExtractor","dep","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","TYPE","HAS_TRANSPLANTED_VIEWS","NATIVE","VIEW_REFS","MOVED_VIEWS","CONTAINER_HEADER_OFFSET","isLView","isLContainer","isContentQueryHost","tNode","isComponentHost","componentOffset","isDirectiveHost","isComponentDef","isRootView","getFactoryDef","SimpleChange","isFirstChange","ɵɵNgOnChangesFeature","NgOnChangesFeatureImpl","ngOnChangesSetInput","rememberChangeHistoryAndInvokeOnChangesHook","simpleChangesStore","getSimpleChangesStore","privateName","setSimpleChangesStore","store","SIMPLE_CHANGES_STORE","previousChange","ngInherit","profiler","hookOrListener","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","isCurrentTNodeParent","setCurrentTNodeAsNotParent","getBindingRoot","bindingRootIndex","bindingStartIndex","getBindingIndex","bindingIndex","nextBindingIndex","incrementBindingIndex","setBindingRootForHostBindings","currentDirectiveIndex","setCurrentDirectiveIndex","getCurrentQueryIndex","setCurrentQueryIndex","getDeclarationTNode","declTNode","enterDI","parentTNode","parentLView","allocLFrame","enterView","newView","newLFrame","inI18n","currentLFrame","childLFrame","elementDepthCount","currentNamespace","leaveViewLight","oldLFrame","leaveDI","leaveView","getSelectedIndex","setSelectedIndex","getSelectedTNode","registerPostOrderHooks","directiveStart","directiveEnd","lifecycleHooks","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executeCheckHooks","callHooks","executeInitAndCheckHooks","initPhase","incrementInitPhaseFlags","currentView","currentNodeIndex","nodeIndexLimit","lastNodeIndexFound","callHook","isInitHook","hook","directive","NO_PARENT_INJECTOR","NodeInjectorFactory","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","setUpAttributes","native","attrName","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","NOT_FOUND","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","firstCreatePass","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentData","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","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","Query","isViewQuery","descendants","emitDistinctChangesOnly","deepForEach","addToArray","newArray","keyValueArraySet","keyValueArray","keyValueArrayIndexOf","arrayInsert2","keyValueArrayGet","_arrayIndexOfSorted","middle","RendererStyleFlags2","Important","DashCase","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","removeIndex","indexInContainer","viewToDetach","declarationLContainer","removedLView","removeViewFromContainer","lQueries","destroyLView","destroyViewTree","rootView","lViewOrLContainer","cleanUpView","firstView","executeOnDestroys","toCall","callContext","processCleanups","tCleanup","cleanup","lCleanup","lastLCleanupIndex","targetIdx","instanceCleanupFn","unregisterLView","getParentRElement","getClosestRElement","nativeAppendOrInsertBefore","getInsertInFrontOfRNode","_getInsertInFrontOfRNodeWithI18n","_processI18nInsertBefore","policy$1","policy","getInsertInFrontOfRNodeWithNoI18n","childRNode","childTNode","parentRNode","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","getPolicy$1","trustedTypes","createPolicy","createHTML","createScript","createScriptURL","setDocument","getPolicy","trustedHTMLFromStringBypass","trustedScriptURLFromStringBypass","SafeValueImpl","SafeHtmlImpl","getTypeName","SafeStyleImpl","SafeScriptImpl","SafeUrlImpl","SafeResourceUrlImpl","unwrapSafeValue","allowSanitizationBypassAndThrow","actualType","getSanitizationBypassType","bypassSanitizationTrustHtml","trustedHtml","bypassSanitizationTrustStyle","trustedStyle","bypassSanitizationTrustScript","trustedScript","bypassSanitizationTrustUrl","trustedUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","DOMParserHelper","inertDocumentHelper","getInertBodyElement","InertDocumentHelper","defaultDoc","inertDocument","implementation","createHTMLDocument","templateEl","SAFE_URL_PATTERN","_sanitizeUrl","tagSet","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","buf","sanitizeChildren","traverseContent","startElement","chars","nodeValue","endElement","checkClobberedElement","elAttrs","elAttr","encodeEntities","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","inertBodyHelper","_sanitizeHtml","unsafeHtmlInput","inertBodyElement","getInertBodyHelper","isDOMParserAvailable","unsafeHtml","mXSSAttempts","parsedHtml","getTemplateContent","isTemplateElement","SecurityContext","HTML","STYLE","SCRIPT","RESOURCE_URL","ɵɵsanitizeHtml","getSanitizer","sanitize","ɵɵsanitizeUrl","unsafeUrl","ɵɵsanitizeResourceUrl","unsafeResourceUrl","ɵɵsanitizeUrlOrResourceUrl","tag","getUrlSanitizer","ENVIRONMENT_INITIALIZER","INJECTOR_DEF_TYPES","NullInjector","importProvidersFrom","internalImportProvidersFrom","ɵfromNgModule","checkForStandaloneCmp","providersOut","dedup","injectorTypesWithProviders","internalSource","walkProviderTree","processInjectorTypesWithProviders","typesWithProviders","deepForEachProvider","provider","defType","injDef","cmpDef","isDuplicate","importTypesWithProviders","imported","defProviders","USE_VALUE$1","isValueProvider","isTypeProvider","INJECTOR_SCOPE","NOT_YET","CIRCULAR","NULL_INJECTOR$1","getNullInjector","EnvironmentInjector","R3Injector","scopes","records","_ngOnDestroyHooks","_onDestroyHooks","forEachSingleProvider","processProvider","makeRecord","injectorDefTypes","assertNotDestroyed","service","previousInjector","couldBeInjectableType","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","catchInjectorError","injectorErrorName","tokenPath","formatError","resolveInjectorInitializers","initializers","initializer","providerToRecord","providerToFactory","multiRecord","hasOnDestroy","getUndecoratedInjectableFactory","paramLength","inheritedInjectableDef","getInheritedInjectableDef","ngModuleType","unwrappedProvider","isFactoryProvider","isExistingProvider","classRef","hasDeps","ComponentRef$1","ComponentFactory$1","_NullComponentFactoryResolver","noComponentFactoryError","ComponentFactoryResolver$1","NULL","injectElementRef","createElementRef","unwrapElementRef","injectRenderer2","nodeAtIndex","Sanitizer","Version","full","major","minor","VERSION","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","ERROR_ORIGINAL_ERROR","getOriginalError","ErrorHandler","_console","handleError","originalError","_findOriginalError","ɵɵresolveWindow","maybeUnwrapFn","classIndexOf","classToSearch","startingIndex","foundIndex","NG_TEMPLATE_SELECTOR","isCssClassMatching","cssClassToMatch","isProjectionMode","isImplicitAttrsSection","isInlineTemplate","hasTagAndTypeMatch","currentSelector","isNodeMatchingSelector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","selectorAttrValue","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","compareAgainstClassName","bindingsMode","maybeAttrName","matchTemplateAttribute","isNodeMatchingSelectorList","isSelectorInSelectorList","selectorListLoop","currentSelectorInList","maybeWrapInNotSelector","isNegativeMode","chunk","stringifyCSSSelector","currentChunk","valueOrMarker","attrValue","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","stylesWithoutHost","residualStyles","classesWithoutHost","residualClasses","classBindings","styleBindings","isInI18nBlock","getCurrentParentTNode","allocExpando","numSlotsToAlloc","allocIdx","renderView","executeViewQueryFn","templateFn","executeTemplate","staticContentQueries","staticViewQueries","renderChildComponents","hostLView","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","inputData","setInputsForProperty","markDirtyIfOnPush","viewIndex","childComponentLView","mapPropName","resolveDirectives","localRefs","exportsMap","matchResult","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","errorHandler","textBindingInternal","updateTextNode","computeStaticStyling","writeToHost","collectNativeNodes","lNode","lViewInAContainer","lViewFirstChildTNode","nodesInSlot","ViewRef$1","_cdRefInjectingView","_attachedToViewContainer","viewRefs","reattach","checkNoChanges","attachToViewContainerRef","detachFromAppRef","renderDetachView","attachToAppRef","RootViewRef","componentDef","ComponentFactory","toRefArray","nonMinified","templateName","ChainedInjector","parentInjector","stringifyCSSSelectorList","selectorList","isBoundToModule","rootSelectorOrNode","environmentInjector","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","isListLikeIterable","isJsObject","updateBinding","getBinding","bindingUpdated","is","bindingUpdated2","exp1","exp2","different","bindingUpdated3","exp3","bindingUpdated4","exp4","ɵɵattribute","interpolation1","ɵɵtemplate","attrsIndex","localRefsIndex","adjustedIndex","templateFirstCreatePass","tViewConsts","comment","ɵɵreference","getContextLView","ɵɵproperty","setDirectiveInputsWhichShadowsStyling","isClassBased","ɵɵelementStart","elementStartFirstCreatePass","elementStart","getNamespace$1","hasDirectives","getElementDepthCount","increaseElementDepthCount","ɵɵelementEnd","decreaseElementDepthCount","elementEnd","hasClassInput","hasStyleInput","ɵɵelement","ɵɵelementContainerStart","elementContainerStartFirstCreatePass","ɵɵelementContainerEnd","ɵɵelementContainer","ɵɵgetCurrentView","isSubscribable","ɵɵlistener","listenerFn","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","interpolatedValue","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","stringParser","stylingFirstUpdatePass","hasStylingInputShadow","isInHostBindings","staticPrefix","updateStylingMap","oldKeyValueArray","newKeyValueArray","newIndex","oldKey","setKey","updateStyling","toStylingKeyValueArray","styleKeyValueArray","unwrappedValue","classKeyValueArraySet","classStringParser","parseClassName","resetParserState","normalizeSuffix","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","stringKey","tRange","higherPriorityValue","getTStylingRangeNextDuplicate","findStylingValue","isStylingValuePresent","getTStylingRangePrevDuplicate","applyStyling","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","ɵɵtext","textNative","ɵɵtextInterpolate","ɵɵtextInterpolate1","ɵɵtextInterpolate2","interpolation2","ɵɵtextInterpolate3","interpolation3","ɵɵtextInterpolate4","interpolation4","localeEn","plural","LOCALE_DATA","findLocaleData","normalizedLocale","normalizeLocale","getLocaleData","parentLocale","getLocalePluralCase","LocaleDataIndex","PluralCase","ng","common","locales","LocaleId","DayPeriodsFormat","DayPeriodsStandalone","DaysFormat","DaysStandalone","MonthsFormat","MonthsStandalone","FirstDayOfWeek","WeekendRange","DateFormat","TimeFormat","DateTimeFormat","NumberSymbols","NumberFormats","CurrencyCode","CurrencySymbol","CurrencyName","Currencies","ExtraData","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","_r3Injector","NgModuleFactory","moduleType","EnvironmentNgModuleRefAdapter","createEnvironmentInjector","debugName","StandaloneService","cachedInjectors","getOrCreateStandaloneInjector","standaloneInjector","ɵɵStandaloneFeature","ɵɵpureFunction0","slotOffset","pureFn","ɵɵpureFunction1","pureFunction1Internal","ɵɵpureFunction2","pureFunction2Internal","ɵɵpureFunction3","pureFunction3Internal","bindingRoot","getPureFunctionReturnValue","ɵɵpureFunction4","pureFunction4Internal","ɵɵpureFunction6","exp5","exp6","returnValueIndex","lastReturnValue","ɵɵpipe","pipeName","getPipeDef","pipeFactory","pipeInstance","ɵɵpipeBind1","isPure","ɵɵpipeBind2","_wrapInTimeout","EventEmitter_","isAsync","__isAsync","nextFn","errorFn","completeFn","symbolIterator","_results","_changes","_emitDistinctChangesOnly","dirty","_changesDetected","resultsTree","identityAccessor","newResultFlat","arrayEquals","notifyOnChanges","setDirty","injectTemplateRef","ViewEngineTemplateRef","R3TemplateRef","_declarationLView","_declarationTContainer","declarationViewLQueries","createTemplateRef","injectViewContainerRef","createContainerRef","VE_ViewContainerRef","R3ViewContainerRef","_hostTNode","_hostLView","getViewRefs","indexOrOptions","componentFactoryOrType","isComponentFactory","isType","ngModuleRef","contextInjector","viewAttachedToContainer","prevLContainer","prevVCRef","adjustedIdx","_adjustIndex","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","isNgModule","bindingPropertyName","ApplicationInitStatus","appInits","initialized","donePromise","rej","runInitializers","asyncInitPromises","initResult","observableAsPromise","APP_ID","_appIdRandomProviderFactory","_randomChar","PLATFORM_INITIALIZER","Console","getGlobalLocale","$localize","DEFAULT_CURRENCY_CODE","ModuleWithComponentFactories","ngModuleFactory","componentFactories","Compiler","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","declaration","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","enableLongStackTrace","shouldCoalesceEventChangeDetection","shouldCoalesceRunChangeDetection","hasPendingMacrotasks","hasPendingMicrotasks","isStable","onUnstable","onMicrotaskEmpty","assertZonePatched","_nesting","_outer","_inner","TaskTrackingZoneSpec","longStackTraceZoneSpec","lastRequestAnimationFrameId","nativeRequestAnimationFrame","getNativeRequestAnimationFrame","nativeCancelAnimationFrame","unpatchedRequestAnimationFrame","__symbol__","unpatchedCancelAnimationFrame","forkInnerZoneWithAngularBehavior","delayChangeDetectionForEventsDelegate","delayChangeDetectionForEvents","isCheckStableRunning","fakeTopEventTask","updateMicroTaskStatus","checkStable","isAngularZone","onEnter","onLeave","onHasTask","hasTaskState","hasTask","_hasPendingMicrotasks","microTask","macroTask","isInAngularZone","runTask","EMPTY_PAYLOAD","NoopNgZone","TESTABILITY","TESTABILITY_GETTER","_testabilityGetter","Testability","testabilityGetter","_pendingCount","_isZoneStable","_didWork","_callbacks","taskTrackingZone","setTestabilityGetter","addToWindow","_watchAngularEvents","assertNotInAngularZone","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","timeoutId","doneCb","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","whenStable","getPendingRequestCount","registerApplication","unregisterApplication","findProviders","using","exactMatch","TestabilityRegistry","_applications","testability","unregisterAllApplications","getTestability","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","NG_DEV_MODE","_platformInjector","ALLOW_MULTIPLE_PLATFORMS","PLATFORM_DESTROY_LISTENERS","APP_BOOTSTRAP_LISTENER","NgProbeToken","createPlatformFactory","parentPlatformFactory","extraProviders","getPlatform","platformProviders","createPlatform","PlatformRef","runPlatformInitializers","inits","createPlatformInjector","assertPlatform","requiredToken","_modules","_destroyListeners","bootstrapModuleFactory","moduleFactory","getNgZone","ngZoneToUse","getNgZoneOptions","ngZoneEventCoalescing","ngZoneRunCoalescing","ngZoneInjector","moduleRef","exceptionHandler","_callAndReportToErrorHandler","initStatus","setLocaleId","_moduleDoBootstrap","compilerOptions","optionsReducer","compileNgModuleFactory","ngDoBootstrap","destroyListeners","objs","_exceptionHandler","_bootstrapListeners","_views","_runningTick","_stable","componentTypes","_onMicrotaskEmptySubscription","isCurrentlyStable","stableSub","unstableSub","assertInAngularZone","merge$1","share","multicast","subjectOrSubjectFactory","componentOrFactory","cf","compRef","_loadComponent","enableProdMode","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","forEachAddedItem","_nextAdded","forEachMovedItem","_nextMoved","forEachRemovedItem","_nextIdentityChange","_reset","itemTrackBy","mayBeDirty","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","isDirty","previousRecord","_prev","_remove","_reinsertAfter","_moveAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","nextRecord","_addToRemovals","_unlink","prevRecord","_prevRemoved","_insertAfter","_DuplicateMap","_prevDup","_nextDup","_DuplicateItemRecordList","_head","_tail","atOrAfterIndex","duplicates","recordList","moveOffset","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_records","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","forEachChangedItem","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","KeyValueChangeRecord_","_addToAdditions","_addToChanges","defaultIterableDiffersFactory","IterableDiffers","copied","defaultKeyValueDiffersFactory","KeyValueDiffers","kv","platformCore","ApplicationModule","coerceToBoolean","forkJoinInternal","completed","emitted","BaseControlValueAccessor","BuiltInControlValueAccessor","CHECKBOX_VALUE_ACCESSOR","CheckboxControlValueAccessor","DEFAULT_VALUE_ACCESSOR","DefaultValueAccessor","COMPOSITION_BUFFER_MODE","_compositionMode","_composing","_isAndroid","ɵgetDOM","getUserAgent","_handleInput","_compositionStart","_compositionEnd","NG_DEV_MODE$1","isEmptyInputValue","hasValidLength","NG_VALIDATORS","NG_ASYNC_VALIDATORS","EMAIL_REGEXP","minValidator","maxValidator","requiredValidator","requiredTrueValidator","emailValidator","minLengthValidator","minlength","requiredLength","actualLength","maxLengthValidator","maxlength","patternValidator","composeAsync","nullValidator","regex","regexStr","requiredPattern","actualValue","isPresent","ɵisObservable","mergeErrors","arrayOfErrors","executeValidators","normalizeValidators","isValidatorFn","presentValidators","composeValidators","forkJoin","composeAsyncValidators","controlValidators","dirValidator","getControlValidators","_rawValidators","getControlAsyncValidators","_rawAsyncValidators","makeValidatorsArray","hasValidator","addValidators","currentValidators","validatorsToAdd","removeValidators","AbstractControlDirective","_onDestroyCallbacks","pristine","untouched","_setValidators","_composedValidatorFn","_setAsyncValidators","_composedAsyncValidatorFn","_registerOnDestroy","_invokeOnDestroyCallbacks","errorCode","getError","ControlContainer","formDirective","NgControl","valueAccessor","AbstractControlStatus","cd","_cd","isTouched","isUntouched","isPristine","isInvalid","isPending","isSubmitted","NgControlStatus","NgControlStatusGroup","describeKey","isFormGroup","VALID","INVALID","PENDING","DISABLED","pickValidators","validatorOrOpts","isOptionsObj","pickAsyncValidators","assertControlPresent","isGroup","noControlsError","missingControlError","assertAllValuesPresent","missingControlValueError","_pendingDirty","_hasOwnPendingAsyncValidator","_pendingTouched","_onCollectionChange","_onDisabledChange","_assignValidators","_assignAsyncValidators","validatorFn","asyncValidatorFn","_updateOn","addAsyncValidators","removeAsyncValidators","hasAsyncValidator","clearValidators","clearAsyncValidators","markAllAsTouched","markAsUntouched","_updateTouched","markAsPristine","_updatePristine","markAsPending","skipPristineCheck","_parentMarkedDirty","_updateValue","_updateAncestors","getRawValue","_setInitialStatus","_cancelExistingSubscription","_runValidator","_calculateStatus","_runAsyncValidator","_allControlsDisabled","_asyncValidationSubscription","_updateControlsErrors","currPath","_find","_initObservables","_anyControlsHaveStatus","_anyControls","_anyControlsDirty","_anyControlsTouched","_registerOnCollectionChange","_setUpdateStrategy","coerceToValidator","coerceToAsyncValidator","_setUpControls","addControl","controlName","_reduceChildren","_syncPendingControls","subtreeUpdated","_reduceValue","FormRecord","CALL_SET_DISABLED_STATE","setDisabledStateDefault","controlPath","setUpControl","callSetDisabledState","setUpValidators","setUpViewChangePipeline","_pendingValue","_pendingChange","setUpModelChangePipeline","emitModelEvent","viewToModelUpdate","_unregisterOnChange","setUpBlurPipeline","setUpDisabledChangeHandler","onDisabledChange","_unregisterOnDisabledChange","cleanUpControl","validateControlPresenceOnChange","cleanUpValidators","registerOnValidatorChange","onValidatorChange","isControlUpdated","updatedValidators","updatedAsyncValidators","emitModelToViewChange","setUpFormContainer","isPropertyUpdated","viewModel","syncPendingControls","selectValueAccessor","valueAccessors","defaultAccessor","builtinAccessor","customAccessor","isBuiltInAccessor","formDirectiveProvider$1","NgForm","resolvedPromise$1","_directives","ngSubmit","_findContainer","getControl","addFormGroup","removeFormGroup","getFormGroup","updateModel","onSubmit","onReset","removeListItem","isFormControlState","_onChange","_applyFormState","nonNullable","initialValueIsDefault","emitViewToModelChange","UntypedFormControl","formControlBinding$1","NgModel","resolvedPromise","_changeDetectorRef","_registered","_checkForErrors","_checkName","oldName","_getPath","_setUpControl","_updateDisabled","_isStandalone","_setUpStandalone","_checkParentType","disabledValue","ɵcoerceToBoolean","ɵNgNoValidate","NUMBER_VALUE_ACCESSOR","NumberValueAccessor","RADIO_VALUE_ACCESSOR","RadioControlValueAccessor","RadioControlRegistryModule","RadioControlRegistry","_accessors","accessor","_isSameGroup","fireUncheck","controlPair","_control","_registry","setDisabledStateFired","_fn","formControlName","NG_MODEL_WITH_FORM_CONTROL_WARNING","formControlBinding","FormControlDirective","_ngModelWarningConfig","_ngModelWarningSent","_isControlChanged","previousForm","_ngModelWarningSentOnce","formDirectiveProvider","FormGroupDirective","_updateDomValue","_checkFormPresent","_updateValidators","_updateRegistrations","_oldForm","removeListItem$1","_setUpFormContainer","_cleanUpFormContainer","addFormArray","removeFormArray","getFormArray","newCtrl","isFormControl","cleanUpFormContainer","controlNameBinding","FormControlName","_added","SELECT_VALUE_ACCESSOR","_buildValueString$1","_optionMap","_compareWith","valueString","_getOptionValue","_registerOption","_extractId$1","NgSelectOption","_select","ngValue","_setElementValue","SELECT_MULTIPLE_VALUE_ACCESSOR","SelectMultipleControlValueAccessor","_buildValueString","optionSelectedStateSetter","_setSelected","selectedOptions","_extractId","ɵNgSelectMultipleOption","AbstractValidatorDirective","_validator","inputName","normalizeInput","_enabled","createValidator","REQUIRED_VALIDATOR","RequiredValidator","PATTERN_VALIDATOR","PatternValidator","ɵInternalFormsSharedModule","at","_registerControl","isAbstractControlOptions","FormBuilder","useNonNullable","nnfb","reducedControls","_reduceControls","createdControls","_createControl","UntypedFormBuilder","controlsConfig","warnOnNgModelWithFormControl","GenericBrowserDomAdapter","ɵDomAdapter","supportsDOMEvents","BrowserDomAdapter","ɵsetRootDomAdapter","onAndCancel","evt","getDefaultDocument","createHtmlDocument","isShadowRoot","DocumentFragment","getBaseElementHref","baseElement","relativePath","urlParsingNode","pathName","resetBaseElement","getCookie","TRANSITION_ID","SERVER_TRANSITION_PROVIDERS","appInitializerFactory","transitionId","dom","BrowserXhr","EVENT_MANAGER_PLUGINS","EventManager","_eventNameToPlugin","manager","_plugins","_findPluginFor","addGlobalEventListener","getZone","EventManagerPlugin","SharedStylesHost","usageCount","addStyles","changeUsageCount","onStyleAdded","removeStyles","onStyleRemoved","getAllStyles","usage","DomSharedStylesHost","styleRef","hostNodes","resetHostNodes","addStyleToHost","addHost","hostNode","removeHost","styleEl","styleElRef","NAMESPACE_URIS","math","COMPONENT_REGEX","REMOVE_STYLES_ON_COMPONENT_DESTROY","decoratePreventDefault","eventHandler","DomRendererFactory2","eventManager","sharedStylesHost","appId","removeStylesOnCompDestory","rendererByCompId","defaultRenderer","DefaultDomRenderer2","getOrCreateRenderer","EmulatedEncapsulationDomRenderer2","applyToHost","NoneEncapsulationDomRenderer","applyStyles","ShadowDomRenderer","isTemplateNode","namespaceUri","hostEl","nodeOrShadowRoot","rendererUsageCount","contentAttr","shimContentAttribute","componentShortId","hostAttr","shimHostAttribute","DomEventsPlugin","MODIFIER_KEYS","_keyMap","Del","Esc","Menu","Scroll","Win","MODIFIER_KEY_GETTERS","KeyEventsPlugin","parseEventName","parsedEvent","outsideHandler","eventCallback","fullKey","domEventName","_normalizeKey","codeIX","modifierName","fullKeyCode","keycode","modifierGetter","matchEventFullKeyCode","keyName","platformBrowser","ɵPLATFORM_BROWSER_ID","initDomAdapter","makeCurrent","ɵsetDocument","BROWSER_MODULE_PROVIDERS_MARKER","TESTABILITY_PROVIDERS","ɵTESTABILITY_GETTER","BrowserGetTestability","ɵglobal","testabilities","didWork","decrement","didWork_","ɵTESTABILITY","BROWSER_MODULE_PROVIDERS","ɵINJECTOR_SCOPE","providersAlreadyPresent","Title","getTitle","newTitle","createTitle","DomSanitizer","DomSanitizerImpl","ɵallowSanitizationBypassAndThrow","ɵunwrapSafeValue","ɵ_sanitizeHtml","ɵ_sanitizeUrl","ɵXSS_SECURITY_URL","ɵbypassSanitizationTrustHtml","bypassSecurityTrustStyle","ɵbypassSanitizationTrustStyle","bypassSecurityTrustScript","ɵbypassSanitizationTrustScript","bypassSecurityTrustUrl","ɵbypassSanitizationTrustUrl","bypassSecurityTrustResourceUrl","ɵbypassSanitizationTrustResourceUrl","domSanitizerImplFactory","EmptyError","EmptyErrorImpl","OuterSubscriber","outerValue","outerIndex","innerIndex","InnerSubscriber","subscribeToResult","outerSubscriber","combineLatest","CombineLatestOperator","CombineLatestSubscriber","toRespond","unused","_outerValue","_tryResultSelector","defer","observableFactory","defaultIfEmpty","DefaultIfEmptyOperator","DefaultIfEmptySubscriber","throwIfEmpty","errorFactory","defaultErrorFactory","ThrowIfEmptyOperator","ThrowIfEmptySubscriber","hasDefaultValue","scan","accumulator","hasSeed","ScanOperator","ScanSubscriber","_seed","takeLast","TakeLastOperator","TakeLastSubscriber","ring","TakeWhileOperator","inclusive","TakeWhileSubscriber","nextOrComplete","predicateResult","MapToOperator","MapToSubscriber","finalize","FinallyOperator","FinallySubscriber","PRIMARY_OUTLET","RouteTitleKey","ParamsAsMap","convertToParamMap","defaultUrlMatcher","segments","segmentGroup","posParams","segment","consumed","shallowEqual","equalArraysOrString","aSorted","bSorted","wrapIntoObservable","NG_DEV_MODE$b","pathCompareMap","exact","equalSegmentGroups","containee","matrixParams","equalPath","matrixParamsMatch","numberOfChildren","subset","containsSegmentGroup","paramCompareMap","equalParams","containsParams","ignored","containsTree","fragment","containsSegmentGroupHelper","containeePaths","containerPaths","containeeSegment","UrlTree","UrlSegmentGroup","queryParamMap","_queryParamMap","DEFAULT_SERIALIZER","serializePaths","UrlSegment","parameterMap","_parameterMap","serializePath","as","UrlSerializer","DefaultUrlSerializer","UrlParser","parseRootSegment","parseQueryParams","parseFragment","serializeSegment","serializeQueryParams","strParams","encodeUriQuery","encodeUriFragment","encodeURI","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","currentVal","allowPrimary","outletName","createRoot","rootCandidate","Ft","squashSegmentGroup","childCandidate","mergeTrivialChildren","isUrlTree","NG_DEV_MODE$a","createUrlTree","urlTree","commands","nav","computeNavigation","Navigation","numberOfDoubleDots","isAbsolute","cmd","cmdIdx","outlets","segmentPath","urlPart","partIndex","toRoot","createTreeUsingPathIndex","lastPathIndex","startingPosition","findStartingPosition","Position","createPositionApplyingDoubleDots","ci","isMatrixParams","snapshot","_urlSegment","processChildren","updateSegmentGroupChildren","updateSegmentGroup","_lastPathIndex","isCommandWithOutlets","oldRoot","oldSegmentGroup","newSegmentGroup","qp","replaceSegment","newRoot","oldSegment","newSegment","cmdWithOutlet","prefixedWith","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","slicedCommands","createNewSegmentGroup","getOutlets","childrenOfEmptyChild","outlet","createNewSegmentChildren","IMPERATIVE_NAVIGATION","RouterEvent","NavigationStart","navigationTrigger","restoredState","NavigationEnd","urlAfterRedirects","NavigationCancel","NavigationSkipped","NavigationError","RoutesRecognized","GuardsCheckStart","GuardsCheckEnd","shouldActivate","ResolveStart","ResolveEnd","RouteConfigLoadStart","RouteConfigLoadEnd","ChildActivationStart","routeConfig","ChildActivationEnd","ActivationStart","ActivationEnd","routerEvent","LegacyCreateUrlTree","relativeTo","currentUrlTree","CreateUrlTreeStrategy","Tree","_root","pathFromRoot","findNode","findPath","cc","TreeNode","nodeChildrenAsMap","RouterState","setRouterState","createEmptyState","rootComponent","createEmptyStateSnapshot","activated","ActivatedRouteSnapshot","RouterStateSnapshot","emptyUrl","emptyParams","emptyData","emptyQueryParams","ActivatedRoute","futureSnapshot","_futureSnapshot","_routerState","paramMap","_paramMap","inheritedParamsDataResolve","paramsInheritanceStrategy","inheritingStartingFrom","flattenInherited","_resolvedData","urlSegment","_resolve","serializeNode","advanceActivatedRoute","nextSnapshot","shallowEqualArrays","equalParamsAndUrlSegments","equalUrlParams","equalSegments","routeReuseStrategy","prevState","shouldReuseRoute","createOrReuseChildren","shouldAttach","detachedRouteHandle","createActivatedRoute","NAVIGATION_CANCELING_ERROR","redirectingNavigationError","urlSerializer","redirect","navigationBehaviorOptions","navigationCancelingError","redirectUrl","cancellationCode","isRedirectingNavigationCancelingError$1","isNavigationCancelingError$1","OutletContext","ChildrenOutletContexts","attachRef","contexts","onChildOutletCreated","childName","getOrCreateContext","onChildOutletDestroyed","onOutletDeactivated","onOutletReAttached","NG_DEV_MODE$8","RouterOutlet","_activatedRoute","activateEvents","deactivateEvents","attachEvents","detachEvents","parentContexts","changeDetector","isTrackedInParentContexts","initializeOutletWithName","activateWith","isActivated","activatedRoute","activatedRouteData","cmp","resolverOrInjector","childContexts","OutletInjector","isComponentFactoryResolver","ɵEmptyOutletComponent","getOrCreateRouteInjectorIfNeeded","currentInjector","standardizeConfig","loadComponent","getOutlet","sortByMatchingOutlets","sortedConfig","getClosestRouteInjector","_loadedInjector","ActivateRoutes","futureState","currState","forwardEvent","futureRoot","currRoot","deactivateChildRoutes","activateChildRoutes","futureNode","futureChild","childOutletName","deactivateRoutes","deactivateRouteAndItsChildren","future","shouldDetach","detachAndStoreRouteSubtree","deactivateRouteAndOutlet","activateRoutes","stored","cmpFactoryResolver","CanActivate","CanDeactivate","getAllRouteGuards","getChildRouteGuards","getTokenOrFunctionIdentity","tokenOrFunction","ɵ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","isCanMatch","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","childConfig","splitSegmentGroup","matchedOnOutlet","runCanLoadGuards","canLoad","canLoadObservables","isCanLoad","shouldLoadResult","canLoadFails","applyRedirectCreateUrlTree","createSegmentGroup","createQueryParams","redirectToParams","actualParams","sourceName","updatedSegments","createSegments","redirectToSegments","actualSegments","findPosParam","findOrReturn","redirectToUrlSegment","NoMatch","Recognizer","rootComponentType","recognize","processSegmentGroup","routeState","inheritParamsAndData","routeNode","processSegment","outletChildren","takeWhile","mergedChildren","mergeEmptyPathMatches","sortActivatedRouteSnapshots","processSegmentAgainstRoute","pathIndexShift","getPathIndexShift","_loadedComponent","getSourceSegmentGroup","getResolve","hasEmptyPathConfig","mergedNodes","duplicateEmptyPathNode","resultNode","mergedNode","hasStaticTitle","switchTap","nextResult","ROUTES","RouterConfigLoader","componentLoaders","childrenLoaders","compiler","onLoadStartListener","loadRunner","maybeUnwrapDefaultExport","onLoadEndListener","loader","loadModuleFactoryOrRoutes","factoryOrRoutes","rawRoutes","requireStandaloneComponents","NG_DEV_MODE$5","isWrappedDefaultExport","NavigationTransitions","hasRequestedNavigation","navigationId","currentNavigation","lastSuccessfulNavigation","rootContexts","afterPreactivation","handleNavigationRequest","setupNavigations","targetPageId","currentRawUrl","extractedUrl","urlHandlingStrategy","extract","rawUrl","routerState","targetSnapshot","currentRouterState","targetRouterState","guards","guardsResult","overallTransitionState","initialUrl","previousNavigation","browserUrlTree","urlTransition","navigated","onSameUrlNavigation","serializeUrl","rawUrlTree","shouldProcessUrl","isBrowserTriggeredNavigation","applyRedirects","applyRedirects$1","finalUrl","recognize$1","newObservableError","urlUpdateStrategy","skipLocationChange","setBrowserUrl","routesRecognized","navStart","replaceUrl","guardsStart","checkGuards","runCanDeactivateChecks","futureRSS","currRSS","runCanDeactivate","currARS","canDeactivate","canDeactivateObservables","closestInjector","isCanDeactivate","runCanActivateChecks","fireChildActivationStart","fireActivationStart","runCanActivateChild","futureARS","canActivateChildGuardsMapped","getCanActivateChild","canActivateChild","guardsMapped","isCanActivateChild","runCanActivate","canActivateObservables","isCanActivate","guardsEnd","restoreHistory","cancelNavigationTransition","resolveStart","dataResolved","resolveData","canActivateChecksResolved","runResolve","resolveNode","getDataKeys","getOwnPropertySymbols","getResolver","mapTo","resolvedData","resolveEnd","loadComponents","loaders","loadedComponent","createRouterState","titleStrategy","updateTitle","navCancel","mergedTree","scheduleNavigation","navError","ee","TitleStrategy","buildTitle","pageTitle","getResolvedTitleForRoute","DefaultTitleStrategy","RouteReuseStrategy","DefaultRouteReuseStrategy","BaseRouteReuseStrategy","detachedTree","ROUTER_CONFIGURATION","UrlHandlingStrategy","DefaultUrlHandlingStrategy","newUrlPart","wholeUrl","defaultErrorHandler","defaultMalformedUriErrorHandler","exactMatchOptions","subsetMatchOptions","Router","navigationTransitions","browserPageId","canceledNavigationResolution","ɵrouterPageId","disposed","currentPageId","ɵConsole","isNgZoneEnabled","malformedUriErrorHandler","lastSuccessfulId","urlCreationStrategy","resetConfig","resetRootComponentType","initialNavigation","setUpLocationChangeListener","navigateToSyncWithBrowser","locationSubscription","stateCopy","parseUrl","getCurrentNavigation","navigationExtras","queryParamsHandling","preserveFragment","removeEmptyProps","navigateByUrl","validateCommands","matchOptions","priorPromise","generateNgRouterState","restoringFromCaughtError","targetPagePosition","resetUrlToCurrentUrlTree","routerPageId","RouterLink","tabIndexAttribute","_preserveFragment","_skipLocationChange","_replaceUrl","onChanges","isAnchorElement","updateHref","setTabIndexIfNotOnNativeEl","newTabIndex","applyAttributeValue","routerLink","onClick","sanitizedValue","i3","RouterLinkActive","_isActive","cdr","routerLinkActiveOptions","isActiveChange","routerEventsSubscription","links","subscribeToEachLinkOnChanges","linkInputChangesSubscription","allLinkChanges","isLinkActive","routerLinkActive","hasActiveLinks","ariaCurrentWhenActive","isActiveMatchOptions","isActiveCheckFn","PreloadingStrategy","RouterPreloader","preloadingStrategy","setUpPreloading","preload","processRoutes","injectorForCurrentRoute","injectorForChildren","preloadConfig","loadedChildren$","recursiveLoadChildren$","loadComponent$","ROUTER_SCROLLER","RouterScroller","viewportScroller","lastId","lastSource","restoredId","createScrollEvents","scrollEventsSubscription","consumeScrollEvents","scheduleScrollEvent","NavigationResult","COMPLETE","FAILED","REDIRECTING","routerFeature","ROUTER_IS_PROVIDED","getBootstrapListener","bootstrappedComponentRef","bootstrapDone","BOOTSTRAP_DONE","INITIAL_NAVIGATION","ROUTER_PRELOADER","withDebugTracing","stringifyEvent","groupEnd","withPreloading","ROUTER_FORROOT_GUARD","ROUTER_PROVIDERS","rootRoute","routerNgProbeToken","enableTracing","provideForRootGuard","useHash","provideInitialNavigation","ROUTER_INITIALIZER","locationInitialized","afterNextNavigation"],"sourceRoot":"webpack:///","sources":["./src/app/_helpers/auth.guard.ts","./src/app/_helpers/jwt.interceptor.ts","./src/app/services/api/FastApp/model/UsersJwtDto.ts","./src/app/_services/authentication.service.ts","./src/app/config.service.ts","./src/app/services/api/FastApp/api/exportMappingDiagnostic.service.ts","./src/app/services/api/FastApp/api.module.ts","./src/app/core/core.module.ts","./src/app/features/applicant/services/applicant.auth.guard.ts","./src/app/features/applicant/services/applicant.service.ts","./src/app/services/api/FastApp/FastAppApiService.ts","./src/app/services/api/FastApp/api/apiBase.service.ts","./src/app/services/api/FastApp/api/action.service.ts","./src/app/services/api/FastApp/api/apiServerInfo.service.ts","./src/app/services/api/FastApp/model/AppDataStatusChangeModel.ts","./src/app/services/api/FastApp/api/apps.service.ts","./src/app/services/api/FastApp/api/avatar.service.ts","./src/app/services/api/FastApp/api/dashboard.service.ts","./src/app/services/api/FastApp/api/dev.service.ts","./src/app/services/api/FastApp/api/defaults.service.ts","./src/app/services/api/FastApp/api/docs.service.ts","./src/app/services/api/FastApp/api/email.service.ts","./src/app/services/api/FastApp/api/exportMapping.service.ts","./src/app/services/api/FastApp/api/forms.service.ts","./src/app/services/api/FastApp/api/integration.service.ts","./src/app/services/api/FastApp/api/license-service.service.ts","./src/app/services/api/FastApp/api/list.service.ts","./src/app/services/api/FastApp/api/orgs.service.ts","./src/app/services/api/FastApp/api/pdf.service.ts","./src/app/services/api/FastApp/api/schema.service.ts","./src/app/services/api/FastApp/api/users.service.ts","./src/app/services/api/FastApp/api/webClientLogger.service.ts","./src/app/services/api/FastApp/api/two-factor-auth.service.ts","./src/app/services/api/FastApp/keyservice/KeyInfoModel.ts","./src/app/services/api/FastApp/keyservice/key.service.ts","./src/app/types/list-item.type.ts","./src/app/services/list-provider/list-provider.service.ts","./src/app/services/session/session.service.ts","./src/app/services/theme.service.ts","./src/app/services/shared.service.ts","./src/app/services/timestamp.service.ts","./src/app/shared/bulma-ui/bulma-card/bulma-card.component.html","./src/app/shared/bulma-ui/bulma-card/bulma-card.component.ts","./src/app/shared/bulma-ui/bulma-modal-card/bulma-modal-card.component.ts","./src/app/shared/bulma-ui/bulma-modal-card/bulma-modal-card.component.html","./src/app/shared/bulma-ui/bulma-modal/bulma-modal.component.ts","./src/app/shared/bulma-ui/bulma-modal/bulma-modal.component.html","./src/app/shared/bulma-ui/bulma-notification/bulma-notification.component.ts","./src/app/shared/bulma-ui/bulma-notification/bulma-notification.component.html","./src/app/shared/bulma-ui/bulma.module.ts","./src/app/shared/display-status-message/StatusMessage.ts","./src/app/shared/display-status-message/display-status-message.component.html","./src/app/shared/display-status-message/display-status-message.component.ts","./src/app/shared/util/AppInjector.ts","./src/app/shared/feature-flag.service.ts","./src/app/shared/abs.service.ts","./src/app/shared/ngx-formly/ui-bulma/checkbox/checkbox.type.html","./src/app/shared/ngx-formly/ui-bulma/checkbox/checkbox.type.ts","./src/app/shared/ngx-formly/ui-bulma/form-field/form-field.wrapper.html","./src/app/shared/ngx-formly/ui-bulma/form-field/form-field.wrapper.ts","./src/app/shared/ngx-formly/ui-bulma/form-field/form-field.module.ts","./src/app/shared/ngx-formly/ui-bulma/checkbox/checkbox.module.ts","./src/app/shared/ngx-formly/ui-bulma/color/color.type.ts","./src/app/shared/ngx-formly/ui-bulma/color/color.module.ts","./src/app/shared/ngx-formly/ui-bulma/file/file-value-accessor.ts","./src/app/shared/ngx-formly/ui-bulma/file/file.type.ts","./src/app/shared/ngx-formly/ui-bulma/file/file.module.ts","./src/app/shared/ngx-formly/ui-bulma/form-field-horiz/form-field-horiz.wrapper.html","./src/app/shared/ngx-formly/ui-bulma/form-field-horiz/form-field-horiz.wrapper.ts","./src/app/shared/ngx-formly/ui-bulma/form-field-horiz/form-field-horiz.module.ts","./src/app/shared/ngx-formly/ui-bulma/form-field-td/form-field-td.wrapper.html","./src/app/shared/ngx-formly/ui-bulma/form-field-td/form-field-td.wrapper.ts","./src/app/shared/ngx-formly/ui-bulma/form-field-td/form-field-td.module.ts","./src/app/shared/ngx-formly/ui-bulma/input/input.type.html","./src/app/shared/ngx-formly/ui-bulma/input/input.type.ts","./src/app/shared/ngx-formly/ui-bulma/input/input.module.ts","./node_modules/@ngx-formly/core/__ivy_ngcc__/fesm2015/ngx-formly-core-select.js","./src/app/shared/ngx-formly/ui-bulma/multicheckbox/multicheckbox.type.html","./src/app/shared/ngx-formly/ui-bulma/multicheckbox/multicheckbox.type.ts","./src/app/shared/ngx-formly/ui-bulma/multicheckbox/multicheckbox.module.ts","./src/app/shared/ngx-formly/ui-bulma/panel/panel-wrapper.component.ts","./src/app/shared/ngx-formly/ui-bulma/panel/panel-wrapper.module.ts","./src/app/shared/ngx-formly/ui-bulma/radio/radio.type.html","./src/app/shared/ngx-formly/ui-bulma/radio/radio.type.ts","./src/app/shared/ngx-formly/ui-bulma/radio/radio.module.ts","./src/app/shared/ngx-formly/ui-bulma/select/select.type.html","./src/app/shared/ngx-formly/ui-bulma/select/select.type.ts","./src/app/shared/ngx-formly/ui-bulma/select/select.module.ts","./src/app/shared/ngx-formly/ui-bulma/statictext/statictext.component.html","./src/app/shared/ngx-formly/ui-bulma/statictext/statictext.component.ts","./src/app/shared/ngx-formly/ui-bulma/statictext/statictext.module.ts","./src/app/shared/ngx-formly/ui-bulma/textarea/textarea.type.ts","./src/app/shared/ngx-formly/ui-bulma/textarea/textarea.type.html","./src/app/shared/ngx-formly/ui-bulma/textarea/textarea.module.ts","./src/app/shared/ngx-formly/ui-bulma/repeat/repeat.component.html","./src/app/shared/ngx-formly/ui-bulma/repeat/repeat.component.ts","./src/app/shared/ngx-formly/ui-bulma/repeat/repeat.module.ts","./src/app/shared/ngx-formly/ui-bulma/repeat-table/repeat.table.component.html","./src/app/shared/ngx-formly/ui-bulma/repeat-table/repeat.table.component.ts","./src/app/shared/ngx-formly/ui-bulma/repeat-table/repeat.table.module.ts","./src/app/shared/ngx-formly/ui-bulma/password/password.type.ts","./src/app/shared/ngx-formly/ui-bulma/password/password.type.html","./src/app/shared/ngx-formly/ui-bulma/password/password.module.ts","./src/app/shared/ngx-formly/ui-bulma/bulma.module.ts","./src/app/shared/page-footer/page-footer.component.ts","./src/app/shared/page-footer/page-footer.component.html","./src/app/shared/pages-info-view/pages-info-view.component.html","./src/app/shared/pages-info-view/pages-info-view.component.ts","./src/app/shared/shared.module.ts","./src/app/shared/util/util-functions-service.ts","./src/app/app.component.ts","./src/app/app.component.html","./node_modules/@angular/cdk/fesm2020/portal.mjs","./node_modules/@angular/cdk/fesm2020/coercion.mjs","./node_modules/rxjs/_esm2015/internal/scheduler/animationFrame.js","./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameScheduler.js","./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameAction.js","./node_modules/rxjs/_esm2015/internal/util/Immediate.js","./node_modules/rxjs/_esm2015/internal/scheduler/asap.js","./node_modules/rxjs/_esm2015/internal/scheduler/AsapScheduler.js","./node_modules/rxjs/_esm2015/internal/scheduler/AsapAction.js","./node_modules/rxjs/_esm2015/internal/operators/audit.js","./node_modules/rxjs/_esm2015/internal/util/isNumeric.js","./node_modules/rxjs/_esm2015/internal/observable/timer.js","./node_modules/rxjs/_esm2015/internal/operators/auditTime.js","./node_modules/@angular/cdk/fesm2020/platform.mjs","./node_modules/@angular/cdk/fesm2020/scrolling.mjs","./node_modules/@angular/cdk/fesm2020/bidi.mjs","./node_modules/@angular/cdk/fesm2020/overlay.mjs","./src/app/poc/contextmenu/contextmenu.component.html","./src/app/poc/contextmenu/contextmenu.component.ts","./src/app/poc/key-dev/key-dev.component.ts","./src/app/poc/key-dev/key-dev.component.html","./src/app/features/public/page-about/page-about.component.ts","./src/app/features/public/page-about/page-about.component.html","./src/app/features/public/page-not-found/page-not-found.component.ts","./src/app/features/public/page-not-found/page-not-found.component.html","./src/app/features/public/public.module.ts","./src/resolvers/applicant.resolver.ts","./src/resolvers/global.resolver.ts","./src/resolvers/tenant.resolver.ts","./src/app/app-routing.module.ts","./src/resolvers/basic.resolver.ts","./src/resolvers/private.resolver.ts","./src/app/formly-demo/repeat-page/repeat-page.component.ts","./src/app/formly-demo/repeat-page/repeat-page.component.html","./src/app/formly-demo/repeat-table-page/repeat-table-page.component.ts","./src/app/formly-demo/repeat-table-page/repeat-table-page.component.html","./node_modules/@angular/animations/fesm2020/animations.mjs","./node_modules/@angular/animations/fesm2020/browser.mjs","./node_modules/@angular/platform-browser/fesm2020/animations.mjs","./src/app/utility.ts","./src/app/app.module.ts","./src/main.ts","tslib","./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js","./node_modules/rxjs/_esm2015/internal/operators/debounceTime.js","./node_modules/rxjs/_esm2015/internal/util/isObservable.js","./node_modules/@ngx-formly/core/__ivy_ngcc__/fesm2015/ngx-formly-core.js","./node_modules/ag-grid-angular/node_modules/tslib/tslib.es6.js","./node_modules/ag-grid-angular/__ivy_ngcc__/fesm2015/ag-grid-angular.js","./node_modules/ag-grid-community/dist/ag-grid-community.cjs.js","./node_modules/angular-billboard/__ivy_ngcc__/src/angular-billboard.component.js","./node_modules/angular-billboard/__ivy_ngcc__/src/angular-billboard.service.js","./node_modules/angular-billboard/__ivy_ngcc__/src/angular-billboard.module.js","./node_modules/billboard.js/dist/billboard.js","./node_modules/d3-array/src/ascending.js","./node_modules/d3-array/src/bisector.js","./node_modules/d3-array/src/bisect.js","./node_modules/d3-array/src/array.js","./node_modules/d3-array/src/ticks.js","./node_modules/d3-array/src/number.js","./node_modules/d3-array/src/quantile.js","./node_modules/billboard.js/node_modules/d3-scale/src/init.js","./node_modules/d3-collection/src/map.js","./node_modules/d3-collection/src/set.js","./node_modules/billboard.js/node_modules/d3-scale/src/array.js","./node_modules/billboard.js/node_modules/d3-scale/src/ordinal.js","./node_modules/billboard.js/node_modules/d3-scale/src/band.js","./node_modules/d3-array/src/range.js","./node_modules/billboard.js/node_modules/d3-scale/src/number.js","./node_modules/billboard.js/node_modules/d3-scale/src/continuous.js","./node_modules/billboard.js/node_modules/d3-scale/src/constant.js","./node_modules/d3-format/src/formatSpecifier.js","./node_modules/d3-format/src/formatPrefixAuto.js","./node_modules/d3-format/src/formatDecimal.js","./node_modules/d3-format/src/exponent.js","./node_modules/d3-format/src/formatRounded.js","./node_modules/d3-format/src/formatTypes.js","./node_modules/d3-format/src/identity.js","./node_modules/d3-format/src/locale.js","./node_modules/d3-format/src/defaultLocale.js","./node_modules/billboard.js/node_modules/d3-scale/src/tickFormat.js","./node_modules/d3-format/src/precisionPrefix.js","./node_modules/d3-format/src/precisionRound.js","./node_modules/d3-format/src/precisionFixed.js","./node_modules/billboard.js/node_modules/d3-scale/src/linear.js","./node_modules/billboard.js/node_modules/d3-scale/src/identity.js","./node_modules/billboard.js/node_modules/d3-scale/src/nice.js","./node_modules/billboard.js/node_modules/d3-scale/src/log.js","./node_modules/billboard.js/node_modules/d3-scale/src/symlog.js","./node_modules/billboard.js/node_modules/d3-scale/src/pow.js","./node_modules/billboard.js/node_modules/d3-scale/src/quantile.js","./node_modules/billboard.js/node_modules/d3-scale/src/quantize.js","./node_modules/billboard.js/node_modules/d3-scale/src/threshold.js","./node_modules/d3-format/src/formatGroup.js","./node_modules/d3-format/src/formatNumerals.js","./node_modules/d3-format/src/formatTrim.js","./node_modules/d3-time/src/month.js","./node_modules/d3-time/src/hour.js","./node_modules/d3-time/src/minute.js","./node_modules/d3-time/src/second.js","./node_modules/d3-time/src/millisecond.js","./node_modules/billboard.js/node_modules/d3-scale/src/time.js","./node_modules/d3-time/src/utcMonth.js","./node_modules/d3-time/src/utcHour.js","./node_modules/d3-time/src/utcMinute.js","./node_modules/billboard.js/node_modules/d3-scale/src/utcTime.js","./node_modules/billboard.js/node_modules/d3-scale/src/sequential.js","./node_modules/billboard.js/node_modules/d3-scale/src/sequentialQuantile.js","./node_modules/billboard.js/node_modules/d3-scale/src/diverging.js","./node_modules/d3-axis/src/array.js","./node_modules/d3-axis/src/identity.js","./node_modules/d3-axis/src/axis.js","./node_modules/d3-brush/src/constant.js","./node_modules/d3-brush/src/event.js","./node_modules/d3-brush/src/noevent.js","./node_modules/d3-brush/src/brush.js","./node_modules/d3-color/src/color.js","./node_modules/d3-color/src/define.js","./node_modules/d3-dispatch/src/dispatch.js","./node_modules/d3-drag/src/constant.js","./node_modules/d3-drag/src/event.js","./node_modules/d3-drag/src/drag.js","./node_modules/d3-drag/src/nodrag.js","./node_modules/d3-drag/src/noevent.js","./node_modules/d3-dsv/src/dsv.js","./node_modules/d3-dsv/src/csv.js","./node_modules/d3-dsv/src/tsv.js","./node_modules/d3-dsv/src/autoType.js","./node_modules/d3-ease/src/cubic.js","./node_modules/d3-ease/src/linear.js","./node_modules/d3-ease/src/quad.js","./node_modules/d3-ease/src/poly.js","./node_modules/d3-ease/src/sin.js","./node_modules/d3-ease/src/math.js","./node_modules/d3-ease/src/exp.js","./node_modules/d3-ease/src/circle.js","./node_modules/d3-ease/src/bounce.js","./node_modules/d3-ease/src/back.js","./node_modules/d3-ease/src/elastic.js","./node_modules/d3-interpolate/src/array.js","./node_modules/d3-interpolate/src/basis.js","./node_modules/d3-interpolate/src/basisClosed.js","./node_modules/d3-interpolate/src/color.js","./node_modules/d3-interpolate/src/constant.js","./node_modules/d3-interpolate/src/date.js","./node_modules/d3-interpolate/src/discrete.js","./node_modules/d3-interpolate/src/hue.js","./node_modules/d3-interpolate/src/hsl.js","./node_modules/d3-color/src/math.js","./node_modules/d3-color/src/lab.js","./node_modules/d3-interpolate/src/lab.js","./node_modules/d3-interpolate/src/hcl.js","./node_modules/d3-color/src/cubehelix.js","./node_modules/d3-interpolate/src/cubehelix.js","./node_modules/d3-interpolate/src/piecewise.js","./node_modules/d3-interpolate/src/quantize.js","./node_modules/d3-interpolate/src/number.js","./node_modules/d3-interpolate/src/numberArray.js","./node_modules/d3-interpolate/src/object.js","./node_modules/d3-interpolate/src/rgb.js","./node_modules/d3-interpolate/src/round.js","./node_modules/d3-interpolate/src/string.js","./node_modules/d3-interpolate/src/transform/parse.js","./node_modules/d3-interpolate/src/transform/decompose.js","./node_modules/d3-interpolate/src/transform/index.js","./node_modules/d3-interpolate/src/value.js","./node_modules/d3-interpolate/src/zoom.js","./node_modules/d3-selection/src/creator.js","./node_modules/d3-selection/src/create.js","./node_modules/d3-selection/src/local.js","./node_modules/d3-selection/src/selectAll.js","./node_modules/d3-selection/src/touches.js","./node_modules/d3-selection/src/matcher.js","./node_modules/d3-selection/src/mouse.js","./node_modules/d3-selection/src/namespace.js","./node_modules/d3-selection/src/namespaces.js","./node_modules/d3-selection/src/point.js","./node_modules/d3-selection/src/select.js","./node_modules/d3-selection/src/selection/sparse.js","./node_modules/d3-selection/src/selection/enter.js","./node_modules/d3-selection/src/selection/data.js","./node_modules/d3-selection/src/selection/sort.js","./node_modules/d3-selection/src/selection/attr.js","./node_modules/d3-selection/src/selection/property.js","./node_modules/d3-selection/src/selection/classed.js","./node_modules/d3-selection/src/selection/text.js","./node_modules/d3-selection/src/selection/html.js","./node_modules/d3-selection/src/selection/raise.js","./node_modules/d3-selection/src/selection/lower.js","./node_modules/d3-selection/src/selection/insert.js","./node_modules/d3-selection/src/selection/remove.js","./node_modules/d3-selection/src/selection/clone.js","./node_modules/d3-selection/src/selection/dispatch.js","./node_modules/d3-selection/src/selection/index.js","./node_modules/d3-selection/src/selection/select.js","./node_modules/d3-selection/src/selection/selectAll.js","./node_modules/d3-selection/src/selection/filter.js","./node_modules/d3-selection/src/constant.js","./node_modules/d3-selection/src/selection/exit.js","./node_modules/d3-selection/src/selection/join.js","./node_modules/d3-selection/src/selection/merge.js","./node_modules/d3-selection/src/selection/order.js","./node_modules/d3-selection/src/selection/call.js","./node_modules/d3-selection/src/selection/nodes.js","./node_modules/d3-selection/src/selection/node.js","./node_modules/d3-selection/src/selection/size.js","./node_modules/d3-selection/src/selection/empty.js","./node_modules/d3-selection/src/selection/each.js","./node_modules/d3-selection/src/selection/append.js","./node_modules/d3-selection/src/selection/datum.js","./node_modules/d3-selection/src/selection/on.js","./node_modules/d3-selection/src/selection/style.js","./node_modules/d3-selection/src/selector.js","./node_modules/d3-selection/src/selectorAll.js","./node_modules/d3-selection/src/sourceEvent.js","./node_modules/d3-selection/src/touch.js","./node_modules/d3-selection/src/window.js","./node_modules/d3-path/src/path.js","./node_modules/d3-shape/src/constant.js","./node_modules/d3-shape/src/math.js","./node_modules/d3-shape/src/arc.js","./node_modules/d3-shape/src/curve/linear.js","./node_modules/d3-shape/src/point.js","./node_modules/d3-shape/src/line.js","./node_modules/d3-shape/src/area.js","./node_modules/d3-shape/src/descending.js","./node_modules/d3-shape/src/identity.js","./node_modules/d3-shape/src/pie.js","./node_modules/d3-shape/src/curve/radial.js","./node_modules/d3-shape/src/lineRadial.js","./node_modules/d3-shape/src/areaRadial.js","./node_modules/d3-shape/src/pointRadial.js","./node_modules/d3-shape/src/array.js","./node_modules/d3-shape/src/link/index.js","./node_modules/d3-shape/src/symbol/circle.js","./node_modules/d3-shape/src/symbol/cross.js","./node_modules/d3-shape/src/symbol/diamond.js","./node_modules/d3-shape/src/symbol/star.js","./node_modules/d3-shape/src/symbol/square.js","./node_modules/d3-shape/src/symbol/triangle.js","./node_modules/d3-shape/src/symbol/wye.js","./node_modules/d3-shape/src/symbol.js","./node_modules/d3-shape/src/noop.js","./node_modules/d3-shape/src/curve/basis.js","./node_modules/d3-shape/src/curve/basisClosed.js","./node_modules/d3-shape/src/curve/basisOpen.js","./node_modules/d3-shape/src/curve/bundle.js","./node_modules/d3-shape/src/curve/cardinal.js","./node_modules/d3-shape/src/curve/cardinalClosed.js","./node_modules/d3-shape/src/curve/cardinalOpen.js","./node_modules/d3-shape/src/curve/catmullRom.js","./node_modules/d3-shape/src/curve/catmullRomClosed.js","./node_modules/d3-shape/src/curve/catmullRomOpen.js","./node_modules/d3-shape/src/curve/linearClosed.js","./node_modules/d3-shape/src/curve/monotone.js","./node_modules/d3-shape/src/curve/natural.js","./node_modules/d3-shape/src/curve/step.js","./node_modules/d3-shape/src/offset/none.js","./node_modules/d3-shape/src/order/none.js","./node_modules/d3-shape/src/stack.js","./node_modules/d3-shape/src/offset/expand.js","./node_modules/d3-shape/src/offset/diverging.js","./node_modules/d3-shape/src/offset/silhouette.js","./node_modules/d3-shape/src/offset/wiggle.js","./node_modules/d3-shape/src/order/appearance.js","./node_modules/d3-shape/src/order/ascending.js","./node_modules/d3-shape/src/order/descending.js","./node_modules/d3-shape/src/order/insideOut.js","./node_modules/d3-shape/src/order/reverse.js","./node_modules/d3-time-format/src/defaultLocale.js","./node_modules/d3-time-format/src/isoFormat.js","./node_modules/d3-time-format/src/isoParse.js","./node_modules/d3-time-format/src/locale.js","./node_modules/d3-time/src/day.js","./node_modules/d3-time/src/duration.js","./node_modules/d3-time/src/interval.js","./node_modules/d3-time/src/utcDay.js","./node_modules/d3-time/src/utcWeek.js","./node_modules/d3-time/src/utcYear.js","./node_modules/d3-time/src/week.js","./node_modules/d3-time/src/year.js","./node_modules/d3-timer/src/timer.js","./node_modules/d3-timer/src/timeout.js","./node_modules/d3-transition/src/transition/schedule.js","./node_modules/d3-transition/src/interrupt.js","./node_modules/d3-transition/src/transition/tween.js","./node_modules/d3-transition/src/transition/interpolate.js","./node_modules/d3-transition/src/transition/attr.js","./node_modules/d3-transition/src/transition/attrTween.js","./node_modules/d3-transition/src/transition/delay.js","./node_modules/d3-transition/src/transition/duration.js","./node_modules/d3-transition/src/transition/selection.js","./node_modules/d3-transition/src/transition/style.js","./node_modules/d3-transition/src/transition/index.js","./node_modules/d3-transition/src/transition/select.js","./node_modules/d3-transition/src/transition/selectAll.js","./node_modules/d3-transition/src/transition/filter.js","./node_modules/d3-transition/src/transition/merge.js","./node_modules/d3-transition/src/transition/transition.js","./node_modules/d3-transition/src/transition/on.js","./node_modules/d3-transition/src/transition/styleTween.js","./node_modules/d3-transition/src/transition/text.js","./node_modules/d3-transition/src/transition/textTween.js","./node_modules/d3-transition/src/transition/remove.js","./node_modules/d3-transition/src/transition/ease.js","./node_modules/d3-transition/src/transition/end.js","./node_modules/d3-transition/src/selection/transition.js","./node_modules/d3-transition/src/selection/index.js","./node_modules/d3-transition/src/selection/interrupt.js","./node_modules/d3-transition/src/active.js","./node_modules/d3-zoom/src/constant.js","./node_modules/d3-zoom/src/event.js","./node_modules/d3-zoom/src/transform.js","./node_modules/d3-zoom/src/noevent.js","./node_modules/d3-zoom/src/zoom.js","./node_modules/ngx-window-token/__ivy_ngcc__/fesm2015/ngx-window-token.js","./node_modules/ngx-clipboard/__ivy_ngcc__/fesm2015/ngx-clipboard.js","./node_modules/rxjs/_esm2015/internal/operators/retry.js","./node_modules/rxjs/_esm2015/internal/scheduler/queue.js","./node_modules/rxjs/_esm2015/internal/scheduler/QueueScheduler.js","./node_modules/rxjs/_esm2015/internal/scheduler/QueueAction.js","./node_modules/rxjs/_esm2015/internal/Notification.js","./node_modules/rxjs/_esm2015/internal/operators/observeOn.js","./node_modules/rxjs/_esm2015/internal/ReplaySubject.js","./node_modules/vlq/dist/vlq.es.js","./node_modules/ngx-logger/__ivy_ngcc__/fesm2015/ngx-logger.js","./node_modules/rxjs/_esm2015/internal/operators/shareReplay.js","./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js","./node_modules/rxjs/_esm2015/internal/Observable.js","./node_modules/rxjs/_esm2015/internal/util/toSubscriber.js","./node_modules/rxjs/_esm2015/internal/util/canReportError.js","./node_modules/rxjs/_esm2015/internal/Observer.js","./node_modules/rxjs/_esm2015/internal/Subject.js","./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js","./node_modules/rxjs/_esm2015/internal/Subscriber.js","./node_modules/rxjs/_esm2015/internal/util/UnsubscriptionError.js","./node_modules/rxjs/_esm2015/internal/Subscription.js","./node_modules/rxjs/_esm2015/internal/config.js","./node_modules/rxjs/_esm2015/internal/innerSubscribe.js","./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js","./node_modules/rxjs/_esm2015/internal/observable/concat.js","./node_modules/rxjs/_esm2015/internal/operators/concatAll.js","./node_modules/rxjs/_esm2015/internal/observable/empty.js","./node_modules/rxjs/_esm2015/internal/observable/from.js","./node_modules/rxjs/_esm2015/internal/scheduled/scheduled.js","./node_modules/rxjs/_esm2015/internal/util/isInteropObservable.js","./node_modules/rxjs/_esm2015/internal/scheduled/scheduleObservable.js","./node_modules/rxjs/_esm2015/internal/scheduled/schedulePromise.js","./node_modules/rxjs/_esm2015/internal/util/isIterable.js","./node_modules/rxjs/_esm2015/internal/scheduled/scheduleIterable.js","./node_modules/rxjs/_esm2015/internal/observable/fromArray.js","./node_modules/rxjs/_esm2015/internal/observable/fromEvent.js","./node_modules/rxjs/_esm2015/internal/observable/merge.js","./node_modules/rxjs/_esm2015/internal/observable/of.js","./node_modules/rxjs/_esm2015/internal/observable/throwError.js","./node_modules/rxjs/_esm2015/internal/operators/catchError.js","./node_modules/rxjs/_esm2015/internal/operators/concatMap.js","./node_modules/rxjs/_esm2015/internal/operators/filter.js","./node_modules/rxjs/_esm2015/internal/operators/map.js","./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js","./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js","./node_modules/rxjs/_esm2015/internal/operators/refCount.js","./node_modules/rxjs/_esm2015/internal/operators/startWith.js","./node_modules/rxjs/_esm2015/internal/operators/switchMap.js","./node_modules/rxjs/_esm2015/internal/operators/take.js","./node_modules/rxjs/_esm2015/internal/operators/takeUntil.js","./node_modules/rxjs/_esm2015/internal/util/noop.js","./node_modules/rxjs/_esm2015/internal/operators/tap.js","./node_modules/rxjs/_esm2015/internal/scheduled/scheduleArray.js","./node_modules/rxjs/_esm2015/internal/scheduler/Action.js","./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js","./node_modules/rxjs/_esm2015/internal/Scheduler.js","./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js","./node_modules/rxjs/_esm2015/internal/scheduler/async.js","./node_modules/rxjs/_esm2015/internal/symbol/iterator.js","./node_modules/rxjs/_esm2015/internal/symbol/observable.js","./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js","./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js","./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js","./node_modules/rxjs/_esm2015/internal/util/hostReportError.js","./node_modules/rxjs/_esm2015/internal/util/identity.js","./node_modules/rxjs/_esm2015/internal/util/isArray.js","./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js","./node_modules/rxjs/_esm2015/internal/util/isFunction.js","./node_modules/rxjs/_esm2015/internal/util/isObject.js","./node_modules/rxjs/_esm2015/internal/util/isPromise.js","./node_modules/rxjs/_esm2015/internal/util/isScheduler.js","./node_modules/rxjs/_esm2015/internal/util/pipe.js","./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js","./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js","./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js","./node_modules/rxjs/_esm2015/internal/util/subscribeToIterable.js","./node_modules/rxjs/_esm2015/internal/util/subscribeToArray.js","./node_modules/zone.js/fesm2015/zone-error.js","./node_modules/@angular/common/fesm2020/common.mjs","./node_modules/@angular/common/fesm2020/http.mjs","./node_modules/rxjs/_esm2015/internal/operators/multicast.js","./node_modules/rxjs/_esm2015/internal/operators/share.js","./node_modules/@angular/core/fesm2020/core.mjs","./node_modules/rxjs/_esm2015/internal/observable/forkJoin.js","./node_modules/@angular/forms/fesm2020/forms.mjs","./node_modules/@angular/platform-browser/fesm2020/platform-browser.mjs","./node_modules/rxjs/_esm2015/internal/util/EmptyError.js","./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js","./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js","./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js","./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js","./node_modules/rxjs/_esm2015/internal/observable/defer.js","./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js","./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js","./node_modules/rxjs/_esm2015/internal/operators/first.js","./node_modules/rxjs/_esm2015/internal/operators/scan.js","./node_modules/rxjs/_esm2015/internal/operators/takeLast.js","./node_modules/rxjs/_esm2015/internal/operators/last.js","./node_modules/rxjs/_esm2015/internal/operators/takeWhile.js","./node_modules/rxjs/_esm2015/internal/operators/mapTo.js","./node_modules/rxjs/_esm2015/internal/operators/finalize.js","./node_modules/@angular/router/fesm2020/router.mjs"],"sourcesContent":["import {\r\n ActivatedRouteSnapshot,\r\n CanActivate,\r\n Router,\r\n RouterStateSnapshot,\r\n} from '@angular/router';\r\nimport { AuthenticationService } from '../_services';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AuthGuard implements CanActivate {\r\n /* DEPRECATED 07/06/2023 CanActivate remove ASAP */\r\n\r\n constructor(\r\n private authenticationService: AuthenticationService,\r\n private logger: NGXLogger,\r\n private router: Router\r\n ) {\r\n // constructor is no longer empty.\r\n }\r\n\r\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n const currentUser = this.authenticationService.currentUserValue;\r\n if (currentUser) {\r\n // logged in so return true\r\n return true;\r\n }\r\n\r\n // not logged in so redirect to login page with the return url\r\n const navRoute = ['/login']; // goes to 'about' page\r\n this.router.navigate(navRoute, { queryParams: { returnUrl: state.url } });\r\n\r\n /* TODO 07/06/2021 log attempt to access pages when not logged in */\r\n // this.logger.trace(`AuthGuard.canActivate(...) : false`);\r\n\r\n return false;\r\n }\r\n}\r\n","import { AuthenticationService } from '../_services';\r\nimport { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class JwtInterceptor implements HttpInterceptor {\r\n\r\n constructor(\r\n private logger: NGXLogger,\r\n private authenticationService: AuthenticationService\r\n ) {\r\n }\r\n\r\n intercept(request: HttpRequest, next: HttpHandler): Observable> {\r\n // add authorization header with jwt token if available\r\n const currentUser = this.authenticationService.currentUserValue;\r\n if (currentUser && currentUser.token) {\r\n\r\n request = request.clone({\r\n setHeaders: {\r\n Authorization: `Bearer ${currentUser.token}`\r\n }\r\n });\r\n }\r\n\r\n return next.handle(request);\r\n }\r\n}\r\n","export class UserRights {\r\n bankId: number;\r\n userName: string;\r\n fullName: string;\r\n appNotify: boolean;\r\n userLevel: number;\r\n userLevelText: string;\r\n emailAddress: string;\r\n loanAccess: boolean;\r\n accountAccess: boolean;\r\n sysAdmin: boolean;\r\n hasValues: boolean;\r\n isLoanOfficer: boolean;\r\n losExport: boolean;\r\n}\r\n\r\nexport class UsersJwtDto {\r\n id: number;\r\n fullName: string;\r\n username: string;\r\n hasPassword: boolean;\r\n token: string;\r\n locked: boolean;\r\n bank: number;\r\n rights: UserRights;\r\n roles: string; // Comma separated list : \"user,can delete,admin\"\r\n guid: string;\r\n userType?: string;\r\n userLevel?: string;\r\n\r\n public isInRole(role: string) {\r\n // Transform list into array\r\n // [ \"user\", \"can delete\" , \"admin\" ]\r\n const roleArr = this.roles.split(',');\r\n // can find input parameter in array (true/false)\r\n // Is \"admin\" in array -> true\r\n const hasMatch = roleArr.some((item) => item === role);\r\n return hasMatch;\r\n }\r\n}\r\n","import { AppConfigService } from '../config.service';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { UsersJwtDto } from '../services/api/FastApp';\r\nimport { map } from 'rxjs/operators';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AuthenticationService {\r\n public currentUser: Observable;\r\n private tokenName = 'currentUser';\r\n private loggedIn: boolean;\r\n private currentUserSubject: BehaviorSubject;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private http: HttpClient,\r\n private logger: NGXLogger,\r\n ) {\r\n const json = localStorage.getItem(this.tokenName);\r\n const obj = JSON.parse(json);\r\n this.currentUserSubject = new BehaviorSubject(obj);\r\n this.currentUser = this.currentUserSubject.asObservable();\r\n this.loggedIn = false;\r\n }\r\n\r\n public hasUser(): boolean {\r\n const user = this.currentUserSubject.value;\r\n let hasUser = false;\r\n\r\n if (user) {\r\n hasUser = true;\r\n }\r\n return hasUser;\r\n }\r\n\r\n public hasToken(): boolean {\r\n const user = this.currentUserSubject.value;\r\n let hasToken = false;\r\n\r\n if (user && user.token) {\r\n hasToken = true;\r\n }\r\n return hasToken;\r\n }\r\n\r\n public get currentUserValue(): UsersJwtDto {\r\n const user: UsersJwtDto = this.currentUserSubject.value;\r\n return user;\r\n }\r\n\r\n setGuestToken(token: string) {\r\n const user = new UsersJwtDto();\r\n user.token = token;\r\n localStorage.setItem(this.tokenName, JSON.stringify(user));\r\n this.currentUserSubject.next(user);\r\n }\r\n\r\n login(email: string, password: string, bankSlug: string): Observable {\r\n const creds = { email, password, bankSlug };\r\n const url = `${this.config.getConfig().url.api}/users/auth`;\r\n return this.http.post(url, creds)\r\n .pipe(map(user => {\r\n this.logger.info(`User/JWT info saved to local storage.`);\r\n localStorage.setItem(this.tokenName, JSON.stringify(user));\r\n this.currentUserSubject.next(user);\r\n this.loggedIn = true;\r\n return user;\r\n }));\r\n }\r\n\r\n logout() {\r\n localStorage.removeItem(this.tokenName);\r\n this.currentUserSubject.next(null);\r\n this.loggedIn = false;\r\n }\r\n\r\n isLoggedIn(): boolean {\r\n return this.loggedIn;\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { versionInfo } from './version';\r\n\r\nexport class AppConfigData {\r\n url: {\r\n api: string;\r\n legacyClient: string;\r\n appRoot: string;\r\n };\r\n key: {\r\n name: string;\r\n instance: string;\r\n };\r\n appName: string;\r\n loginPrefill: boolean;\r\n devNav: boolean;\r\n v2Access: boolean;\r\n disablePrefill: boolean;\r\n}\r\n\r\n@Injectable()\r\nexport class AppConfigService {\r\n private appConfig: AppConfigData;\r\n public webAppName = `FastApp`;\r\n\r\n constructor(private http: HttpClient, public logger: NGXLogger) {\r\n }\r\n\r\n loadAppConfig() {\r\n /* DO_SOON 09/13/2021 Modify client to read config outside of project/code. */\r\n\r\n const url = './assets/data/appConfig.json';\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then((data) => {\r\n this.appConfig = data;\r\n });\r\n }\r\n\r\n getConfig(): AppConfigData {\r\n return this.appConfig;\r\n }\r\n\r\n getVersion(): string {\r\n // Version number read from version.ts automatically updated.\r\n // Update is scripted by : node replace.build.js\r\n return `${versionInfo.version}-${versionInfo.buildDate}`;\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { ExportMappingErrorsAndOmissionsCountsModel, ExportMappingErrorsAndOmissionsModel } from '../model';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class ExportMappingDiagnosticService extends ApiBaseService {\r\n\r\n endpoint: string;\r\n\r\n constructor(\r\n config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n protected http: HttpClient,\r\n protected logger: NGXLogger,\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.LogAPIService(`ExportMappingDiagnosticService.constructor()`);\r\n this.endpoint = config.getConfig().url.api + '/dev/exportMap';\r\n }\r\n\r\n detail(schema: string): Observable {\r\n this.LogAPIService(`detail()`);\r\n const url = `${this.endpoint}/detail/${schema}`;\r\n this.LogAPIService({ url });\r\n return this.http.get(url);\r\n }\r\n\r\n count(schema: string): Observable {\r\n this.LogAPIService(`count()`);\r\n const url = `${this.endpoint}/count/${schema}`;\r\n this.LogAPIService({ url });\r\n return this.http.get(url);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport {\r\n ActionService,\r\n ApiServerInfoService,\r\n AppsService,\r\n AvatarService,\r\n DashboardService,\r\n DefaultsService,\r\n DocsService,\r\n EmailService,\r\n ExportMappingService,\r\n FormsService,\r\n IntegrationService,\r\n LicenseServiceService,\r\n ListService,\r\n OrgsService,\r\n PDFService,\r\n SchemaService,\r\n TwoFactorAuthService,\r\n UsersService,\r\n WebClientLoggerService,\r\n} from './api';\r\nimport { ExportMappingDiagnosticService } from './api/exportMappingDiagnostic.service';\r\n\r\n@NgModule({\r\n imports: [],\r\n declarations: [],\r\n exports: [],\r\n providers: [\r\n ActionService,\r\n ApiServerInfoService,\r\n AppsService,\r\n AvatarService,\r\n DashboardService,\r\n DefaultsService,\r\n DocsService,\r\n EmailService,\r\n ExportMappingService,\r\n ExportMappingDiagnosticService,\r\n IntegrationService,\r\n // FastAppApiService,\r\n FormsService,\r\n LicenseServiceService,\r\n ListService,\r\n OrgsService,\r\n PDFService,\r\n SchemaService,\r\n TwoFactorAuthService,\r\n UsersService,\r\n WebClientLoggerService,\r\n ]\r\n})\r\nexport class ApiModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { RouterModule } from '@angular/router';\r\nimport { ApiModule } from '../services/api/FastApp/api.module';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n RouterModule,\r\n ApiModule,\r\n ],\r\n exports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n RouterModule,\r\n ApiModule\r\n ]\r\n})\r\nexport class CoreModule { }\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n Router,\r\n CanActivate,\r\n} from '@angular/router';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { AuthenticationService } from 'src/app/_services';\r\nimport { ApplicantService } from './applicant.service';\r\n\r\n/* DEPRECATED 06/28/2023 CanActivate. Migrate ASAP. */\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class ApplicantAuthGuard implements CanActivate {\r\n constructor(\r\n private logger: NGXLogger,\r\n private router: Router,\r\n private authenticationService: AuthenticationService,\r\n private applicantService: ApplicantService\r\n ) {}\r\n\r\n canActivate() {\r\n const currentUser = this.authenticationService.currentUserValue;\r\n if (currentUser) {\r\n // logged in so return true\r\n return true;\r\n }\r\n\r\n // not logged in so redirect to login page with the return url\r\n const bankSlug = this.getBankSlug();\r\n const path = ['client', bankSlug, 'begin'];\r\n this.router.navigate(path);\r\n\r\n return false;\r\n }\r\n\r\n getBankSlug(): string {\r\n const pathname = window.location.pathname; // example \"/admin/BOE/dashboard\"\r\n const parts = pathname.split('/');\r\n\r\n const bankSlug = parts[2]; // BOE\r\n return bankSlug;\r\n }\r\n}\r\n","import {\r\n FullListModel,\r\n OrganizationsModel,\r\n UsersModel,\r\n} from 'src/app/services/api/FastApp';\r\nimport { ICompanyInfo } from 'src/app/shared';\r\nimport { Injectable } from '@angular/core';\r\nimport { ListService } from 'src/app/services/api/FastApp/api';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ApplicantService {\r\n private loggedIn: boolean;\r\n private orgSlug: string;\r\n private userID: string;\r\n\r\n public bankInfo: OrganizationsModel;\r\n public lists: FullListModel[];\r\n public userData: UsersModel;\r\n\r\n constructor(\r\n private listSvc: ListService,\r\n private logger: NGXLogger,\r\n public svc: SharedService\r\n ) {\r\n this.loggedIn = false;\r\n }\r\n\r\n public getUserID() {\r\n return this.userID;\r\n }\r\n\r\n public setUserID(userID: string) {\r\n this.loggedIn = true;\r\n this.userID = userID;\r\n\r\n this.svc.api.users.getUser(this.userID).subscribe({\r\n next: (userData) => {\r\n this.userData = userData;\r\n },\r\n error: (error) => {\r\n this.logger.error(error);\r\n },\r\n });\r\n }\r\n\r\n public getOrgSlug() {\r\n return this.orgSlug;\r\n }\r\n\r\n public setOrgSlug(orgSlug: string) {\r\n this.orgSlug = orgSlug;\r\n\r\n this.svc.api.orgs.bySlug(this.orgSlug).subscribe({\r\n next: (data) => {\r\n this.bankInfo = data;\r\n },\r\n error: (error) => {\r\n this.logger.error(error);\r\n },\r\n });\r\n\r\n this.listSvc.forOrg(this.orgSlug).subscribe({\r\n next: (data) => {\r\n this.lists = data;\r\n },\r\n error: (error) => {\r\n this.logger.error(error);\r\n },\r\n });\r\n }\r\n\r\n public getLoggedIn(): boolean {\r\n return this.loggedIn;\r\n }\r\n\r\n public logout() {\r\n this.loggedIn = false;\r\n }\r\n\r\n public getAbsInfo(): ICompanyInfo {\r\n return this.svc.abs.companyInfo;\r\n }\r\n\r\n public getVersion(): string {\r\n return this.svc.config.getVersion();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport {\r\n ActionService,\r\n ApiServerInfoService,\r\n AppsService,\r\n AvatarService,\r\n DashboardService,\r\n DefaultsService,\r\n DevService,\r\n DocsService,\r\n EmailService,\r\n ExportMappingService,\r\n FormsService,\r\n IntegrationService,\r\n LicenseServiceService,\r\n ListService,\r\n OrgsService,\r\n PDFService,\r\n SchemaService,\r\n TwoFactorAuthService,\r\n UsersService,\r\n WebClientLoggerService\r\n} from './api';\r\nimport { KeyService } from './keyservice';\r\n\r\n@Injectable()\r\nexport class FastAppApiService {\r\n\r\n constructor( // nosonar\r\n private logger: NGXLogger,\r\n public actions: ActionService,\r\n public apiServerInfo: ApiServerInfoService,\r\n public apps: AppsService,\r\n public avatar: AvatarService,\r\n public dashboard: DashboardService,\r\n public dev: DevService,\r\n public defaults: DefaultsService,\r\n public docs: DocsService,\r\n public email: EmailService,\r\n public exportMappingService: ExportMappingService,\r\n public forms: FormsService,\r\n public integration: IntegrationService,\r\n public key: KeyService,\r\n public lists: ListService,\r\n public license: LicenseServiceService,\r\n public orgs: OrgsService,\r\n public pdf: PDFService,\r\n public schema: SchemaService,\r\n public twoFactorAuth: TwoFactorAuthService,\r\n public users: UsersService,\r\n public webClientLoggerService: WebClientLoggerService,\r\n ) {\r\n }\r\n}\r\n","import { NGXLogger } from 'ngx-logger';\r\nimport { of } from 'rxjs';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\n\r\nexport class ApiBaseService {\r\n endpoint: string;\r\n serviceName: string;\r\n doLogging: boolean;\r\n\r\n constructor(\r\n // Parent class must not have parameters sorted, or all children will have to be modified.\r\n private logger2: NGXLogger,\r\n private feature2: FeatureFlagService\r\n ) {\r\n this.serviceName = `UNSPECIFIED`;\r\n this.doLogging = false;\r\n }\r\n\r\n /* REFACTOR 10/18/2021 Use this method for all GET parameters */\r\n protected formatGetParams(paramObject: any): string {\r\n /*\r\n https://stackoverflow.com/questions/332872/encode-url-in-javascript/58879100#58879100\r\n https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams\r\n */\r\n const result = new URLSearchParams(paramObject);\r\n return result.toString();\r\n }\r\n\r\n protected LogAPIService(info) {\r\n const logAll = this.feature2.api.log.ALL;\r\n const logSpecific = this.doLogging;\r\n const logNone = this.feature2.api.log.NONE;\r\n const canLog = (logAll || logSpecific) && !logNone;\r\n\r\n if (this.feature2.api.log.debug) {\r\n this.logger2.debug(`ApiBaseService.LogAPIService()`, info, {\r\n logAll,\r\n logSpecific,\r\n logNone,\r\n canLog,\r\n });\r\n }\r\n\r\n if (canLog) {\r\n let data = info;\r\n\r\n try {\r\n data = JSON.parse(info);\r\n } catch (error) {\r\n // do nothing for now\r\n }\r\n\r\n this.logger2.debug({\r\n serviceName: this.serviceName,\r\n // endpoint: this.endpoint,\r\n data,\r\n });\r\n }\r\n }\r\n\r\n handleCatchError(err, empty) {\r\n if (this.feature2.api.log.errors) {\r\n /* TODO 06/08/2023 need better error reporting */\r\n this.logger2.error({\r\n message: 'CATCH ERROR: NEED TO REPORT IT BETTER... called from base...',\r\n err,\r\n });\r\n }\r\n return of(empty);\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { PostResponse } from '../model';\r\n\r\n@Injectable()\r\nexport class ActionService extends ApiBaseService {\r\n\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private logger: NGXLogger,\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.LogAPIService(`ActionService.constructor()`);\r\n this.endpoint = `${this.config.getConfig().url.api}/actions`;\r\n this.doLogging = feature.api.log.action;\r\n }\r\n\r\n executeAction(actionName: string, appData: string): Observable {\r\n this.LogAPIService(`ActionService.executeAction( ${actionName} , appData )`);\r\n const json = { appData };\r\n const url = `${this.endpoint}/${actionName}`;\r\n this.LogAPIService(`ActionService.executeAction(...) : POST : url = ${url}`);\r\n this.LogAPIService(`ActionService.executeAction(...) : json = ${JSON.stringify(json)}`);\r\n return this.http.post(url, json);\r\n }\r\n\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { ApiServerInfoModel } from '../model/ApiServerInfoModel';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class ApiServerInfoService extends ApiBaseService {\r\n endpoint: string;\r\n\r\n constructor(\r\n protected logger: NGXLogger,\r\n protected http: HttpClient,\r\n private feature: FeatureFlagService,\r\n private config: AppConfigService\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = config.getConfig().url.api + '/abs/api';\r\n this.doLogging = feature.api.log.serverInfo;\r\n }\r\n\r\n getInfo(): Observable {\r\n const url = `${this.endpoint}`;\r\n this.LogAPIService(url);\r\n return this.http.get(url);\r\n }\r\n}\r\n","export class AppDataStatusChangeModel {\r\n id: string;\r\n who: string;\r\n text?: string;\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport {\r\n AppDataStatusChangeModel,\r\n AppDetailDataModel,\r\n AppReport2Schema,\r\n LookupDataModel,\r\n SignaturesForAppModel,\r\n} from '../model';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { KeyService } from '../keyservice';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { TimestampService } from 'src/app/services';\r\nimport { map, tap } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class AppsService extends ApiBaseService {\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger,\r\n private timestampService: TimestampService\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = `${this.config.getConfig().url.api}/apps`;\r\n this.doLogging = feature.api.log.apps;\r\n }\r\n\r\n /* REFACTOR 07/14/2023 Replace Observable with Observable of specific interface */\r\n\r\n /* REFACTOR 12/29/2020 Confirm all locations this is called.\r\n At a glance, there appears to be more calls than expected.\r\n Might be different use cases...???\r\n */\r\n newAppData(bankID: string, schemaID: string, userID: string): Observable {\r\n const call = `newAppData(bankID: string, schemaID: string, userID: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const clientTime = this.timestampService.nowFormatAsString();\r\n const json = { bankID, schemaID, userID, key, clientTime };\r\n const url = `${this.endpoint}/data/new`;\r\n return this.http.post(url, json).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n bankID,\r\n schemaID,\r\n userID,\r\n url,\r\n json,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n delete(id: string): Observable {\r\n const call = `delete(id: string)`;\r\n const url = `${this.endpoint}/${id}`;\r\n return this.http.delete(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `DELETE`,\r\n call,\r\n id,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n undelete(id: string): Observable {\r\n const call = `undelete(id: string)`;\r\n const url = `${this.endpoint}/undelete/${id}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n id,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getDeletedCount(orgSlug: string): Observable {\r\n const call = `getDeletedCount(orgSlug: string)`;\r\n const url = `${this.endpoint}/deleted/${orgSlug}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n purge(orgSlug: string): Observable {\r\n const call = `purge(orgSlug: string)`;\r\n const url = `${this.endpoint}/purge/${orgSlug}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getAppData(id: string): Observable {\r\n const call = `getAppData(id: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/data/${id}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n id,\r\n url,\r\n result,\r\n });\r\n }),\r\n\r\n map((x) => {\r\n const json = JSON.parse(x['jsonData']);\r\n for (const name in json) {\r\n if (Object.prototype.hasOwnProperty.call(json, name)) {\r\n if (name !== 'appInfo' && name !== 'pagesInfo') {\r\n if (!json[name].hide) {\r\n json[name].hide = {};\r\n }\r\n }\r\n }\r\n }\r\n json.lookup = JSON.parse(x['lookup']);\r\n x['jsonData'] = JSON.stringify(json);\r\n return x;\r\n })\r\n );\r\n }\r\n\r\n\r\n getAppDataByExportID(exportID: number): Observable {\r\n const call = `getAppDataByExportID(exportID: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/export/${exportID}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n exportID,\r\n url,\r\n result,\r\n });\r\n }),\r\n\r\n map((x) => {\r\n const json = JSON.parse(x['jsonData']);\r\n for (const name in json) {\r\n if (Object.prototype.hasOwnProperty.call(json, name)) {\r\n if (name !== 'appInfo' && name !== 'pagesInfo') {\r\n if (!json[name].hide) {\r\n json[name].hide = {};\r\n }\r\n }\r\n }\r\n }\r\n json.lookup = JSON.parse(x['lookup']);\r\n x['jsonData'] = JSON.stringify(json);\r\n return x;\r\n })\r\n );\r\n }\r\n\r\n getSignatures(id: string): Observable {\r\n const call = `getSignatures(id: string)`;\r\n const url = `${this.endpoint}/data/${id}/signers`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n id,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n saveAppData(appData: object): Observable {\r\n const call = `saveAppData(appData: any)`;\r\n const jsonData = JSON.stringify(appData);\r\n const data = { jsonData };\r\n const url = `${this.endpoint}/data`;\r\n return this.http.post(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n appData,\r\n data,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n /* REFACTOR 07/14/2023 Give appData a proper/specific type. */\r\n submitAppData(appData: object): Observable {\r\n const call = `submitAppData(appData: any)`;\r\n const jsonData = JSON.stringify(appData);\r\n const data = { jsonData };\r\n const url = `${this.endpoint}/submit`;\r\n return this.http.post(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n appData,\r\n data,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n /* TO-DO 02/08/2021 Create type for paginated */\r\n /* DEPRECATED 07/21/2022 When using ag-grid, is will this form of pagination even work? */\r\n pagedApps(\r\n bankSlug: string,\r\n status: string,\r\n pageIndex: number,\r\n pageSize: number\r\n ) {\r\n const call = `pagedApps( bankSlug: string, status: string, pageIndex: number, pageSize: number )`;\r\n if (pageIndex === undefined || pageIndex < 0) {\r\n pageIndex = 0;\r\n }\r\n const url = `${this.endpoint}/${bankSlug}?status=${status}&pageIndex=${pageIndex}&pageSize=${pageSize}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n bankSlug,\r\n status,\r\n pageIndex,\r\n pageSize,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n deny(id: string, who: string, text?: string): Observable {\r\n const call = `deny(id: string, who: string, text?: string)`;\r\n const data = new AppDataStatusChangeModel();\r\n data.id = id;\r\n data.who = who;\r\n data.text = text;\r\n const url = `${this.endpoint}/deny`;\r\n return this.http.post(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n id,\r\n who,\r\n text,\r\n data,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n reviewed(id: string, who: string, text?: string): Observable {\r\n const call = `reviewed(id: string, who: string, text?: string)`;\r\n const data = new AppDataStatusChangeModel();\r\n data.id = id;\r\n data.who = who;\r\n data.text = text;\r\n const url = `${this.endpoint}/reviewed`;\r\n return this.http.post(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n id,\r\n who,\r\n text,\r\n data,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getAppPDFData(appID: string): Observable {\r\n const call = `getAppPDFData(appID: string)`;\r\n const url = `${this.endpoint}/pdf/${appID}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n appID,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getDetail(id: string): Observable {\r\n const call = `getDetail(id: string)`;\r\n const url = `${this.endpoint}/detail/${id}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n id,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getReport2(id: string): Observable {\r\n const call = `getReport2(id: string)`;\r\n const url = `${this.endpoint}/report2/${id}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n id,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n /* REFACTOR 06/13/2023 Copied getAppData (for processing of return) and modified. Look into refactoring. */\r\n saveReviewNote(reviewNoteJson: string): Observable {\r\n const call = `saveReviewNote(reviewNoteJson: string)`;\r\n const json = { jsonData: reviewNoteJson };\r\n const url = `${this.endpoint}/review`;\r\n\r\n return this.http.post(url, json).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n reviewNoteJson,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getLookupData(orgSlug: string): Observable {\r\n const call = `getLookupData(orgSlug: string)`;\r\n /* DEADCODE 12/20/2023 remove ASAP */\r\n // const url = `${this.config.getConfig().url.api}/apps/lookup/${orgSlug}`;\r\n const url = `${this.endpoint}/lookup/${orgSlug}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n setStatus(exportID: number, status: string): Observable {\r\n const call = `setStatus(exportID: ${exportID}, status: ${status})`;\r\n const url = `${this.config.getConfig().url.api}/abs/FastApps/${exportID}/Status`;\r\n const body = {id:exportID, status};\r\n return this.http.put(url, body).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `PUT`,\r\n call,\r\n url,\r\n body,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n changeApplicant(appID: string, newUserEmail: string): Observable {\r\n const call = `changeApplicant(appID: ${appID}, newUserEmail: ${newUserEmail})`;\r\n const url = `${this.endpoint}/applicant`;\r\n const body = {appID, newUserEmail};\r\n return this.http.post(url, body).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n url,\r\n body,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { AvatarModel } from '../model';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class AvatarService extends ApiBaseService {\r\n endpoint: string;\r\n\r\n constructor(\r\n config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private logger: NGXLogger,\r\n protected http: HttpClient\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.doLogging = feature.api.log.avatar;\r\n this.endpoint = config.getConfig().url.api + '/avatars';\r\n this.LogAPIService(`AvatarService.constructor()`);\r\n }\r\n\r\n getList(): Observable {\r\n this.LogAPIService(`getList()`);\r\n return this.http.get(`${this.endpoint}`);\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { DashboardCurrentAssignedModel, DashboardRawData } from '..';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { tap } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class DashboardService extends ApiBaseService {\r\n constructor(\r\n config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n protected http: HttpClient,\r\n protected logger: NGXLogger\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = config.getConfig().url.api + '/dashboard';\r\n this.doLogging = feature.api.log.dashboard;\r\n }\r\n\r\n getBarAppStatusForBank(orgSlug: string, startDate: string, endDate: string, assignedTo: string) {\r\n const call = `getBarAppStatusForBank(orgSlug: string, startDate: string, endDate: string, assignedTo: string = \"${assignedTo}\")`;\r\n const pStartDate = encodeURIComponent(startDate);\r\n const pEndDate = encodeURIComponent(endDate);\r\n // const url = `${this.endpoint}/bar/app/status?bankSlug=${orgSlug}&startDate=${pStartDate}&endDate=${pEndDate}`;\r\n const url = `${this.endpoint}/bar/app/status?bankSlug=${orgSlug}&startDate=${pStartDate}&endDate=${pEndDate}&assignedName=${assignedTo}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n startDate,\r\n endDate,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getPieLoanOfficersForBank(orgSlug: string, startDate: string, endDate: string) {\r\n const call = `getPieLoanOfficersForBank(orgSlug: string, startDate: string, endDate: string)`;\r\n const pStartDate = encodeURIComponent(startDate);\r\n const pEndDate = encodeURIComponent(endDate);\r\n const url = `${this.endpoint}/pie/loanOfficers?bankSlug=${orgSlug}&startDate=${pStartDate}&endDate=${pEndDate}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n startDate,\r\n endDate,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getAppsForCurrentLoanOfficer(\r\n userNumber: number\r\n ): Observable {\r\n const call = `getAppsForCurrentLoanOfficer(userNumber: number)`;\r\n const url = `${this.endpoint}/appList?userNumber=${userNumber}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n userNumber,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getRawData(orgSlug: string): Observable {\r\n const call = `getRawData(orgSlug: string)`;\r\n const url = `${this.endpoint}/raw/${orgSlug}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { CustomerInfoModel } from '../model/dev/customerInfo/CustomerInfoModel';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { KeyService } from '../keyservice';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { TimestampService } from 'src/app/services/timestamp.service';\r\nimport { tap } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DevService extends ApiBaseService {\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger,\r\n private timestampService: TimestampService\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = `${this.config.getConfig().url.api}/dev`;\r\n this.doLogging = feature.api.log.dev;\r\n }\r\n\r\n customerInfo(): Observable {\r\n const call = `customerInfo()`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/customerInfo?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { DefaultValuesModel } from '../model';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class DefaultsService extends ApiBaseService {\r\n\r\n endpoint: string;\r\n\r\n constructor(\r\n config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n protected http: HttpClient,\r\n protected logger: NGXLogger,\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.LogAPIService(`DefaultsService.constructor()`);\r\n this.endpoint = config.getConfig().url.api + '/emails';\r\n }\r\n\r\n get(): Observable {\r\n this.LogAPIService(`get()`);\r\n const url = `${this.endpoint}/defaults`;\r\n this.LogAPIService({ url });\r\n return this.http.get(url);\r\n }\r\n\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { DocsModel } from '../model';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { KeyService } from '../keyservice';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class DocsService extends ApiBaseService {\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.doLogging = feature.api.log.docs;\r\n this.LogAPIService(`DocsService.constructor()`);\r\n this.endpoint = `${this.config.getConfig().url.api}/docs`;\r\n }\r\n\r\n // getDocs(): Observable {\r\n getDocs(): Observable {\r\n this.LogAPIService(`getDocs()`);\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/?key=${key}`;\r\n this.LogAPIService(`GET : ${url}`);\r\n return this.http.get(url);\r\n // return this.http.get(url);\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { EmailTemplatesModel, MailServerModel } from '../model';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { KeyService } from '../keyservice';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { tap } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class EmailService extends ApiBaseService {\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = this.config.getConfig().url.api + '/emails';\r\n this.doLogging = feature.api.log.emails;\r\n }\r\n\r\n requestEmailVerification(email: string, orgSlug: string) {\r\n const call = `requestEmailVerification(email: string, orgSlug: string)`;\r\n const url = `${this.endpoint}/verify`;\r\n const key = this.keyService.newEncodedKey();\r\n const body = { email, orgSlug, key };\r\n return this.http.post(url, body).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n email,\r\n orgSlug,\r\n url,\r\n body,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n newApp(email: string, appID: string) {\r\n const call = `newApp(email: string, appID: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const encodedEmail = encodeURIComponent(email);\r\n const url = `${this.endpoint}/newApp/${encodedEmail}/${appID}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n email,\r\n appID,\r\n url,\r\n encodedEmail,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getCustomConfig(orgID: string): Observable {\r\n const call = `getCustomConfig(orgID: string): Observable`;\r\n const url = `${this.endpoint}/settings/${orgID}/custom`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgID,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n insert(data: MailServerModel): Observable {\r\n const call = `insert(data: MailServerModel): Observable`;\r\n const url = `${this.endpoint}/settings`;\r\n return this.http.post(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n data,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n sendTest(data: MailServerModel): Observable {\r\n const call = `sendTest(data: MailServerModel): Observable`;\r\n const url = `${this.endpoint}/settings/test`;\r\n return this.http.post(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n data,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getTemplateList(): Observable {\r\n const call = `getTemplateList(): Observable`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/templates?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n sendTestToCurrentConfiguration(bankID: string, email: string): any {\r\n const call = `sendTestToCurrentConfiguration(bankID: string, email: string)`;\r\n const encodedEmail = encodeURIComponent(email);\r\n const url = `${this.endpoint}/settings/test/current?bankID=${bankID}&emailAddress=${encodedEmail}`;\r\n return this.http.get(url,\r\n {responseType: 'text'}).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n email,\r\n encodedEmail,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { ExportMappingModel } from '../model';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class ExportMappingService extends ApiBaseService {\r\n\r\n endpoint: string;\r\n\r\n constructor(\r\n config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n protected http: HttpClient,\r\n protected logger: NGXLogger,\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.LogAPIService(`ExportMappingService.constructor()`);\r\n this.endpoint = config.getConfig().url.api + '/mapping';\r\n }\r\n\r\n list(): Observable {\r\n this.LogAPIService(`get()`);\r\n const url = `${this.endpoint}`;\r\n this.LogAPIService({ url });\r\n return this.http.get(url);\r\n }\r\n\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { BankFormsForBankModel, BankFormsModel } from '..';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { KeyService } from '../keyservice';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { tap } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class FormsService extends ApiBaseService {\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = this.config.getConfig().url.api + '/forms';\r\n this.doLogging = feature.api.log.forms;\r\n this.LogAPIService(`FormsService.constructor()`);\r\n }\r\n\r\n forBank(\r\n orgSlug: string,\r\n enabled?: boolean\r\n ): Observable {\r\n const call = 'forBank(orgSlug: string, enabled?: boolean)';\r\n const key = this.keyService.newEncodedKey();\r\n\r\n let url = `${this.endpoint}/${orgSlug}/org?key=${key}`;\r\n if (enabled !== undefined) {\r\n url += `&enabled=${enabled}`;\r\n }\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n enabled,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n byID(id: string): Observable {\r\n const call = `byID(id: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/${id}?key=${key}`;\r\n this.LogAPIService(`GET: ${url}`);\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n id,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n bySlug(bankSlug: string, formSlug: string): Observable {\r\n const call = `bySlug(bankSlug: string, formSlug: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/bySlug?bankSlug=${bankSlug}&formSlug=${formSlug}&key=${key}`;\r\n this.LogAPIService(`GET: ${url}`);\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n bankSlug,\r\n formSlug,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n byAppDataID(appDataID: string): Observable {\r\n const call = `byAppDataID(appDataID: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/byAppData/${appDataID}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n appDataID,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n update(data: BankFormsModel): Observable {\r\n const call = `update(data: BankFormsModel)`;\r\n const url = `${this.endpoint}`;\r\n return this.http.put(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `PUT`,\r\n call,\r\n data,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getByIdOrSlug(orgSlug: string, formIdentifier: string): Observable {\r\n const call = `getByIdOrSlug(orgSlug: string, formIdentifier: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/${orgSlug}/frm/${formIdentifier}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n formIdentifier,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n setSlug(formID: string, formSlug: string): Observable {\r\n const call = `setSlug(formID: string, formSlug: string)`;\r\n const data = {formID, formSlug};\r\n const url = `${this.endpoint}/slug`;\r\n return this.http.put(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `PUT`,\r\n call,\r\n formID,\r\n formSlug,\r\n data,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n clearSlug(formID: string): Observable {\r\n const call = `clearSlug(formID: string)`;\r\n const data = {formID};\r\n const url = `${this.endpoint}/slug/delete?formID=${formID}`;\r\n return this.http.delete(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `DELETE`,\r\n call,\r\n formID,\r\n data,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { KeyService } from '../keyservice';\r\nimport { ApiBaseService } from './apiBase.service';\r\nimport { Observable } from 'rxjs';\r\nimport { tap } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class IntegrationService extends ApiBaseService {\r\n\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger,\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = this.config.getConfig().url.api + '/abs';\r\n this.doLogging = feature.api.log.lists;\r\n }\r\n\r\n getCoPilotApp(orgSlug: string, exportID: string): Observable {\r\n const call = `getCoPilotApp(orgSlug: string, exportID: string)`;\r\n const url = `${this.endpoint}/${orgSlug}/api/v3/FastApps/exports/CoPilot/${exportID}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { KeyService } from '../keyservice';\r\nimport { LicenseReportModel, LicenseUpdateDetailModel } from '../model';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { tap } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class LicenseServiceService extends ApiBaseService {\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = this.config.getConfig().url.api + '/license';\r\n this.doLogging = feature.api.log.license;\r\n // this.LogAPIService(`LicenseServiceService.constructor()`);\r\n }\r\n\r\n history(orgSlug: string): Observable {\r\n const call = `history(${orgSlug})`;\r\n // this.LogAPIService(`LicenseServiceService.history(${orgSlug})`);\r\n\r\n const url = `${this.endpoint}/${orgSlug}/history`;\r\n // this.LogAPIService(`GET: ${url}`);\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `PUT`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n report(): Observable {\r\n const call = `report()`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/report?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { FullListModel, ListSaveModel } from '..';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { KeyService } from '../keyservice';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { tap } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class ListService extends ApiBaseService {\r\n\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger,\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = this.config.getConfig().url.api + '/lists';\r\n this.doLogging = feature.api.log.lists;\r\n }\r\n\r\n forOrg(orgSlug: string): Observable {\r\n const call = `forOrg(orgSlug: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/full/${orgSlug}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n byName(orgSlug: string, listName: string): Observable {\r\n const call = `byName(orgSlug: string, listName: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/${orgSlug}/${listName}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n orgSlug,\r\n listName,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n save(data: ListSaveModel): Observable {\r\n const call = `save(data: ListSaveModel)`;\r\n const url = `${this.endpoint}`;\r\n return this.http.post(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n data,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import {\r\n AppMyDataModel,\r\n BankApplicantAppSchemaModel,\r\n BankUsersModel,\r\n LicenseKeyCodeModel,\r\n OrganizationsModel,\r\n} from '../model';\r\nimport { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { KeyService } from '../keyservice';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { catchError, tap } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class OrgsService extends ApiBaseService {\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.doLogging = feature.api.log.orgs;\r\n this.endpoint = this.config.getConfig().url.api + '/orgs';\r\n }\r\n\r\n /*\r\n CONFIRM 09/30/2021 API endpoints not called AND REMOVE FROM API CODE\r\n\r\n /orgs/slug/{slug}/notify\r\n /orgs/id/{id}/notify\r\n */\r\n\r\n byID(id: string): Observable {\r\n const url = `${this.endpoint}/${id}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call: `byID(${id})`,\r\n method: `GET`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n bySlug(slug: string): Observable {\r\n const call = `bySlug(${slug})`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/slug/${slug}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n catchError((err) => {\r\n const emptyObj: OrganizationsModel = {\r\n id: '',\r\n name: '',\r\n orgType: '',\r\n street: '',\r\n city: '',\r\n state: '',\r\n zip: '',\r\n slug: '',\r\n verificationMinutes: 0,\r\n verificationAttempts: 0,\r\n enabled: false,\r\n exportID: 0\r\n };\r\n return this.handleCatchError(err, emptyObj);\r\n }),\r\n\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `GET`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n list(): Observable {\r\n const call = `list(): OrganizationsModel[]`;\r\n const url = `${this.endpoint}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `GET`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n bankAppsBySlug(slug: string): Observable {\r\n const call = `bankAppsBySlug(slug: string): Observable`;\r\n const url = `${this.endpoint}/${slug}/apps`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `GET`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getMyData(slug: string): Observable {\r\n const call = `getMyData(slug: string): Observable`;\r\n // this.LogAPIService(`getMyData()`);\r\n /* TODO 07/07/2022 might move this to apps.service */\r\n const url = `${this.config.getConfig().url.api}/apps/v2/${slug}`;\r\n // this.LogAPIService(url);\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `GET`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n bankUsersBySlug(slug: string): Observable {\r\n const call = `bankUsersBySlug(${slug})`;\r\n const url = `${this.endpoint}/${slug}/users`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `GET`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n /* FUTURE 09/13/2021 Service Get /orgs/children (gets parent/child info for all orgs)\r\n\r\n listAllChildren(): Observable {\r\n this.LogAPIService(`listAllChildren() OrgChildrenModel[]`);\r\n const url = `${this.url}/children`;\r\n this.LogAPIService(url);\r\n return this.http.get(url);\r\n }\r\n\r\n */\r\n\r\n update(data: OrganizationsModel): Observable {\r\n const call = `update(data: OrganizationsModel): Observable`;\r\n const url = `${this.endpoint}`;\r\n return this.http.put(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `PUT`,\r\n url,\r\n data,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n license(slug: string): Observable {\r\n const call = `license(${slug})`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/license/${slug}?key=${key}`;\r\n this.LogAPIService(url);\r\n return this.http.get(url).pipe(\r\n\r\n catchError((err) => {\r\n const emptyObj: LicenseKeyCodeModel = {\r\n hasValue: false,\r\n customer: '',\r\n productName: '',\r\n serialNumber: '',\r\n expirationDateAsString: '',\r\n currentDate: '',\r\n hasExpired: false,\r\n daysTillExpiration: 0,\r\n daysSinceExpiration: 0,\r\n notifyDays: 0,\r\n libraries: [],\r\n functions: [],\r\n licenseKeyCode: ''\r\n };\r\n return this.handleCatchError(err, emptyObj);\r\n }),\r\n\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `GET`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import { AppConfigService } from 'src/app/config.service';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { PdfUploadModel } from '../model/PdfUploadModel';\r\nimport { ViewPdfSchemaModel } from '..';\r\nimport { KeyService } from '../keyservice';\r\nimport { ApiBaseService } from './apiBase.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\n\r\n@Injectable()\r\nexport class PDFService extends ApiBaseService {\r\n\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger,\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.doLogging = feature.api.log.pdf;\r\n this.endpoint = this.config.getConfig().url.api + '/pdf';\r\n this.LogAPIService(`constructor()`);\r\n }\r\n\r\n upload(data: PdfUploadModel): Observable {\r\n this.LogAPIService(`upload(...)`);\r\n const url = `${this.endpoint}/upload`;\r\n this.LogAPIService(url);\r\n return this.http.post(url, data);\r\n }\r\n\r\n schema(schemaID: string): Observable {\r\n this.LogAPIService(`schema(${schemaID})`);\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/schema/${schemaID}?key=${key}`;\r\n this.LogAPIService(`GET ${url}`);\r\n return this.http.get(url);\r\n }\r\n\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { KeyService } from '../keyservice';\r\nimport { AppSchemaModel, AppSchemaSaveAsRequestModel, SchemaSummaryListModel } from '../model';\r\nimport { ApiBaseService } from './apiBase.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { tap } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class SchemaService extends ApiBaseService {\r\n\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger,\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = config.getConfig().url.api + '/schemas';\r\n this.doLogging = feature.api.log.schema;\r\n }\r\n\r\n list(): Observable {\r\n const call = `list()`;\r\n const url = this.endpoint;\r\n return this.http.get(this.endpoint).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n get(id: string): Observable {\r\n const call = `get(${id})`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/${id}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n // save(jsonString: string): Observable {\r\n save(jsonString: string): Observable {\r\n const call = `save(jsonString: string)`;\r\n const url = `${this.endpoint}`;\r\n const header = { 'Content-Type': 'application/json' };\r\n return this.http.post(url, jsonString,\r\n { headers: header }).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n url,\r\n header,\r\n jsonString,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n saveAs(data: AppSchemaSaveAsRequestModel): Observable {\r\n const call = `save(data: AppSchemaSaveAsRequestModel)`;\r\n const url = `${this.endpoint}/as`;\r\n return this.http.post(url, data).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n url,\r\n data,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import {\r\n AdminPasswordChangeModel,\r\n KeyValuePairLowerModel,\r\n UserAppsModel,\r\n UserHasAccountModel,\r\n UserPurgeResultsModel,\r\n UsersModel,\r\n} from '../model';\r\nimport { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { KeyService } from '../keyservice';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { tap } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class UsersService extends ApiBaseService {\r\n endpoint: string;\r\n\r\n constructor(\r\n private config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n private http: HttpClient,\r\n private keyService: KeyService,\r\n private logger: NGXLogger\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.doLogging = feature.api.log.users;\r\n this.endpoint = this.config.getConfig().url.api + '/users';\r\n }\r\n\r\n getUser(id: string): Observable {\r\n const call = `getUser(${id})`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/${id}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getUserByEmail(bankSlug: string, email: string): Observable {\r\n const call = `getUserByEmail(${bankSlug}, ${email})`;\r\n const key = this.keyService.newEncodedKey();\r\n const url = `${this.endpoint}/email/${bankSlug}/${email}?key=${key}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `GET`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n hasAccount(bankSlug: string, email: string): Observable {\r\n const call = `hasAccount(${bankSlug}, ${email})`;\r\n const key = this.keyService.newEncodedKey();\r\n const searchParams = this.formatGetParams({ email, key });\r\n const url = `${this.endpoint}/find/${bankSlug}?${searchParams}`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `GET`,\r\n searchParams,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n getUserApps(id: string): Observable {\r\n const call = `getUserApps(${id})`;\r\n const url = `${this.endpoint}/${id}/apps`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `GET`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n login(\r\n email: string,\r\n password: string,\r\n bankSlug: string\r\n ): Observable {\r\n const call = `login( ${email} , Password(Len = ${password.length}) )`;\r\n const json = { email, password, bankSlug };\r\n const url = `${this.endpoint}/auth`;\r\n return this.http.post(url, json).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `POST`,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n // REFACTOR use strong type, not any (uses an object not JSON string)\r\n create(json: any) {\r\n const call = `create(json: any)`;\r\n const url = this.endpoint;\r\n return this.http.post(url, json).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `GET`,\r\n url,\r\n json,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n // REFACTOR use strong type, not any\r\n update(json: any) {\r\n const call = `update(json: any)`;\r\n const url = this.endpoint;\r\n return this.http.put(url, json).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n call,\r\n method: `PUT`,\r\n url,\r\n result,\r\n });\r\n })\r\n ); // REFACTOR ? 7/23/2023 PUT same as update...\r\n }\r\n\r\n changePassword(\r\n bankSlug: string,\r\n email: string,\r\n verificationCode: string,\r\n password: string,\r\n passwordConfirm: string\r\n ) {\r\n const call = `changePassword( bankSlug: string, email: string, verificationCode: string, password: string, passwordConfirm: string )`;\r\n const url = `${this.endpoint}/password`;\r\n const key = this.keyService.newEncodedKey();\r\n const json = {\r\n bankSlug,\r\n email,\r\n verificationCode,\r\n password,\r\n passwordConfirm,\r\n key,\r\n };\r\n return this.http.post(url, json).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n url,\r\n bankSlug,\r\n email,\r\n verificationCode,\r\n password, /* TODO 12/19/2023 Hash logged passwords. */\r\n passwordConfirm,\r\n json,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n adminChangePassword(\r\n userID: string,\r\n password: string,\r\n passwordConfirm: string\r\n ): Observable {\r\n const call = `adminChangePassword( userID: string, password: string, passwordConfirm: string )`;\r\n const url = `${this.endpoint}/password/admin`;\r\n const key = this.keyService.newEncodedKey();\r\n const json = { userID, password, passwordConfirm, key };\r\n return this.http.post(url, json).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n url,\r\n userID,\r\n password, /* TODO 12/19/2023 Hash logged passwords. */\r\n passwordConfirm,\r\n json,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n needPasswordReset(id: string): Observable {\r\n const call = `needPasswordReset(id: string)`;\r\n const url = `${this.endpoint}/needPasswordReset/${id}/`;\r\n return this.http.get(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `GET`,\r\n call,\r\n id,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n verifyEmail(bankSlug: string, email: string, code: string) {\r\n const call = `verifyEmail(bankSlug: string, email: string, code: string)`;\r\n const key = this.keyService.newEncodedKey();\r\n const body = { bankSlug, email, code, key };\r\n const url = `${this.endpoint}/verify/`;\r\n return this.http.post(url, body).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n bankSlug,\r\n email,\r\n code,\r\n url,\r\n body,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n setEnabled(userID: string, enabled: boolean): Observable {\r\n const call = `setEnabled(userID: string, enabled: boolean)`;\r\n const url = `${this.endpoint}/enabled`;\r\n const body = { userID, enabled };\r\n return this.http.post(url, body).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n userID,\r\n enabled,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n delete(userID: string) {\r\n const call = `delete(userID: string)`;\r\n const url = `${this.endpoint}?userID=${userID}`;\r\n return this.http.delete(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `DELETE`,\r\n call,\r\n userID,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n purge(bankID: string): Observable{\r\n const call = `purge(bankID: string)`;\r\n const url = `${this.endpoint}/purge?bankID=${bankID}`;\r\n return this.http.delete(url).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `DELETE`,\r\n call,\r\n bankID,\r\n url,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n\r\n changeUser(id: string, userKind: string): Observable {\r\n const call = `changeUser(${id}, ${userKind})`;\r\n const url = `${this.endpoint}/${id}/change`;\r\n const body = { userKind };\r\n return this.http.post(url, body).pipe(\r\n tap((result) => {\r\n this.LogAPIService({\r\n method: `POST`,\r\n call,\r\n url,\r\n body,\r\n result,\r\n });\r\n })\r\n );\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\n@Injectable()\r\nexport class WebClientLoggerService extends ApiBaseService {\r\n\r\n constructor(\r\n private logger: NGXLogger,\r\n private feature: FeatureFlagService,\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.doLogging = feature.api.log.webClientLogger;\r\n }\r\n}\r\n","import { ApiBaseService } from './apiBase.service';\r\nimport { AppConfigService } from 'src/app/config.service';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Observable } from 'rxjs';\r\nimport { TwoFactorAuthEnableModel } from '..';\r\nimport { TwoFactorAuthVerifyModel } from '../model/TwoFactorAuthVerifyModel';\r\n\r\n@Injectable()\r\nexport class TwoFactorAuthService extends ApiBaseService {\r\n\r\n endpoint: string;\r\n\r\n constructor(\r\n config: AppConfigService,\r\n private feature: FeatureFlagService,\r\n protected http: HttpClient,\r\n protected logger: NGXLogger,\r\n ) {\r\n super(logger, feature);\r\n this.serviceName = this.constructor.name;\r\n this.endpoint = config.getConfig().url.api + '/2fa';\r\n this.doLogging = feature.api.log.twoFactorAuth;\r\n this.LogAPIService(`constructor()`);\r\n }\r\n\r\n setup(userID: string): Observable {\r\n this.LogAPIService(`enable(${userID})`);\r\n const url = `${this.endpoint}/setup?userID=${userID}`;\r\n this.LogAPIService(`GET: ${url}`);\r\n return this.http.get(url);\r\n }\r\n\r\n verify(userID: string, inputCode: string, resetUser: boolean): Observable {\r\n this.LogAPIService(`verify(${userID}, ${inputCode}, ${resetUser})`);\r\n const url = `${this.endpoint}/verify`;\r\n const data = { userID, inputCode, resetUser };\r\n this.LogAPIService(`POST: ${url} : json`);\r\n return this.http.post(url, data);\r\n }\r\n}\r\n","export class KeyInfoModel {\r\n raw: string;\r\n clearText: string;\r\n name: string;\r\n instance: string;\r\n dateTime: Date;\r\n expired: boolean;\r\n valid: boolean;\r\n reason: string;\r\n\r\n constructor() {\r\n this.raw = '';\r\n this.clearText = '';\r\n this.name = '';\r\n this.instance = '';\r\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date\r\n this.dateTime = new Date(); // Date() : milliseconds since 1 January 1970 UTC\r\n this.expired = false;\r\n this.valid = false;\r\n this.reason = '';\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { AppConfigData, AppConfigService } from 'src/app/config.service';\r\nimport { UtilFunctionsService } from 'src/app/shared';\r\nimport { KeyInfoModel } from './KeyInfoModel';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class KeyService {\r\n configData: AppConfigData;\r\n\r\n constructor(\r\n private config: AppConfigService, // Fallback source of Key info ( appConfig.json )\r\n private utilService: UtilFunctionsService,\r\n public logger: NGXLogger,\r\n ) {\r\n this.configData = this.config.getConfig();\r\n }\r\n\r\n newKey(): KeyInfoModel {\r\n /* NOTE 11/22/2021 Logging in this function causes a loop and uses all browser resources! */\r\n const keyInfo = new KeyInfoModel();\r\n keyInfo.instance = this.configData.key.instance;\r\n keyInfo.name = this.configData.key.name;\r\n return keyInfo;\r\n }\r\n\r\n newDecodedKey(): string {\r\n const keyInfo = this.newKey();\r\n return JSON.stringify(keyInfo);\r\n }\r\n\r\n newEncodedKey(): string {\r\n return this.utilService.Base64Encode(this.newDecodedKey());\r\n }\r\n\r\n decodeKey(encoded: string): KeyInfoModel {\r\n return JSON.parse(encoded);\r\n }\r\n /* TODO 08/30/2022 This seems incomplete, find where used and fix or remove. */\r\n}\r\n","export interface IListItemType {\r\n label: string;\r\n value: string;\r\n}\r\n\r\n/*\r\n Used for multi-select droplists and radio button groups.\r\n Exactly what Formly needs.\r\n*/\r\nexport class ListItemType implements IListItemType {\r\n label: string;\r\n value: string;\r\n\r\n constructor(label: string, value: string) {\r\n this.label = label;\r\n this.value = value;\r\n }\r\n}\r\n\r\n// Returned as stringified JSON by ListsService.forOrg()\r\nexport class ExtendedListItemType implements IListItemType {\r\n label: string;\r\n value: string;\r\n orderby: number;\r\n enabled: boolean;\r\n}\r\n\r\nexport class ListsLookup {\r\n name: string;\r\n list: ListItemType[];\r\n}\r\n","import { ExtendedListItemType, ListItemType, ListsLookup } from 'src/app/types';\r\nimport { FullListModel } from '../api/FastApp';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ListProviderService {\r\n workList: { name: string; list: Array }[];\r\n\r\n constructor(private logger: NGXLogger) {}\r\n\r\n convertList(list: FullListModel[]) {\r\n this.workList = [];\r\n\r\n for (const element of list) {\r\n const record = new ListsLookup();\r\n record.name = element.name.toLowerCase(); // for case insensitive compares.\r\n record.list = [];\r\n\r\n let json: ExtendedListItemType[] = JSON.parse(element.list);\r\n\r\n json = json.filter((x) => {\r\n return x.enabled === true;\r\n });\r\n\r\n json = json.sort((a, b) => {\r\n if (a.orderby < b.orderby) {\r\n return -1;\r\n }\r\n if (a.orderby > b.orderby) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n\r\n record.list = json; // LET THE TYPES OF SAME INTERFACE AUTOMATICALLY MAP...\r\n\r\n this.workList.push(record);\r\n }\r\n }\r\n\r\n get(list: string | Array): Array {\r\n if (list == null) {\r\n return null;\r\n }\r\n\r\n if (typeof list === 'object') {\r\n return list;\r\n }\r\n\r\n const listName = list.toLowerCase();\r\n\r\n let result: ListItemType[] = [];\r\n\r\n if (typeof this.workList === 'undefined') {\r\n result = [{ label: `NO LISTS AVAILABLE (${listName})`, value: `nope` }];\r\n } else {\r\n result = this.workList.find((item) => {\r\n return item.name === listName;\r\n }).list;\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n","import { FullListModel } from '../api/FastApp';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SessionService {\r\n private privOrgSlug: string;\r\n private privLists: FullListModel[];\r\n\r\n constructor(private logger: NGXLogger) {\r\n this.privOrgSlug = '';\r\n this.privLists = [];\r\n }\r\n\r\n public get lists(): FullListModel[] {\r\n return this.privLists;\r\n }\r\n\r\n public set lists(value: FullListModel[]) {\r\n this.privLists = value;\r\n }\r\n\r\n public get orgSlug(): string {\r\n return this.privOrgSlug;\r\n }\r\n\r\n public set orgSlug(value: string) {\r\n this.privOrgSlug = value;\r\n }\r\n}\r\n","import { BankThemeModel } from './api/FastApp/model';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ThemeService {\r\n constructor(private logger: NGXLogger) {}\r\n\r\n public setBankTheme(bankTheme: BankThemeModel | string) {\r\n let theme: BankThemeModel;\r\n if (typeof bankTheme === 'string') {\r\n theme = JSON.parse(bankTheme);\r\n } else {\r\n theme = bankTheme;\r\n }\r\n\r\n const colors = theme.colors;\r\n\r\n this.setProperty('--colors_main_background', colors.main.background);\r\n this.setProperty('--colors_main_foreground', colors.main.foreground);\r\n\r\n this.setProperty('--colors_sidebar_background', colors.sidebar.background);\r\n this.setProperty('--colors_sidebar_foreground', colors.sidebar.foreground);\r\n\r\n this.setProperty('--colors_button_background', colors.button.background);\r\n this.setProperty('--colors_button_foreground', colors.button.foreground);\r\n\r\n this.setProperty(\r\n '--colors_activeMenu_background',\r\n colors.activeMenu.background\r\n );\r\n this.setProperty(\r\n '--colors_activeMenu_foreground',\r\n colors.activeMenu.foreground\r\n );\r\n }\r\n\r\n /*\r\n Given an object containing style attributes,\r\n iterate and set properties with same name.\r\n { my-color: red; } => sets --my-color: red;\r\n */\r\n\r\n public setTheme(theme: object) {\r\n Object.keys(theme).forEach((k) => this.setProperty(`--${k}`, theme[k]));\r\n }\r\n\r\n public setProperty(name: string, value: string) {\r\n document.documentElement.style.setProperty(name, value);\r\n }\r\n}\r\n","import {\r\n ABSService,\r\n FeatureFlagService,\r\n UtilFunctionsService,\r\n} from '../shared';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { AppConfigService } from '../config.service';\r\nimport { AuthenticationService } from '../_services';\r\nimport { DatePipe } from '@angular/common';\r\nimport { FastAppApiService } from './api/FastApp/FastAppApiService';\r\nimport { Injectable } from '@angular/core';\r\nimport { ListProviderService } from './list-provider/list-provider.service';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { SessionService } from './session/session.service';\r\nimport { ThemeService } from './theme.service';\r\nimport { TimestampService } from './timestamp.service';\r\nimport { Title } from '@angular/platform-browser';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SharedService {\r\n constructor(\r\n // nosonar\r\n private logger: NGXLogger,\r\n public abs: ABSService,\r\n public api: FastAppApiService,\r\n public authenticationService: AuthenticationService,\r\n public config: AppConfigService,\r\n public dateFormatter: DatePipe,\r\n public feature: FeatureFlagService,\r\n public listProvider: ListProviderService,\r\n public route: ActivatedRoute,\r\n public router: Router,\r\n public session: SessionService,\r\n public theme: ThemeService,\r\n public timestamp: TimestampService,\r\n public titleSvc: Title,\r\n public util: UtilFunctionsService\r\n ) {}\r\n\r\n setPageTitle2(theTitle: string, theClass) {\r\n const className = theClass.constructor.name;\r\n const title = theTitle;\r\n this.setPageTitle(title);\r\n }\r\n\r\n setPageTitle(theTitle: string) {\r\n const title = `${this.config.webAppName} ${theTitle}`;\r\n this.titleSvc.setTitle(title);\r\n this.logger.info(`PAGE LOAD - ${title}`, window.location.href);\r\n }\r\n\r\n logIFTrace(doLog: boolean, obj) {\r\n if (doLog) {\r\n let message = obj;\r\n try {\r\n message = JSON.parse(obj);\r\n } catch (e) {\r\n this.logger.trace(e.message);\r\n }\r\n\r\n this.logger.trace(message);\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\nexport interface ITimestampServiceModel {\r\n time?: {\r\n submitted?: string;\r\n created?: string;\r\n }\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TimestampService {\r\n\r\n constructor(\r\n private logger: NGXLogger\r\n ) { }\r\n\r\n /*\r\n Bank (Citizens Bank of Americus) wanted to see the time shown in the timezone of the client.\r\n Started down the store in UCT and convert to local time for anyone viewing the data.\r\n This opened the whole can of worms of:\r\n + Getting the timezone from the browser (Central/Chicago).\r\n + Several standard ways of representing timezone.\r\n + Converting the timezone format provided by the client/browser to the format supported by SQL Server\r\n + (Microsoft has their own \"standard\" SYS.TIME_ZONE_INFO).\r\n + Format the resulting time to show the short (familiar) \"CST\".\r\n + Keeping daylight savings time in mind... ect...\r\n\r\n Jobby suggested \"just get the time string from the user and store it in a 'known format'\".\r\n The function(s) below format the client/browser time into a \"friendly\" format.\r\n It does not include the original/desired short timezone (CST) but Jobby said that was ok.\r\n Robert - 4/25/2022\r\n */\r\n\r\n // Format date as : \t4/22/2022, 11:58:22 AM (Central Daylight Time)\r\n dateFormatAsString(date: Date): string {\r\n const dt = date.toLocaleString();\r\n const str = date.toString();\r\n const tz = str.substring(str.indexOf('('));\r\n return `${dt} ${tz}`;\r\n }\r\n\r\n nowFormatAsString(): string {\r\n const date = new Date();\r\n return this.dateFormatAsString(date);\r\n }\r\n\r\n /*\r\n Adding code set and get timestamp strings from model.\r\n Code here for consistency.\r\n Apps are created in multiple places, shared code here.\r\n */\r\n\r\n setSubmitTime(model: any): any {\r\n if (!model.time) {\r\n model.time = {};\r\n }\r\n model.time.submitted = this.nowFormatAsString();\r\n\r\n return model;\r\n }\r\n\r\n getSubmitTime(model: any): string {\r\n return model?.time && model.time.submitted ? model.time.submitted : '';\r\n }\r\n\r\n setCreatedTime(model: any): any {\r\n if (!model.time) {\r\n model.time = {};\r\n }\r\n model.time.created = this.nowFormatAsString();\r\n\r\n return model;\r\n }\r\n\r\n /*\r\n Error: src/app/dynamic-app/report/dynamic-app-report.component.ts:92:62 - error TS2559: Type 'ExtendedAppReport' has no properties in common with type 'ITimestampServiceModel'.\r\n Error: src/app/dynamic-app/report/dynamic-app-report.component.ts:93:63 - error TS2559: Type 'ExtendedAppReport' has no properties in common with type 'ITimestampServiceModel'.\r\n */\r\n getCreatedTime(model: any): string {\r\n return model?.time && model.time.created ? model.time.created : '';\r\n }\r\n}\r\n","
\n
\n \n
\n
\n

\n \n

\n
\n
\n
\n \n
\n
\n \n
\n","import { Component, Input } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\nexport interface IBulmaCardComponentFooterButton {\r\n url: string | string[], // [routerLink]\r\n label: string\r\n}\r\n\r\n@Component({\r\n selector: 'app-bulma-card',\r\n templateUrl: './bulma-card.component.html',\r\n styleUrls: ['./bulma-card.component.scss'],\r\n})\r\nexport class BulmaCardComponent {\r\n // Template includes multi-slot transclusion.\r\n\r\n @Input() footerButtons: IBulmaCardComponentFooterButton[] = [];\r\n /*\r\n Transclusion did not work for footer buttons.\r\n \r\n .card-footer-item were displayed stacked vertically instead of horizontally\r\n Had to introduce an input field and loop through objects\r\n */\r\n\r\n // TODO use *ngIf to hide unused/optional transclusion: [header-title], [header-icon], etc.\r\n\r\n constructor(private logger: NGXLogger) {}\r\n}\r\n","import { Component, OnInit, Output, EventEmitter } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\n@Component({\r\n selector: 'app-bulma-modal-card',\r\n templateUrl: './bulma-modal-card.component.html',\r\n styleUrls: ['./bulma-modal-card.component.scss'],\r\n})\r\nexport class BulmaModalCardComponent implements OnInit {\r\n // Template includes multi-slot transclusion.\r\n\r\n @Output() closed = new EventEmitter();\r\n\r\n constructor(private logger: NGXLogger) {\r\n this.logger.trace(`BulmaModalCardComponent.constructor()`);\r\n }\r\n\r\n ngOnInit() {\r\n this.logger.trace(`ngOnInit()`);\r\n }\r\n\r\n cancel() {\r\n this.logger.trace(`cancel()`);\r\n this.closed.emit(null);\r\n }\r\n}\r\n","
\n
\n
\n
\n

\n \n

\n \n
\n
\n \n
\n
\n \n
\n
\n
\n","import { Component, EventEmitter, OnInit, Output } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\n@Component({\r\n selector: 'app-bulma-modal',\r\n templateUrl: './bulma-modal.component.html',\r\n styleUrls: ['./bulma-modal.component.scss'],\r\n})\r\nexport class BulmaModalComponent implements OnInit {\r\n @Output() closed = new EventEmitter();\r\n\r\n constructor(private logger: NGXLogger) {\r\n this.logger.trace(`BulmaModalComponent.constructor()`);\r\n }\r\n\r\n ngOnInit() {\r\n this.logger.trace(`ngOnInit()`);\r\n }\r\n\r\n cancel() {\r\n this.logger.trace(`cancel()`);\r\n this.closed.emit(null);\r\n }\r\n}\r\n","
\n
\n
\n \n
\n \n
\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\n@Component({\r\n selector: 'app-bulma-notification',\r\n templateUrl: './bulma-notification.component.html',\r\n styleUrls: ['./bulma-notification.component.scss'],\r\n})\r\nexport class BulmaNotificationComponent implements OnInit {\r\n // https://bulma.io/documentation/elements/notification/\r\n // Template includes single slot transclusion.\r\n\r\n @Output() closed = new EventEmitter();\r\n\r\n /*\r\n The template includes a close (delete) button/icon and logic to close itself when needed.\r\n Closing the dialog sends an event to the parent.\r\n It is the parent's responsibility to close/hide the dialog using *ngIf.\r\n */\r\n\r\n @Input() css = '';\r\n\r\n constructor(private logger: NGXLogger) {\r\n this.logger.trace(`BulmaNotificationComponent.constructor()`);\r\n }\r\n\r\n ngOnInit() {\r\n this.logger.trace(`ngOnInit()`);\r\n }\r\n\r\n cancel() {\r\n this.logger.trace(`cancel()`);\r\n this.closed.emit(null);\r\n }\r\n}\r\n","
\n \n
\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { CoreModule } from 'src/app/core/core.module';\n\nimport {\n BulmaBreadcrumbsComponent,\n BulmaCardComponent,\n BulmaContentComponent,\n BulmaFieldInputComponent,\n BulmaFooterComponent,\n BulmaHeroComponent,\n BulmaIconComponent,\n BulmaImageComponent,\n BulmaModalCardComponent,\n BulmaModalComponent,\n BulmaNavbarComponent,\n BulmaNotificationComponent,\n BulmaSectionComponent,\n BulmaTableComponent,\n BulmaTagComponent,\n} from '.';\n\n@NgModule({\n declarations: [\n BulmaBreadcrumbsComponent,\n BulmaCardComponent,\n BulmaContentComponent,\n BulmaFieldInputComponent,\n BulmaFooterComponent,\n BulmaHeroComponent,\n BulmaIconComponent,\n BulmaImageComponent,\n BulmaModalCardComponent,\n BulmaModalComponent,\n BulmaNavbarComponent,\n BulmaNotificationComponent,\n BulmaSectionComponent,\n BulmaTableComponent,\n BulmaTagComponent,\n ],\n imports: [\n CoreModule,\n RouterModule,\n ],\n exports: [\n BulmaBreadcrumbsComponent,\n BulmaCardComponent,\n BulmaContentComponent,\n BulmaFieldInputComponent,\n BulmaFooterComponent,\n BulmaHeroComponent,\n BulmaIconComponent,\n BulmaImageComponent,\n BulmaModalCardComponent,\n BulmaModalComponent,\n BulmaNavbarComponent,\n BulmaNotificationComponent,\n BulmaSectionComponent,\n BulmaTableComponent,\n BulmaTagComponent,\n ]\n})\nexport class BulmaModule { }\n","export class StatusMessage {\r\n isError: boolean;\r\n isInfo: boolean;\r\n isSuccess: boolean;\r\n isLoading: boolean;\r\n hasMessage: boolean;\r\n message: string;\r\n\r\n readonly SERVER_ERROR = `Error contacting server.`;\r\n\r\n /* TODO 06/02/2021 Add isWarning */\r\n\r\n constructor() {\r\n this.clear();\r\n }\r\n\r\n clear() {\r\n this.isError = false;\r\n this.isLoading = false;\r\n this.isInfo = false;\r\n this.isSuccess = false;\r\n this.hasMessage = false;\r\n this.message = '';\r\n }\r\n\r\n setError(msg: string) {\r\n this.clear();\r\n this.message = msg;\r\n this.isError = true;\r\n this.hasMessage = true;\r\n }\r\n\r\n setLoading(msg: string) {\r\n this.clear();\r\n this.message = msg;\r\n this.isLoading = true;\r\n this.hasMessage = true;\r\n }\r\n\r\n setInfo(msg: string) {\r\n this.clear();\r\n this.message = msg;\r\n this.isInfo = true;\r\n this.hasMessage = true;\r\n }\r\n\r\n setSuccess(msg: string) {\r\n this.clear();\r\n this.message = msg;\r\n this.isSuccess = true;\r\n this.hasMessage = true;\r\n }\r\n\r\n}\r\n\r\n","\r\n
\r\n \r\n
\r\n\r\n {{ statusMessage[\"message\"] }}\r\n\r\n","import { Component, Input } from '@angular/core';\r\nimport { StatusMessage } from './StatusMessage';\r\n\r\n@Component({\r\n selector: 'app-display-status-message',\r\n templateUrl: './display-status-message.component.html',\r\n styleUrls: ['./display-status-message.component.scss'],\r\n})\r\nexport class DisplayStatusMessageComponent {\r\n @Input() statusMessage = StatusMessage;\r\n}\r\n","import { Injector, Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class AppInjector {\r\n private static injector: Injector;\r\n\r\n static setInjector(injector: Injector) {\r\n if (AppInjector.injector) {\r\n // Should not happen\r\n console.error('Programming error: AppInjector was already set');\r\n } else {\r\n AppInjector.injector = injector;\r\n }\r\n }\r\n\r\n static getInjector() {\r\n return AppInjector.injector;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class FeatureFlagService {\r\n /* REFACTOR 06/13/2023 Reorganize the object nesting/attribute names... */\r\n\r\n /* REFACTOR 07/29/2022 Use library FeatureFlagService.\r\n A library could read config file (without reinventing the wheel).\r\n Currently feature flag uses hardcoded values which are compiled.\r\n Doesn't have flexibility of different features enabled per environment (dev/QA/prod/CBOA/etc).\r\n */\r\n\r\n // True enables feature, false disables/hides feature.\r\n // Feature flags are nested for easier drill-down discoverability.\r\n\r\n public dev = {\r\n integration: {\r\n viewCoPilot: false, // Show \"CoPilot\" integration raw data.\r\n },\r\n viewAppJson: false,\r\n };\r\n\r\n public breadcrumbs = {\r\n showHidden: false\r\n };\r\n\r\n public entry = {\r\n diagnostic: {\r\n logModel: false,\r\n showPagesInfo: false,\r\n },\r\n };\r\n\r\n public ready = {\r\n adminButtonComponents: false\r\n };\r\n\r\n public logClass = {\r\n FastTrackEntryComponent: false,\r\n DynamicAppFormComponent: true,\r\n FastTrackUserComponent: false,\r\n DynamicAppNavService: true,\r\n };\r\n\r\n public admin = {\r\n user: {\r\n changeType: true, /* TODO 08/08/2023 Work in progress. Remove flag ASAP */\r\n individualPurge: false\r\n },\r\n dashboard: {\r\n filter: false,\r\n },\r\n\r\n showBankForms: false, /* TODO 11/27/2023 Work in progress. */\r\n\r\n showExportMappingMenu: false, // show menu for organizations other than API (CoPilot development/testing).\r\n\r\n form: {\r\n access: false, // TODO 07/29/2022 Finish admin \"Forms Access\" feature [Azure DevOps|Task#1248|Sprint 7]\r\n },\r\n myData: {\r\n reviewNotes: true, // TODO 01/09/2023 Feature put on hold. Finish this feature ASAP.\r\n },\r\n appReport: {\r\n canToggleDebugView: false,\r\n },\r\n proofOfConcept: {\r\n bankListWithChildren: false, // FUTURE 09/13/2021 Proof of Concept Bank list (with children)\r\n fileUpload: false, // FUTURE 09/13/2021 file upload\r\n },\r\n schema: {\r\n view: true,\r\n tech: false, // display hideExpression (a technical detail)\r\n json: false, // display raw JSON\r\n todo: false, // display todo items\r\n note: false // note items\r\n }\r\n };\r\n\r\n public agGrid = {\r\n /* TODO 04/24/2023 \"My Data\" save as CSV. Debug/dev. ASK: Useful in QA??? Prod??? */\r\n downLoadCSV: true,\r\n };\r\n\r\n public api = {\r\n log: {\r\n NONE: true, // The \"MASTER SWITCH\" true turns off ALL API logging\r\n debug: false, // USED TO DEBUG THIS LOGGING PROCESS. REMOVE ASAP.\r\n errors: true, // Flag to turn off error messages for dev/test only. Should be true for releases.\r\n ALL: true, // turns on all API logging, IF NONE is false\r\n // Turn on specific endpoints, IF (ALL=false) and (NONE=false)\r\n action: false,\r\n apps: false,\r\n avatar: false,\r\n dashboard: false,\r\n dev: false,\r\n docs: false,\r\n emails: false,\r\n forms: true,\r\n license: false,\r\n lists: false,\r\n orgs: true,\r\n pdf: false,\r\n schema: false,\r\n serverInfo: false,\r\n twoFactorAuth: false,\r\n users: false,\r\n webClientLogger: false,\r\n }\r\n };\r\n\r\n public resolvers = {\r\n log: false,\r\n };\r\n\r\n /* TODO 06/12/2023 \"DEV ONLY\" flag. Enabled/disables a group of things. Logs in a big/obvious way when true */\r\n /* TODO 06/12/2023 Disable email flag(s), DEV only */\r\n\r\n constructor(private logger: NGXLogger) {}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nexport interface ICompanyInfo {\r\n name: string;\r\n street: string;\r\n city: string;\r\n state: string;\r\n zip: string;\r\n phone: string;\r\n fax: string;\r\n tollFree: string;\r\n afterHours: string;\r\n website: string;\r\n copyrightYear: string;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ABSService {\r\n public readonly urlAbs = 'https://www.americanbanksystems.com';\r\n public readonly urlAbsFastApp =\r\n 'https://www.americanbanksystems.com/fastapp-prequalification-system/';\r\n public readonly companyInfo: ICompanyInfo;\r\n\r\n constructor() {\r\n this.companyInfo = {\r\n name: 'American Bank Systems',\r\n street: '14000 Parkway Commons Drive',\r\n city: 'Oklahoma City',\r\n state: 'OK',\r\n zip: '73134',\r\n phone: '405-607-7000',\r\n fax: '405-607-7005',\r\n tollFree: '800-522-4990',\r\n afterHours: '405-420-6007',\r\n website: 'https://www.americanbanksystems.com/',\r\n copyrightYear: '2023',\r\n };\r\n\r\n const currentYear = new Date().getFullYear();\r\n this.companyInfo.copyrightYear = `${currentYear}`; // convert to string\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n {{ to.label }}\r\n *\r\n \r\n \r\n\r\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n selector: 'app-formly-field-checkbox',\r\n templateUrl: './checkbox.type.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormlyFieldCheckboxComponent extends FieldType {\r\n defaultOptions = {\r\n templateOptions: {\r\n indeterminate: true,\r\n hideLabel: true,\r\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel'\r\n },\r\n };\r\n}\r\n","
\r\n
\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n {{ to.description }}\r\n
\r\n
\r\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n templateUrl: './form-field.wrapper.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyWrapperFormFieldComponent extends FieldWrapper {}\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyWrapperFormFieldComponent } from './form-field.wrapper';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [FormlyWrapperFormFieldComponent],\n imports: [\n CoreModule,\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormFieldComponent,\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaFormFieldModule {}\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyFieldCheckboxComponent } from './checkbox.type';\nimport { FormlyBulmaFormFieldModule } from '../form-field/form-field.module';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [FormlyFieldCheckboxComponent],\n imports: [\n CoreModule,\n FormlyBulmaFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'checkbox',\n component: FormlyFieldCheckboxComponent,\n wrappers: ['form-field'],\n },\n {\n name: 'boolean',\n extends: 'checkbox',\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaCheckboxModule {}\n","import { Component } from '@angular/core';\r\nimport { FieldType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n selector: 'app-formly-field-color',\r\n template: `\r\n \r\n `,\r\n styles: [``]\r\n})\r\nexport class FormlyFieldColorComponent extends FieldType { }\r\n","import { NgModule } from '@angular/core';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\n\r\nimport { FormlyBulmaFormFieldModule } from '../form-field/form-field.module';\r\nimport { FormlyFieldColorComponent } from './color.type';\r\nimport { CoreModule } from 'src/app/core/core.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n FormlyFieldColorComponent\r\n ],\r\n imports: [\r\n CoreModule,\r\n FormlyBulmaFormFieldModule,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'color',\r\n component: FormlyFieldColorComponent,\r\n wrappers: ['form-field'],\r\n },\r\n {\r\n name: 'color-h',\r\n component: FormlyFieldColorComponent,\r\n wrappers: ['form-field-h'],\r\n },\r\n ],\r\n }),\r\n ],\r\n})\r\nexport class FormlyBulmaColorModule { }\r\n","import { Directive } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\n@Directive({\r\n selector: 'input[type=file]',\r\n host: {\r\n '(change)': 'onChange($event.target.files)',\r\n '(blur)': 'onTouched()',\r\n },\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: FileValueAccessorDirective,\r\n multi: true,\r\n },\r\n ],\r\n})\r\n// https://github.com/angular/angular/issues/7341\r\nexport class FileValueAccessorDirective implements ControlValueAccessor {\r\n value: any;\r\n\r\n onChange = () => {\r\n // do nothing for now\r\n };\r\n\r\n onTouched = () => {\r\n // do nothing for now\r\n };\r\n\r\n writeValue() {\r\n // do nothing for now\r\n }\r\n\r\n registerOnChange(fn: any) {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any) {\r\n this.onTouched = fn;\r\n }\r\n}\r\n\r\n/* Copyright 2018 Google Inc. All Rights Reserved.\r\n Use of this source code is governed by an MIT-style license that\r\n can be found in the LICENSE file at http://angular.io/license */\r\n","import { Component } from '@angular/core';\r\nimport { FieldType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n selector: 'app-formly-field-file',\r\n template: `\r\n \r\n `,\r\n})\r\nexport class FormlyFieldFileComponent extends FieldType {}\r\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyBulmaFormFieldModule } from '../form-field/form-field.module';\nimport { FormlyFieldFileComponent } from './file.type';\nimport { FileValueAccessorDirective } from './file-value-accessor';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [\n FormlyFieldFileComponent,\n FileValueAccessorDirective\n ],\n imports: [\n CoreModule,\n FormlyBulmaFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'file',\n component: FormlyFieldFileComponent,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaFileModule { }\n","
\r\n
\r\n \r\n
\r\n {{ to.label }}\r\n \r\n *\r\n \r\n {{ to.description }}\r\n
\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n// TODO make -h versions of all inputs (started with color)\n\n@Component({\n templateUrl: './form-field-horiz.wrapper.html',\n styleUrls: [ './form-field-horiz.wrapper.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyWrapperFormFieldComponentHorizontalComponent extends FieldWrapper {\n}\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyWrapperFormFieldComponentHorizontalComponent } from './form-field-horiz.wrapper';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [FormlyWrapperFormFieldComponentHorizontalComponent],\n imports: [\n CoreModule,\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'form-field-h',\n component: FormlyWrapperFormFieldComponentHorizontalComponent,\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaFormFieldHorizontalModule {}\n","\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n\r\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n templateUrl: './form-field-td.wrapper.html',\n styleUrls: [ './form-field-td.wrapper.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyWrapperFormFieldComponentTableDataComponent extends FieldWrapper {\n}\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyWrapperFormFieldComponentTableDataComponent } from './form-field-td.wrapper';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [FormlyWrapperFormFieldComponentTableDataComponent],\n imports: [\n CoreModule,\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'form-field-td',\n component: FormlyWrapperFormFieldComponentTableDataComponent,\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaFormFieldTableDataModule {}\n","\r\n\r\n \r\n\r\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n selector: 'app-formly-field-input',\r\n templateUrl: './input.type.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormlyFieldInputComponent extends FieldType {\r\n get type() {\r\n return this.to.type || 'text';\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\n\r\nimport { FormlyBulmaFormFieldModule } from '../form-field/form-field.module';\r\nimport { FormlyFieldInputComponent } from './input.type';\r\nimport { CoreModule } from 'src/app/core/core.module';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldInputComponent],\r\n imports: [\r\n CoreModule,\r\n FormlyBulmaFormFieldModule,\r\n FormlyModule.forChild({\r\n types: [\r\n // Standard\r\n {\r\n name: 'input',\r\n component: FormlyFieldInputComponent,\r\n wrappers: ['form-field'],\r\n },\r\n { name: 'string', extends: 'input' },\r\n {\r\n name: 'number',\r\n extends: 'input',\r\n defaultOptions: {\r\n templateOptions: {\r\n type: 'number',\r\n },\r\n },\r\n },\r\n {\r\n name: 'integer',\r\n extends: 'input',\r\n defaultOptions: {\r\n templateOptions: {\r\n type: 'number',\r\n },\r\n },\r\n },\r\n // Table\r\n {\r\n name: 'input-td',\r\n component: FormlyFieldInputComponent,\r\n wrappers: ['form-field-td'],\r\n },\r\n { name: 'string-td', extends: 'input-td' },\r\n {\r\n name: 'number-td',\r\n extends: 'input-td',\r\n defaultOptions: {\r\n templateOptions: {\r\n type: 'number',\r\n },\r\n },\r\n },\r\n {\r\n name: 'integer-td',\r\n extends: 'input-td',\r\n defaultOptions: {\r\n templateOptions: {\r\n type: 'number',\r\n },\r\n },\r\n },\r\n\r\n // Horizontal\r\n {\r\n name: 'input-h',\r\n component: FormlyFieldInputComponent,\r\n wrappers: ['form-field-h'],\r\n },\r\n { name: 'string-h', extends: 'input-h' },\r\n {\r\n name: 'number-h',\r\n extends: 'input-h',\r\n defaultOptions: {\r\n templateOptions: {\r\n type: 'number',\r\n },\r\n },\r\n },\r\n {\r\n name: 'integer-h',\r\n extends: 'input-h',\r\n defaultOptions: {\r\n templateOptions: {\r\n type: 'number',\r\n },\r\n },\r\n },\r\n ],\r\n }),\r\n ],\r\n})\r\nexport class FormlyBulmaInputModule {}\r\n","import { Pipe, NgModule } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { filter, map, tap } from 'rxjs/operators';\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';\nclass FormlySelectOptionsPipe {\n /**\n * @param {?} options\n * @param {?=} field\n * @return {?}\n */\n transform(options, field) {\n if (!(options instanceof Observable)) {\n options = this.observableOf(options, field);\n }\n else {\n this.dispose();\n }\n return ((/** @type {?} */ (options))).pipe(map((/**\n * @param {?} value\n * @return {?}\n */\n value => this.toOptions(value, field || {}))));\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n this.dispose();\n }\n /**\n * @private\n * @param {?} options\n * @param {?} field\n * @return {?}\n */\n toOptions(options, field) {\n /** @type {?} */\n const gOptions = [];\n /** @type {?} */\n const groups = {};\n /** @type {?} */\n const to = field.templateOptions || {};\n to._flatOptions = true;\n options.map((/**\n * @param {?} option\n * @return {?}\n */\n (option) => {\n if (!this.getGroupProp(option, to)) {\n gOptions.push(this.toOption(option, to));\n }\n else {\n to._flatOptions = false;\n if (!groups[this.getGroupProp(option, to)]) {\n groups[this.getGroupProp(option, to)] = [];\n gOptions.push({\n label: this.getGroupProp(option, to),\n group: groups[this.getGroupProp(option, to)],\n });\n }\n groups[this.getGroupProp(option, to)].push(this.toOption(option, to));\n }\n }));\n return gOptions;\n }\n /**\n * @private\n * @param {?} item\n * @param {?} to\n * @return {?}\n */\n toOption(item, to) {\n return {\n label: this.getLabelProp(item, to),\n value: this.getValueProp(item, to),\n disabled: this.getDisabledProp(item, to) || false,\n };\n }\n /**\n * @private\n * @param {?} item\n * @param {?} to\n * @return {?}\n */\n getLabelProp(item, to) {\n if (typeof to.labelProp === 'function') {\n return to.labelProp(item);\n }\n if (this.shouldUseLegacyOption(item, to)) {\n console.warn(`NgxFormly: legacy select option '{key, value}' is deprecated since v5.5, use '{value, label}' instead.`);\n return item.value;\n }\n return item[to.labelProp || 'label'];\n }\n /**\n * @private\n * @param {?} item\n * @param {?} to\n * @return {?}\n */\n getValueProp(item, to) {\n if (typeof to.valueProp === 'function') {\n return to.valueProp(item);\n }\n if (this.shouldUseLegacyOption(item, to)) {\n return item.key;\n }\n return item[to.valueProp || 'value'];\n }\n /**\n * @private\n * @param {?} item\n * @param {?} to\n * @return {?}\n */\n getDisabledProp(item, to) {\n if (typeof to.disabledProp === 'function') {\n return to.disabledProp(item);\n }\n return item[to.disabledProp || 'disabled'];\n }\n /**\n * @private\n * @param {?} item\n * @param {?} to\n * @return {?}\n */\n getGroupProp(item, to) {\n if (typeof to.groupProp === 'function') {\n return to.groupProp(item);\n }\n return item[to.groupProp || 'group'];\n }\n /**\n * @private\n * @param {?} item\n * @param {?} to\n * @return {?}\n */\n shouldUseLegacyOption(item, to) {\n return !to.valueProp\n && !to.labelProp\n && item != null\n && typeof item === 'object'\n && 'key' in item\n && 'value' in item;\n }\n /**\n * @private\n * @return {?}\n */\n dispose() {\n if (this._options) {\n this._options.complete();\n this._options = null;\n }\n if (this._subscription) {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n /**\n * @private\n * @param {?} options\n * @param {?=} f\n * @return {?}\n */\n observableOf(options, f) {\n this.dispose();\n if (f && f.options && f.options.fieldChanges) {\n this._subscription = f.options.fieldChanges.pipe(filter((/**\n * @param {?} __0\n * @return {?}\n */\n ({ property, type, field }) => {\n return type === 'expressionChanges'\n && property.indexOf('templateOptions.options') === 0\n && field === f\n && Array.isArray(field.templateOptions.options)\n && !!this._options;\n })), tap((/**\n * @return {?}\n */\n () => this._options.next((/** @type {?} */ (f.templateOptions.options)))))).subscribe();\n }\n this._options = new BehaviorSubject(options);\n return this._options.asObservable();\n }\n}\nFormlySelectOptionsPipe.ɵfac = function FormlySelectOptionsPipe_Factory(t) { return new (t || FormlySelectOptionsPipe)(); };\nFormlySelectOptionsPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"formlySelectOptions\", type: FormlySelectOptionsPipe, pure: true });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlySelectOptionsPipe, [{\n type: Pipe,\n args: [{ name: 'formlySelectOptions' }]\n }], null, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass FormlySelectModule {\n}\nFormlySelectModule.ɵfac = function FormlySelectModule_Factory(t) { return new (t || FormlySelectModule)(); };\nFormlySelectModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: FormlySelectModule });\nFormlySelectModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlySelectModule, [{\n type: NgModule,\n args: [{\n declarations: [FormlySelectOptionsPipe],\n exports: [FormlySelectOptionsPipe]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(FormlySelectModule, { declarations: [FormlySelectOptionsPipe], exports: [FormlySelectOptionsPipe] }); })();\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 { FormlySelectModule, FormlySelectOptionsPipe };\n\n","
\r\n \r\n \r\n \r\n {{ option.label }}\r\n \r\n
\r\n\r\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n selector: 'app-formly-field-multicheckbox',\r\n templateUrl: './multicheckbox.type.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormlyFieldMultiCheckboxComponent extends FieldType {\r\n defaultOptions = {\r\n templateOptions: {\r\n options: [],\r\n formCheck: 'custom', // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline'\r\n },\r\n };\r\n\r\n onChange(value: any, checked: boolean) {\r\n if (this.to.type === 'array') {\r\n this.formControl.patchValue(\r\n checked\r\n ? [...(this.formControl.value || []), value]\r\n : [...(this.formControl.value || [])].filter((o) => o !== value),\r\n );\r\n } else {\r\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\r\n }\r\n this.formControl.markAsTouched();\r\n }\r\n\r\n isChecked(option: any) {\r\n const value = this.formControl.value;\r\n\r\n return value && (this.to.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyFieldMultiCheckboxComponent } from './multicheckbox.type';\nimport { FormlyBulmaFormFieldModule } from '../form-field/form-field.module';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [FormlyFieldMultiCheckboxComponent],\n imports: [\n CoreModule,\n FormlyBulmaFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckboxComponent,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaMultiCheckboxModule {}\n","import { Component } from '@angular/core';\r\nimport { FieldWrapper } from '@ngx-formly/core';\r\n\r\n@Component({\r\n selector: 'app-formly-wrapper-panel',\r\n template: `\r\n
\r\n
\r\n

{{ to.label }

\r\n

{{ to.description }}

\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n `,\r\n})\r\nexport class PanelWrapperComponent extends FieldWrapper {\r\n}\r\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { PanelWrapperComponent } from './panel-wrapper.component';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [PanelWrapperComponent],\n imports: [\n CoreModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'panel',\n component: PanelWrapperComponent\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaPanelWrapperModule { }\n","\r\n \r\n\r\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n selector: 'app-formly-field-radio',\r\n templateUrl: './radio.type.html',\r\n styleUrls: ['./radio.type.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormlyFieldRadioComponent extends FieldType {\r\n defaultOptions = {\r\n templateOptions: {\r\n options: [],\r\n formCheck: 'vertical', // 'vertical'' | 'horizontal'\r\n },\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyFieldRadioComponent } from './radio.type';\nimport { FormlyBulmaFormFieldModule } from '../form-field/form-field.module';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [FormlyFieldRadioComponent],\n imports: [\n CoreModule,\n FormlyBulmaFormFieldModule,\n FormlySelectModule, // Needed for radio\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadioComponent,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaRadioModule {}\n","\r\n\r\n\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {{ opt.label }}\r\n \r\n \r\n \r\n \r\n {{ child.label }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {{ opt.label }}\r\n \r\n \r\n \r\n \r\n {{ child.label }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewChild,\r\n NgZone,\r\n} from '@angular/core';\r\nimport { FieldType } from '@ngx-formly/core';\r\nimport { SelectControlValueAccessor } from '@angular/forms';\r\nimport { take } from 'rxjs/operators';\r\n\r\n@Component({\r\n // selector: 'app-formly-field-select',\r\n templateUrl: './select.type.html',\r\n styleUrls: ['./select.type.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormlyFieldSelectComponent extends FieldType {\r\n defaultOptions = {\r\n templateOptions: {\r\n options: [],\r\n compareWith(o1: any, o2: any) {\r\n return o1 === o2;\r\n },\r\n },\r\n };\r\n\r\n // workaround for https://github.com/angular/angular/issues/10010\r\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\r\n if (!s) {\r\n return;\r\n }\r\n\r\n const writeValue = s.writeValue.bind(s);\r\n if (s._getOptionId(s.value) === null) {\r\n writeValue(s.value);\r\n }\r\n\r\n s.writeValue = (value: any) => {\r\n const id = s._idCounter;\r\n writeValue(value);\r\n if (value === null) {\r\n this.ngZone.onStable\r\n .asObservable()\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n if (\r\n id !== s._idCounter &&\r\n s._getOptionId(value) === null &&\r\n s._elementRef.nativeElement.selectedIndex !== -1\r\n ) {\r\n writeValue(value);\r\n }\r\n });\r\n }\r\n };\r\n }\r\n\r\n constructor(private ngZone: NgZone) {\r\n super();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyFieldSelectComponent } from './select.type';\nimport { FormlyBulmaFormFieldModule } from '../form-field/form-field.module';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [FormlyFieldSelectComponent],\n imports: [\n CoreModule,\n FormlyBulmaFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n // Standard\n {\n name: 'select',\n component: FormlyFieldSelectComponent,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\n // Horizontal\n {\n name: 'select-h',\n component: FormlyFieldSelectComponent,\n wrappers: ['form-field-h'],\n },\n\n ],\n }),\n ],\n})\nexport class FormlyBulmaSelectModule {}\n","
\n
\n

{{ to.title }}

\n
\n
{{ to.message }}
\n
\n
    \n
  • {{ point }}
  • \n
\n
\n
\n
\n
\n","import { Component } from '@angular/core';\r\nimport { FieldType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n selector: 'app-bulma-statictext',\r\n templateUrl: './statictext.component.html',\r\n styleUrls: ['./statictext.component.scss']\r\n})\r\nexport class FormlyStaticTextComponent extends FieldType {\r\n // A custom (component/formly type) to insert paragraphs into a formly form.\r\n}\r\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyStaticTextComponent } from './statictext.component';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [FormlyStaticTextComponent],\n imports: [\n CoreModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'statictext',\n component: FormlyStaticTextComponent,\n },\n {\n name: 'textdisplay',\n component: FormlyStaticTextComponent,\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaStaticTextModule {}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n selector: 'app-formly-field-textarea',\r\n templateUrl: './textarea.type.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormlyFieldTextAreaComponent extends FieldType {\r\n // FUTURE textarea does not display templateOptions.description. See if other UIs do this.\r\n defaultOptions = {\r\n templateOptions: { rows: 2 }\r\n };\r\n}\r\n","\r\n\r\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyFieldTextAreaComponent } from './textarea.type';\nimport { FormlyBulmaFormFieldModule } from '../form-field/form-field.module';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [FormlyFieldTextAreaComponent],\n imports: [\n CoreModule,\n FormlyBulmaFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'textarea',\n component: FormlyFieldTextAreaComponent,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaTextAreaModule {}\n","

\r\n [min = {{ min }}] <= [count = {{ count }}] <= [max = {{ max }}]\r\n

\r\n\r\n\r\n {{ to.addText }}\r\n\r\n\r\n
\r\n
\r\n

\r\n {{ to.headerText }}\r\n [{{ i + 1 }}]\r\n

\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n {{ to.addText }}\r\n\r\n\r\n

\r\n [min = {{ min }}] <= [count = {{ count }}] <= [max = {{ max }}]\r\n

\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { FieldArrayType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n templateUrl: `./repeat.component.html`,\r\n styleUrls: [`./repeat.component.scss`]\r\n})\r\nexport class RepeatComponent extends FieldArrayType implements OnInit {\r\n\r\n min = 1;\r\n max = 1;\r\n count: number;\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n if (typeof this.to.min !== 'undefined') {\r\n this.min = this.to.min;\r\n }\r\n\r\n if (typeof this.to.max !== 'undefined') {\r\n this.max = this.to.max;\r\n }\r\n\r\n if (this.max < this.min) {\r\n this.max = this.min;\r\n }\r\n\r\n this.updateCount();\r\n }\r\n\r\n updateCount() {\r\n this.count = this.field.fieldGroup.length;\r\n }\r\n\r\n add() {\r\n if ((this.field.fieldGroup.length + 1) <= this.max) {\r\n super.add();\r\n }\r\n this.updateCount();\r\n }\r\n\r\n remove(i) {\r\n if ((this.field.fieldGroup.length) > this.min) {\r\n if (confirm(`Are you sure you wish to delete the selected row?`)) {\r\n super.remove(i);\r\n }\r\n }\r\n this.updateCount();\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { RepeatComponent } from './repeat.component';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [RepeatComponent],\n imports: [\n CoreModule,\n ReactiveFormsModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'repeat',\n component: RepeatComponent\n },\n ],\n }),\n ],\n})\nexport class FormlyRepeatModule { }\n","
\r\n
    \r\n
  • [min = {{ min }}]
  • \r\n
  • [count = {{ count }}] IS NUMBER {{ count | json }}
  • \r\n
  • [max = {{ max }}]
  • \r\n
  • Add Button Caption = \"{{ to.addText }}\"
  • \r\n
\r\n
\r\n\r\n\r\n {{ to.viewText }}\r\n\r\n\r\n\r\n {{ to.addText }}\r\n\r\n\r\n
0\">\r\n
{{ to.headerText }}
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n [{{ i + 1 }}]\r\n
\r\n
\r\n\r\n \r\n\r\n

\r\n [min = {{ min }}] <= [count = {{ count }}] <= [max = {{ max }}]\r\n

\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { FieldArrayType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n templateUrl: `./repeat.table.component.html`,\r\n styleUrls: [`./repeat.table.component.scss`]\r\n})\r\nexport class RepeatTableComponent extends FieldArrayType implements OnInit {\r\n\r\n min = 1;\r\n max = 1;\r\n count: number;\r\n\r\n names: string[];\r\n descs: string[];\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n\r\n if (typeof this.to.min !== 'undefined') {\r\n this.min = this.to.min;\r\n }\r\n\r\n if (typeof this.to.max !== 'undefined') {\r\n this.max = this.to.max;\r\n }\r\n\r\n if (this.max < this.min) {\r\n this.max = this.min;\r\n }\r\n\r\n const to = this.field.templateOptions;\r\n\r\n this.names = [];\r\n this.descs = ['', ''];\r\n this.names.push('Add');\r\n this.names.push('Remove');\r\n if (to.showCount || to.debug) {\r\n this.names.push('Count');\r\n this.descs.push('Dev Only...');\r\n }\r\n\r\n for (const f of this.field.fieldGroup[0].fieldGroup) {\r\n // console.log( JSON.stringify(f) );\r\n let name = f.templateOptions.label + ' ';\r\n if (f.templateOptions.required) {\r\n name += '*';\r\n // } else {\r\n // name += '-';\r\n }\r\n\r\n const desc = `${f.templateOptions.description} `;\r\n this.names.push(name);\r\n this.descs.push(desc);\r\n }\r\n\r\n this.updateCount();\r\n }\r\n\r\n updateCount() {\r\n this.count = this.field.fieldGroup.length;\r\n\r\n if (( this.count === undefined) || ( this.count === null)) {\r\n this.count = 0;\r\n }\r\n }\r\n\r\n /* TODO 02/12/2021 Fix problem with initial RepeatTable display.\r\n Loads collapsed with data. \"add()\" expands but adds a record. Trying to see if I can expand but keep original count. */\r\n view() {\r\n // if ((this.field.fieldGroup.length + 1) <= this.max) {\r\n // super.add();\r\n // }\r\n this.updateCount();\r\n }\r\n\r\n add() {\r\n if ((this.field.fieldGroup.length + 1) <= this.max) {\r\n super.add();\r\n }\r\n this.updateCount();\r\n }\r\n\r\n remove(i) {\r\n if ((this.field.fieldGroup.length) > this.min) {\r\n if (confirm(`Are you sure you wish to delete the selected row?`)) {\r\n super.remove(i);\r\n }\r\n }\r\n this.updateCount();\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { RepeatTableComponent } from './repeat.table.component';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [RepeatTableComponent],\n imports: [\n CoreModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'repeatTable',\n component: RepeatTableComponent\n },\n ],\n }),\n ],\n})\nexport class FormlyRepeatTableModule { }\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType } from '@ngx-formly/core';\r\n\r\n@Component({\r\n selector: 'app-formly-field-password',\r\n templateUrl: './password.type.html',\r\n styleUrls: ['./password.type.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormlyFieldPasswordComponent extends FieldType {\r\n\r\n fieldType = 'password';\r\n\r\n /*\r\n Preferred template layout would have password field and button touching as one unit.\r\n Bulma uses the following around the button:\r\n ... \r\n\r\n Unfortunately this somehow prevents the click handler from being triggered.\r\n\r\n Went with other styling options.\r\n */\r\n\r\n constructor(\r\n ) {\r\n super();\r\n }\r\n\r\n get type() {\r\n return this.to.type || 'text';\r\n }\r\n\r\n toggle() {\r\n if (this.fieldType === 'password') {\r\n this.fieldType = 'text';\r\n } else {\r\n this.fieldType = 'password';\r\n }\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n","import { NgModule } from '@angular/core';\nimport { FormlyModule } from '@ngx-formly/core';\n\nimport { FormlyBulmaFormFieldModule } from '../form-field/form-field.module';\nimport { FormlyFieldPasswordComponent } from './password.type';\nimport { CoreModule } from 'src/app/core/core.module';\n\n@NgModule({\n declarations: [\n FormlyFieldPasswordComponent\n ],\n imports: [\n CoreModule,\n FormlyBulmaFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'password',\n component: FormlyFieldPasswordComponent,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBulmaPasswordModule { }\n","import { AbstractControl } from '@angular/forms';\r\nimport { FormlyBulmaCheckboxModule } from './checkbox/checkbox.module';\r\nimport { FormlyBulmaColorModule } from './color/color.module';\r\nimport { FormlyBulmaFileModule } from './file/file.module';\r\nimport { FormlyBulmaFormFieldHorizontalModule } from './form-field-horiz/form-field-horiz.module';\r\nimport { FormlyBulmaFormFieldTableDataModule } from './form-field-td/form-field-td.module';\r\nimport { FormlyBulmaInputModule } from './input/input.module';\r\nimport { FormlyBulmaMultiCheckboxModule } from './multicheckbox/multicheckbox.module';\r\nimport { FormlyBulmaPanelWrapperModule } from './panel/panel-wrapper.module';\r\nimport { FormlyBulmaRadioModule } from './radio/radio.module';\r\nimport { FormlyBulmaSelectModule } from './select/select.module';\r\nimport { FormlyBulmaStaticTextModule } from './statictext/statictext.module';\r\nimport { FormlyBulmaTextAreaModule } from './textarea/textarea.module';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlyRepeatModule } from './repeat/repeat.module';\r\nimport { FormlyRepeatTableModule } from './repeat-table/repeat.table.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { FormlyBulmaPasswordModule } from './password/password.module';\r\n\r\n// REFACTOR Move bulma-ui into a separate library project.\r\n\r\nexport function minlengthValidationMessage(err, field) {\r\n return `${field.templateOptions.label} must have at least ${field.templateOptions.minLength} characters`;\r\n}\r\n\r\nexport function maxlengthValidationMessage(err, field) {\r\n return `${field.templateOptions.label} must be less than ${field.templateOptions.maxLength} characters`;\r\n}\r\n\r\nexport function minValidationMessage(err, field) {\r\n return `${field.templateOptions.label} must be more than ${field.templateOptions.min}`;\r\n}\r\n\r\nexport function maxValidationMessage(err, field) {\r\n return `${field.templateOptions.label} must be less than ${field.templateOptions.max}`;\r\n}\r\n\r\nexport function requiredMessage(err, field) {\r\n return `${field.templateOptions.label} is required`;\r\n}\r\n\r\nexport function patternValidationMessage(err, field) {\r\n return `${field.templateOptions.label} does not match the expected format.`;\r\n}\r\n\r\nexport function passwordMatchValidator(control: AbstractControl) {\r\n const { password, passwordConfirm } = control.value;\r\n\r\n // avoid displaying the message error when values are empty\r\n if (!passwordConfirm || !password) {\r\n return null;\r\n }\r\n\r\n if (passwordConfirm === password) {\r\n return null;\r\n }\r\n\r\n return { fieldMatch: { message: 'Passwords do not match.' } };\r\n}\r\n\r\nexport function emailMatchValidator(control: AbstractControl) {\r\n const { email, emailConfirm } = control.value;\r\n\r\n // avoid displaying the message error when values are empty\r\n if (!emailConfirm || !email) {\r\n // console.log(`emailMatchValidator`, email, emailConfirm, 'One is empty');\r\n return null;\r\n }\r\n\r\n if (emailConfirm === email) {\r\n // console.log(`emailMatchValidator`, email, emailConfirm, 'They match');\r\n return null;\r\n }\r\n\r\n // console.log(`emailMatchValidator`, email, emailConfirm, 'NO MATCH');\r\n\r\n return { fieldMatch: { message: 'Emails do not match.' } };\r\n}\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n FormlyBulmaCheckboxModule,\r\n FormlyBulmaColorModule,\r\n FormlyBulmaFileModule,\r\n FormlyBulmaFormFieldHorizontalModule,\r\n FormlyBulmaFormFieldTableDataModule,\r\n FormlyBulmaInputModule,\r\n FormlyBulmaMultiCheckboxModule,\r\n FormlyBulmaPanelWrapperModule,\r\n FormlyBulmaPasswordModule,\r\n FormlyBulmaRadioModule,\r\n FormlyBulmaSelectModule,\r\n FormlyBulmaStaticTextModule,\r\n FormlyBulmaTextAreaModule,\r\n FormlyRepeatModule,\r\n FormlyRepeatTableModule,\r\n FormlyModule.forRoot({\r\n validators: [\r\n { name: 'passwordMatch', validation: passwordMatchValidator },\r\n { name: 'emailMatch', validation: emailMatchValidator }\r\n ],\r\n validationMessages: [\r\n { name: 'required', message: requiredMessage },\r\n { name: 'minlength', message: minlengthValidationMessage },\r\n { name: 'maxlength', message: maxlengthValidationMessage },\r\n { name: 'min', message: minValidationMessage },\r\n { name: 'max', message: maxValidationMessage },\r\n { name: 'pattern', message: patternValidationMessage },\r\n ],\r\n }),\r\n\r\n ]\r\n})\r\nexport class FormlyBulmaModule { }\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\n\r\n@Component({\r\n selector: 'app-page-footer',\r\n templateUrl: './page-footer.component.html',\r\n styleUrls: ['./page-footer.component.scss']\r\n})\r\nexport class PageFooterComponent implements OnInit {\r\n\r\n now: Date;\r\n version: string;\r\n urlAbs: string;\r\n urlAbsFastApp: string;\r\n\r\n constructor(\r\n private logger: NGXLogger,\r\n public svc: SharedService,\r\n ) {\r\n this.version = svc.config.getVersion();\r\n }\r\n\r\n ngOnInit() {\r\n this.now = new Date();\r\n this.urlAbs = this.svc.abs.urlAbs;\r\n this.urlAbsFastApp = this.svc.abs.urlAbsFastApp;\r\n }\r\n\r\n getYear() {\r\n return this.now.getFullYear();\r\n }\r\n}\r\n","
\n \n
\n","\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
ordinalpageNamelabelisVisitedisCurrentisVisibleerrCountlastAccessisSubmit
{{item.ordinal}}{{item.pageName}}{{item.label}}{{item.isVisited}}{{item.isCurrent}}{{item.isVisible}}{{item.errCount}}{{item.lastAccess}}{{item.isSubmit}}
\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-pages-info-view',\r\n templateUrl: './pages-info-view.component.html',\r\n styleUrls: ['./pages-info-view.component.scss']\r\n})\r\nexport class PagesInfoViewComponent {\r\n\r\n @Input() pagesInfo: object; /* TODO 06/12/2023 create TS type instead of any */\r\n}\r\n","import { AngularBillboardModule } from 'angular-billboard';\r\nimport { ApplicantHeaderComponent } from './applicant-header/applicant-header.component';\r\nimport { AvatarsListComponent } from './avatars-list/avatars-list.component';\r\nimport { BankLogoComponent } from './bank-logo/bank-logo.component';\r\nimport { BankPageHeaderComponent } from './bank-page-header/bank-page-header.component';\r\nimport { BulmaModule } from './bulma-ui/bulma.module';\r\nimport { CoreModule } from '../core/core.module';\r\nimport { DisplayStatusMessageComponent } from './display-status-message/display-status-message.component';\r\nimport { ForgottenPasswordComponent } from './forgotten-password/forgotten-password.component';\r\nimport { FormlyBulmaModule } from './ngx-formly/ui-bulma/bulma.module';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { LoadingSpinnerComponent } from './loading-spinner/loading-spinner.component';\r\nimport { LogPipe } from './pipes/log-pipe/log.pipe';\r\nimport { NgModule } from '@angular/core';\r\nimport { PageFooterComponent } from './page-footer/page-footer.component';\r\nimport { ProgressBarComponent } from './progress-bar/progress-bar.component';\r\nimport { SafeJsonPipe } from './pipes/safe-json-pipe/safe-json.pipe';\r\nimport { ScreenDumpJsonComponent } from './screen-dump-json/screen-dump-json.component';\r\nimport { SignatureComponent } from './signature/signature.component';\r\nimport { ValidPasswordComponent } from './valid-password/valid-password.component';\r\nimport { RenderCellBooleanComponent } from './cell-renderer/render-cell-boolean/render-cell-boolean.component';\r\nimport { RenderViewAppDetailsComponent } from './cell-renderer/render-view-app-details/render-view-app-details.component';\r\nimport { CheckboxRendererComponent } from './cell-renderer/checkbox-renderer/checkbox-renderer.component';\r\nimport { TemplateRendererComponent } from './cell-renderer/template-renderer/template-renderer.component';\r\nimport { CelRendererSchemaEditComponent } from './cell-renderer/cel-renderer-schema-edit/cel-renderer-schema-edit.component';\r\nimport { CelRendererSchemaSaveAsComponent } from './cell-renderer/cel-renderer-schema-save-as/cel-renderer-schema-save-as.component';\r\nimport { AgGridModule } from 'ag-grid-angular';\r\nimport { ButtonRendererComponent } from './cell-renderer/button-renderer/button-renderer.component';\r\nimport { PagesInfoViewComponent } from './pages-info-view/pages-info-view.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n ApplicantHeaderComponent,\r\n AvatarsListComponent,\r\n BankLogoComponent,\r\n BankPageHeaderComponent,\r\n ButtonRendererComponent,\r\n CelRendererSchemaEditComponent,\r\n CelRendererSchemaSaveAsComponent,\r\n CheckboxRendererComponent,\r\n DisplayStatusMessageComponent,\r\n ForgottenPasswordComponent,\r\n LoadingSpinnerComponent,\r\n LogPipe,\r\n PageFooterComponent,\r\n ProgressBarComponent,\r\n RenderCellBooleanComponent,\r\n RenderViewAppDetailsComponent,\r\n SafeJsonPipe,\r\n ScreenDumpJsonComponent,\r\n SignatureComponent,\r\n TemplateRendererComponent,\r\n ValidPasswordComponent,\r\n PagesInfoViewComponent,\r\n ],\r\n imports: [\r\n AgGridModule,\r\n AngularBillboardModule,\r\n BulmaModule,\r\n CoreModule,\r\n FormlyBulmaModule,\r\n FormlyModule.forRoot(),\r\n FormsModule,\r\n ],\r\n exports: [\r\n AgGridModule,\r\n AngularBillboardModule,\r\n ApplicantHeaderComponent,\r\n AvatarsListComponent,\r\n BankLogoComponent,\r\n BankPageHeaderComponent,\r\n BulmaModule,\r\n DisplayStatusMessageComponent,\r\n ForgottenPasswordComponent,\r\n FormlyBulmaModule,\r\n LoadingSpinnerComponent,\r\n PageFooterComponent,\r\n ProgressBarComponent,\r\n RenderCellBooleanComponent,\r\n ScreenDumpJsonComponent,\r\n SignatureComponent,\r\n ValidPasswordComponent,\r\n PagesInfoViewComponent,\r\n ],\r\n})\r\nexport class SharedModule {}\r\n","import { ExtendedListItemType } from 'src/app/types';\r\nimport { Injectable } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n\r\nexport const BLANK_JSON_ARRAY = JSON.parse('[]');\r\nexport const BLANK_JSON_OBJECT = JSON.parse('{}');\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class UtilFunctionsService {\r\n DEFAULT_DATE_DELIMITER = '/';\r\n\r\n constructor(private logger: NGXLogger) {}\r\n\r\n /*\r\n Format JSON object into a string, configurable indentation and circular references handled.\r\n https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value#Examples\r\n */\r\n jsonToString(json: object, indent = 2): string {\r\n const getCircularReplacer = () => {\r\n const seen = new WeakSet();\r\n return (key, value) => {\r\n if (typeof value === 'object' && value !== null) {\r\n if (seen.has(value)) {\r\n return '[CIRCULAR REFERENCE]';\r\n }\r\n seen.add(value);\r\n }\r\n return value;\r\n };\r\n };\r\n\r\n return JSON.stringify(json, getCircularReplacer(), indent);\r\n }\r\n\r\n /* REFACTOR 06/07/2022 Duplicate. Consolidate ASAP */\r\n strToFunction(str: string) {\r\n try {\r\n const fx = eval('var f = function(){ return ' + str + ';}; f() ;');\r\n return fx;\r\n } catch (error) {\r\n this.logger.error(error);\r\n this.logger.error(`INPUT: ${str}`);\r\n }\r\n }\r\n\r\n isDefined(obj) {\r\n return typeof obj !== 'undefined';\r\n }\r\n\r\n logBrowserSize() {\r\n const object = {\r\n window: {\r\n innerWidth,\r\n innerHeight,\r\n },\r\n };\r\n this.logger.info('BROWSER SIZE', object);\r\n }\r\n\r\n /*\r\n https://stackoverflow.com/questions/26049303/how-to-compare-two-json-have-the-same-properties-without-order\r\n */\r\n jsonIsEqual(obj1: object, obj2: object): boolean {\r\n const keys1 = Object.keys(obj1);\r\n const keys2 = Object.keys(obj2);\r\n\r\n // return true when the two json has same length and all the properties has same value key by key\r\n return (\r\n keys1.length === keys2.length &&\r\n Object.keys(obj1).every((key) => obj1[key] === obj2[key])\r\n );\r\n }\r\n\r\n Base64Encode(input: string): string {\r\n const result = btoa(input);\r\n return result;\r\n }\r\n\r\n Base64Decode(input: string): string {\r\n const result = atob(input);\r\n return result;\r\n }\r\n\r\n getDefaultVerbiage(): string {\r\n return `
\r\n

Authorization Amendment

\r\n

\r\n Checking 'Authorize' below applies to the acknowledgment of the following statement:\r\n

\r\n

\r\n This is not a commitment to lend or to open an account.\r\n Everything that I have stated in this application is correct to the best of my knowledge. I understand that you will\r\n retain this information whether or not the loan is approved. By submitting this application, I authorize you to check\r\n my credit and employment history and to verify and re-verify any other information contained herein.\r\n

\r\n
`;\r\n }\r\n\r\n padTo2Digits(num: number): string {\r\n return num.toString().padStart(2, '0');\r\n }\r\n\r\n validDateDelimiter(delim: string): boolean {\r\n switch (delim) {\r\n case '-':\r\n case '/':\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n private _formatDateAsMMDDYYYY(date: Date, delim?: string): string {\r\n if (!this.validDateDelimiter(delim)) {\r\n delim = this.DEFAULT_DATE_DELIMITER;\r\n }\r\n return [\r\n this.padTo2Digits(date.getMonth() + 1),\r\n this.padTo2Digits(date.getDate()),\r\n date.getFullYear(),\r\n ].join(delim);\r\n }\r\n\r\n formatDateAsMMDDYYYY(date: Date, delim?: string): string {\r\n try {\r\n return this._formatDateAsMMDDYYYY(date, delim);\r\n } catch (error) {\r\n this.logger.error(error);\r\n return this._formatDateAsMMDDYYYY(date, delim);\r\n }\r\n }\r\n\r\n private _formatDateAsYYYYMMDD(date: Date, delim?: string): string {\r\n if (!this.validDateDelimiter(delim)) {\r\n delim = this.DEFAULT_DATE_DELIMITER;\r\n }\r\n return [\r\n date.getFullYear(),\r\n this.padTo2Digits(date.getMonth() + 1),\r\n this.padTo2Digits(date.getDate()),\r\n ].join(delim);\r\n }\r\n\r\n formatDateAsYYYYMMDD(date: Date, delim?: string): string {\r\n try {\r\n return this._formatDateAsYYYYMMDD(date, delim);\r\n } catch (error) {\r\n this.logger.error(error);\r\n return this._formatDateAsYYYYMMDD(date, delim);\r\n }\r\n }\r\n\r\n makeList_WYSIWYG(list: ExtendedListItemType[]): ExtendedListItemType[] {\r\n list.forEach((element) => {\r\n element.value = element.label;\r\n });\r\n return list;\r\n }\r\n\r\n listSort(list: ExtendedListItemType[]): ExtendedListItemType[] {\r\n return list.sort((a, b) => a.orderby - b.orderby);\r\n }\r\n\r\n convertYYYYMMDD_MMDDYY(input) {\r\n const piece = input.toString().split('-');\r\n return [piece[1], piece[2], piece[0]].join('/');\r\n }\r\n\r\n JSONPath(root: object, path: string): object {\r\n const parts = path.split('.');\r\n let value: object; // initialize???\r\n parts.forEach((part) => {\r\n if (part === '$') {\r\n value = root;\r\n } else {\r\n value = value[part];\r\n if (typeof value === 'undefined') {\r\n return null;\r\n }\r\n }\r\n });\r\n return value;\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\n// import { CacheBusterService } from './services/cache-buster/cache-buster.service';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: './app.component.html',\r\n styleUrls: ['./app.component.scss'],\r\n})\r\nexport class AppComponent {\r\n title = 'FastApp';\r\n\r\n constructor(\r\n private logger: NGXLogger,\r\n // private cacheBuster: CacheBusterService\r\n ) {}\r\n}\r\n","
\r\n \r\n
\r\n","import * as i0 from '@angular/core';\nimport { ElementRef, Injector, Directive, EventEmitter, Inject, Output, NgModule } from '@angular/core';\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 */\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nfunction throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nfunction throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nfunction throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nfunction throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.');\n}\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nfunction throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nfunction throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a 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 * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nclass Portal {\n /** Attach this portal to a host. */\n attach(host) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n this._attachedHost = host;\n return host.attach(this);\n }\n /** Detach this portal from its host */\n detach() {\n let host = this._attachedHost;\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n /** Whether this portal is attached to a host. */\n get isAttached() {\n return this._attachedHost != null;\n }\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host) {\n this._attachedHost = host;\n }\n}\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nclass ComponentPortal extends Portal {\n constructor(component, viewContainerRef, injector, componentFactoryResolver, projectableNodes) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.componentFactoryResolver = componentFactoryResolver;\n this.projectableNodes = projectableNodes;\n }\n}\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nclass TemplatePortal extends Portal {\n constructor(\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n templateRef, \n /** Reference to the ViewContainer into which the template will be stamped out. */\n viewContainerRef, \n /** Contextual data to be passed in to the embedded view. */\n context, \n /** The injector to use for the embedded view. */\n injector) {\n super();\n this.templateRef = templateRef;\n this.viewContainerRef = viewContainerRef;\n this.context = context;\n this.injector = injector;\n }\n get origin() {\n return this.templateRef.elementRef;\n }\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n attach(host, context = this.context) {\n this.context = context;\n return super.attach(host);\n }\n detach() {\n this.context = undefined;\n return super.detach();\n }\n}\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nclass DomPortal extends Portal {\n constructor(element) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nclass BasePortalOutlet {\n constructor() {\n /** Whether this host has already been permanently disposed. */\n this._isDisposed = false;\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n this.attachDomPortal = null;\n }\n /** Whether this host has an attached portal. */\n hasAttached() {\n return !!this._attachedPortal;\n }\n /** Attaches a portal. */\n attach(portal) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n }\n else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n }\n else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n /** Detaches a previously attached portal. */\n detach() {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n this._invokeDisposeFn();\n }\n /** Permanently dispose of this portal host. */\n dispose() {\n if (this.hasAttached()) {\n this.detach();\n }\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n /** @docs-private */\n setDisposeFn(fn) {\n this._disposeFn = fn;\n }\n _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n/**\n * @deprecated Use `BasePortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass BasePortalHost extends BasePortalOutlet {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code 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 PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nclass DomPortalOutlet extends BasePortalOutlet {\n /**\n * @param outletElement Element into which the content is projected.\n * @param _componentFactoryResolver Used to resolve the component factory.\n * Only required when attaching component portals.\n * @param _appRef Reference to the application. Only used in component portals when there\n * is no `ViewContainerRef` available.\n * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't\n * have one. Only used for component portals.\n * @param _document Reference to the document. Used when attaching a DOM portal. Will eventually\n * become a required parameter.\n */\n constructor(\n /** Element into which the content is projected. */\n outletElement, _componentFactoryResolver, _appRef, _defaultInjector, \n /**\n * @deprecated `_document` Parameter to be made required.\n * @breaking-change 10.0.0\n */\n _document) {\n super();\n this.outletElement = outletElement;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._appRef = _appRef;\n this._defaultInjector = _defaultInjector;\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n // @breaking-change 10.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n element.parentNode.insertBefore(anchorNode, element);\n this.outletElement.appendChild(element);\n this._attachedPortal = portal;\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n this._document = _document;\n }\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal(portal) {\n const resolver = (portal.componentFactoryResolver || this._componentFactoryResolver);\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !resolver) {\n throw Error('Cannot attach component portal to outlet without a ComponentFactoryResolver.');\n }\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n let componentRef;\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector, portal.projectableNodes || undefined);\n this.setDisposeFn(() => componentRef.destroy());\n }\n else {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {\n throw Error('Cannot attach component portal to outlet without an ApplicationRef.');\n }\n componentRef = componentFactory.create(portal.injector || this._defaultInjector || Injector.NULL);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n // Verify that the ApplicationRef has registered views before trying to detach a host view.\n // This check also protects the `detachView` from being called on a destroyed ApplicationRef.\n if (this._appRef.viewCount > 0) {\n this._appRef.detachView(componentRef.hostView);\n }\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n this._attachedPortal = portal;\n return componentRef;\n }\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n this.setDisposeFn(() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n this._attachedPortal = portal;\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n /**\n * Clears out a portal from the DOM.\n */\n dispose() {\n super.dispose();\n this.outletElement.remove();\n }\n /** Gets the root HTMLElement for an instantiated component. */\n _getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }\n}\n/**\n * @deprecated Use `DomPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass DomPortalHost extends DomPortalOutlet {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\nclass CdkPortal extends TemplatePortal {\n constructor(templateRef, viewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\nCdkPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkPortal, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkPortal.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkPortal, selector: \"[cdkPortal]\", exportAs: [\"cdkPortal\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkPortal, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });\n/**\n * @deprecated Use `CdkPortal` instead.\n * @breaking-change 9.0.0\n */\nclass TemplatePortalDirective extends CdkPortal {\n}\nTemplatePortalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: TemplatePortalDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nTemplatePortalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: TemplatePortalDirective, selector: \"[cdk-portal], [portal]\", providers: [\n {\n provide: CdkPortal,\n useExisting: TemplatePortalDirective,\n },\n ], exportAs: [\"cdkPortal\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: TemplatePortalDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdk-portal], [portal]',\n exportAs: 'cdkPortal',\n providers: [\n {\n provide: CdkPortal,\n useExisting: TemplatePortalDirective,\n },\n ],\n }]\n }] });\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * ``\n */\nclass CdkPortalOutlet extends BasePortalOutlet {\n constructor(_componentFactoryResolver, _viewContainerRef, \n /**\n * @deprecated `_document` parameter to be made required.\n * @breaking-change 9.0.0\n */\n _document) {\n super();\n this._componentFactoryResolver = _componentFactoryResolver;\n this._viewContainerRef = _viewContainerRef;\n /** Whether the portal component is initialized. */\n this._isInitialized = false;\n /** Emits when a portal is attached to the outlet. */\n this.attached = new EventEmitter();\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n // @breaking-change 9.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n portal.setAttachedHost(this);\n element.parentNode.insertBefore(anchorNode, element);\n this._getRootNode().appendChild(element);\n this._attachedPortal = portal;\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n this._document = _document;\n }\n /** Portal associated with the Portal outlet. */\n get portal() {\n return this._attachedPortal;\n }\n set portal(portal) {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `
`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n if (this.hasAttached()) {\n super.detach();\n }\n if (portal) {\n super.attach(portal);\n }\n this._attachedPortal = portal || null;\n }\n /** Component or view reference that is attached to the portal. */\n get attachedRef() {\n return this._attachedRef;\n }\n ngOnInit() {\n this._isInitialized = true;\n }\n ngOnDestroy() {\n super.dispose();\n this._attachedRef = this._attachedPortal = null;\n }\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal(portal) {\n portal.setAttachedHost(this);\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector, portal.projectableNodes || undefined);\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild(ref.hostView.rootNodes[0]);\n }\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n return ref;\n }\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n super.setDisposeFn(() => this._viewContainerRef.clear());\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n return viewRef;\n }\n /** Gets the root node of the portal outlet. */\n _getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE\n ? nativeElement\n : nativeElement.parentNode);\n }\n}\nCdkPortalOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkPortalOutlet, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });\nCdkPortalOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: { portal: [\"cdkPortalOutlet\", \"portal\"] }, outputs: { attached: \"attached\" }, exportAs: [\"cdkPortalOutlet\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkPortalOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n inputs: ['portal: cdkPortalOutlet'],\n }]\n }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { attached: [{\n type: Output\n }] } });\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass PortalHostDirective extends CdkPortalOutlet {\n}\nPortalHostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PortalHostDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nPortalHostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: PortalHostDirective, selector: \"[cdkPortalHost], [portalHost]\", inputs: { portal: [\"cdkPortalHost\", \"portal\"] }, providers: [\n {\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective,\n },\n ], exportAs: [\"cdkPortalHost\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PortalHostDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalHost',\n inputs: ['portal: cdkPortalHost'],\n providers: [\n {\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective,\n },\n ],\n }]\n }] });\nclass PortalModule {\n}\nPortalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PortalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nPortalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PortalModule, declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective] });\nPortalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PortalModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PortalModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\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 * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * @docs-private\n * @deprecated Use `Injector.create` instead.\n * @breaking-change 11.0.0\n */\nclass PortalInjector {\n constructor(_parentInjector, _customTokens) {\n this._parentInjector = _parentInjector;\n this._customTokens = _customTokens;\n }\n get(token, notFoundValue) {\n const value = this._customTokens.get(token);\n if (typeof value !== 'undefined') {\n return value;\n }\n return this._parentInjector.get(token, 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/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BasePortalHost, BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, DomPortalHost, DomPortalOutlet, Portal, PortalHostDirective, PortalInjector, PortalModule, TemplatePortal, TemplatePortalDirective };\n","import { ElementRef } 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/** Coerces a data-bound value (typically a string) to a boolean. */\nfunction coerceBooleanProperty(value) {\n return 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 */\nfunction coerceNumberProperty(value, fallbackValue = 0) {\n return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nfunction _isNumberValue(value) {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value)) && !isNaN(Number(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 coerceArray(value) {\n return Array.isArray(value) ? value : [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/** Coerces a value to a CSS pixel value. */\nfunction coerceCssPixelValue(value) {\n if (value == null) {\n return '';\n }\n return typeof value === 'string' ? value : `${value}px`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Coerces an ElementRef or an Element into an element.\n * Useful for APIs that can accept either a ref or the native element itself.\n */\nfunction coerceElement(elementOrRef) {\n return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Coerces a value to an array of trimmed non-empty strings.\n * Any input that is not an array, `null` or `undefined` will be turned into a string\n * via `toString()` and subsequently split with the given separator.\n * `null` and `undefined` will result in an empty array.\n * This results in the following outcomes:\n * - `null` -> `[]`\n * - `[null]` -> `[\"null\"]`\n * - `[\"a\", \"b \", \" \"]` -> `[\"a\", \"b\"]`\n * - `[1, [2, 3]]` -> `[\"1\", \"2,3\"]`\n * - `[{ a: 0 }]` -> `[\"[object Object]\"]`\n * - `{ a: 0 }` -> `[\"[object\", \"Object]\"]`\n *\n * Useful for defining CSS classes or table columns.\n * @param value the value to coerce into an array of strings\n * @param separator split-separator if value isn't an array\n */\nfunction coerceStringArray(value, separator = /\\s+/) {\n const result = [];\n if (value != null) {\n const sourceValues = Array.isArray(value) ? value : `${value}`.split(separator);\n for (const sourceValue of sourceValues) {\n const trimmedString = `${sourceValue}`.trim();\n if (trimmedString) {\n result.push(trimmedString);\n }\n }\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport { _isNumberValue, coerceArray, coerceBooleanProperty, coerceCssPixelValue, coerceElement, coerceNumberProperty, coerceStringArray };\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 this.scheduled = undefined;\n const { actions } = this;\n let error;\n let index = -1;\n let count = actions.length;\n action = action || actions.shift();\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (++index < count && (action = actions.shift()));\n this.active = false;\n if (error) {\n while (++index < count && (action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\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 = requestAnimationFrame(() => scheduler.flush(null)));\n }\n recycleAsyncId(scheduler, id, delay = 0) {\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n if (scheduler.actions.length === 0) {\n cancelAnimationFrame(id);\n scheduler.scheduled = undefined;\n }\n return undefined;\n }\n}\n","let nextHandle = 1;\nconst RESOLVED = (() => Promise.resolve())();\nconst activeHandles = {};\nfunction findAndClearHandle(handle) {\n if (handle in activeHandles) {\n delete activeHandles[handle];\n return true;\n }\n return false;\n}\nexport const Immediate = {\n setImmediate(cb) {\n const handle = nextHandle++;\n activeHandles[handle] = true;\n RESOLVED.then(() => findAndClearHandle(handle) && cb());\n return handle;\n },\n clearImmediate(handle) {\n findAndClearHandle(handle);\n },\n};\nexport const TestTools = {\n pending() {\n return Object.keys(activeHandles).length;\n }\n};\n","import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\nexport const asapScheduler = new AsapScheduler(AsapAction);\nexport const asap = asapScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\nexport class AsapScheduler extends AsyncScheduler {\n flush(action) {\n this.active = true;\n this.scheduled = undefined;\n const { actions } = this;\n let error;\n let index = -1;\n let count = actions.length;\n action = action || actions.shift();\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (++index < count && (action = actions.shift()));\n this.active = false;\n if (error) {\n while (++index < count && (action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { Immediate } from '../util/Immediate';\nimport { AsyncAction } from './AsyncAction';\nexport class AsapAction 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 = Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));\n }\n recycleAsyncId(scheduler, id, delay = 0) {\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n if (scheduler.actions.length === 0) {\n Immediate.clearImmediate(id);\n scheduler.scheduled = undefined;\n }\n return undefined;\n }\n}\n","import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function audit(durationSelector) {\n return function auditOperatorFunction(source) {\n return source.lift(new AuditOperator(durationSelector));\n };\n}\nclass AuditOperator {\n constructor(durationSelector) {\n this.durationSelector = durationSelector;\n }\n call(subscriber, source) {\n return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));\n }\n}\nclass AuditSubscriber extends SimpleOuterSubscriber {\n constructor(destination, durationSelector) {\n super(destination);\n this.durationSelector = durationSelector;\n this.hasValue = false;\n }\n _next(value) {\n this.value = value;\n this.hasValue = true;\n if (!this.throttled) {\n let duration;\n try {\n const { durationSelector } = this;\n duration = durationSelector(value);\n }\n catch (err) {\n return this.destination.error(err);\n }\n const innerSubscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n if (!innerSubscription || innerSubscription.closed) {\n this.clearThrottle();\n }\n else {\n this.add(this.throttled = innerSubscription);\n }\n }\n }\n clearThrottle() {\n const { value, hasValue, throttled } = this;\n if (throttled) {\n this.remove(throttled);\n this.throttled = undefined;\n throttled.unsubscribe();\n }\n if (hasValue) {\n this.value = undefined;\n this.hasValue = false;\n this.destination.next(value);\n }\n }\n notifyNext() {\n this.clearThrottle();\n }\n notifyComplete() {\n this.clearThrottle();\n }\n}\n","import { isArray } from './isArray';\nexport function isNumeric(val) {\n return !isArray(val) && (val - parseFloat(val) + 1) >= 0;\n}\n","import { Observable } from '../Observable';\nimport { async } from '../scheduler/async';\nimport { isNumeric } from '../util/isNumeric';\nimport { isScheduler } from '../util/isScheduler';\nexport function timer(dueTime = 0, periodOrScheduler, scheduler) {\n let period = -1;\n if (isNumeric(periodOrScheduler)) {\n period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);\n }\n else if (isScheduler(periodOrScheduler)) {\n scheduler = periodOrScheduler;\n }\n if (!isScheduler(scheduler)) {\n scheduler = async;\n }\n return new Observable(subscriber => {\n const due = isNumeric(dueTime)\n ? dueTime\n : (+dueTime - scheduler.now());\n return scheduler.schedule(dispatch, due, {\n index: 0, period, subscriber\n });\n });\n}\nfunction dispatch(state) {\n const { index, period, subscriber } = state;\n subscriber.next(index);\n if (subscriber.closed) {\n return;\n }\n else if (period === -1) {\n return subscriber.complete();\n }\n state.index = index + 1;\n this.schedule(state, period);\n}\n","import { async } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = async) {\n return audit(() => timer(duration, scheduler));\n}\n","import * as i0 from '@angular/core';\nimport { PLATFORM_ID, Injectable, Inject, NgModule } from '@angular/core';\nimport { isPlatformBrowser } 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 */\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator;\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = typeof Intl !== 'undefined' && Intl.v8BreakIterator;\n}\ncatch {\n hasV8BreakIterator = false;\n}\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\nclass Platform {\n constructor(_platformId) {\n this._platformId = _platformId;\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n this.isBrowser = this._platformId\n ? isPlatformBrowser(this._platformId)\n : typeof document === 'object' && !!document;\n /** Whether the current browser is Microsoft Edge. */\n this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n /** Whether the current rendering engine is Microsoft Trident. */\n this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n this.BLINK = this.isBrowser &&\n !!(window.chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' &&\n !this.EDGE &&\n !this.TRIDENT;\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n this.WEBKIT = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) &&\n !this.BLINK &&\n !this.EDGE &&\n !this.TRIDENT;\n /** Whether the current platform is Apple iOS. */\n this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n }\n}\nPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Platform, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Platform, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Platform, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [PLATFORM_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 */\nclass PlatformModule {\n}\nPlatformModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PlatformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nPlatformModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PlatformModule });\nPlatformModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PlatformModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PlatformModule, 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/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes;\n/** Types of `` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n/** @returns The input types supported by this browser. */\nfunction getSupportedInputTypes() {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n return supportedInputTypes;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents;\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nfunction supportsPassiveEventListeners() {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n get: () => (supportsPassiveEvents = true),\n }));\n }\n finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n return supportsPassiveEvents;\n}\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nfunction normalizePassiveListenerOptions(options) {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType;\n/** Cached result of the check that indicates whether the browser supports scroll behaviors. */\nlet scrollBehaviorSupported;\n/** Check whether the browser supports scroll behaviors. */\nfunction supportsScrollBehavior() {\n if (scrollBehaviorSupported == null) {\n // If we're not in the browser, it can't be supported. Also check for `Element`, because\n // some projects stub out the global `document` during SSR which can throw us off.\n if (typeof document !== 'object' || !document || typeof Element !== 'function' || !Element) {\n scrollBehaviorSupported = false;\n return scrollBehaviorSupported;\n }\n // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n if ('scrollBehavior' in document.documentElement.style) {\n scrollBehaviorSupported = true;\n }\n else {\n // At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's\n // supported but it doesn't handle scroll behavior, or it has been polyfilled.\n const scrollToFunction = Element.prototype.scrollTo;\n if (scrollToFunction) {\n // We can detect if the function has been polyfilled by calling `toString` on it. Native\n // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n // polyfilled functions as supporting scroll behavior.\n scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString());\n }\n else {\n scrollBehaviorSupported = false;\n }\n }\n }\n return scrollBehaviorSupported;\n}\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nfunction getRtlScrollAxisType() {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return 0 /* RtlScrollAxisType.NORMAL */;\n }\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n const scrollContainer = document.createElement('div');\n const containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n const content = document.createElement('div');\n const contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n rtlScrollAxisType = 0 /* RtlScrollAxisType.NORMAL */;\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? 1 /* RtlScrollAxisType.NEGATED */ : 2 /* RtlScrollAxisType.INVERTED */;\n }\n scrollContainer.remove();\n }\n return rtlScrollAxisType;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 shadowDomIsSupported;\n/** Checks whether the user's browser support Shadow DOM. */\nfunction _supportsShadowDom() {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));\n }\n return shadowDomIsSupported;\n}\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nfunction _getShadowRoot(element) {\n if (_supportsShadowDom()) {\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n return null;\n}\n/**\n * Gets the currently-focused element on the page while\n * also piercing through Shadow DOM boundaries.\n */\nfunction _getFocusedElementPierceShadowDom() {\n let activeElement = typeof document !== 'undefined' && document\n ? document.activeElement\n : null;\n while (activeElement && activeElement.shadowRoot) {\n const newActiveElement = activeElement.shadowRoot.activeElement;\n if (newActiveElement === activeElement) {\n break;\n }\n else {\n activeElement = newActiveElement;\n }\n }\n return activeElement;\n}\n/** Gets the target of an event while accounting for Shadow DOM. */\nfunction _getEventTarget(event) {\n // If an event is bound outside the Shadow DOM, the `event.target` will\n // point to the shadow root so we have to use `composedPath` instead.\n return (event.composedPath ? event.composedPath()[0] : event.target);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Gets whether the code is currently running in a test environment. */\nfunction _isTestEnvironment() {\n // We can't use `declare const` because it causes conflicts inside Google with the real typings\n // for these symbols and we can't read them off the global object, because they don't appear to\n // be attached there for some runners like Jest.\n // (see: https://github.com/angular/components/issues/23365#issuecomment-938146643)\n return (\n // @ts-ignore\n (typeof __karma__ !== 'undefined' && !!__karma__) ||\n // @ts-ignore\n (typeof jasmine !== 'undefined' && !!jasmine) ||\n // @ts-ignore\n (typeof jest !== 'undefined' && !!jest) ||\n // @ts-ignore\n (typeof Mocha !== 'undefined' && !!Mocha));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code 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 { Platform, PlatformModule, _getEventTarget, _getFocusedElementPierceShadowDom, _getShadowRoot, _isTestEnvironment, _supportsShadowDom, getRtlScrollAxisType, getSupportedInputTypes, normalizePassiveListenerOptions, supportsPassiveEventListeners, supportsScrollBehavior };\n","import { coerceNumberProperty, coerceElement, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, Directive, Input, Injectable, Optional, Inject, inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ViewChild, SkipSelf, ElementRef, NgModule } from '@angular/core';\nimport { Subject, of, Observable, fromEvent, animationFrameScheduler, asapScheduler, Subscription, isObservable } from 'rxjs';\nimport { distinctUntilChanged, auditTime, filter, takeUntil, startWith, pairwise, switchMap, shareReplay } from 'rxjs/operators';\nimport * as i1 from '@angular/cdk/platform';\nimport { getRtlScrollAxisType, supportsScrollBehavior, Platform } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport * as i2 from '@angular/cdk/bidi';\nimport { BidiModule } from '@angular/cdk/bidi';\nimport * as i2$1 from '@angular/cdk/collections';\nimport { isDataSource, ArrayDataSource, _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy } from '@angular/cdk/collections';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** The injection token used to specify the virtual scrolling strategy. */\nconst VIRTUAL_SCROLL_STRATEGY = new InjectionToken('VIRTUAL_SCROLL_STRATEGY');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Virtual scrolling strategy for lists with items of known fixed size. */\nclass FixedSizeVirtualScrollStrategy {\n /**\n * @param itemSize The size of the items in the virtually scrolling list.\n * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more\n * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.\n */\n constructor(itemSize, minBufferPx, maxBufferPx) {\n this._scrolledIndexChange = new Subject();\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n this.scrolledIndexChange = this._scrolledIndexChange.pipe(distinctUntilChanged());\n /** The attached viewport. */\n this._viewport = null;\n this._itemSize = itemSize;\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n }\n /**\n * Attaches this scroll strategy to a viewport.\n * @param viewport The viewport to attach this strategy to.\n */\n attach(viewport) {\n this._viewport = viewport;\n this._updateTotalContentSize();\n this._updateRenderedRange();\n }\n /** Detaches this scroll strategy from the currently attached viewport. */\n detach() {\n this._scrolledIndexChange.complete();\n this._viewport = null;\n }\n /**\n * Update the item size and buffer size.\n * @param itemSize The size of the items in the virtually scrolling list.\n * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more\n * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.\n */\n updateItemAndBufferSize(itemSize, minBufferPx, maxBufferPx) {\n if (maxBufferPx < minBufferPx && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx');\n }\n this._itemSize = itemSize;\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n this._updateTotalContentSize();\n this._updateRenderedRange();\n }\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentScrolled() {\n this._updateRenderedRange();\n }\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onDataLengthChanged() {\n this._updateTotalContentSize();\n this._updateRenderedRange();\n }\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentRendered() {\n /* no-op */\n }\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onRenderedOffsetChanged() {\n /* no-op */\n }\n /**\n * Scroll to the offset for the given index.\n * @param index The index of the element to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling.\n */\n scrollToIndex(index, behavior) {\n if (this._viewport) {\n this._viewport.scrollToOffset(index * this._itemSize, behavior);\n }\n }\n /** Update the viewport's total content size. */\n _updateTotalContentSize() {\n if (!this._viewport) {\n return;\n }\n this._viewport.setTotalContentSize(this._viewport.getDataLength() * this._itemSize);\n }\n /** Update the viewport's rendered range. */\n _updateRenderedRange() {\n if (!this._viewport) {\n return;\n }\n const renderedRange = this._viewport.getRenderedRange();\n const newRange = { start: renderedRange.start, end: renderedRange.end };\n const viewportSize = this._viewport.getViewportSize();\n const dataLength = this._viewport.getDataLength();\n let scrollOffset = this._viewport.measureScrollOffset();\n // Prevent NaN as result when dividing by zero.\n let firstVisibleIndex = this._itemSize > 0 ? scrollOffset / this._itemSize : 0;\n // If user scrolls to the bottom of the list and data changes to a smaller list\n if (newRange.end > dataLength) {\n // We have to recalculate the first visible index based on new data length and viewport size.\n const maxVisibleItems = Math.ceil(viewportSize / this._itemSize);\n const newVisibleIndex = Math.max(0, Math.min(firstVisibleIndex, dataLength - maxVisibleItems));\n // If first visible index changed we must update scroll offset to handle start/end buffers\n // Current range must also be adjusted to cover the new position (bottom of new list).\n if (firstVisibleIndex != newVisibleIndex) {\n firstVisibleIndex = newVisibleIndex;\n scrollOffset = newVisibleIndex * this._itemSize;\n newRange.start = Math.floor(firstVisibleIndex);\n }\n newRange.end = Math.max(0, Math.min(dataLength, newRange.start + maxVisibleItems));\n }\n const startBuffer = scrollOffset - newRange.start * this._itemSize;\n if (startBuffer < this._minBufferPx && newRange.start != 0) {\n const expandStart = Math.ceil((this._maxBufferPx - startBuffer) / this._itemSize);\n newRange.start = Math.max(0, newRange.start - expandStart);\n newRange.end = Math.min(dataLength, Math.ceil(firstVisibleIndex + (viewportSize + this._minBufferPx) / this._itemSize));\n }\n else {\n const endBuffer = newRange.end * this._itemSize - (scrollOffset + viewportSize);\n if (endBuffer < this._minBufferPx && newRange.end != dataLength) {\n const expandEnd = Math.ceil((this._maxBufferPx - endBuffer) / this._itemSize);\n if (expandEnd > 0) {\n newRange.end = Math.min(dataLength, newRange.end + expandEnd);\n newRange.start = Math.max(0, Math.floor(firstVisibleIndex - this._minBufferPx / this._itemSize));\n }\n }\n }\n this._viewport.setRenderedRange(newRange);\n this._viewport.setRenderedContentOffset(this._itemSize * newRange.start);\n this._scrolledIndexChange.next(Math.floor(firstVisibleIndex));\n }\n}\n/**\n * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created\n * `FixedSizeVirtualScrollStrategy` from the given directive.\n * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the\n * `FixedSizeVirtualScrollStrategy` from.\n */\nfunction _fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) {\n return fixedSizeDir._scrollStrategy;\n}\n/** A virtual scroll strategy that supports fixed-size items. */\nclass CdkFixedSizeVirtualScroll {\n constructor() {\n this._itemSize = 20;\n this._minBufferPx = 100;\n this._maxBufferPx = 200;\n /** The scroll strategy used by this directive. */\n this._scrollStrategy = new FixedSizeVirtualScrollStrategy(this.itemSize, this.minBufferPx, this.maxBufferPx);\n }\n /** The size of the items in the list (in pixels). */\n get itemSize() {\n return this._itemSize;\n }\n set itemSize(value) {\n this._itemSize = coerceNumberProperty(value);\n }\n /**\n * The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.\n */\n get minBufferPx() {\n return this._minBufferPx;\n }\n set minBufferPx(value) {\n this._minBufferPx = coerceNumberProperty(value);\n }\n /**\n * The number of pixels worth of buffer to render for when rendering new items. Defaults to 200px.\n */\n get maxBufferPx() {\n return this._maxBufferPx;\n }\n set maxBufferPx(value) {\n this._maxBufferPx = coerceNumberProperty(value);\n }\n ngOnChanges() {\n this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx);\n }\n}\nCdkFixedSizeVirtualScroll.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkFixedSizeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nCdkFixedSizeVirtualScroll.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkFixedSizeVirtualScroll, isStandalone: true, selector: \"cdk-virtual-scroll-viewport[itemSize]\", inputs: { itemSize: \"itemSize\", minBufferPx: \"minBufferPx\", maxBufferPx: \"maxBufferPx\" }, providers: [\n {\n provide: VIRTUAL_SCROLL_STRATEGY,\n useFactory: _fixedSizeVirtualScrollStrategyFactory,\n deps: [forwardRef(() => CdkFixedSizeVirtualScroll)],\n },\n ], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkFixedSizeVirtualScroll, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-virtual-scroll-viewport[itemSize]',\n standalone: true,\n providers: [\n {\n provide: VIRTUAL_SCROLL_STRATEGY,\n useFactory: _fixedSizeVirtualScrollStrategyFactory,\n deps: [forwardRef(() => CdkFixedSizeVirtualScroll)],\n },\n ],\n }]\n }], propDecorators: { itemSize: [{\n type: Input\n }], minBufferPx: [{\n type: Input\n }], maxBufferPx: [{\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/** Time in ms to throttle the scrolling events by default. */\nconst DEFAULT_SCROLL_TIME = 20;\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\nclass ScrollDispatcher {\n constructor(_ngZone, _platform, document) {\n this._ngZone = _ngZone;\n this._platform = _platform;\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n this._scrolled = new Subject();\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n this._globalSubscription = null;\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n this._scrolledCount = 0;\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n this.scrollContainers = new Map();\n this._document = document;\n }\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable) {\n if (!this.scrollContainers.has(scrollable)) {\n this.scrollContainers.set(scrollable, scrollable.elementScrolled().subscribe(() => this._scrolled.next(scrollable)));\n }\n }\n /**\n * De-registers a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable) {\n const scrollableReference = this.scrollContainers.get(scrollable);\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n /**\n * Returns an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs = DEFAULT_SCROLL_TIME) {\n if (!this._platform.isBrowser) {\n return of();\n }\n return new Observable((observer) => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\n }\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n const subscription = auditTimeInMs > 0\n ? this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer)\n : this._scrolled.subscribe(observer);\n this._scrolledCount++;\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n });\n }\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n this._scrolled.complete();\n }\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementOrElementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementOrElementRef, auditTimeInMs) {\n const ancestors = this.getAncestorScrollContainers(elementOrElementRef);\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementOrElementRef) {\n const scrollingContainers = [];\n this.scrollContainers.forEach((_subscription, scrollable) => {\n if (this._scrollableContainsElement(scrollable, elementOrElementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n }\n /** Use defaultView of injected document if available or fallback to global window reference */\n _getWindow() {\n return this._document.defaultView || window;\n }\n /** Returns true if the element is contained within the provided Scrollable. */\n _scrollableContainsElement(scrollable, elementOrElementRef) {\n let element = coerceElement(elementOrElementRef);\n let scrollableElement = scrollable.getElementRef().nativeElement;\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) {\n return true;\n }\n } while ((element = element.parentElement));\n return false;\n }\n /** Sets up the global scroll listeners. */\n _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n const window = this._getWindow();\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n /** Cleans up the global scroll listener. */\n _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\nScrollDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ScrollDispatcher, deps: [{ token: i0.NgZone }, { token: i1.Platform }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nScrollDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ScrollDispatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ScrollDispatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.Platform }, { type: undefined, decorators: [{\n type: Optional\n }, {\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 * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\nclass CdkScrollable {\n constructor(elementRef, scrollDispatcher, ngZone, dir) {\n this.elementRef = elementRef;\n this.scrollDispatcher = scrollDispatcher;\n this.ngZone = ngZone;\n this.dir = dir;\n this._destroyed = new Subject();\n this._elementScrolled = new Observable((observer) => this.ngZone.runOutsideAngular(() => fromEvent(this.elementRef.nativeElement, 'scroll')\n .pipe(takeUntil(this._destroyed))\n .subscribe(observer)));\n }\n ngOnInit() {\n this.scrollDispatcher.register(this);\n }\n ngOnDestroy() {\n this.scrollDispatcher.deregister(this);\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** Returns observable that emits when a scroll event is fired on the host element. */\n elementScrolled() {\n return this._elementScrolled;\n }\n /** Gets the ElementRef for the viewport. */\n getElementRef() {\n return this.elementRef;\n }\n /**\n * Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo\n * method, since browsers are not consistent about what scrollLeft means in RTL. For this method\n * left and right always refer to the left and right side of the scrolling container irrespective\n * of the layout direction. start and end refer to left and right in an LTR context and vice-versa\n * in an RTL context.\n * @param options specified the offsets to scroll to.\n */\n scrollTo(options) {\n const el = this.elementRef.nativeElement;\n const isRtl = this.dir && this.dir.value == 'rtl';\n // Rewrite start & end offsets as right or left offsets.\n if (options.left == null) {\n options.left = isRtl ? options.end : options.start;\n }\n if (options.right == null) {\n options.right = isRtl ? options.start : options.end;\n }\n // Rewrite the bottom offset as a top offset.\n if (options.bottom != null) {\n options.top =\n el.scrollHeight - el.clientHeight - options.bottom;\n }\n // Rewrite the right offset as a left offset.\n if (isRtl && getRtlScrollAxisType() != 0 /* RtlScrollAxisType.NORMAL */) {\n if (options.left != null) {\n options.right =\n el.scrollWidth - el.clientWidth - options.left;\n }\n if (getRtlScrollAxisType() == 2 /* RtlScrollAxisType.INVERTED */) {\n options.left = options.right;\n }\n else if (getRtlScrollAxisType() == 1 /* RtlScrollAxisType.NEGATED */) {\n options.left = options.right ? -options.right : options.right;\n }\n }\n else {\n if (options.right != null) {\n options.left =\n el.scrollWidth - el.clientWidth - options.right;\n }\n }\n this._applyScrollToOptions(options);\n }\n _applyScrollToOptions(options) {\n const el = this.elementRef.nativeElement;\n if (supportsScrollBehavior()) {\n el.scrollTo(options);\n }\n else {\n if (options.top != null) {\n el.scrollTop = options.top;\n }\n if (options.left != null) {\n el.scrollLeft = options.left;\n }\n }\n }\n /**\n * Measures the scroll offset relative to the specified edge of the viewport. This method can be\n * used instead of directly checking scrollLeft or scrollTop, since browsers are not consistent\n * about what scrollLeft means in RTL. The values returned by this method are normalized such that\n * left and right always refer to the left and right side of the scrolling container irrespective\n * of the layout direction. start and end refer to left and right in an LTR context and vice-versa\n * in an RTL context.\n * @param from The edge to measure from.\n */\n measureScrollOffset(from) {\n const LEFT = 'left';\n const RIGHT = 'right';\n const el = this.elementRef.nativeElement;\n if (from == 'top') {\n return el.scrollTop;\n }\n if (from == 'bottom') {\n return el.scrollHeight - el.clientHeight - el.scrollTop;\n }\n // Rewrite start & end as left or right offsets.\n const isRtl = this.dir && this.dir.value == 'rtl';\n if (from == 'start') {\n from = isRtl ? RIGHT : LEFT;\n }\n else if (from == 'end') {\n from = isRtl ? LEFT : RIGHT;\n }\n if (isRtl && getRtlScrollAxisType() == 2 /* RtlScrollAxisType.INVERTED */) {\n // For INVERTED, scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and\n // 0 when scrolled all the way right.\n if (from == LEFT) {\n return el.scrollWidth - el.clientWidth - el.scrollLeft;\n }\n else {\n return el.scrollLeft;\n }\n }\n else if (isRtl && getRtlScrollAxisType() == 1 /* RtlScrollAxisType.NEGATED */) {\n // For NEGATED, scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and\n // 0 when scrolled all the way right.\n if (from == LEFT) {\n return el.scrollLeft + el.scrollWidth - el.clientWidth;\n }\n else {\n return -el.scrollLeft;\n }\n }\n else {\n // For NORMAL, as well as non-RTL contexts, scrollLeft is 0 when scrolled all the way left and\n // (scrollWidth - clientWidth) when scrolled all the way right.\n if (from == LEFT) {\n return el.scrollLeft;\n }\n else {\n return el.scrollWidth - el.clientWidth - el.scrollLeft;\n }\n }\n }\n}\nCdkScrollable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkScrollable, deps: [{ token: i0.ElementRef }, { token: ScrollDispatcher }, { token: i0.NgZone }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkScrollable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkScrollable, isStandalone: true, selector: \"[cdk-scrollable], [cdkScrollable]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkScrollable, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdk-scrollable], [cdkScrollable]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ScrollDispatcher }, { type: i0.NgZone }, { type: i2.Directionality, decorators: [{\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 */\n/** Time in ms to throttle the resize events by default. */\nconst DEFAULT_RESIZE_TIME = 20;\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\nclass ViewportRuler {\n constructor(_platform, ngZone, document) {\n this._platform = _platform;\n /** Stream of viewport change events. */\n this._change = new Subject();\n /** Event listener that will be used to handle the viewport change events. */\n this._changeListener = (event) => {\n this._change.next(event);\n };\n this._document = document;\n ngZone.runOutsideAngular(() => {\n if (_platform.isBrowser) {\n const window = this._getWindow();\n // Note that bind the events ourselves, rather than going through something like RxJS's\n // `fromEvent` so that we can ensure that they're bound outside of the NgZone.\n window.addEventListener('resize', this._changeListener);\n window.addEventListener('orientationchange', this._changeListener);\n }\n // Clear the cached position so that the viewport is re-measured next time it is required.\n // We don't need to keep track of the subscription, because it is completed on destroy.\n this.change().subscribe(() => (this._viewportSize = null));\n });\n }\n ngOnDestroy() {\n if (this._platform.isBrowser) {\n const window = this._getWindow();\n window.removeEventListener('resize', this._changeListener);\n window.removeEventListener('orientationchange', this._changeListener);\n }\n this._change.complete();\n }\n /** Returns the viewport's width and height. */\n getViewportSize() {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n const output = { width: this._viewportSize.width, height: this._viewportSize.height };\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null;\n }\n return output;\n }\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect() {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const { width, height } = this.getViewportSize();\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }\n /** Gets the (top, left) scroll position of the viewport. */\n getViewportScrollPosition() {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return { top: 0, left: 0 };\n }\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const document = this._document;\n const window = this._getWindow();\n const documentElement = document.documentElement;\n const documentRect = documentElement.getBoundingClientRect();\n const top = -documentRect.top ||\n document.body.scrollTop ||\n window.scrollY ||\n documentElement.scrollTop ||\n 0;\n const left = -documentRect.left ||\n document.body.scrollLeft ||\n window.scrollX ||\n documentElement.scrollLeft ||\n 0;\n return { top, left };\n }\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * This stream emits outside of the Angular zone.\n * @param throttleTime Time in milliseconds to throttle the stream.\n */\n change(throttleTime = DEFAULT_RESIZE_TIME) {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n /** Use defaultView of injected document if available or fallback to global window reference */\n _getWindow() {\n return this._document.defaultView || window;\n }\n /** Updates the cached viewport size. */\n _updateViewportSize() {\n const window = this._getWindow();\n this._viewportSize = this._platform.isBrowser\n ? { width: window.innerWidth, height: window.innerHeight }\n : { width: 0, height: 0 };\n }\n}\nViewportRuler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ViewportRuler, deps: [{ token: i1.Platform }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nViewportRuler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ViewportRuler, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ViewportRuler, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Platform }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\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 VIRTUAL_SCROLLABLE = new InjectionToken('VIRTUAL_SCROLLABLE');\n/**\n * Extending the {@link CdkScrollable} to be used as scrolling container for virtual scrolling.\n */\nclass CdkVirtualScrollable extends CdkScrollable {\n constructor(elementRef, scrollDispatcher, ngZone, dir) {\n super(elementRef, scrollDispatcher, ngZone, dir);\n }\n /**\n * Measure the viewport size for the provided orientation.\n *\n * @param orientation The orientation to measure the size from.\n */\n measureViewportSize(orientation) {\n const viewportEl = this.elementRef.nativeElement;\n return orientation === 'horizontal' ? viewportEl.clientWidth : viewportEl.clientHeight;\n }\n}\nCdkVirtualScrollable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkVirtualScrollable, deps: [{ token: i0.ElementRef }, { token: ScrollDispatcher }, { token: i0.NgZone }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkVirtualScrollable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkVirtualScrollable, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkVirtualScrollable, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ScrollDispatcher }, { type: i0.NgZone }, { type: i2.Directionality, decorators: [{\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 */\n/** Checks if the given ranges are equal. */\nfunction rangesEqual(r1, r2) {\n return r1.start == r2.start && r1.end == r2.end;\n}\n/**\n * Scheduler to be used for scroll events. Needs to fall back to\n * something that doesn't rely on requestAnimationFrame on environments\n * that don't support it (e.g. server-side rendering).\n */\nconst SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? animationFrameScheduler : asapScheduler;\n/** A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`. */\nclass CdkVirtualScrollViewport extends CdkVirtualScrollable {\n /** The direction the viewport scrolls. */\n get orientation() {\n return this._orientation;\n }\n set orientation(orientation) {\n if (this._orientation !== orientation) {\n this._orientation = orientation;\n this._calculateSpacerSize();\n }\n }\n /**\n * Whether rendered items should persist in the DOM after scrolling out of view. By default, items\n * will be removed.\n */\n get appendOnly() {\n return this._appendOnly;\n }\n set appendOnly(value) {\n this._appendOnly = coerceBooleanProperty(value);\n }\n constructor(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher, viewportRuler, scrollable) {\n super(elementRef, scrollDispatcher, ngZone, dir);\n this.elementRef = elementRef;\n this._changeDetectorRef = _changeDetectorRef;\n this._scrollStrategy = _scrollStrategy;\n this.scrollable = scrollable;\n this._platform = inject(Platform);\n /** Emits when the viewport is detached from a CdkVirtualForOf. */\n this._detachedSubject = new Subject();\n /** Emits when the rendered range changes. */\n this._renderedRangeSubject = new Subject();\n this._orientation = 'vertical';\n this._appendOnly = false;\n // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll\n // strategy lazily (i.e. only if the user is actually listening to the events). We do this because\n // depending on how the strategy calculates the scrolled index, it may come at a cost to\n // performance.\n /** Emits when the index of the first element visible in the viewport changes. */\n this.scrolledIndexChange = new Observable((observer) => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));\n /** A stream that emits whenever the rendered range changes. */\n this.renderedRangeStream = this._renderedRangeSubject;\n /**\n * The total size of all content (in pixels), including content that is not currently rendered.\n */\n this._totalContentSize = 0;\n /** A string representing the `style.width` property value to be used for the spacer element. */\n this._totalContentWidth = '';\n /** A string representing the `style.height` property value to be used for the spacer element. */\n this._totalContentHeight = '';\n /** The currently rendered range of indices. */\n this._renderedRange = { start: 0, end: 0 };\n /** The length of the data bound to this viewport (in number of items). */\n this._dataLength = 0;\n /** The size of the viewport (in pixels). */\n this._viewportSize = 0;\n /** The last rendered content offset that was set. */\n this._renderedContentOffset = 0;\n /**\n * Whether the last rendered content offset was to the end of the content (and therefore needs to\n * be rewritten as an offset to the start of the content).\n */\n this._renderedContentOffsetNeedsRewrite = false;\n /** Whether there is a pending change detection cycle. */\n this._isChangeDetectionPending = false;\n /** A list of functions to run after the next change detection cycle. */\n this._runAfterChangeDetection = [];\n /** Subscription to changes in the viewport size. */\n this._viewportChanges = Subscription.EMPTY;\n if (!_scrollStrategy && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Error: cdk-virtual-scroll-viewport requires the \"itemSize\" property to be set.');\n }\n this._viewportChanges = viewportRuler.change().subscribe(() => {\n this.checkViewportSize();\n });\n if (!this.scrollable) {\n // No scrollable is provided, so the virtual-scroll-viewport needs to become a scrollable\n this.elementRef.nativeElement.classList.add('cdk-virtual-scrollable');\n this.scrollable = this;\n }\n }\n ngOnInit() {\n // Scrolling depends on the element dimensions which we can't get during SSR.\n if (!this._platform.isBrowser) {\n return;\n }\n if (this.scrollable === this) {\n super.ngOnInit();\n }\n // It's still too early to measure the viewport at this point. Deferring with a promise allows\n // the Viewport to be rendered with the correct size before we measure. We run this outside the\n // zone to avoid causing more change detection cycles. We handle the change detection loop\n // ourselves instead.\n this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {\n this._measureViewportSize();\n this._scrollStrategy.attach(this);\n this.scrollable\n .elementScrolled()\n .pipe(\n // Start off with a fake scroll event so we properly detect our initial position.\n startWith(null), \n // Collect multiple events into one until the next animation frame. This way if\n // there are multiple scroll events in the same frame we only need to recheck\n // our layout once.\n auditTime(0, SCROLL_SCHEDULER))\n .subscribe(() => this._scrollStrategy.onContentScrolled());\n this._markChangeDetectionNeeded();\n }));\n }\n ngOnDestroy() {\n this.detach();\n this._scrollStrategy.detach();\n // Complete all subjects\n this._renderedRangeSubject.complete();\n this._detachedSubject.complete();\n this._viewportChanges.unsubscribe();\n super.ngOnDestroy();\n }\n /** Attaches a `CdkVirtualScrollRepeater` to this viewport. */\n attach(forOf) {\n if (this._forOf && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('CdkVirtualScrollViewport is already attached.');\n }\n // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length\n // changes. Run outside the zone to avoid triggering change detection, since we're managing the\n // change detection loop ourselves.\n this.ngZone.runOutsideAngular(() => {\n this._forOf = forOf;\n this._forOf.dataStream.pipe(takeUntil(this._detachedSubject)).subscribe(data => {\n const newLength = data.length;\n if (newLength !== this._dataLength) {\n this._dataLength = newLength;\n this._scrollStrategy.onDataLengthChanged();\n }\n this._doChangeDetection();\n });\n });\n }\n /** Detaches the current `CdkVirtualForOf`. */\n detach() {\n this._forOf = null;\n this._detachedSubject.next();\n }\n /** Gets the length of the data bound to this viewport (in number of items). */\n getDataLength() {\n return this._dataLength;\n }\n /** Gets the size of the viewport (in pixels). */\n getViewportSize() {\n return this._viewportSize;\n }\n // TODO(mmalerba): This is technically out of sync with what's really rendered until a render\n // cycle happens. I'm being careful to only call it after the render cycle is complete and before\n // setting it to something else, but its error prone and should probably be split into\n // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.\n /** Get the current rendered range of items. */\n getRenderedRange() {\n return this._renderedRange;\n }\n measureBoundingClientRectWithScrollOffset(from) {\n return this.getElementRef().nativeElement.getBoundingClientRect()[from];\n }\n /**\n * Sets the total size of all content (in pixels), including content that is not currently\n * rendered.\n */\n setTotalContentSize(size) {\n if (this._totalContentSize !== size) {\n this._totalContentSize = size;\n this._calculateSpacerSize();\n this._markChangeDetectionNeeded();\n }\n }\n /** Sets the currently rendered range of indices. */\n setRenderedRange(range) {\n if (!rangesEqual(this._renderedRange, range)) {\n if (this.appendOnly) {\n range = { start: 0, end: Math.max(this._renderedRange.end, range.end) };\n }\n this._renderedRangeSubject.next((this._renderedRange = range));\n this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n }\n }\n /**\n * Gets the offset from the start of the viewport to the start of the rendered data (in pixels).\n */\n getOffsetToRenderedContentStart() {\n return this._renderedContentOffsetNeedsRewrite ? null : this._renderedContentOffset;\n }\n /**\n * Sets the offset from the start of the viewport to either the start or end of the rendered data\n * (in pixels).\n */\n setRenderedContentOffset(offset, to = 'to-start') {\n // In appendOnly, we always start from the top\n offset = this.appendOnly && to === 'to-start' ? 0 : offset;\n // For a horizontal viewport in a right-to-left language we need to translate along the x-axis\n // in the negative direction.\n const isRtl = this.dir && this.dir.value == 'rtl';\n const isHorizontal = this.orientation == 'horizontal';\n const axis = isHorizontal ? 'X' : 'Y';\n const axisDirection = isHorizontal && isRtl ? -1 : 1;\n let transform = `translate${axis}(${Number(axisDirection * offset)}px)`;\n this._renderedContentOffset = offset;\n if (to === 'to-end') {\n transform += ` translate${axis}(-100%)`;\n // The viewport should rewrite this as a `to-start` offset on the next render cycle. Otherwise\n // elements will appear to expand in the wrong direction (e.g. `mat-expansion-panel` would\n // expand upward).\n this._renderedContentOffsetNeedsRewrite = true;\n }\n if (this._renderedContentTransform != transform) {\n // We know this value is safe because we parse `offset` with `Number()` before passing it\n // into the string.\n this._renderedContentTransform = transform;\n this._markChangeDetectionNeeded(() => {\n if (this._renderedContentOffsetNeedsRewrite) {\n this._renderedContentOffset -= this.measureRenderedContentSize();\n this._renderedContentOffsetNeedsRewrite = false;\n this.setRenderedContentOffset(this._renderedContentOffset);\n }\n else {\n this._scrollStrategy.onRenderedOffsetChanged();\n }\n });\n }\n }\n /**\n * Scrolls to the given offset from the start of the viewport. Please note that this is not always\n * the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left\n * direction, this would be the equivalent of setting a fictional `scrollRight` property.\n * @param offset The offset to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.\n */\n scrollToOffset(offset, behavior = 'auto') {\n const options = { behavior };\n if (this.orientation === 'horizontal') {\n options.start = offset;\n }\n else {\n options.top = offset;\n }\n this.scrollable.scrollTo(options);\n }\n /**\n * Scrolls to the offset for the given index.\n * @param index The index of the element to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.\n */\n scrollToIndex(index, behavior = 'auto') {\n this._scrollStrategy.scrollToIndex(index, behavior);\n }\n /**\n * Gets the current scroll offset from the start of the scrollable (in pixels).\n * @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start'\n * in horizontal mode.\n */\n measureScrollOffset(from) {\n // This is to break the call cycle\n let measureScrollOffset;\n if (this.scrollable == this) {\n measureScrollOffset = (_from) => super.measureScrollOffset(_from);\n }\n else {\n measureScrollOffset = (_from) => this.scrollable.measureScrollOffset(_from);\n }\n return Math.max(0, measureScrollOffset(from ?? (this.orientation === 'horizontal' ? 'start' : 'top')) -\n this.measureViewportOffset());\n }\n /**\n * Measures the offset of the viewport from the scrolling container\n * @param from The edge to measure from.\n */\n measureViewportOffset(from) {\n let fromRect;\n const LEFT = 'left';\n const RIGHT = 'right';\n const isRtl = this.dir?.value == 'rtl';\n if (from == 'start') {\n fromRect = isRtl ? RIGHT : LEFT;\n }\n else if (from == 'end') {\n fromRect = isRtl ? LEFT : RIGHT;\n }\n else if (from) {\n fromRect = from;\n }\n else {\n fromRect = this.orientation === 'horizontal' ? 'left' : 'top';\n }\n const scrollerClientRect = this.scrollable.measureBoundingClientRectWithScrollOffset(fromRect);\n const viewportClientRect = this.elementRef.nativeElement.getBoundingClientRect()[fromRect];\n return viewportClientRect - scrollerClientRect;\n }\n /** Measure the combined size of all of the rendered items. */\n measureRenderedContentSize() {\n const contentEl = this._contentWrapper.nativeElement;\n return this.orientation === 'horizontal' ? contentEl.offsetWidth : contentEl.offsetHeight;\n }\n /**\n * Measure the total combined size of the given range. Throws if the range includes items that are\n * not rendered.\n */\n measureRangeSize(range) {\n if (!this._forOf) {\n return 0;\n }\n return this._forOf.measureRangeSize(range, this.orientation);\n }\n /** Update the viewport dimensions and re-render. */\n checkViewportSize() {\n // TODO: Cleanup later when add logic for handling content resize\n this._measureViewportSize();\n this._scrollStrategy.onDataLengthChanged();\n }\n /** Measure the viewport size. */\n _measureViewportSize() {\n this._viewportSize = this.scrollable.measureViewportSize(this.orientation);\n }\n /** Queue up change detection to run. */\n _markChangeDetectionNeeded(runAfter) {\n if (runAfter) {\n this._runAfterChangeDetection.push(runAfter);\n }\n // Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of\n // properties sequentially we only have to run `_doChangeDetection` once at the end.\n if (!this._isChangeDetectionPending) {\n this._isChangeDetectionPending = true;\n this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {\n this._doChangeDetection();\n }));\n }\n }\n /** Run change detection. */\n _doChangeDetection() {\n this._isChangeDetectionPending = false;\n // Apply the content transform. The transform can't be set via an Angular binding because\n // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of\n // string literals, a variable that can only be 'X' or 'Y', and user input that is run through\n // the `Number` function first to coerce it to a numeric value.\n this._contentWrapper.nativeElement.style.transform = this._renderedContentTransform;\n // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection\n // from the root, since the repeated items are content projected in. Calling `detectChanges`\n // instead does not properly check the projected content.\n this.ngZone.run(() => this._changeDetectorRef.markForCheck());\n const runAfterChangeDetection = this._runAfterChangeDetection;\n this._runAfterChangeDetection = [];\n for (const fn of runAfterChangeDetection) {\n fn();\n }\n }\n /** Calculates the `style.width` and `style.height` for the spacer element. */\n _calculateSpacerSize() {\n this._totalContentHeight =\n this.orientation === 'horizontal' ? '' : `${this._totalContentSize}px`;\n this._totalContentWidth =\n this.orientation === 'horizontal' ? `${this._totalContentSize}px` : '';\n }\n}\nCdkVirtualScrollViewport.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkVirtualScrollViewport, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: VIRTUAL_SCROLL_STRATEGY, optional: true }, { token: i2.Directionality, optional: true }, { token: ScrollDispatcher }, { token: ViewportRuler }, { token: VIRTUAL_SCROLLABLE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nCdkVirtualScrollViewport.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkVirtualScrollViewport, isStandalone: true, selector: \"cdk-virtual-scroll-viewport\", inputs: { orientation: \"orientation\", appendOnly: \"appendOnly\" }, outputs: { scrolledIndexChange: \"scrolledIndexChange\" }, host: { properties: { \"class.cdk-virtual-scroll-orientation-horizontal\": \"orientation === \\\"horizontal\\\"\", \"class.cdk-virtual-scroll-orientation-vertical\": \"orientation !== \\\"horizontal\\\"\" }, classAttribute: \"cdk-virtual-scroll-viewport\" }, providers: [\n {\n provide: CdkScrollable,\n useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport,\n deps: [[new Optional(), new Inject(VIRTUAL_SCROLLABLE)], CdkVirtualScrollViewport],\n },\n ], viewQueries: [{ propertyName: \"_contentWrapper\", first: true, predicate: [\"contentWrapper\"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"\\n
\\n \\n
\\n\\n
\\n\", styles: [\"cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkVirtualScrollViewport, decorators: [{\n type: Component,\n args: [{ selector: 'cdk-virtual-scroll-viewport', host: {\n 'class': 'cdk-virtual-scroll-viewport',\n '[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === \"horizontal\"',\n '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== \"horizontal\"',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, providers: [\n {\n provide: CdkScrollable,\n useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport,\n deps: [[new Optional(), new Inject(VIRTUAL_SCROLLABLE)], CdkVirtualScrollViewport],\n },\n ], template: \"\\n
\\n \\n
\\n\\n
\\n\", styles: [\"cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [VIRTUAL_SCROLL_STRATEGY]\n }] }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }, { type: ScrollDispatcher }, { type: ViewportRuler }, { type: CdkVirtualScrollable, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [VIRTUAL_SCROLLABLE]\n }] }]; }, propDecorators: { orientation: [{\n type: Input\n }], appendOnly: [{\n type: Input\n }], scrolledIndexChange: [{\n type: Output\n }], _contentWrapper: [{\n type: ViewChild,\n args: ['contentWrapper', { static: 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/** Helper to extract the offset of a DOM Node in a certain direction. */\nfunction getOffset(orientation, direction, node) {\n const el = node;\n if (!el.getBoundingClientRect) {\n return 0;\n }\n const rect = el.getBoundingClientRect();\n if (orientation === 'horizontal') {\n return direction === 'start' ? rect.left : rect.right;\n }\n return direction === 'start' ? rect.top : rect.bottom;\n}\n/**\n * A directive similar to `ngForOf` to be used for rendering data inside a virtual scrolling\n * container.\n */\nclass CdkVirtualForOf {\n /** The DataSource to display. */\n get cdkVirtualForOf() {\n return this._cdkVirtualForOf;\n }\n set cdkVirtualForOf(value) {\n this._cdkVirtualForOf = value;\n if (isDataSource(value)) {\n this._dataSourceChanges.next(value);\n }\n else {\n // If value is an an NgIterable, convert it to an array.\n this._dataSourceChanges.next(new ArrayDataSource(isObservable(value) ? value : Array.from(value || [])));\n }\n }\n /**\n * The `TrackByFunction` to use for tracking changes. The `TrackByFunction` takes the index and\n * the item and produces a value to be used as the item's identity when tracking changes.\n */\n get cdkVirtualForTrackBy() {\n return this._cdkVirtualForTrackBy;\n }\n set cdkVirtualForTrackBy(fn) {\n this._needsUpdate = true;\n this._cdkVirtualForTrackBy = fn\n ? (index, item) => fn(index + (this._renderedRange ? this._renderedRange.start : 0), item)\n : undefined;\n }\n /** The template used to stamp out new elements. */\n set cdkVirtualForTemplate(value) {\n if (value) {\n this._needsUpdate = true;\n this._template = value;\n }\n }\n /**\n * The size of the cache used to store templates that are not being used for re-use later.\n * Setting the cache size to `0` will disable caching. Defaults to 20 templates.\n */\n get cdkVirtualForTemplateCacheSize() {\n return this._viewRepeater.viewCacheSize;\n }\n set cdkVirtualForTemplateCacheSize(size) {\n this._viewRepeater.viewCacheSize = coerceNumberProperty(size);\n }\n constructor(\n /** The view container to add items to. */\n _viewContainerRef, \n /** The template to use when stamping out new items. */\n _template, \n /** The set of available differs. */\n _differs, \n /** The strategy used to render items in the virtual scroll viewport. */\n _viewRepeater, \n /** The virtual scrolling viewport that these items are being rendered in. */\n _viewport, ngZone) {\n this._viewContainerRef = _viewContainerRef;\n this._template = _template;\n this._differs = _differs;\n this._viewRepeater = _viewRepeater;\n this._viewport = _viewport;\n /** Emits when the rendered view of the data changes. */\n this.viewChange = new Subject();\n /** Subject that emits when a new DataSource instance is given. */\n this._dataSourceChanges = new Subject();\n /** Emits whenever the data in the current DataSource changes. */\n this.dataStream = this._dataSourceChanges.pipe(\n // Start off with null `DataSource`.\n startWith(null), \n // Bundle up the previous and current data sources so we can work with both.\n pairwise(), \n // Use `_changeDataSource` to disconnect from the previous data source and connect to the\n // new one, passing back a stream of data changes which we run through `switchMap` to give\n // us a data stream that emits the latest data from whatever the current `DataSource` is.\n switchMap(([prev, cur]) => this._changeDataSource(prev, cur)), \n // Replay the last emitted data when someone subscribes.\n shareReplay(1));\n /** The differ used to calculate changes to the data. */\n this._differ = null;\n /** Whether the rendered data should be updated during the next ngDoCheck cycle. */\n this._needsUpdate = false;\n this._destroyed = new Subject();\n this.dataStream.subscribe(data => {\n this._data = data;\n this._onRenderedDataChange();\n });\n this._viewport.renderedRangeStream.pipe(takeUntil(this._destroyed)).subscribe(range => {\n this._renderedRange = range;\n if (this.viewChange.observers.length) {\n ngZone.run(() => this.viewChange.next(this._renderedRange));\n }\n this._onRenderedDataChange();\n });\n this._viewport.attach(this);\n }\n /**\n * Measures the combined size (width for horizontal orientation, height for vertical) of all items\n * in the specified range. Throws an error if the range includes items that are not currently\n * rendered.\n */\n measureRangeSize(range, orientation) {\n if (range.start >= range.end) {\n return 0;\n }\n if ((range.start < this._renderedRange.start || range.end > this._renderedRange.end) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Error: attempted to measure an item that isn't rendered.`);\n }\n // The index into the list of rendered views for the first item in the range.\n const renderedStartIndex = range.start - this._renderedRange.start;\n // The length of the range we're measuring.\n const rangeLen = range.end - range.start;\n // Loop over all the views, find the first and land node and compute the size by subtracting\n // the top of the first node from the bottom of the last one.\n let firstNode;\n let lastNode;\n // Find the first node by starting from the beginning and going forwards.\n for (let i = 0; i < rangeLen; i++) {\n const view = this._viewContainerRef.get(i + renderedStartIndex);\n if (view && view.rootNodes.length) {\n firstNode = lastNode = view.rootNodes[0];\n break;\n }\n }\n // Find the last node by starting from the end and going backwards.\n for (let i = rangeLen - 1; i > -1; i--) {\n const view = this._viewContainerRef.get(i + renderedStartIndex);\n if (view && view.rootNodes.length) {\n lastNode = view.rootNodes[view.rootNodes.length - 1];\n break;\n }\n }\n return firstNode && lastNode\n ? getOffset(orientation, 'end', lastNode) - getOffset(orientation, 'start', firstNode)\n : 0;\n }\n ngDoCheck() {\n if (this._differ && this._needsUpdate) {\n // TODO(mmalerba): We should differentiate needs update due to scrolling and a new portion of\n // this list being rendered (can use simpler algorithm) vs needs update due to data actually\n // changing (need to do this diff).\n const changes = this._differ.diff(this._renderedItems);\n if (!changes) {\n this._updateContext();\n }\n else {\n this._applyChanges(changes);\n }\n this._needsUpdate = false;\n }\n }\n ngOnDestroy() {\n this._viewport.detach();\n this._dataSourceChanges.next(undefined);\n this._dataSourceChanges.complete();\n this.viewChange.complete();\n this._destroyed.next();\n this._destroyed.complete();\n this._viewRepeater.detach();\n }\n /** React to scroll state changes in the viewport. */\n _onRenderedDataChange() {\n if (!this._renderedRange) {\n return;\n }\n this._renderedItems = this._data.slice(this._renderedRange.start, this._renderedRange.end);\n if (!this._differ) {\n // Use a wrapper function for the `trackBy` so any new values are\n // picked up automatically without having to recreate the differ.\n this._differ = this._differs.find(this._renderedItems).create((index, item) => {\n return this.cdkVirtualForTrackBy ? this.cdkVirtualForTrackBy(index, item) : item;\n });\n }\n this._needsUpdate = true;\n }\n /** Swap out one `DataSource` for another. */\n _changeDataSource(oldDs, newDs) {\n if (oldDs) {\n oldDs.disconnect(this);\n }\n this._needsUpdate = true;\n return newDs ? newDs.connect(this) : of();\n }\n /** Update the `CdkVirtualForOfContext` for all views. */\n _updateContext() {\n const count = this._data.length;\n let i = this._viewContainerRef.length;\n while (i--) {\n const view = this._viewContainerRef.get(i);\n view.context.index = this._renderedRange.start + i;\n view.context.count = count;\n this._updateComputedContextProperties(view.context);\n view.detectChanges();\n }\n }\n /** Apply changes to the DOM. */\n _applyChanges(changes) {\n this._viewRepeater.applyChanges(changes, this._viewContainerRef, (record, _adjustedPreviousIndex, currentIndex) => this._getEmbeddedViewArgs(record, currentIndex), record => record.item);\n // Update $implicit for any items that had an identity change.\n changes.forEachIdentityChange((record) => {\n const view = this._viewContainerRef.get(record.currentIndex);\n view.context.$implicit = record.item;\n });\n // Update the context variables on all items.\n const count = this._data.length;\n let i = this._viewContainerRef.length;\n while (i--) {\n const view = this._viewContainerRef.get(i);\n view.context.index = this._renderedRange.start + i;\n view.context.count = count;\n this._updateComputedContextProperties(view.context);\n }\n }\n /** Update the computed properties on the `CdkVirtualForOfContext`. */\n _updateComputedContextProperties(context) {\n context.first = context.index === 0;\n context.last = context.index === context.count - 1;\n context.even = context.index % 2 === 0;\n context.odd = !context.even;\n }\n _getEmbeddedViewArgs(record, index) {\n // Note that it's important that we insert the item directly at the proper index,\n // rather than inserting it and the moving it in place, because if there's a directive\n // on the same node that injects the `ViewContainerRef`, Angular will insert another\n // comment node which can throw off the move when it's being repeated for all items.\n return {\n templateRef: this._template,\n context: {\n $implicit: record.item,\n // It's guaranteed that the iterable is not \"undefined\" or \"null\" because we only\n // generate views for elements if the \"cdkVirtualForOf\" iterable has elements.\n cdkVirtualForOf: this._cdkVirtualForOf,\n index: -1,\n count: -1,\n first: false,\n last: false,\n odd: false,\n even: false,\n },\n index,\n };\n }\n}\nCdkVirtualForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkVirtualForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: _VIEW_REPEATER_STRATEGY }, { token: CdkVirtualScrollViewport, skipSelf: true }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nCdkVirtualForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkVirtualForOf, isStandalone: true, selector: \"[cdkVirtualFor][cdkVirtualForOf]\", inputs: { cdkVirtualForOf: \"cdkVirtualForOf\", cdkVirtualForTrackBy: \"cdkVirtualForTrackBy\", cdkVirtualForTemplate: \"cdkVirtualForTemplate\", cdkVirtualForTemplateCacheSize: \"cdkVirtualForTemplateCacheSize\" }, providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkVirtualForOf, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkVirtualFor][cdkVirtualForOf]',\n providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: i2$1._RecycleViewRepeaterStrategy, decorators: [{\n type: Inject,\n args: [_VIEW_REPEATER_STRATEGY]\n }] }, { type: CdkVirtualScrollViewport, decorators: [{\n type: SkipSelf\n }] }, { type: i0.NgZone }]; }, propDecorators: { cdkVirtualForOf: [{\n type: Input\n }], cdkVirtualForTrackBy: [{\n type: Input\n }], cdkVirtualForTemplate: [{\n type: Input\n }], cdkVirtualForTemplateCacheSize: [{\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 * Provides a virtual scrollable for the element it is attached to.\n */\nclass CdkVirtualScrollableElement extends CdkVirtualScrollable {\n constructor(elementRef, scrollDispatcher, ngZone, dir) {\n super(elementRef, scrollDispatcher, ngZone, dir);\n }\n measureBoundingClientRectWithScrollOffset(from) {\n return (this.getElementRef().nativeElement.getBoundingClientRect()[from] -\n this.measureScrollOffset(from));\n }\n}\nCdkVirtualScrollableElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkVirtualScrollableElement, deps: [{ token: i0.ElementRef }, { token: ScrollDispatcher }, { token: i0.NgZone }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkVirtualScrollableElement.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkVirtualScrollableElement, isStandalone: true, selector: \"[cdkVirtualScrollingElement]\", host: { classAttribute: \"cdk-virtual-scrollable\" }, providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkVirtualScrollableElement, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkVirtualScrollingElement]',\n providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }],\n standalone: true,\n host: {\n 'class': 'cdk-virtual-scrollable',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ScrollDispatcher }, { type: i0.NgZone }, { type: i2.Directionality, decorators: [{\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 */\n/**\n * Provides as virtual scrollable for the global / window scrollbar.\n */\nclass CdkVirtualScrollableWindow extends CdkVirtualScrollable {\n constructor(scrollDispatcher, ngZone, dir) {\n super(new ElementRef(document.documentElement), scrollDispatcher, ngZone, dir);\n this._elementScrolled = new Observable((observer) => this.ngZone.runOutsideAngular(() => fromEvent(document, 'scroll').pipe(takeUntil(this._destroyed)).subscribe(observer)));\n }\n measureBoundingClientRectWithScrollOffset(from) {\n return this.getElementRef().nativeElement.getBoundingClientRect()[from];\n }\n}\nCdkVirtualScrollableWindow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkVirtualScrollableWindow, deps: [{ token: ScrollDispatcher }, { token: i0.NgZone }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkVirtualScrollableWindow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkVirtualScrollableWindow, isStandalone: true, selector: \"cdk-virtual-scroll-viewport[scrollWindow]\", providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableWindow }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkVirtualScrollableWindow, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-virtual-scroll-viewport[scrollWindow]',\n providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableWindow }],\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: ScrollDispatcher }, { type: i0.NgZone }, { type: i2.Directionality, decorators: [{\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 */\nclass CdkScrollableModule {\n}\nCdkScrollableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkScrollableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCdkScrollableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkScrollableModule, imports: [CdkScrollable], exports: [CdkScrollable] });\nCdkScrollableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkScrollableModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkScrollableModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [CdkScrollable],\n imports: [CdkScrollable],\n }]\n }] });\n/**\n * @docs-primary-export\n */\nclass ScrollingModule {\n}\nScrollingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ScrollingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nScrollingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ScrollingModule, imports: [BidiModule, CdkScrollableModule, CdkVirtualScrollViewport,\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollableWindow,\n CdkVirtualScrollableElement], exports: [BidiModule, CdkScrollableModule, CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n CdkVirtualScrollableWindow,\n CdkVirtualScrollableElement] });\nScrollingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ScrollingModule, imports: [BidiModule,\n CdkScrollableModule,\n CdkVirtualScrollViewport, BidiModule, CdkScrollableModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ScrollingModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [\n BidiModule,\n CdkScrollableModule,\n CdkVirtualScrollViewport,\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollableWindow,\n CdkVirtualScrollableElement,\n ],\n exports: [\n BidiModule,\n CdkScrollableModule,\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n CdkVirtualScrollableWindow,\n CdkVirtualScrollableElement,\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\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CdkFixedSizeVirtualScroll, CdkScrollable, CdkScrollableModule, CdkVirtualForOf, CdkVirtualScrollViewport, CdkVirtualScrollable, CdkVirtualScrollableElement, CdkVirtualScrollableWindow, DEFAULT_RESIZE_TIME, DEFAULT_SCROLL_TIME, FixedSizeVirtualScrollStrategy, ScrollDispatcher, ScrollingModule, VIRTUAL_SCROLLABLE, VIRTUAL_SCROLL_STRATEGY, ViewportRuler, _fixedSizeVirtualScrollStrategyFactory };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, inject, EventEmitter, Injectable, Optional, Inject, Directive, Output, Input, NgModule } from '@angular/core';\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 */\n/**\n * Injection token used to inject the document into Directionality.\n * This is used so that the value can be faked in tests.\n *\n * We can't use the real document in tests because changing the real `dir` causes geometry-based\n * tests in Safari to fail.\n *\n * We also can't re-provide the DOCUMENT token from platform-browser because the unit tests\n * themselves use things like `querySelector` in test code.\n *\n * This token is defined in a separate file from Directionality as a workaround for\n * https://github.com/angular/angular/issues/22559\n *\n * @docs-private\n */\nconst DIR_DOCUMENT = new InjectionToken('cdk-dir-doc', {\n providedIn: 'root',\n factory: DIR_DOCUMENT_FACTORY,\n});\n/** @docs-private */\nfunction DIR_DOCUMENT_FACTORY() {\n return 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/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n/** Resolves a string value to a specific direction. */\nfunction _resolveDirectionality(rawValue) {\n const value = rawValue?.toLowerCase() || '';\n if (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n return RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n }\n return value === 'rtl' ? 'rtl' : 'ltr';\n}\n/**\n * The directionality (LTR / RTL) context for the application (or a subtree of it).\n * Exposes the current direction and a stream of direction changes.\n */\nclass Directionality {\n constructor(_document) {\n /** The current 'ltr' or 'rtl' value. */\n this.value = 'ltr';\n /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */\n this.change = new EventEmitter();\n if (_document) {\n const bodyDir = _document.body ? _document.body.dir : null;\n const htmlDir = _document.documentElement ? _document.documentElement.dir : null;\n this.value = _resolveDirectionality(bodyDir || htmlDir || 'ltr');\n }\n }\n ngOnDestroy() {\n this.change.complete();\n }\n}\nDirectionality.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Directionality, deps: [{ token: DIR_DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nDirectionality.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Directionality, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Directionality, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DIR_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 * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\nclass Dir {\n constructor() {\n /** Normalized direction that accounts for invalid/unsupported values. */\n this._dir = 'ltr';\n /** Whether the `value` has been set to its initial value. */\n this._isInitialized = false;\n /** Event emitted when the direction changes. */\n this.change = new EventEmitter();\n }\n /** @docs-private */\n get dir() {\n return this._dir;\n }\n set dir(value) {\n const previousValue = this._dir;\n // Note: `_resolveDirectionality` resolves the language based on the browser's language,\n // whereas the browser does it based on the content of the element. Since doing so based\n // on the content can be expensive, for now we're doing the simpler matching.\n this._dir = _resolveDirectionality(value);\n this._rawDir = value;\n if (previousValue !== this._dir && this._isInitialized) {\n this.change.emit(this._dir);\n }\n }\n /** Current layout direction of the element. */\n get value() {\n return this.dir;\n }\n /** Initialize once default value has been set. */\n ngAfterContentInit() {\n this._isInitialized = true;\n }\n ngOnDestroy() {\n this.change.complete();\n }\n}\nDir.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Dir, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nDir.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: Dir, selector: \"[dir]\", inputs: { dir: \"dir\" }, outputs: { change: \"dirChange\" }, host: { properties: { \"attr.dir\": \"_rawDir\" } }, providers: [{ provide: Directionality, useExisting: Dir }], exportAs: [\"dir\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Dir, decorators: [{\n type: Directive,\n args: [{\n selector: '[dir]',\n providers: [{ provide: Directionality, useExisting: Dir }],\n host: { '[attr.dir]': '_rawDir' },\n exportAs: 'dir',\n }]\n }], propDecorators: { change: [{\n type: Output,\n args: ['dirChange']\n }], dir: [{\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 */\nclass BidiModule {\n}\nBidiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BidiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBidiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BidiModule, declarations: [Dir], exports: [Dir] });\nBidiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BidiModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BidiModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [Dir],\n declarations: [Dir],\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 * Generated bundle index. Do not edit.\n */\n\nexport { BidiModule, DIR_DOCUMENT, Dir, Directionality };\n","import * as i1 from '@angular/cdk/scrolling';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nexport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport * as i6 from '@angular/common';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Injectable, Inject, Optional, ElementRef, ApplicationRef, ANIMATION_MODULE_TYPE, InjectionToken, Directive, EventEmitter, Input, Output, NgModule } from '@angular/core';\nimport { coerceCssPixelValue, coerceArray, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i1$1 from '@angular/cdk/platform';\nimport { supportsScrollBehavior, _getEventTarget, _isTestEnvironment } from '@angular/cdk/platform';\nimport { filter, take, takeUntil, takeWhile } from 'rxjs/operators';\nimport * as i5 from '@angular/cdk/bidi';\nimport { BidiModule } from '@angular/cdk/bidi';\nimport { DomPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { Subject, Subscription, merge } from 'rxjs';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 scrollBehaviorSupported = supportsScrollBehavior();\n/**\n * Strategy that will prevent the user from scrolling while the overlay is visible.\n */\nclass BlockScrollStrategy {\n constructor(_viewportRuler, document) {\n this._viewportRuler = _viewportRuler;\n this._previousHTMLStyles = { top: '', left: '' };\n this._isEnabled = false;\n this._document = document;\n }\n /** Attaches this scroll strategy to an overlay. */\n attach() { }\n /** Blocks page-level scroll while the attached overlay is open. */\n enable() {\n if (this._canBeEnabled()) {\n const root = this._document.documentElement;\n this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();\n // Cache the previous inline styles in case the user had set them.\n this._previousHTMLStyles.left = root.style.left || '';\n this._previousHTMLStyles.top = root.style.top || '';\n // Note: we're using the `html` node, instead of the `body`, because the `body` may\n // have the user agent margin, whereas the `html` is guaranteed not to have one.\n root.style.left = coerceCssPixelValue(-this._previousScrollPosition.left);\n root.style.top = coerceCssPixelValue(-this._previousScrollPosition.top);\n root.classList.add('cdk-global-scrollblock');\n this._isEnabled = true;\n }\n }\n /** Unblocks page-level scroll while the attached overlay is open. */\n disable() {\n if (this._isEnabled) {\n const html = this._document.documentElement;\n const body = this._document.body;\n const htmlStyle = html.style;\n const bodyStyle = body.style;\n const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';\n const previousBodyScrollBehavior = bodyStyle.scrollBehavior || '';\n this._isEnabled = false;\n htmlStyle.left = this._previousHTMLStyles.left;\n htmlStyle.top = this._previousHTMLStyles.top;\n html.classList.remove('cdk-global-scrollblock');\n // Disable user-defined smooth scrolling temporarily while we restore the scroll position.\n // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior\n // Note that we don't mutate the property if the browser doesn't support `scroll-behavior`,\n // because it can throw off feature detections in `supportsScrollBehavior` which\n // checks for `'scrollBehavior' in documentElement.style`.\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto';\n }\n window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top);\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = previousHtmlScrollBehavior;\n bodyStyle.scrollBehavior = previousBodyScrollBehavior;\n }\n }\n }\n _canBeEnabled() {\n // Since the scroll strategies can't be singletons, we have to use a global CSS class\n // (`cdk-global-scrollblock`) to make sure that we don't try to disable global\n // scrolling multiple times.\n const html = this._document.documentElement;\n if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {\n return false;\n }\n const body = this._document.body;\n const viewport = this._viewportRuler.getViewportSize();\n return body.scrollHeight > viewport.height || body.scrollWidth > viewport.width;\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 an error to be thrown when attempting to attach an already-attached scroll strategy.\n */\nfunction getMatScrollStrategyAlreadyAttachedError() {\n return Error(`Scroll strategy has already been attached.`);\n}\n\n/**\n * Strategy that will close the overlay as soon as the user starts scrolling.\n */\nclass CloseScrollStrategy {\n constructor(_scrollDispatcher, _ngZone, _viewportRuler, _config) {\n this._scrollDispatcher = _scrollDispatcher;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._config = _config;\n this._scrollSubscription = null;\n /** Detaches the overlay ref and disables the scroll strategy. */\n this._detach = () => {\n this.disable();\n if (this._overlayRef.hasAttached()) {\n this._ngZone.run(() => this._overlayRef.detach());\n }\n };\n }\n /** Attaches this scroll strategy to an overlay. */\n attach(overlayRef) {\n if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n this._overlayRef = overlayRef;\n }\n /** Enables the closing of the attached overlay on scroll. */\n enable() {\n if (this._scrollSubscription) {\n return;\n }\n const stream = this._scrollDispatcher.scrolled(0).pipe(filter(scrollable => {\n return (!scrollable ||\n !this._overlayRef.overlayElement.contains(scrollable.getElementRef().nativeElement));\n }));\n if (this._config && this._config.threshold && this._config.threshold > 1) {\n this._initialScrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n this._scrollSubscription = stream.subscribe(() => {\n const scrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n if (Math.abs(scrollPosition - this._initialScrollPosition) > this._config.threshold) {\n this._detach();\n }\n else {\n this._overlayRef.updatePosition();\n }\n });\n }\n else {\n this._scrollSubscription = stream.subscribe(this._detach);\n }\n }\n /** Disables the closing the attached overlay on scroll. */\n disable() {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n }\n detach() {\n this.disable();\n this._overlayRef = 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/** Scroll strategy that doesn't do anything. */\nclass NoopScrollStrategy {\n /** Does nothing, as this scroll strategy is a no-op. */\n enable() { }\n /** Does nothing, as this scroll strategy is a no-op. */\n disable() { }\n /** Does nothing, as this scroll strategy is a no-op. */\n attach() { }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code 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 whether an element is scrolled outside of view by any of its parent scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is scrolled out of view\n * @docs-private\n */\nfunction isElementScrolledOutsideView(element, scrollContainers) {\n return scrollContainers.some(containerBounds => {\n const outsideAbove = element.bottom < containerBounds.top;\n const outsideBelow = element.top > containerBounds.bottom;\n const outsideLeft = element.right < containerBounds.left;\n const outsideRight = element.left > containerBounds.right;\n return outsideAbove || outsideBelow || outsideLeft || outsideRight;\n });\n}\n/**\n * Gets whether an element is clipped by any of its scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is clipped\n * @docs-private\n */\nfunction isElementClippedByScrolling(element, scrollContainers) {\n return scrollContainers.some(scrollContainerRect => {\n const clippedAbove = element.top < scrollContainerRect.top;\n const clippedBelow = element.bottom > scrollContainerRect.bottom;\n const clippedLeft = element.left < scrollContainerRect.left;\n const clippedRight = element.right > scrollContainerRect.right;\n return clippedAbove || clippedBelow || clippedLeft || clippedRight;\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 * Strategy that will update the element position as the user is scrolling.\n */\nclass RepositionScrollStrategy {\n constructor(_scrollDispatcher, _viewportRuler, _ngZone, _config) {\n this._scrollDispatcher = _scrollDispatcher;\n this._viewportRuler = _viewportRuler;\n this._ngZone = _ngZone;\n this._config = _config;\n this._scrollSubscription = null;\n }\n /** Attaches this scroll strategy to an overlay. */\n attach(overlayRef) {\n if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n this._overlayRef = overlayRef;\n }\n /** Enables repositioning of the attached overlay on scroll. */\n enable() {\n if (!this._scrollSubscription) {\n const throttle = this._config ? this._config.scrollThrottle : 0;\n this._scrollSubscription = this._scrollDispatcher.scrolled(throttle).subscribe(() => {\n this._overlayRef.updatePosition();\n // TODO(crisbeto): make `close` on by default once all components can handle it.\n if (this._config && this._config.autoClose) {\n const overlayRect = this._overlayRef.overlayElement.getBoundingClientRect();\n const { width, height } = this._viewportRuler.getViewportSize();\n // TODO(crisbeto): include all ancestor scroll containers here once\n // we have a way of exposing the trigger element to the scroll strategy.\n const parentRects = [{ width, height, bottom: height, right: width, top: 0, left: 0 }];\n if (isElementScrolledOutsideView(overlayRect, parentRects)) {\n this.disable();\n this._ngZone.run(() => this._overlayRef.detach());\n }\n }\n });\n }\n }\n /** Disables repositioning of the attached overlay on scroll. */\n disable() {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n }\n detach() {\n this.disable();\n this._overlayRef = 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 * Options for how an overlay will handle scrolling.\n *\n * Users can provide a custom value for `ScrollStrategyOptions` to replace the default\n * behaviors. This class primarily acts as a factory for ScrollStrategy instances.\n */\nclass ScrollStrategyOptions {\n constructor(_scrollDispatcher, _viewportRuler, _ngZone, document) {\n this._scrollDispatcher = _scrollDispatcher;\n this._viewportRuler = _viewportRuler;\n this._ngZone = _ngZone;\n /** Do nothing on scroll. */\n this.noop = () => new NoopScrollStrategy();\n /**\n * Close the overlay as soon as the user scrolls.\n * @param config Configuration to be used inside the scroll strategy.\n */\n this.close = (config) => new CloseScrollStrategy(this._scrollDispatcher, this._ngZone, this._viewportRuler, config);\n /** Block scrolling. */\n this.block = () => new BlockScrollStrategy(this._viewportRuler, this._document);\n /**\n * Update the overlay's position on scroll.\n * @param config Configuration to be used inside the scroll strategy.\n * Allows debouncing the reposition calls.\n */\n this.reposition = (config) => new RepositionScrollStrategy(this._scrollDispatcher, this._viewportRuler, this._ngZone, config);\n this._document = document;\n }\n}\nScrollStrategyOptions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ScrollStrategyOptions, deps: [{ token: i1.ScrollDispatcher }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nScrollStrategyOptions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ScrollStrategyOptions, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: ScrollStrategyOptions, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.ScrollDispatcher }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { 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/** Initial configuration used when creating an overlay. */\nclass OverlayConfig {\n constructor(config) {\n /** Strategy to be used when handling scroll events while the overlay is open. */\n this.scrollStrategy = new NoopScrollStrategy();\n /** Custom class to add to the overlay pane. */\n this.panelClass = '';\n /** Whether the overlay has a backdrop. */\n this.hasBackdrop = false;\n /** Custom class to add to the backdrop */\n this.backdropClass = 'cdk-overlay-dark-backdrop';\n /**\n * Whether the overlay should be disposed of when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n this.disposeOnNavigation = false;\n if (config) {\n // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n const configKeys = Object.keys(config);\n for (const key of configKeys) {\n if (config[key] !== undefined) {\n // TypeScript, as of version 3.5, sees the left-hand-side of this expression\n // as \"I don't know *which* key this is, so the only valid value is the intersection\n // of all the possible values.\" In this case, that happens to be `undefined`. TypeScript\n // is not smart enough to see that the right-hand-side is actually an access of the same\n // exact type with the same exact key, meaning that the value type must be identical.\n // So we use `any` to work around this.\n this[key] = config[key];\n }\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/** The points of the origin element and the overlay element to connect. */\nclass ConnectionPositionPair {\n constructor(origin, overlay, \n /** Offset along the X axis. */\n offsetX, \n /** Offset along the Y axis. */\n offsetY, \n /** Class(es) to be applied to the panel while this position is active. */\n panelClass) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n this.panelClass = panelClass;\n this.originX = origin.originX;\n this.originY = origin.originY;\n this.overlayX = overlay.overlayX;\n this.overlayY = overlay.overlayY;\n }\n}\n/**\n * Set of properties regarding the position of the origin and overlay relative to the viewport\n * with respect to the containing Scrollable elements.\n *\n * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the\n * bounds of any one of the strategy's Scrollable's bounding client rectangle.\n *\n * The overlay and origin are outside view if there is no overlap between their bounding client\n * rectangle and any one of the strategy's Scrollable's bounding client rectangle.\n *\n * ----------- -----------\n * | outside | | clipped |\n * | view | --------------------------\n * | | | | | |\n * ---------- | ----------- |\n * -------------------------- | |\n * | | | Scrollable |\n * | | | |\n * | | --------------------------\n * | Scrollable |\n * | |\n * --------------------------\n *\n * @docs-private\n */\nclass ScrollingVisibility {\n}\n/** The change event emitted by the strategy when a fallback position is used. */\nclass ConnectedOverlayPositionChange {\n constructor(\n /** The position used as a result of this change. */\n connectionPair, \n /** @docs-private */\n scrollableViewProperties) {\n this.connectionPair = connectionPair;\n this.scrollableViewProperties = scrollableViewProperties;\n }\n}\n/**\n * Validates whether a vertical position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nfunction validateVerticalPosition(property, value) {\n if (value !== 'top' && value !== 'bottom' && value !== 'center') {\n throw Error(`ConnectedPosition: Invalid ${property} \"${value}\". ` +\n `Expected \"top\", \"bottom\" or \"center\".`);\n }\n}\n/**\n * Validates whether a horizontal position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nfunction validateHorizontalPosition(property, value) {\n if (value !== 'start' && value !== 'end' && value !== 'center') {\n throw Error(`ConnectedPosition: Invalid ${property} \"${value}\". ` +\n `Expected \"start\", \"end\" or \"center\".`);\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 * Service for dispatching events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass BaseOverlayDispatcher {\n constructor(document) {\n /** Currently attached overlays in the order they were attached. */\n this._attachedOverlays = [];\n this._document = document;\n }\n ngOnDestroy() {\n this.detach();\n }\n /** Add a new overlay to the list of attached overlay refs. */\n add(overlayRef) {\n // Ensure that we don't get the same overlay multiple times.\n this.remove(overlayRef);\n this._attachedOverlays.push(overlayRef);\n }\n /** Remove an overlay from the list of attached overlay refs. */\n remove(overlayRef) {\n const index = this._attachedOverlays.indexOf(overlayRef);\n if (index > -1) {\n this._attachedOverlays.splice(index, 1);\n }\n // Remove the global listener once there are no more overlays.\n if (this._attachedOverlays.length === 0) {\n this.detach();\n }\n }\n}\nBaseOverlayDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BaseOverlayDispatcher, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBaseOverlayDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BaseOverlayDispatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BaseOverlayDispatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\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 * Service for dispatching keyboard events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass OverlayKeyboardDispatcher extends BaseOverlayDispatcher {\n constructor(document, \n /** @breaking-change 14.0.0 _ngZone will be required. */\n _ngZone) {\n super(document);\n this._ngZone = _ngZone;\n /** Keyboard event listener that will be attached to the body. */\n this._keydownListener = (event) => {\n const overlays = this._attachedOverlays;\n for (let i = overlays.length - 1; i > -1; i--) {\n // Dispatch the keydown event to the top overlay which has subscribers to its keydown events.\n // We want to target the most recent overlay, rather than trying to match where the event came\n // from, because some components might open an overlay, but keep focus on a trigger element\n // (e.g. for select and autocomplete). We skip overlays without keydown event subscriptions,\n // because we don't want overlays that don't handle keyboard events to block the ones below\n // them that do.\n if (overlays[i]._keydownEvents.observers.length > 0) {\n const keydownEvents = overlays[i]._keydownEvents;\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.run(() => keydownEvents.next(event));\n }\n else {\n keydownEvents.next(event);\n }\n break;\n }\n }\n };\n }\n /** Add a new overlay to the list of attached overlay refs. */\n add(overlayRef) {\n super.add(overlayRef);\n // Lazily start dispatcher once first overlay is added\n if (!this._isAttached) {\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.runOutsideAngular(() => this._document.body.addEventListener('keydown', this._keydownListener));\n }\n else {\n this._document.body.addEventListener('keydown', this._keydownListener);\n }\n this._isAttached = true;\n }\n }\n /** Detaches the global keyboard event listener. */\n detach() {\n if (this._isAttached) {\n this._document.body.removeEventListener('keydown', this._keydownListener);\n this._isAttached = false;\n }\n }\n}\nOverlayKeyboardDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayKeyboardDispatcher, deps: [{ token: DOCUMENT }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nOverlayKeyboardDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayKeyboardDispatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayKeyboardDispatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.NgZone, decorators: [{\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 */\n/**\n * Service for dispatching mouse click events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {\n constructor(document, _platform, \n /** @breaking-change 14.0.0 _ngZone will be required. */\n _ngZone) {\n super(document);\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._cursorStyleIsSet = false;\n /** Store pointerdown event target to track origin of click. */\n this._pointerDownListener = (event) => {\n this._pointerDownEventTarget = _getEventTarget(event);\n };\n /** Click event listener that will be attached to the body propagate phase. */\n this._clickListener = (event) => {\n const target = _getEventTarget(event);\n // In case of a click event, we want to check the origin of the click\n // (e.g. in case where a user starts a click inside the overlay and\n // releases the click outside of it).\n // This is done by using the event target of the preceding pointerdown event.\n // Every click event caused by a pointer device has a preceding pointerdown\n // event, unless the click was programmatically triggered (e.g. in a unit test).\n const origin = event.type === 'click' && this._pointerDownEventTarget\n ? this._pointerDownEventTarget\n : target;\n // Reset the stored pointerdown event target, to avoid having it interfere\n // in subsequent events.\n this._pointerDownEventTarget = null;\n // We copy the array because the original may be modified asynchronously if the\n // outsidePointerEvents listener decides to detach overlays resulting in index errors inside\n // the for loop.\n const overlays = this._attachedOverlays.slice();\n // Dispatch the mouse event to the top overlay which has subscribers to its mouse events.\n // We want to target all overlays for which the click could be considered as outside click.\n // As soon as we reach an overlay for which the click is not outside click we break off\n // the loop.\n for (let i = overlays.length - 1; i > -1; i--) {\n const overlayRef = overlays[i];\n if (overlayRef._outsidePointerEvents.observers.length < 1 || !overlayRef.hasAttached()) {\n continue;\n }\n // If it's a click inside the overlay, just break - we should do nothing\n // If it's an outside click (both origin and target of the click) dispatch the mouse event,\n // and proceed with the next overlay\n if (overlayRef.overlayElement.contains(target) ||\n overlayRef.overlayElement.contains(origin)) {\n break;\n }\n const outsidePointerEvents = overlayRef._outsidePointerEvents;\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.run(() => outsidePointerEvents.next(event));\n }\n else {\n outsidePointerEvents.next(event);\n }\n }\n };\n }\n /** Add a new overlay to the list of attached overlay refs. */\n add(overlayRef) {\n super.add(overlayRef);\n // Safari on iOS does not generate click events for non-interactive\n // elements. However, we want to receive a click for any element outside\n // the overlay. We can force a \"clickable\" state by setting\n // `cursor: pointer` on the document body. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#Safari_Mobile\n // https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html\n if (!this._isAttached) {\n const body = this._document.body;\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.runOutsideAngular(() => this._addEventListeners(body));\n }\n else {\n this._addEventListeners(body);\n }\n // click event is not fired on iOS. To make element \"clickable\" we are\n // setting the cursor to pointer\n if (this._platform.IOS && !this._cursorStyleIsSet) {\n this._cursorOriginalValue = body.style.cursor;\n body.style.cursor = 'pointer';\n this._cursorStyleIsSet = true;\n }\n this._isAttached = true;\n }\n }\n /** Detaches the global keyboard event listener. */\n detach() {\n if (this._isAttached) {\n const body = this._document.body;\n body.removeEventListener('pointerdown', this._pointerDownListener, true);\n body.removeEventListener('click', this._clickListener, true);\n body.removeEventListener('auxclick', this._clickListener, true);\n body.removeEventListener('contextmenu', this._clickListener, true);\n if (this._platform.IOS && this._cursorStyleIsSet) {\n body.style.cursor = this._cursorOriginalValue;\n this._cursorStyleIsSet = false;\n }\n this._isAttached = false;\n }\n }\n _addEventListeners(body) {\n body.addEventListener('pointerdown', this._pointerDownListener, true);\n body.addEventListener('click', this._clickListener, true);\n body.addEventListener('auxclick', this._clickListener, true);\n body.addEventListener('contextmenu', this._clickListener, true);\n }\n}\nOverlayOutsideClickDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayOutsideClickDispatcher, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nOverlayOutsideClickDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayOutsideClickDispatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayOutsideClickDispatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1$1.Platform }, { type: i0.NgZone, decorators: [{\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 */\n/** Container inside which all overlays will render. */\nclass OverlayContainer {\n constructor(document, _platform) {\n this._platform = _platform;\n this._document = document;\n }\n ngOnDestroy() {\n this._containerElement?.remove();\n }\n /**\n * This method returns the overlay container element. It will lazily\n * create the element the first time it is called to facilitate using\n * the container in non-browser environments.\n * @returns the container element\n */\n getContainerElement() {\n if (!this._containerElement) {\n this._createContainer();\n }\n return this._containerElement;\n }\n /**\n * Create the overlay container element, which is simply a div\n * with the 'cdk-overlay-container' class on the document body.\n */\n _createContainer() {\n const containerClass = 'cdk-overlay-container';\n // TODO(crisbeto): remove the testing check once we have an overlay testing\n // module or Angular starts tearing down the testing `NgModule`. See:\n // https://github.com/angular/angular/issues/18831\n if (this._platform.isBrowser || _isTestEnvironment()) {\n const oppositePlatformContainers = this._document.querySelectorAll(`.${containerClass}[platform=\"server\"], ` + `.${containerClass}[platform=\"test\"]`);\n // Remove any old containers from the opposite platform.\n // This can happen when transitioning from the server to the client.\n for (let i = 0; i < oppositePlatformContainers.length; i++) {\n oppositePlatformContainers[i].remove();\n }\n }\n const container = this._document.createElement('div');\n container.classList.add(containerClass);\n // A long time ago we kept adding new overlay containers whenever a new app was instantiated,\n // but at some point we added logic which clears the duplicate ones in order to avoid leaks.\n // The new logic was a little too aggressive since it was breaking some legitimate use cases.\n // To mitigate the problem we made it so that only containers from a different platform are\n // cleared, but the side-effect was that people started depending on the overly-aggressive\n // logic to clean up their tests for them. Until we can introduce an overlay-specific testing\n // module which does the cleanup, we try to detect that we're in a test environment and we\n // always clear the container. See #17006.\n // TODO(crisbeto): remove the test environment check once we have an overlay testing module.\n if (_isTestEnvironment()) {\n container.setAttribute('platform', 'test');\n }\n else if (!this._platform.isBrowser) {\n container.setAttribute('platform', 'server');\n }\n this._document.body.appendChild(container);\n this._containerElement = container;\n }\n}\nOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });\nOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayContainer, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayContainer, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1$1.Platform }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nclass OverlayRef {\n constructor(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document, _location, _outsideClickDispatcher, _animationsDisabled = false) {\n this._portalOutlet = _portalOutlet;\n this._host = _host;\n this._pane = _pane;\n this._config = _config;\n this._ngZone = _ngZone;\n this._keyboardDispatcher = _keyboardDispatcher;\n this._document = _document;\n this._location = _location;\n this._outsideClickDispatcher = _outsideClickDispatcher;\n this._animationsDisabled = _animationsDisabled;\n this._backdropElement = null;\n this._backdropClick = new Subject();\n this._attachments = new Subject();\n this._detachments = new Subject();\n this._locationChanges = Subscription.EMPTY;\n this._backdropClickHandler = (event) => this._backdropClick.next(event);\n this._backdropTransitionendHandler = (event) => {\n this._disposeBackdrop(event.target);\n };\n /** Stream of keydown events dispatched to this overlay. */\n this._keydownEvents = new Subject();\n /** Stream of mouse outside events dispatched to this overlay. */\n this._outsidePointerEvents = new Subject();\n if (_config.scrollStrategy) {\n this._scrollStrategy = _config.scrollStrategy;\n this._scrollStrategy.attach(this);\n }\n this._positionStrategy = _config.positionStrategy;\n }\n /** The overlay's HTML element */\n get overlayElement() {\n return this._pane;\n }\n /** The overlay's backdrop HTML element. */\n get backdropElement() {\n return this._backdropElement;\n }\n /**\n * Wrapper around the panel element. Can be used for advanced\n * positioning where a wrapper with specific styling is\n * required around the overlay pane.\n */\n get hostElement() {\n return this._host;\n }\n /**\n * Attaches content, given via a Portal, to the overlay.\n * If the overlay is configured to have a backdrop, it will be created.\n *\n * @param portal Portal instance to which to attach the overlay.\n * @returns The portal attachment result.\n */\n attach(portal) {\n // Insert the host into the DOM before attaching the portal, otherwise\n // the animations module will skip animations on repeat attachments.\n if (!this._host.parentElement && this._previousHostParent) {\n this._previousHostParent.appendChild(this._host);\n }\n const attachResult = this._portalOutlet.attach(portal);\n if (this._positionStrategy) {\n this._positionStrategy.attach(this);\n }\n this._updateStackingOrder();\n this._updateElementSize();\n this._updateElementDirection();\n if (this._scrollStrategy) {\n this._scrollStrategy.enable();\n }\n // Update the position once the zone is stable so that the overlay will be fully rendered\n // before attempting to position it, as the position may depend on the size of the rendered\n // content.\n this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n // The overlay could've been detached before the zone has stabilized.\n if (this.hasAttached()) {\n this.updatePosition();\n }\n });\n // Enable pointer events for the overlay pane element.\n this._togglePointerEvents(true);\n if (this._config.hasBackdrop) {\n this._attachBackdrop();\n }\n if (this._config.panelClass) {\n this._toggleClasses(this._pane, this._config.panelClass, true);\n }\n // Only emit the `attachments` event once all other setup is done.\n this._attachments.next();\n // Track this overlay by the keyboard dispatcher\n this._keyboardDispatcher.add(this);\n if (this._config.disposeOnNavigation) {\n this._locationChanges = this._location.subscribe(() => this.dispose());\n }\n this._outsideClickDispatcher.add(this);\n // TODO(crisbeto): the null check is here, because the portal outlet returns `any`.\n // We should be guaranteed for the result to be `ComponentRef | EmbeddedViewRef`, but\n // `instanceof EmbeddedViewRef` doesn't appear to work at the moment.\n if (typeof attachResult?.onDestroy === 'function') {\n // In most cases we control the portal and we know when it is being detached so that\n // we can finish the disposal process. The exception is if the user passes in a custom\n // `ViewContainerRef` that isn't destroyed through the overlay API. Note that we use\n // `detach` here instead of `dispose`, because we don't know if the user intends to\n // reattach the overlay at a later point. It also has the advantage of waiting for animations.\n attachResult.onDestroy(() => {\n if (this.hasAttached()) {\n // We have to delay the `detach` call, because detaching immediately prevents\n // other destroy hooks from running. This is likely a framework bug similar to\n // https://github.com/angular/angular/issues/46119\n this._ngZone.runOutsideAngular(() => Promise.resolve().then(() => this.detach()));\n }\n });\n }\n return attachResult;\n }\n /**\n * Detaches an overlay from a portal.\n * @returns The portal detachment result.\n */\n detach() {\n if (!this.hasAttached()) {\n return;\n }\n this.detachBackdrop();\n // When the overlay is detached, the pane element should disable pointer events.\n // This is necessary because otherwise the pane element will cover the page and disable\n // pointer events therefore. Depends on the position strategy and the applied pane boundaries.\n this._togglePointerEvents(false);\n if (this._positionStrategy && this._positionStrategy.detach) {\n this._positionStrategy.detach();\n }\n if (this._scrollStrategy) {\n this._scrollStrategy.disable();\n }\n const detachmentResult = this._portalOutlet.detach();\n // Only emit after everything is detached.\n this._detachments.next();\n // Remove this overlay from keyboard dispatcher tracking.\n this._keyboardDispatcher.remove(this);\n // Keeping the host element in the DOM can cause scroll jank, because it still gets\n // rendered, even though it's transparent and unclickable which is why we remove it.\n this._detachContentWhenStable();\n this._locationChanges.unsubscribe();\n this._outsideClickDispatcher.remove(this);\n return detachmentResult;\n }\n /** Cleans up the overlay from the DOM. */\n dispose() {\n const isAttached = this.hasAttached();\n if (this._positionStrategy) {\n this._positionStrategy.dispose();\n }\n this._disposeScrollStrategy();\n this._disposeBackdrop(this._backdropElement);\n this._locationChanges.unsubscribe();\n this._keyboardDispatcher.remove(this);\n this._portalOutlet.dispose();\n this._attachments.complete();\n this._backdropClick.complete();\n this._keydownEvents.complete();\n this._outsidePointerEvents.complete();\n this._outsideClickDispatcher.remove(this);\n this._host?.remove();\n this._previousHostParent = this._pane = this._host = null;\n if (isAttached) {\n this._detachments.next();\n }\n this._detachments.complete();\n }\n /** Whether the overlay has attached content. */\n hasAttached() {\n return this._portalOutlet.hasAttached();\n }\n /** Gets an observable that emits when the backdrop has been clicked. */\n backdropClick() {\n return this._backdropClick;\n }\n /** Gets an observable that emits when the overlay has been attached. */\n attachments() {\n return this._attachments;\n }\n /** Gets an observable that emits when the overlay has been detached. */\n detachments() {\n return this._detachments;\n }\n /** Gets an observable of keydown events targeted to this overlay. */\n keydownEvents() {\n return this._keydownEvents;\n }\n /** Gets an observable of pointer events targeted outside this overlay. */\n outsidePointerEvents() {\n return this._outsidePointerEvents;\n }\n /** Gets the current overlay configuration, which is immutable. */\n getConfig() {\n return this._config;\n }\n /** Updates the position of the overlay based on the position strategy. */\n updatePosition() {\n if (this._positionStrategy) {\n this._positionStrategy.apply();\n }\n }\n /** Switches to a new position strategy and updates the overlay position. */\n updatePositionStrategy(strategy) {\n if (strategy === this._positionStrategy) {\n return;\n }\n if (this._positionStrategy) {\n this._positionStrategy.dispose();\n }\n this._positionStrategy = strategy;\n if (this.hasAttached()) {\n strategy.attach(this);\n this.updatePosition();\n }\n }\n /** Update the size properties of the overlay. */\n updateSize(sizeConfig) {\n this._config = { ...this._config, ...sizeConfig };\n this._updateElementSize();\n }\n /** Sets the LTR/RTL direction for the overlay. */\n setDirection(dir) {\n this._config = { ...this._config, direction: dir };\n this._updateElementDirection();\n }\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes) {\n if (this._pane) {\n this._toggleClasses(this._pane, classes, true);\n }\n }\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes) {\n if (this._pane) {\n this._toggleClasses(this._pane, classes, false);\n }\n }\n /**\n * Returns the layout direction of the overlay panel.\n */\n getDirection() {\n const direction = this._config.direction;\n if (!direction) {\n return 'ltr';\n }\n return typeof direction === 'string' ? direction : direction.value;\n }\n /** Switches to a new scroll strategy. */\n updateScrollStrategy(strategy) {\n if (strategy === this._scrollStrategy) {\n return;\n }\n this._disposeScrollStrategy();\n this._scrollStrategy = strategy;\n if (this.hasAttached()) {\n strategy.attach(this);\n strategy.enable();\n }\n }\n /** Updates the text direction of the overlay panel. */\n _updateElementDirection() {\n this._host.setAttribute('dir', this.getDirection());\n }\n /** Updates the size of the overlay element based on the overlay config. */\n _updateElementSize() {\n if (!this._pane) {\n return;\n }\n const style = this._pane.style;\n style.width = coerceCssPixelValue(this._config.width);\n style.height = coerceCssPixelValue(this._config.height);\n style.minWidth = coerceCssPixelValue(this._config.minWidth);\n style.minHeight = coerceCssPixelValue(this._config.minHeight);\n style.maxWidth = coerceCssPixelValue(this._config.maxWidth);\n style.maxHeight = coerceCssPixelValue(this._config.maxHeight);\n }\n /** Toggles the pointer events for the overlay pane element. */\n _togglePointerEvents(enablePointer) {\n this._pane.style.pointerEvents = enablePointer ? '' : 'none';\n }\n /** Attaches a backdrop for this overlay. */\n _attachBackdrop() {\n const showingClass = 'cdk-overlay-backdrop-showing';\n this._backdropElement = this._document.createElement('div');\n this._backdropElement.classList.add('cdk-overlay-backdrop');\n if (this._animationsDisabled) {\n this._backdropElement.classList.add('cdk-overlay-backdrop-noop-animation');\n }\n if (this._config.backdropClass) {\n this._toggleClasses(this._backdropElement, this._config.backdropClass, true);\n }\n // Insert the backdrop before the pane in the DOM order,\n // in order to handle stacked overlays properly.\n this._host.parentElement.insertBefore(this._backdropElement, this._host);\n // Forward backdrop clicks such that the consumer of the overlay can perform whatever\n // action desired when such a click occurs (usually closing the overlay).\n this._backdropElement.addEventListener('click', this._backdropClickHandler);\n // Add class to fade-in the backdrop after one frame.\n if (!this._animationsDisabled && typeof requestAnimationFrame !== 'undefined') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n if (this._backdropElement) {\n this._backdropElement.classList.add(showingClass);\n }\n });\n });\n }\n else {\n this._backdropElement.classList.add(showingClass);\n }\n }\n /**\n * Updates the stacking order of the element, moving it to the top if necessary.\n * This is required in cases where one overlay was detached, while another one,\n * that should be behind it, was destroyed. The next time both of them are opened,\n * the stacking will be wrong, because the detached element's pane will still be\n * in its original DOM position.\n */\n _updateStackingOrder() {\n if (this._host.nextSibling) {\n this._host.parentNode.appendChild(this._host);\n }\n }\n /** Detaches the backdrop (if any) associated with the overlay. */\n detachBackdrop() {\n const backdropToDetach = this._backdropElement;\n if (!backdropToDetach) {\n return;\n }\n if (this._animationsDisabled) {\n this._disposeBackdrop(backdropToDetach);\n return;\n }\n backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');\n this._ngZone.runOutsideAngular(() => {\n backdropToDetach.addEventListener('transitionend', this._backdropTransitionendHandler);\n });\n // If the backdrop doesn't have a transition, the `transitionend` event won't fire.\n // In this case we make it unclickable and we try to remove it after a delay.\n backdropToDetach.style.pointerEvents = 'none';\n // Run this outside the Angular zone because there's nothing that Angular cares about.\n // If it were to run inside the Angular zone, every test that used Overlay would have to be\n // either async or fakeAsync.\n this._backdropTimeout = this._ngZone.runOutsideAngular(() => setTimeout(() => {\n this._disposeBackdrop(backdropToDetach);\n }, 500));\n }\n /** Toggles a single CSS class or an array of classes on an element. */\n _toggleClasses(element, cssClasses, isAdd) {\n const classes = coerceArray(cssClasses || []).filter(c => !!c);\n if (classes.length) {\n isAdd ? element.classList.add(...classes) : element.classList.remove(...classes);\n }\n }\n /** Detaches the overlay content next time the zone stabilizes. */\n _detachContentWhenStable() {\n // Normally we wouldn't have to explicitly run this outside the `NgZone`, however\n // if the consumer is using `zone-patch-rxjs`, the `Subscription.unsubscribe` call will\n // be patched to run inside the zone, which will throw us into an infinite loop.\n this._ngZone.runOutsideAngular(() => {\n // We can't remove the host here immediately, because the overlay pane's content\n // might still be animating. This stream helps us avoid interrupting the animation\n // by waiting for the pane to become empty.\n const subscription = this._ngZone.onStable\n .pipe(takeUntil(merge(this._attachments, this._detachments)))\n .subscribe(() => {\n // Needs a couple of checks for the pane and host, because\n // they may have been removed by the time the zone stabilizes.\n if (!this._pane || !this._host || this._pane.children.length === 0) {\n if (this._pane && this._config.panelClass) {\n this._toggleClasses(this._pane, this._config.panelClass, false);\n }\n if (this._host && this._host.parentElement) {\n this._previousHostParent = this._host.parentElement;\n this._host.remove();\n }\n subscription.unsubscribe();\n }\n });\n });\n }\n /** Disposes of a scroll strategy. */\n _disposeScrollStrategy() {\n const scrollStrategy = this._scrollStrategy;\n if (scrollStrategy) {\n scrollStrategy.disable();\n if (scrollStrategy.detach) {\n scrollStrategy.detach();\n }\n }\n }\n /** Removes a backdrop element from the DOM. */\n _disposeBackdrop(backdrop) {\n if (backdrop) {\n backdrop.removeEventListener('click', this._backdropClickHandler);\n backdrop.removeEventListener('transitionend', this._backdropTransitionendHandler);\n backdrop.remove();\n // It is possible that a new portal has been attached to this overlay since we started\n // removing the backdrop. If that is the case, only clear the backdrop reference if it\n // is still the same instance that we started to remove.\n if (this._backdropElement === backdrop) {\n this._backdropElement = null;\n }\n }\n if (this._backdropTimeout) {\n clearTimeout(this._backdropTimeout);\n this._backdropTimeout = undefined;\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: refactor clipping detection into a separate thing (part of scrolling module)\n// TODO: doesn't handle both flexible width and height when it has to scroll along both axis.\n/** Class to be added to the overlay bounding box. */\nconst boundingBoxClass = 'cdk-overlay-connected-position-bounding-box';\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative some origin element. The relative position is defined in terms of\n * a point on the origin element that is connected to a point on the overlay element. For example,\n * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner\n * of the overlay.\n */\nclass FlexibleConnectedPositionStrategy {\n /** Ordered list of preferred positions, from most to least desirable. */\n get positions() {\n return this._preferredPositions;\n }\n constructor(connectedTo, _viewportRuler, _document, _platform, _overlayContainer) {\n this._viewportRuler = _viewportRuler;\n this._document = _document;\n this._platform = _platform;\n this._overlayContainer = _overlayContainer;\n /** Last size used for the bounding box. Used to avoid resizing the overlay after open. */\n this._lastBoundingBoxSize = { width: 0, height: 0 };\n /** Whether the overlay was pushed in a previous positioning. */\n this._isPushed = false;\n /** Whether the overlay can be pushed on-screen on the initial open. */\n this._canPush = true;\n /** Whether the overlay can grow via flexible width/height after the initial open. */\n this._growAfterOpen = false;\n /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n this._hasFlexibleDimensions = true;\n /** Whether the overlay position is locked. */\n this._positionLocked = false;\n /** Amount of space that must be maintained between the overlay and the edge of the viewport. */\n this._viewportMargin = 0;\n /** The Scrollable containers used to check scrollable view properties on position change. */\n this._scrollables = [];\n /** Ordered list of preferred positions, from most to least desirable. */\n this._preferredPositions = [];\n /** Subject that emits whenever the position changes. */\n this._positionChanges = new Subject();\n /** Subscription to viewport size changes. */\n this._resizeSubscription = Subscription.EMPTY;\n /** Default offset for the overlay along the x axis. */\n this._offsetX = 0;\n /** Default offset for the overlay along the y axis. */\n this._offsetY = 0;\n /** Keeps track of the CSS classes that the position strategy has applied on the overlay panel. */\n this._appliedPanelClasses = [];\n /** Observable sequence of position changes. */\n this.positionChanges = this._positionChanges;\n this.setOrigin(connectedTo);\n }\n /** Attaches this position strategy to an overlay. */\n attach(overlayRef) {\n if (this._overlayRef &&\n overlayRef !== this._overlayRef &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('This position strategy is already attached to an overlay');\n }\n this._validatePositions();\n overlayRef.hostElement.classList.add(boundingBoxClass);\n this._overlayRef = overlayRef;\n this._boundingBox = overlayRef.hostElement;\n this._pane = overlayRef.overlayElement;\n this._isDisposed = false;\n this._isInitialRender = true;\n this._lastPosition = null;\n this._resizeSubscription.unsubscribe();\n this._resizeSubscription = this._viewportRuler.change().subscribe(() => {\n // When the window is resized, we want to trigger the next reposition as if it\n // was an initial render, in order for the strategy to pick a new optimal position,\n // otherwise position locking will cause it to stay at the old one.\n this._isInitialRender = true;\n this.apply();\n });\n }\n /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin best fits on-screen.\n *\n * The selection of a position goes as follows:\n * - If any positions fit completely within the viewport as-is,\n * choose the first position that does so.\n * - If flexible dimensions are enabled and at least one satisfies the given minimum width/height,\n * choose the position with the greatest available size modified by the positions' weight.\n * - If pushing is enabled, take the position that went off-screen the least and push it\n * on-screen.\n * - If none of the previous criteria were met, use the position that goes off-screen the least.\n * @docs-private\n */\n apply() {\n // We shouldn't do anything if the strategy was disposed or we're on the server.\n if (this._isDisposed || !this._platform.isBrowser) {\n return;\n }\n // If the position has been applied already (e.g. when the overlay was opened) and the\n // consumer opted into locking in the position, re-use the old position, in order to\n // prevent the overlay from jumping around.\n if (!this._isInitialRender && this._positionLocked && this._lastPosition) {\n this.reapplyLastPosition();\n return;\n }\n this._clearPanelClasses();\n this._resetOverlayElementStyles();\n this._resetBoundingBoxStyles();\n // We need the bounding rects for the origin, the overlay and the container to determine how to position\n // the overlay relative to the origin.\n // We use the viewport rect to determine whether a position would go off-screen.\n this._viewportRect = this._getNarrowedViewportRect();\n this._originRect = this._getOriginRect();\n this._overlayRect = this._pane.getBoundingClientRect();\n this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();\n const originRect = this._originRect;\n const overlayRect = this._overlayRect;\n const viewportRect = this._viewportRect;\n const containerRect = this._containerRect;\n // Positions where the overlay will fit with flexible dimensions.\n const flexibleFits = [];\n // Fallback if none of the preferred positions fit within the viewport.\n let fallback;\n // Go through each of the preferred positions looking for a good fit.\n // If a good fit is found, it will be applied immediately.\n for (let pos of this._preferredPositions) {\n // Get the exact (x, y) coordinate for the point-of-origin on the origin element.\n let originPoint = this._getOriginPoint(originRect, containerRect, pos);\n // From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the\n // overlay in this position. We use the top-left corner for calculations and later translate\n // this into an appropriate (top, left, bottom, right) style.\n let overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos);\n // Calculate how well the overlay would fit into the viewport with this point.\n let overlayFit = this._getOverlayFit(overlayPoint, overlayRect, viewportRect, pos);\n // If the overlay, without any further work, fits into the viewport, use this position.\n if (overlayFit.isCompletelyWithinViewport) {\n this._isPushed = false;\n this._applyPosition(pos, originPoint);\n return;\n }\n // If the overlay has flexible dimensions, we can use this position\n // so long as there's enough space for the minimum dimensions.\n if (this._canFitWithFlexibleDimensions(overlayFit, overlayPoint, viewportRect)) {\n // Save positions where the overlay will fit with flexible dimensions. We will use these\n // if none of the positions fit *without* flexible dimensions.\n flexibleFits.push({\n position: pos,\n origin: originPoint,\n overlayRect,\n boundingBoxRect: this._calculateBoundingBoxRect(originPoint, pos),\n });\n continue;\n }\n // If the current preferred position does not fit on the screen, remember the position\n // if it has more visible area on-screen than we've seen and move onto the next preferred\n // position.\n if (!fallback || fallback.overlayFit.visibleArea < overlayFit.visibleArea) {\n fallback = { overlayFit, overlayPoint, originPoint, position: pos, overlayRect };\n }\n }\n // If there are any positions where the overlay would fit with flexible dimensions, choose the\n // one that has the greatest area available modified by the position's weight\n if (flexibleFits.length) {\n let bestFit = null;\n let bestScore = -1;\n for (const fit of flexibleFits) {\n const score = fit.boundingBoxRect.width * fit.boundingBoxRect.height * (fit.position.weight || 1);\n if (score > bestScore) {\n bestScore = score;\n bestFit = fit;\n }\n }\n this._isPushed = false;\n this._applyPosition(bestFit.position, bestFit.origin);\n return;\n }\n // When none of the preferred positions fit within the viewport, take the position\n // that went off-screen the least and attempt to push it on-screen.\n if (this._canPush) {\n // TODO(jelbourn): after pushing, the opening \"direction\" of the overlay might not make sense.\n this._isPushed = true;\n this._applyPosition(fallback.position, fallback.originPoint);\n return;\n }\n // All options for getting the overlay within the viewport have been exhausted, so go with the\n // position that went off-screen the least.\n this._applyPosition(fallback.position, fallback.originPoint);\n }\n detach() {\n this._clearPanelClasses();\n this._lastPosition = null;\n this._previousPushAmount = null;\n this._resizeSubscription.unsubscribe();\n }\n /** Cleanup after the element gets destroyed. */\n dispose() {\n if (this._isDisposed) {\n return;\n }\n // We can't use `_resetBoundingBoxStyles` here, because it resets\n // some properties to zero, rather than removing them.\n if (this._boundingBox) {\n extendStyles(this._boundingBox.style, {\n top: '',\n left: '',\n right: '',\n bottom: '',\n height: '',\n width: '',\n alignItems: '',\n justifyContent: '',\n });\n }\n if (this._pane) {\n this._resetOverlayElementStyles();\n }\n if (this._overlayRef) {\n this._overlayRef.hostElement.classList.remove(boundingBoxClass);\n }\n this.detach();\n this._positionChanges.complete();\n this._overlayRef = this._boundingBox = null;\n this._isDisposed = true;\n }\n /**\n * This re-aligns the overlay element with the trigger in its last calculated position,\n * even if a position higher in the \"preferred positions\" list would now fit. This\n * allows one to re-align the panel without changing the orientation of the panel.\n */\n reapplyLastPosition() {\n if (this._isDisposed || !this._platform.isBrowser) {\n return;\n }\n const lastPosition = this._lastPosition;\n if (lastPosition) {\n this._originRect = this._getOriginRect();\n this._overlayRect = this._pane.getBoundingClientRect();\n this._viewportRect = this._getNarrowedViewportRect();\n this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();\n const originPoint = this._getOriginPoint(this._originRect, this._containerRect, lastPosition);\n this._applyPosition(lastPosition, originPoint);\n }\n else {\n this.apply();\n }\n }\n /**\n * Sets the list of Scrollable containers that host the origin element so that\n * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n * Scrollable must be an ancestor element of the strategy's origin element.\n */\n withScrollableContainers(scrollables) {\n this._scrollables = scrollables;\n return this;\n }\n /**\n * Adds new preferred positions.\n * @param positions List of positions options for this overlay.\n */\n withPositions(positions) {\n this._preferredPositions = positions;\n // If the last calculated position object isn't part of the positions anymore, clear\n // it in order to avoid it being picked up if the consumer tries to re-apply.\n if (positions.indexOf(this._lastPosition) === -1) {\n this._lastPosition = null;\n }\n this._validatePositions();\n return this;\n }\n /**\n * Sets a minimum distance the overlay may be positioned to the edge of the viewport.\n * @param margin Required margin between the overlay and the viewport edge in pixels.\n */\n withViewportMargin(margin) {\n this._viewportMargin = margin;\n return this;\n }\n /** Sets whether the overlay's width and height can be constrained to fit within the viewport. */\n withFlexibleDimensions(flexibleDimensions = true) {\n this._hasFlexibleDimensions = flexibleDimensions;\n return this;\n }\n /** Sets whether the overlay can grow after the initial open via flexible width/height. */\n withGrowAfterOpen(growAfterOpen = true) {\n this._growAfterOpen = growAfterOpen;\n return this;\n }\n /** Sets whether the overlay can be pushed on-screen if none of the provided positions fit. */\n withPush(canPush = true) {\n this._canPush = canPush;\n return this;\n }\n /**\n * Sets whether the overlay's position should be locked in after it is positioned\n * initially. When an overlay is locked in, it won't attempt to reposition itself\n * when the position is re-applied (e.g. when the user scrolls away).\n * @param isLocked Whether the overlay should locked in.\n */\n withLockedPosition(isLocked = true) {\n this._positionLocked = isLocked;\n return this;\n }\n /**\n * Sets the origin, relative to which to position the overlay.\n * Using an element origin is useful for building components that need to be positioned\n * relatively to a trigger (e.g. dropdown menus or tooltips), whereas using a point can be\n * used for cases like contextual menus which open relative to the user's pointer.\n * @param origin Reference to the new origin.\n */\n setOrigin(origin) {\n this._origin = origin;\n return this;\n }\n /**\n * Sets the default offset for the overlay's connection point on the x-axis.\n * @param offset New offset in the X axis.\n */\n withDefaultOffsetX(offset) {\n this._offsetX = offset;\n return this;\n }\n /**\n * Sets the default offset for the overlay's connection point on the y-axis.\n * @param offset New offset in the Y axis.\n */\n withDefaultOffsetY(offset) {\n this._offsetY = offset;\n return this;\n }\n /**\n * Configures that the position strategy should set a `transform-origin` on some elements\n * inside the overlay, depending on the current position that is being applied. This is\n * useful for the cases where the origin of an animation can change depending on the\n * alignment of the overlay.\n * @param selector CSS selector that will be used to find the target\n * elements onto which to set the transform origin.\n */\n withTransformOriginOn(selector) {\n this._transformOriginSelector = selector;\n return this;\n }\n /**\n * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.\n */\n _getOriginPoint(originRect, containerRect, pos) {\n let x;\n if (pos.originX == 'center') {\n // Note: when centering we should always use the `left`\n // offset, otherwise the position will be wrong in RTL.\n x = originRect.left + originRect.width / 2;\n }\n else {\n const startX = this._isRtl() ? originRect.right : originRect.left;\n const endX = this._isRtl() ? originRect.left : originRect.right;\n x = pos.originX == 'start' ? startX : endX;\n }\n // When zooming in Safari the container rectangle contains negative values for the position\n // and we need to re-add them to the calculated coordinates.\n if (containerRect.left < 0) {\n x -= containerRect.left;\n }\n let y;\n if (pos.originY == 'center') {\n y = originRect.top + originRect.height / 2;\n }\n else {\n y = pos.originY == 'top' ? originRect.top : originRect.bottom;\n }\n // Normally the containerRect's top value would be zero, however when the overlay is attached to an input\n // (e.g. in an autocomplete), mobile browsers will shift everything in order to put the input in the middle\n // of the screen and to make space for the virtual keyboard. We need to account for this offset,\n // otherwise our positioning will be thrown off.\n // Additionally, when zooming in Safari this fixes the vertical position.\n if (containerRect.top < 0) {\n y -= containerRect.top;\n }\n return { x, y };\n }\n /**\n * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and\n * origin point to which the overlay should be connected.\n */\n _getOverlayPoint(originPoint, overlayRect, pos) {\n // Calculate the (overlayStartX, overlayStartY), the start of the\n // potential overlay position relative to the origin point.\n let overlayStartX;\n if (pos.overlayX == 'center') {\n overlayStartX = -overlayRect.width / 2;\n }\n else if (pos.overlayX === 'start') {\n overlayStartX = this._isRtl() ? -overlayRect.width : 0;\n }\n else {\n overlayStartX = this._isRtl() ? 0 : -overlayRect.width;\n }\n let overlayStartY;\n if (pos.overlayY == 'center') {\n overlayStartY = -overlayRect.height / 2;\n }\n else {\n overlayStartY = pos.overlayY == 'top' ? 0 : -overlayRect.height;\n }\n // The (x, y) coordinates of the overlay.\n return {\n x: originPoint.x + overlayStartX,\n y: originPoint.y + overlayStartY,\n };\n }\n /** Gets how well an overlay at the given point will fit within the viewport. */\n _getOverlayFit(point, rawOverlayRect, viewport, position) {\n // Round the overlay rect when comparing against the\n // viewport, because the viewport is always rounded.\n const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n let { x, y } = point;\n let offsetX = this._getOffset(position, 'x');\n let offsetY = this._getOffset(position, 'y');\n // Account for the offsets since they could push the overlay out of the viewport.\n if (offsetX) {\n x += offsetX;\n }\n if (offsetY) {\n y += offsetY;\n }\n // How much the overlay would overflow at this position, on each side.\n let leftOverflow = 0 - x;\n let rightOverflow = x + overlay.width - viewport.width;\n let topOverflow = 0 - y;\n let bottomOverflow = y + overlay.height - viewport.height;\n // Visible parts of the element on each axis.\n let visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow);\n let visibleHeight = this._subtractOverflows(overlay.height, topOverflow, bottomOverflow);\n let visibleArea = visibleWidth * visibleHeight;\n return {\n visibleArea,\n isCompletelyWithinViewport: overlay.width * overlay.height === visibleArea,\n fitsInViewportVertically: visibleHeight === overlay.height,\n fitsInViewportHorizontally: visibleWidth == overlay.width,\n };\n }\n /**\n * Whether the overlay can fit within the viewport when it may resize either its width or height.\n * @param fit How well the overlay fits in the viewport at some position.\n * @param point The (x, y) coordinates of the overlay at some position.\n * @param viewport The geometry of the viewport.\n */\n _canFitWithFlexibleDimensions(fit, point, viewport) {\n if (this._hasFlexibleDimensions) {\n const availableHeight = viewport.bottom - point.y;\n const availableWidth = viewport.right - point.x;\n const minHeight = getPixelValue(this._overlayRef.getConfig().minHeight);\n const minWidth = getPixelValue(this._overlayRef.getConfig().minWidth);\n const verticalFit = fit.fitsInViewportVertically || (minHeight != null && minHeight <= availableHeight);\n const horizontalFit = fit.fitsInViewportHorizontally || (minWidth != null && minWidth <= availableWidth);\n return verticalFit && horizontalFit;\n }\n return false;\n }\n /**\n * Gets the point at which the overlay can be \"pushed\" on-screen. If the overlay is larger than\n * the viewport, the top-left corner will be pushed on-screen (with overflow occurring on the\n * right and bottom).\n *\n * @param start Starting point from which the overlay is pushed.\n * @param rawOverlayRect Dimensions of the overlay.\n * @param scrollPosition Current viewport scroll position.\n * @returns The point at which to position the overlay after pushing. This is effectively a new\n * originPoint.\n */\n _pushOverlayOnScreen(start, rawOverlayRect, scrollPosition) {\n // If the position is locked and we've pushed the overlay already, reuse the previous push\n // amount, rather than pushing it again. If we were to continue pushing, the element would\n // remain in the viewport, which goes against the expectations when position locking is enabled.\n if (this._previousPushAmount && this._positionLocked) {\n return {\n x: start.x + this._previousPushAmount.x,\n y: start.y + this._previousPushAmount.y,\n };\n }\n // Round the overlay rect when comparing against the\n // viewport, because the viewport is always rounded.\n const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n const viewport = this._viewportRect;\n // Determine how much the overlay goes outside the viewport on each\n // side, which we'll use to decide which direction to push it.\n const overflowRight = Math.max(start.x + overlay.width - viewport.width, 0);\n const overflowBottom = Math.max(start.y + overlay.height - viewport.height, 0);\n const overflowTop = Math.max(viewport.top - scrollPosition.top - start.y, 0);\n const overflowLeft = Math.max(viewport.left - scrollPosition.left - start.x, 0);\n // Amount by which to push the overlay in each axis such that it remains on-screen.\n let pushX = 0;\n let pushY = 0;\n // If the overlay fits completely within the bounds of the viewport, push it from whichever\n // direction is goes off-screen. Otherwise, push the top-left corner such that its in the\n // viewport and allow for the trailing end of the overlay to go out of bounds.\n if (overlay.width <= viewport.width) {\n pushX = overflowLeft || -overflowRight;\n }\n else {\n pushX = start.x < this._viewportMargin ? viewport.left - scrollPosition.left - start.x : 0;\n }\n if (overlay.height <= viewport.height) {\n pushY = overflowTop || -overflowBottom;\n }\n else {\n pushY = start.y < this._viewportMargin ? viewport.top - scrollPosition.top - start.y : 0;\n }\n this._previousPushAmount = { x: pushX, y: pushY };\n return {\n x: start.x + pushX,\n y: start.y + pushY,\n };\n }\n /**\n * Applies a computed position to the overlay and emits a position change.\n * @param position The position preference\n * @param originPoint The point on the origin element where the overlay is connected.\n */\n _applyPosition(position, originPoint) {\n this._setTransformOrigin(position);\n this._setOverlayElementStyles(originPoint, position);\n this._setBoundingBoxStyles(originPoint, position);\n if (position.panelClass) {\n this._addPanelClasses(position.panelClass);\n }\n // Save the last connected position in case the position needs to be re-calculated.\n this._lastPosition = position;\n // Notify that the position has been changed along with its change properties.\n // We only emit if we've got any subscriptions, because the scroll visibility\n // calculations can be somewhat expensive.\n if (this._positionChanges.observers.length) {\n const scrollableViewProperties = this._getScrollVisibility();\n const changeEvent = new ConnectedOverlayPositionChange(position, scrollableViewProperties);\n this._positionChanges.next(changeEvent);\n }\n this._isInitialRender = false;\n }\n /** Sets the transform origin based on the configured selector and the passed-in position. */\n _setTransformOrigin(position) {\n if (!this._transformOriginSelector) {\n return;\n }\n const elements = this._boundingBox.querySelectorAll(this._transformOriginSelector);\n let xOrigin;\n let yOrigin = position.overlayY;\n if (position.overlayX === 'center') {\n xOrigin = 'center';\n }\n else if (this._isRtl()) {\n xOrigin = position.overlayX === 'start' ? 'right' : 'left';\n }\n else {\n xOrigin = position.overlayX === 'start' ? 'left' : 'right';\n }\n for (let i = 0; i < elements.length; i++) {\n elements[i].style.transformOrigin = `${xOrigin} ${yOrigin}`;\n }\n }\n /**\n * Gets the position and size of the overlay's sizing container.\n *\n * This method does no measuring and applies no styles so that we can cheaply compute the\n * bounds for all positions and choose the best fit based on these results.\n */\n _calculateBoundingBoxRect(origin, position) {\n const viewport = this._viewportRect;\n const isRtl = this._isRtl();\n let height, top, bottom;\n if (position.overlayY === 'top') {\n // Overlay is opening \"downward\" and thus is bound by the bottom viewport edge.\n top = origin.y;\n height = viewport.height - top + this._viewportMargin;\n }\n else if (position.overlayY === 'bottom') {\n // Overlay is opening \"upward\" and thus is bound by the top viewport edge. We need to add\n // the viewport margin back in, because the viewport rect is narrowed down to remove the\n // margin, whereas the `origin` position is calculated based on its `ClientRect`.\n bottom = viewport.height - origin.y + this._viewportMargin * 2;\n height = viewport.height - bottom + this._viewportMargin;\n }\n else {\n // If neither top nor bottom, it means that the overlay is vertically centered on the\n // origin point. Note that we want the position relative to the viewport, rather than\n // the page, which is why we don't use something like `viewport.bottom - origin.y` and\n // `origin.y - viewport.top`.\n const smallestDistanceToViewportEdge = Math.min(viewport.bottom - origin.y + viewport.top, origin.y);\n const previousHeight = this._lastBoundingBoxSize.height;\n height = smallestDistanceToViewportEdge * 2;\n top = origin.y - smallestDistanceToViewportEdge;\n if (height > previousHeight && !this._isInitialRender && !this._growAfterOpen) {\n top = origin.y - previousHeight / 2;\n }\n }\n // The overlay is opening 'right-ward' (the content flows to the right).\n const isBoundedByRightViewportEdge = (position.overlayX === 'start' && !isRtl) || (position.overlayX === 'end' && isRtl);\n // The overlay is opening 'left-ward' (the content flows to the left).\n const isBoundedByLeftViewportEdge = (position.overlayX === 'end' && !isRtl) || (position.overlayX === 'start' && isRtl);\n let width, left, right;\n if (isBoundedByLeftViewportEdge) {\n right = viewport.width - origin.x + this._viewportMargin;\n width = origin.x - this._viewportMargin;\n }\n else if (isBoundedByRightViewportEdge) {\n left = origin.x;\n width = viewport.right - origin.x;\n }\n else {\n // If neither start nor end, it means that the overlay is horizontally centered on the\n // origin point. Note that we want the position relative to the viewport, rather than\n // the page, which is why we don't use something like `viewport.right - origin.x` and\n // `origin.x - viewport.left`.\n const smallestDistanceToViewportEdge = Math.min(viewport.right - origin.x + viewport.left, origin.x);\n const previousWidth = this._lastBoundingBoxSize.width;\n width = smallestDistanceToViewportEdge * 2;\n left = origin.x - smallestDistanceToViewportEdge;\n if (width > previousWidth && !this._isInitialRender && !this._growAfterOpen) {\n left = origin.x - previousWidth / 2;\n }\n }\n return { top: top, left: left, bottom: bottom, right: right, width, height };\n }\n /**\n * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the\n * origin's connection point and stretches to the bounds of the viewport.\n *\n * @param origin The point on the origin element where the overlay is connected.\n * @param position The position preference\n */\n _setBoundingBoxStyles(origin, position) {\n const boundingBoxRect = this._calculateBoundingBoxRect(origin, position);\n // It's weird if the overlay *grows* while scrolling, so we take the last size into account\n // when applying a new size.\n if (!this._isInitialRender && !this._growAfterOpen) {\n boundingBoxRect.height = Math.min(boundingBoxRect.height, this._lastBoundingBoxSize.height);\n boundingBoxRect.width = Math.min(boundingBoxRect.width, this._lastBoundingBoxSize.width);\n }\n const styles = {};\n if (this._hasExactPosition()) {\n styles.top = styles.left = '0';\n styles.bottom = styles.right = styles.maxHeight = styles.maxWidth = '';\n styles.width = styles.height = '100%';\n }\n else {\n const maxHeight = this._overlayRef.getConfig().maxHeight;\n const maxWidth = this._overlayRef.getConfig().maxWidth;\n styles.height = coerceCssPixelValue(boundingBoxRect.height);\n styles.top = coerceCssPixelValue(boundingBoxRect.top);\n styles.bottom = coerceCssPixelValue(boundingBoxRect.bottom);\n styles.width = coerceCssPixelValue(boundingBoxRect.width);\n styles.left = coerceCssPixelValue(boundingBoxRect.left);\n styles.right = coerceCssPixelValue(boundingBoxRect.right);\n // Push the pane content towards the proper direction.\n if (position.overlayX === 'center') {\n styles.alignItems = 'center';\n }\n else {\n styles.alignItems = position.overlayX === 'end' ? 'flex-end' : 'flex-start';\n }\n if (position.overlayY === 'center') {\n styles.justifyContent = 'center';\n }\n else {\n styles.justifyContent = position.overlayY === 'bottom' ? 'flex-end' : 'flex-start';\n }\n if (maxHeight) {\n styles.maxHeight = coerceCssPixelValue(maxHeight);\n }\n if (maxWidth) {\n styles.maxWidth = coerceCssPixelValue(maxWidth);\n }\n }\n this._lastBoundingBoxSize = boundingBoxRect;\n extendStyles(this._boundingBox.style, styles);\n }\n /** Resets the styles for the bounding box so that a new positioning can be computed. */\n _resetBoundingBoxStyles() {\n extendStyles(this._boundingBox.style, {\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n height: '',\n width: '',\n alignItems: '',\n justifyContent: '',\n });\n }\n /** Resets the styles for the overlay pane so that a new positioning can be computed. */\n _resetOverlayElementStyles() {\n extendStyles(this._pane.style, {\n top: '',\n left: '',\n bottom: '',\n right: '',\n position: '',\n transform: '',\n });\n }\n /** Sets positioning styles to the overlay element. */\n _setOverlayElementStyles(originPoint, position) {\n const styles = {};\n const hasExactPosition = this._hasExactPosition();\n const hasFlexibleDimensions = this._hasFlexibleDimensions;\n const config = this._overlayRef.getConfig();\n if (hasExactPosition) {\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n extendStyles(styles, this._getExactOverlayY(position, originPoint, scrollPosition));\n extendStyles(styles, this._getExactOverlayX(position, originPoint, scrollPosition));\n }\n else {\n styles.position = 'static';\n }\n // Use a transform to apply the offsets. We do this because the `center` positions rely on\n // being in the normal flex flow and setting a `top` / `left` at all will completely throw\n // off the position. We also can't use margins, because they won't have an effect in some\n // cases where the element doesn't have anything to \"push off of\". Finally, this works\n // better both with flexible and non-flexible positioning.\n let transformString = '';\n let offsetX = this._getOffset(position, 'x');\n let offsetY = this._getOffset(position, 'y');\n if (offsetX) {\n transformString += `translateX(${offsetX}px) `;\n }\n if (offsetY) {\n transformString += `translateY(${offsetY}px)`;\n }\n styles.transform = transformString.trim();\n // If a maxWidth or maxHeight is specified on the overlay, we remove them. We do this because\n // we need these values to both be set to \"100%\" for the automatic flexible sizing to work.\n // The maxHeight and maxWidth are set on the boundingBox in order to enforce the constraint.\n // Note that this doesn't apply when we have an exact position, in which case we do want to\n // apply them because they'll be cleared from the bounding box.\n if (config.maxHeight) {\n if (hasExactPosition) {\n styles.maxHeight = coerceCssPixelValue(config.maxHeight);\n }\n else if (hasFlexibleDimensions) {\n styles.maxHeight = '';\n }\n }\n if (config.maxWidth) {\n if (hasExactPosition) {\n styles.maxWidth = coerceCssPixelValue(config.maxWidth);\n }\n else if (hasFlexibleDimensions) {\n styles.maxWidth = '';\n }\n }\n extendStyles(this._pane.style, styles);\n }\n /** Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing. */\n _getExactOverlayY(position, originPoint, scrollPosition) {\n // Reset any existing styles. This is necessary in case the\n // preferred position has changed since the last `apply`.\n let styles = { top: '', bottom: '' };\n let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n }\n // We want to set either `top` or `bottom` based on whether the overlay wants to appear\n // above or below the origin and the direction in which the element will expand.\n if (position.overlayY === 'bottom') {\n // When using `bottom`, we adjust the y position such that it is the distance\n // from the bottom of the viewport rather than the top.\n const documentHeight = this._document.documentElement.clientHeight;\n styles.bottom = `${documentHeight - (overlayPoint.y + this._overlayRect.height)}px`;\n }\n else {\n styles.top = coerceCssPixelValue(overlayPoint.y);\n }\n return styles;\n }\n /** Gets the exact left/right for the overlay when not using flexible sizing or when pushing. */\n _getExactOverlayX(position, originPoint, scrollPosition) {\n // Reset any existing styles. This is necessary in case the preferred position has\n // changed since the last `apply`.\n let styles = { left: '', right: '' };\n let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n }\n // We want to set either `left` or `right` based on whether the overlay wants to appear \"before\"\n // or \"after\" the origin, which determines the direction in which the element will expand.\n // For the horizontal axis, the meaning of \"before\" and \"after\" change based on whether the\n // page is in RTL or LTR.\n let horizontalStyleProperty;\n if (this._isRtl()) {\n horizontalStyleProperty = position.overlayX === 'end' ? 'left' : 'right';\n }\n else {\n horizontalStyleProperty = position.overlayX === 'end' ? 'right' : 'left';\n }\n // When we're setting `right`, we adjust the x position such that it is the distance\n // from the right edge of the viewport rather than the left edge.\n if (horizontalStyleProperty === 'right') {\n const documentWidth = this._document.documentElement.clientWidth;\n styles.right = `${documentWidth - (overlayPoint.x + this._overlayRect.width)}px`;\n }\n else {\n styles.left = coerceCssPixelValue(overlayPoint.x);\n }\n return styles;\n }\n /**\n * Gets the view properties of the trigger and overlay, including whether they are clipped\n * or completely outside the view of any of the strategy's scrollables.\n */\n _getScrollVisibility() {\n // Note: needs fresh rects since the position could've changed.\n const originBounds = this._getOriginRect();\n const overlayBounds = this._pane.getBoundingClientRect();\n // TODO(jelbourn): instead of needing all of the client rects for these scrolling containers\n // every time, we should be able to use the scrollTop of the containers if the size of those\n // containers hasn't changed.\n const scrollContainerBounds = this._scrollables.map(scrollable => {\n return scrollable.getElementRef().nativeElement.getBoundingClientRect();\n });\n return {\n isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds),\n isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds),\n isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds),\n isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds),\n };\n }\n /** Subtracts the amount that an element is overflowing on an axis from its length. */\n _subtractOverflows(length, ...overflows) {\n return overflows.reduce((currentValue, currentOverflow) => {\n return currentValue - Math.max(currentOverflow, 0);\n }, length);\n }\n /** Narrows the given viewport rect by the current _viewportMargin. */\n _getNarrowedViewportRect() {\n // We recalculate the viewport rect here ourselves, rather than using the ViewportRuler,\n // because we want to use the `clientWidth` and `clientHeight` as the base. The difference\n // being that the client properties don't include the scrollbar, as opposed to `innerWidth`\n // and `innerHeight` that do. This is necessary, because the overlay container uses\n // 100% `width` and `height` which don't include the scrollbar either.\n const width = this._document.documentElement.clientWidth;\n const height = this._document.documentElement.clientHeight;\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n return {\n top: scrollPosition.top + this._viewportMargin,\n left: scrollPosition.left + this._viewportMargin,\n right: scrollPosition.left + width - this._viewportMargin,\n bottom: scrollPosition.top + height - this._viewportMargin,\n width: width - 2 * this._viewportMargin,\n height: height - 2 * this._viewportMargin,\n };\n }\n /** Whether the we're dealing with an RTL context */\n _isRtl() {\n return this._overlayRef.getDirection() === 'rtl';\n }\n /** Determines whether the overlay uses exact or flexible positioning. */\n _hasExactPosition() {\n return !this._hasFlexibleDimensions || this._isPushed;\n }\n /** Retrieves the offset of a position along the x or y axis. */\n _getOffset(position, axis) {\n if (axis === 'x') {\n // We don't do something like `position['offset' + axis]` in\n // order to avoid breaking minifiers that rename properties.\n return position.offsetX == null ? this._offsetX : position.offsetX;\n }\n return position.offsetY == null ? this._offsetY : position.offsetY;\n }\n /** Validates that the current position match the expected values. */\n _validatePositions() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._preferredPositions.length) {\n throw Error('FlexibleConnectedPositionStrategy: At least one position is required.');\n }\n // TODO(crisbeto): remove these once Angular's template type\n // checking is advanced enough to catch these cases.\n this._preferredPositions.forEach(pair => {\n validateHorizontalPosition('originX', pair.originX);\n validateVerticalPosition('originY', pair.originY);\n validateHorizontalPosition('overlayX', pair.overlayX);\n validateVerticalPosition('overlayY', pair.overlayY);\n });\n }\n }\n /** Adds a single CSS class or an array of classes on the overlay panel. */\n _addPanelClasses(cssClasses) {\n if (this._pane) {\n coerceArray(cssClasses).forEach(cssClass => {\n if (cssClass !== '' && this._appliedPanelClasses.indexOf(cssClass) === -1) {\n this._appliedPanelClasses.push(cssClass);\n this._pane.classList.add(cssClass);\n }\n });\n }\n }\n /** Clears the classes that the position strategy has applied from the overlay panel. */\n _clearPanelClasses() {\n if (this._pane) {\n this._appliedPanelClasses.forEach(cssClass => {\n this._pane.classList.remove(cssClass);\n });\n this._appliedPanelClasses = [];\n }\n }\n /** Returns the ClientRect of the current origin. */\n _getOriginRect() {\n const origin = this._origin;\n if (origin instanceof ElementRef) {\n return origin.nativeElement.getBoundingClientRect();\n }\n // Check for Element so SVG elements are also supported.\n if (origin instanceof Element) {\n return origin.getBoundingClientRect();\n }\n const width = origin.width || 0;\n const height = origin.height || 0;\n // If the origin is a point, return a client rect as if it was a 0x0 element at the point.\n return {\n top: origin.y,\n bottom: origin.y + height,\n left: origin.x,\n right: origin.x + width,\n height,\n width,\n };\n }\n}\n/** Shallow-extends a stylesheet object with another stylesheet object. */\nfunction extendStyles(destination, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n destination[key] = source[key];\n }\n }\n return destination;\n}\n/**\n * Extracts the pixel value as a number from a value, if it's a number\n * or a CSS pixel string (e.g. `1337px`). Otherwise returns null.\n */\nfunction getPixelValue(input) {\n if (typeof input !== 'number' && input != null) {\n const [value, units] = input.split(cssUnitPattern);\n return !units || units === 'px' ? parseFloat(value) : null;\n }\n return input || null;\n}\n/**\n * Gets a version of an element's bounding `ClientRect` where all the values are rounded down to\n * the nearest pixel. This allows us to account for the cases where there may be sub-pixel\n * deviations in the `ClientRect` returned by the browser (e.g. when zoomed in with a percentage\n * size, see #21350).\n */\nfunction getRoundedBoundingClientRect(clientRect) {\n return {\n top: Math.floor(clientRect.top),\n right: Math.floor(clientRect.right),\n bottom: Math.floor(clientRect.bottom),\n left: Math.floor(clientRect.left),\n width: Math.floor(clientRect.width),\n height: Math.floor(clientRect.height),\n };\n}\nconst STANDARD_DROPDOWN_BELOW_POSITIONS = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },\n];\nconst STANDARD_DROPDOWN_ADJACENT_POSITIONS = [\n { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },\n { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },\n { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Class to be added to the overlay pane wrapper. */\nconst wrapperClass = 'cdk-global-overlay-wrapper';\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * explicit position relative to the browser's viewport. We use flexbox, instead of\n * transforms, in order to avoid issues with subpixel rendering which can cause the\n * element to become blurry.\n */\nclass GlobalPositionStrategy {\n constructor() {\n this._cssPosition = 'static';\n this._topOffset = '';\n this._bottomOffset = '';\n this._alignItems = '';\n this._xPosition = '';\n this._xOffset = '';\n this._width = '';\n this._height = '';\n this._isDisposed = false;\n }\n attach(overlayRef) {\n const config = overlayRef.getConfig();\n this._overlayRef = overlayRef;\n if (this._width && !config.width) {\n overlayRef.updateSize({ width: this._width });\n }\n if (this._height && !config.height) {\n overlayRef.updateSize({ height: this._height });\n }\n overlayRef.hostElement.classList.add(wrapperClass);\n this._isDisposed = false;\n }\n /**\n * Sets the top position of the overlay. Clears any previously set vertical position.\n * @param value New top offset.\n */\n top(value = '') {\n this._bottomOffset = '';\n this._topOffset = value;\n this._alignItems = 'flex-start';\n return this;\n }\n /**\n * Sets the left position of the overlay. Clears any previously set horizontal position.\n * @param value New left offset.\n */\n left(value = '') {\n this._xOffset = value;\n this._xPosition = 'left';\n return this;\n }\n /**\n * Sets the bottom position of the overlay. Clears any previously set vertical position.\n * @param value New bottom offset.\n */\n bottom(value = '') {\n this._topOffset = '';\n this._bottomOffset = value;\n this._alignItems = 'flex-end';\n return this;\n }\n /**\n * Sets the right position of the overlay. Clears any previously set horizontal position.\n * @param value New right offset.\n */\n right(value = '') {\n this._xOffset = value;\n this._xPosition = 'right';\n return this;\n }\n /**\n * Sets the overlay to the start of the viewport, depending on the overlay direction.\n * This will be to the left in LTR layouts and to the right in RTL.\n * @param offset Offset from the edge of the screen.\n */\n start(value = '') {\n this._xOffset = value;\n this._xPosition = 'start';\n return this;\n }\n /**\n * Sets the overlay to the end of the viewport, depending on the overlay direction.\n * This will be to the right in LTR layouts and to the left in RTL.\n * @param offset Offset from the edge of the screen.\n */\n end(value = '') {\n this._xOffset = value;\n this._xPosition = 'end';\n return this;\n }\n /**\n * Sets the overlay width and clears any previously set width.\n * @param value New width for the overlay\n * @deprecated Pass the `width` through the `OverlayConfig`.\n * @breaking-change 8.0.0\n */\n width(value = '') {\n if (this._overlayRef) {\n this._overlayRef.updateSize({ width: value });\n }\n else {\n this._width = value;\n }\n return this;\n }\n /**\n * Sets the overlay height and clears any previously set height.\n * @param value New height for the overlay\n * @deprecated Pass the `height` through the `OverlayConfig`.\n * @breaking-change 8.0.0\n */\n height(value = '') {\n if (this._overlayRef) {\n this._overlayRef.updateSize({ height: value });\n }\n else {\n this._height = value;\n }\n return this;\n }\n /**\n * Centers the overlay horizontally with an optional offset.\n * Clears any previously set horizontal position.\n *\n * @param offset Overlay offset from the horizontal center.\n */\n centerHorizontally(offset = '') {\n this.left(offset);\n this._xPosition = 'center';\n return this;\n }\n /**\n * Centers the overlay vertically with an optional offset.\n * Clears any previously set vertical position.\n *\n * @param offset Overlay offset from the vertical center.\n */\n centerVertically(offset = '') {\n this.top(offset);\n this._alignItems = 'center';\n return this;\n }\n /**\n * Apply the position to the element.\n * @docs-private\n */\n apply() {\n // Since the overlay ref applies the strategy asynchronously, it could\n // have been disposed before it ends up being applied. If that is the\n // case, we shouldn't do anything.\n if (!this._overlayRef || !this._overlayRef.hasAttached()) {\n return;\n }\n const styles = this._overlayRef.overlayElement.style;\n const parentStyles = this._overlayRef.hostElement.style;\n const config = this._overlayRef.getConfig();\n const { width, height, maxWidth, maxHeight } = config;\n const shouldBeFlushHorizontally = (width === '100%' || width === '100vw') &&\n (!maxWidth || maxWidth === '100%' || maxWidth === '100vw');\n const shouldBeFlushVertically = (height === '100%' || height === '100vh') &&\n (!maxHeight || maxHeight === '100%' || maxHeight === '100vh');\n const xPosition = this._xPosition;\n const xOffset = this._xOffset;\n const isRtl = this._overlayRef.getConfig().direction === 'rtl';\n let marginLeft = '';\n let marginRight = '';\n let justifyContent = '';\n if (shouldBeFlushHorizontally) {\n justifyContent = 'flex-start';\n }\n else if (xPosition === 'center') {\n justifyContent = 'center';\n if (isRtl) {\n marginRight = xOffset;\n }\n else {\n marginLeft = xOffset;\n }\n }\n else if (isRtl) {\n if (xPosition === 'left' || xPosition === 'end') {\n justifyContent = 'flex-end';\n marginLeft = xOffset;\n }\n else if (xPosition === 'right' || xPosition === 'start') {\n justifyContent = 'flex-start';\n marginRight = xOffset;\n }\n }\n else if (xPosition === 'left' || xPosition === 'start') {\n justifyContent = 'flex-start';\n marginLeft = xOffset;\n }\n else if (xPosition === 'right' || xPosition === 'end') {\n justifyContent = 'flex-end';\n marginRight = xOffset;\n }\n styles.position = this._cssPosition;\n styles.marginLeft = shouldBeFlushHorizontally ? '0' : marginLeft;\n styles.marginTop = shouldBeFlushVertically ? '0' : this._topOffset;\n styles.marginBottom = this._bottomOffset;\n styles.marginRight = shouldBeFlushHorizontally ? '0' : marginRight;\n parentStyles.justifyContent = justifyContent;\n parentStyles.alignItems = shouldBeFlushVertically ? 'flex-start' : this._alignItems;\n }\n /**\n * Cleans up the DOM changes from the position strategy.\n * @docs-private\n */\n dispose() {\n if (this._isDisposed || !this._overlayRef) {\n return;\n }\n const styles = this._overlayRef.overlayElement.style;\n const parent = this._overlayRef.hostElement;\n const parentStyles = parent.style;\n parent.classList.remove(wrapperClass);\n parentStyles.justifyContent =\n parentStyles.alignItems =\n styles.marginTop =\n styles.marginBottom =\n styles.marginLeft =\n styles.marginRight =\n styles.position =\n '';\n this._overlayRef = null;\n this._isDisposed = 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/** Builder for overlay position strategy. */\nclass OverlayPositionBuilder {\n constructor(_viewportRuler, _document, _platform, _overlayContainer) {\n this._viewportRuler = _viewportRuler;\n this._document = _document;\n this._platform = _platform;\n this._overlayContainer = _overlayContainer;\n }\n /**\n * Creates a global position strategy.\n */\n global() {\n return new GlobalPositionStrategy();\n }\n /**\n * Creates a flexible position strategy.\n * @param origin Origin relative to which to position the overlay.\n */\n flexibleConnectedTo(origin) {\n return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer);\n }\n}\nOverlayPositionBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayPositionBuilder, deps: [{ token: i1.ViewportRuler }, { token: DOCUMENT }, { token: i1$1.Platform }, { token: OverlayContainer }], target: i0.ɵɵFactoryTarget.Injectable });\nOverlayPositionBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayPositionBuilder, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayPositionBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.ViewportRuler }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1$1.Platform }, { type: OverlayContainer }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Next overlay unique ID. */\nlet nextUniqueId = 0;\n// Note that Overlay is *not* scoped to the app root because of the ComponentFactoryResolver\n// which needs to be different depending on where OverlayModule is imported.\n/**\n * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be\n * used as a low-level building block for other components. Dialogs, tooltips, menus,\n * selects, etc. can all be built using overlays. The service should primarily be used by authors\n * of re-usable components rather than developers building end-user applications.\n *\n * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one.\n */\nclass Overlay {\n constructor(\n /** Scrolling strategies that can be used when creating an overlay. */\n scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher, _animationsModuleType) {\n this.scrollStrategies = scrollStrategies;\n this._overlayContainer = _overlayContainer;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._positionBuilder = _positionBuilder;\n this._keyboardDispatcher = _keyboardDispatcher;\n this._injector = _injector;\n this._ngZone = _ngZone;\n this._document = _document;\n this._directionality = _directionality;\n this._location = _location;\n this._outsideClickDispatcher = _outsideClickDispatcher;\n this._animationsModuleType = _animationsModuleType;\n }\n /**\n * Creates an overlay.\n * @param config Configuration applied to the overlay.\n * @returns Reference to the created overlay.\n */\n create(config) {\n const host = this._createHostElement();\n const pane = this._createPaneElement(host);\n const portalOutlet = this._createPortalOutlet(pane);\n const overlayConfig = new OverlayConfig(config);\n overlayConfig.direction = overlayConfig.direction || this._directionality.value;\n return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document, this._location, this._outsideClickDispatcher, this._animationsModuleType === 'NoopAnimations');\n }\n /**\n * Gets a position builder that can be used, via fluent API,\n * to construct and configure a position strategy.\n * @returns An overlay position builder.\n */\n position() {\n return this._positionBuilder;\n }\n /**\n * Creates the DOM element for an overlay and appends it to the overlay container.\n * @returns Newly-created pane element\n */\n _createPaneElement(host) {\n const pane = this._document.createElement('div');\n pane.id = `cdk-overlay-${nextUniqueId++}`;\n pane.classList.add('cdk-overlay-pane');\n host.appendChild(pane);\n return pane;\n }\n /**\n * Creates the host element that wraps around an overlay\n * and can be used for advanced positioning.\n * @returns Newly-create host element.\n */\n _createHostElement() {\n const host = this._document.createElement('div');\n this._overlayContainer.getContainerElement().appendChild(host);\n return host;\n }\n /**\n * Create a DomPortalOutlet into which the overlay content can be loaded.\n * @param pane The DOM element to turn into a portal outlet.\n * @returns A portal outlet for the given DOM element.\n */\n _createPortalOutlet(pane) {\n // We have to resolve the ApplicationRef later in order to allow people\n // to use overlay-based providers during app initialization.\n if (!this._appRef) {\n this._appRef = this._injector.get(ApplicationRef);\n }\n return new DomPortalOutlet(pane, this._componentFactoryResolver, this._appRef, this._injector, this._document);\n }\n}\nOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Overlay, deps: [{ token: ScrollStrategyOptions }, { token: OverlayContainer }, { token: i0.ComponentFactoryResolver }, { token: OverlayPositionBuilder }, { token: OverlayKeyboardDispatcher }, { token: i0.Injector }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i5.Directionality }, { token: i6.Location }, { token: OverlayOutsideClickDispatcher }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nOverlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Overlay, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Overlay, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: ScrollStrategyOptions }, { type: OverlayContainer }, { type: i0.ComponentFactoryResolver }, { type: OverlayPositionBuilder }, { type: OverlayKeyboardDispatcher }, { type: i0.Injector }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i5.Directionality }, { type: i6.Location }, { type: OverlayOutsideClickDispatcher }, { type: undefined, decorators: [{\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\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 */\n/** Default set of positions for the overlay. Follows the behavior of a dropdown. */\nconst defaultPositionList = [\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n },\n];\n/** Injection token that determines the scroll handling while the connected overlay is open. */\nconst CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('cdk-connected-overlay-scroll-strategy');\n/**\n * Directive applied to an element to make it usable as an origin for an Overlay using a\n * ConnectedPositionStrategy.\n */\nclass CdkOverlayOrigin {\n constructor(\n /** Reference to the element on which the directive is applied. */\n elementRef) {\n this.elementRef = elementRef;\n }\n}\nCdkOverlayOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkOverlayOrigin, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkOverlayOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkOverlayOrigin, isStandalone: true, selector: \"[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]\", exportAs: [\"cdkOverlayOrigin\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkOverlayOrigin, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',\n exportAs: 'cdkOverlayOrigin',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });\n/**\n * Directive to facilitate declarative creation of an\n * Overlay using a FlexibleConnectedPositionStrategy.\n */\nclass CdkConnectedOverlay {\n /** The offset in pixels for the overlay connection point on the x-axis */\n get offsetX() {\n return this._offsetX;\n }\n set offsetX(offsetX) {\n this._offsetX = offsetX;\n if (this._position) {\n this._updatePositionStrategy(this._position);\n }\n }\n /** The offset in pixels for the overlay connection point on the y-axis */\n get offsetY() {\n return this._offsetY;\n }\n set offsetY(offsetY) {\n this._offsetY = offsetY;\n if (this._position) {\n this._updatePositionStrategy(this._position);\n }\n }\n /** Whether or not the overlay should attach a backdrop. */\n get hasBackdrop() {\n return this._hasBackdrop;\n }\n set hasBackdrop(value) {\n this._hasBackdrop = coerceBooleanProperty(value);\n }\n /** Whether or not the overlay should be locked when scrolling. */\n get lockPosition() {\n return this._lockPosition;\n }\n set lockPosition(value) {\n this._lockPosition = coerceBooleanProperty(value);\n }\n /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n get flexibleDimensions() {\n return this._flexibleDimensions;\n }\n set flexibleDimensions(value) {\n this._flexibleDimensions = coerceBooleanProperty(value);\n }\n /** Whether the overlay can grow after the initial open when flexible positioning is turned on. */\n get growAfterOpen() {\n return this._growAfterOpen;\n }\n set growAfterOpen(value) {\n this._growAfterOpen = coerceBooleanProperty(value);\n }\n /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */\n get push() {\n return this._push;\n }\n set push(value) {\n this._push = coerceBooleanProperty(value);\n }\n // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.\n constructor(_overlay, templateRef, viewContainerRef, scrollStrategyFactory, _dir) {\n this._overlay = _overlay;\n this._dir = _dir;\n this._hasBackdrop = false;\n this._lockPosition = false;\n this._growAfterOpen = false;\n this._flexibleDimensions = false;\n this._push = false;\n this._backdropSubscription = Subscription.EMPTY;\n this._attachSubscription = Subscription.EMPTY;\n this._detachSubscription = Subscription.EMPTY;\n this._positionSubscription = Subscription.EMPTY;\n /** Margin between the overlay and the viewport edges. */\n this.viewportMargin = 0;\n /** Whether the overlay is open. */\n this.open = false;\n /** Whether the overlay can be closed by user interaction. */\n this.disableClose = false;\n /** Event emitted when the backdrop is clicked. */\n this.backdropClick = new EventEmitter();\n /** Event emitted when the position has changed. */\n this.positionChange = new EventEmitter();\n /** Event emitted when the overlay has been attached. */\n this.attach = new EventEmitter();\n /** Event emitted when the overlay has been detached. */\n this.detach = new EventEmitter();\n /** Emits when there are keyboard events that are targeted at the overlay. */\n this.overlayKeydown = new EventEmitter();\n /** Emits when there are mouse outside click events that are targeted at the overlay. */\n this.overlayOutsideClick = new EventEmitter();\n this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);\n this._scrollStrategyFactory = scrollStrategyFactory;\n this.scrollStrategy = this._scrollStrategyFactory();\n }\n /** The associated overlay reference. */\n get overlayRef() {\n return this._overlayRef;\n }\n /** The element's layout direction. */\n get dir() {\n return this._dir ? this._dir.value : 'ltr';\n }\n ngOnDestroy() {\n this._attachSubscription.unsubscribe();\n this._detachSubscription.unsubscribe();\n this._backdropSubscription.unsubscribe();\n this._positionSubscription.unsubscribe();\n if (this._overlayRef) {\n this._overlayRef.dispose();\n }\n }\n ngOnChanges(changes) {\n if (this._position) {\n this._updatePositionStrategy(this._position);\n this._overlayRef.updateSize({\n width: this.width,\n minWidth: this.minWidth,\n height: this.height,\n minHeight: this.minHeight,\n });\n if (changes['origin'] && this.open) {\n this._position.apply();\n }\n }\n if (changes['open']) {\n this.open ? this._attachOverlay() : this._detachOverlay();\n }\n }\n /** Creates an overlay */\n _createOverlay() {\n if (!this.positions || !this.positions.length) {\n this.positions = defaultPositionList;\n }\n const overlayRef = (this._overlayRef = this._overlay.create(this._buildConfig()));\n this._attachSubscription = overlayRef.attachments().subscribe(() => this.attach.emit());\n this._detachSubscription = overlayRef.detachments().subscribe(() => this.detach.emit());\n overlayRef.keydownEvents().subscribe((event) => {\n this.overlayKeydown.next(event);\n if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this._detachOverlay();\n }\n });\n this._overlayRef.outsidePointerEvents().subscribe((event) => {\n this.overlayOutsideClick.next(event);\n });\n }\n /** Builds the overlay config based on the directive's inputs */\n _buildConfig() {\n const positionStrategy = (this._position =\n this.positionStrategy || this._createPositionStrategy());\n const overlayConfig = new OverlayConfig({\n direction: this._dir,\n positionStrategy,\n scrollStrategy: this.scrollStrategy,\n hasBackdrop: this.hasBackdrop,\n });\n if (this.width || this.width === 0) {\n overlayConfig.width = this.width;\n }\n if (this.height || this.height === 0) {\n overlayConfig.height = this.height;\n }\n if (this.minWidth || this.minWidth === 0) {\n overlayConfig.minWidth = this.minWidth;\n }\n if (this.minHeight || this.minHeight === 0) {\n overlayConfig.minHeight = this.minHeight;\n }\n if (this.backdropClass) {\n overlayConfig.backdropClass = this.backdropClass;\n }\n if (this.panelClass) {\n overlayConfig.panelClass = this.panelClass;\n }\n return overlayConfig;\n }\n /** Updates the state of a position strategy, based on the values of the directive inputs. */\n _updatePositionStrategy(positionStrategy) {\n const positions = this.positions.map(currentPosition => ({\n originX: currentPosition.originX,\n originY: currentPosition.originY,\n overlayX: currentPosition.overlayX,\n overlayY: currentPosition.overlayY,\n offsetX: currentPosition.offsetX || this.offsetX,\n offsetY: currentPosition.offsetY || this.offsetY,\n panelClass: currentPosition.panelClass || undefined,\n }));\n return positionStrategy\n .setOrigin(this._getFlexibleConnectedPositionStrategyOrigin())\n .withPositions(positions)\n .withFlexibleDimensions(this.flexibleDimensions)\n .withPush(this.push)\n .withGrowAfterOpen(this.growAfterOpen)\n .withViewportMargin(this.viewportMargin)\n .withLockedPosition(this.lockPosition)\n .withTransformOriginOn(this.transformOriginSelector);\n }\n /** Returns the position strategy of the overlay to be set on the overlay config */\n _createPositionStrategy() {\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());\n this._updatePositionStrategy(strategy);\n return strategy;\n }\n _getFlexibleConnectedPositionStrategyOrigin() {\n if (this.origin instanceof CdkOverlayOrigin) {\n return this.origin.elementRef;\n }\n else {\n return this.origin;\n }\n }\n /** Attaches the overlay and subscribes to backdrop clicks if backdrop exists */\n _attachOverlay() {\n if (!this._overlayRef) {\n this._createOverlay();\n }\n else {\n // Update the overlay size, in case the directive's inputs have changed\n this._overlayRef.getConfig().hasBackdrop = this.hasBackdrop;\n }\n if (!this._overlayRef.hasAttached()) {\n this._overlayRef.attach(this._templatePortal);\n }\n if (this.hasBackdrop) {\n this._backdropSubscription = this._overlayRef.backdropClick().subscribe(event => {\n this.backdropClick.emit(event);\n });\n }\n else {\n this._backdropSubscription.unsubscribe();\n }\n this._positionSubscription.unsubscribe();\n // Only subscribe to `positionChanges` if requested, because putting\n // together all the information for it can be expensive.\n if (this.positionChange.observers.length > 0) {\n this._positionSubscription = this._position.positionChanges\n .pipe(takeWhile(() => this.positionChange.observers.length > 0))\n .subscribe(position => {\n this.positionChange.emit(position);\n if (this.positionChange.observers.length === 0) {\n this._positionSubscription.unsubscribe();\n }\n });\n }\n }\n /** Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists */\n _detachOverlay() {\n if (this._overlayRef) {\n this._overlayRef.detach();\n }\n this._backdropSubscription.unsubscribe();\n this._positionSubscription.unsubscribe();\n }\n}\nCdkConnectedOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkConnectedOverlay, deps: [{ token: Overlay }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY }, { token: i5.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkConnectedOverlay.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: CdkConnectedOverlay, isStandalone: true, selector: \"[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]\", inputs: { origin: [\"cdkConnectedOverlayOrigin\", \"origin\"], positions: [\"cdkConnectedOverlayPositions\", \"positions\"], positionStrategy: [\"cdkConnectedOverlayPositionStrategy\", \"positionStrategy\"], offsetX: [\"cdkConnectedOverlayOffsetX\", \"offsetX\"], offsetY: [\"cdkConnectedOverlayOffsetY\", \"offsetY\"], width: [\"cdkConnectedOverlayWidth\", \"width\"], height: [\"cdkConnectedOverlayHeight\", \"height\"], minWidth: [\"cdkConnectedOverlayMinWidth\", \"minWidth\"], minHeight: [\"cdkConnectedOverlayMinHeight\", \"minHeight\"], backdropClass: [\"cdkConnectedOverlayBackdropClass\", \"backdropClass\"], panelClass: [\"cdkConnectedOverlayPanelClass\", \"panelClass\"], viewportMargin: [\"cdkConnectedOverlayViewportMargin\", \"viewportMargin\"], scrollStrategy: [\"cdkConnectedOverlayScrollStrategy\", \"scrollStrategy\"], open: [\"cdkConnectedOverlayOpen\", \"open\"], disableClose: [\"cdkConnectedOverlayDisableClose\", \"disableClose\"], transformOriginSelector: [\"cdkConnectedOverlayTransformOriginOn\", \"transformOriginSelector\"], hasBackdrop: [\"cdkConnectedOverlayHasBackdrop\", \"hasBackdrop\"], lockPosition: [\"cdkConnectedOverlayLockPosition\", \"lockPosition\"], flexibleDimensions: [\"cdkConnectedOverlayFlexibleDimensions\", \"flexibleDimensions\"], growAfterOpen: [\"cdkConnectedOverlayGrowAfterOpen\", \"growAfterOpen\"], push: [\"cdkConnectedOverlayPush\", \"push\"] }, outputs: { backdropClick: \"backdropClick\", positionChange: \"positionChange\", attach: \"attach\", detach: \"detach\", overlayKeydown: \"overlayKeydown\", overlayOutsideClick: \"overlayOutsideClick\" }, exportAs: [\"cdkConnectedOverlay\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: CdkConnectedOverlay, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',\n exportAs: 'cdkConnectedOverlay',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: Overlay }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY]\n }] }, { type: i5.Directionality, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { origin: [{\n type: Input,\n args: ['cdkConnectedOverlayOrigin']\n }], positions: [{\n type: Input,\n args: ['cdkConnectedOverlayPositions']\n }], positionStrategy: [{\n type: Input,\n args: ['cdkConnectedOverlayPositionStrategy']\n }], offsetX: [{\n type: Input,\n args: ['cdkConnectedOverlayOffsetX']\n }], offsetY: [{\n type: Input,\n args: ['cdkConnectedOverlayOffsetY']\n }], width: [{\n type: Input,\n args: ['cdkConnectedOverlayWidth']\n }], height: [{\n type: Input,\n args: ['cdkConnectedOverlayHeight']\n }], minWidth: [{\n type: Input,\n args: ['cdkConnectedOverlayMinWidth']\n }], minHeight: [{\n type: Input,\n args: ['cdkConnectedOverlayMinHeight']\n }], backdropClass: [{\n type: Input,\n args: ['cdkConnectedOverlayBackdropClass']\n }], panelClass: [{\n type: Input,\n args: ['cdkConnectedOverlayPanelClass']\n }], viewportMargin: [{\n type: Input,\n args: ['cdkConnectedOverlayViewportMargin']\n }], scrollStrategy: [{\n type: Input,\n args: ['cdkConnectedOverlayScrollStrategy']\n }], open: [{\n type: Input,\n args: ['cdkConnectedOverlayOpen']\n }], disableClose: [{\n type: Input,\n args: ['cdkConnectedOverlayDisableClose']\n }], transformOriginSelector: [{\n type: Input,\n args: ['cdkConnectedOverlayTransformOriginOn']\n }], hasBackdrop: [{\n type: Input,\n args: ['cdkConnectedOverlayHasBackdrop']\n }], lockPosition: [{\n type: Input,\n args: ['cdkConnectedOverlayLockPosition']\n }], flexibleDimensions: [{\n type: Input,\n args: ['cdkConnectedOverlayFlexibleDimensions']\n }], growAfterOpen: [{\n type: Input,\n args: ['cdkConnectedOverlayGrowAfterOpen']\n }], push: [{\n type: Input,\n args: ['cdkConnectedOverlayPush']\n }], backdropClick: [{\n type: Output\n }], positionChange: [{\n type: Output\n }], attach: [{\n type: Output\n }], detach: [{\n type: Output\n }], overlayKeydown: [{\n type: Output\n }], overlayOutsideClick: [{\n type: Output\n }] } });\n/** @docs-private */\nfunction CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition();\n}\n/** @docs-private */\nconst CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {\n provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_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 */\nclass OverlayModule {\n}\nOverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nOverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayModule, imports: [BidiModule, PortalModule, ScrollingModule, CdkConnectedOverlay, CdkOverlayOrigin], exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule] });\nOverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayModule, providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER], imports: [BidiModule, PortalModule, ScrollingModule, ScrollingModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: OverlayModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [BidiModule, PortalModule, ScrollingModule, CdkConnectedOverlay, CdkOverlayOrigin],\n exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule],\n providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER],\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 * Alternative to OverlayContainer that supports correct displaying of overlay elements in\n * Fullscreen mode\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen\n *\n * Should be provided in the root component.\n */\nclass FullscreenOverlayContainer extends OverlayContainer {\n constructor(_document, platform) {\n super(_document, platform);\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n if (this._fullScreenEventName && this._fullScreenListener) {\n this._document.removeEventListener(this._fullScreenEventName, this._fullScreenListener);\n }\n }\n _createContainer() {\n super._createContainer();\n this._adjustParentForFullscreenChange();\n this._addFullscreenChangeListener(() => this._adjustParentForFullscreenChange());\n }\n _adjustParentForFullscreenChange() {\n if (!this._containerElement) {\n return;\n }\n const fullscreenElement = this.getFullscreenElement();\n const parent = fullscreenElement || this._document.body;\n parent.appendChild(this._containerElement);\n }\n _addFullscreenChangeListener(fn) {\n const eventName = this._getEventName();\n if (eventName) {\n if (this._fullScreenListener) {\n this._document.removeEventListener(eventName, this._fullScreenListener);\n }\n this._document.addEventListener(eventName, fn);\n this._fullScreenListener = fn;\n }\n }\n _getEventName() {\n if (!this._fullScreenEventName) {\n const _document = this._document;\n if (_document.fullscreenEnabled) {\n this._fullScreenEventName = 'fullscreenchange';\n }\n else if (_document.webkitFullscreenEnabled) {\n this._fullScreenEventName = 'webkitfullscreenchange';\n }\n else if (_document.mozFullScreenEnabled) {\n this._fullScreenEventName = 'mozfullscreenchange';\n }\n else if (_document.msFullscreenEnabled) {\n this._fullScreenEventName = 'MSFullscreenChange';\n }\n }\n return this._fullScreenEventName;\n }\n /**\n * When the page is put into fullscreen mode, a specific element is specified.\n * Only that element and its children are visible when in fullscreen mode.\n */\n getFullscreenElement() {\n const _document = this._document;\n return (_document.fullscreenElement ||\n _document.webkitFullscreenElement ||\n _document.mozFullScreenElement ||\n _document.msFullscreenElement ||\n null);\n }\n}\nFullscreenOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: FullscreenOverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });\nFullscreenOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: FullscreenOverlayContainer, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: FullscreenOverlayContainer, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1$1.Platform }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code 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 { BlockScrollStrategy, CdkConnectedOverlay, CdkOverlayOrigin, CloseScrollStrategy, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, FullscreenOverlayContainer, GlobalPositionStrategy, NoopScrollStrategy, Overlay, OverlayConfig, OverlayContainer, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayPositionBuilder, OverlayRef, RepositionScrollStrategy, STANDARD_DROPDOWN_ADJACENT_POSITIONS, STANDARD_DROPDOWN_BELOW_POSITIONS, ScrollStrategyOptions, ScrollingVisibility, validateHorizontalPosition, validateVerticalPosition };\n","
\r\n
\r\n

ContextMenu Proof of Concept

\r\n

\r\n A place to test / demo / try context menu techniques.\r\n

\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n

ContextMenu Proof of Concept

\r\n\r\n

\r\n Right click on name from (random) list below. Click option to close\r\n dialog. Clicking option will log to console (as a test/proof of\r\n concept).\r\n

\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n

Actions

\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n","import { TemplatePortal } from '@angular/cdk/portal';\r\nimport {\r\n Component,\r\n TemplateRef,\r\n ViewChild,\r\n ViewContainerRef,\r\n} from '@angular/core';\r\nimport { fromEvent, Subscription } from 'rxjs';\r\nimport { take, filter } from 'rxjs/operators';\r\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { Title } from '@angular/platform-browser';\r\n\r\n@Component({\r\n selector: 'app-contextmenu',\r\n templateUrl: './contextmenu.component.html',\r\n styleUrls: ['./contextmenu.component.scss'],\r\n})\r\nexport class ContextmenuComponent {\r\n sub: Subscription;\r\n\r\n @ViewChild('userMenu') userMenu: TemplateRef;\r\n\r\n overlayRef: OverlayRef | null;\r\n\r\n constructor(\r\n public overlay: Overlay,\r\n public viewContainerRef: ViewContainerRef,\r\n private logger: NGXLogger,\r\n private title: Title\r\n ) {\r\n this.title.setTitle('ContextMenu POC');\r\n }\r\n\r\n cancelDialog() {\r\n this.close();\r\n }\r\n\r\n open({ x, y }: MouseEvent, user) {\r\n this.close();\r\n const positionStrategy = this.overlay\r\n .position()\r\n .flexibleConnectedTo({ x, y })\r\n .withPositions([\r\n {\r\n originX: 'end',\r\n originY: 'bottom',\r\n overlayX: 'end',\r\n overlayY: 'top',\r\n },\r\n ]);\r\n\r\n this.overlayRef = this.overlay.create({\r\n positionStrategy,\r\n scrollStrategy: this.overlay.scrollStrategies.close(),\r\n });\r\n\r\n this.overlayRef.attach(\r\n new TemplatePortal(this.userMenu, this.viewContainerRef, {\r\n $implicit: user,\r\n })\r\n );\r\n\r\n this.sub = fromEvent(document, 'click')\r\n .pipe(\r\n filter((event) => {\r\n const clickTarget = event.target as HTMLElement;\r\n return (\r\n !!this.overlayRef &&\r\n !this.overlayRef.overlayElement.contains(clickTarget)\r\n );\r\n }),\r\n take(1)\r\n )\r\n .subscribe(() => this.close());\r\n\r\n return false; // Prevent default context menu.\r\n }\r\n\r\n // delete(user: any) {\r\n delete() {\r\n this.close();\r\n }\r\n\r\n // sendto(user: any) {\r\n sendto() {\r\n this.close();\r\n }\r\n\r\n close() {\r\n if (this.sub) {\r\n this.sub.unsubscribe();\r\n }\r\n\r\n if (this.overlayRef) {\r\n this.overlayRef.dispose();\r\n this.overlayRef = null;\r\n }\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { KeyInfoModel } from 'src/app/services/api/FastApp/keyservice';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\nimport { UtilFunctionsService } from 'src/app/shared';\r\n\r\n@Component({\r\n selector: 'app-key-dev',\r\n templateUrl: './key-dev.component.html',\r\n styleUrls: ['./key-dev.component.scss'],\r\n})\r\nexport class KeyDevComponent {\r\n base64: string;\r\n json: string;\r\n keyInfo: KeyInfoModel;\r\n result: string;\r\n\r\n constructor(\r\n private svc: SharedService,\r\n private utilService: UtilFunctionsService,\r\n public logger: NGXLogger\r\n ) {\r\n this.svc.setPageTitle(`Key Tool Dev`);\r\n this.result = '';\r\n this.base64 = '';\r\n this.newKey();\r\n }\r\n\r\n newKey() {\r\n const result = this.svc.api.key.newDecodedKey();\r\n this.json = result;\r\n }\r\n\r\n newEncodedKey() {\r\n const result = this.svc.api.key.newEncodedKey();\r\n this.base64 = result;\r\n }\r\n\r\n encode1() {\r\n const input = this.json;\r\n const result = this.utilService.Base64Encode(input);\r\n this.result = result;\r\n }\r\n\r\n decode1() {\r\n const input = this.base64;\r\n const result = this.utilService.Base64Decode(input);\r\n this.result = result;\r\n }\r\n}\r\n","
\r\n
\r\n

Key Tool Development

\r\n

Development only

\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
JSON :{{ json }}
BASE64 :{{ base64 }}
\r\n
\r\n","import { Component } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\n\r\n@Component({\r\n selector: 'app-page-about',\r\n templateUrl: './page-about.component.html',\r\n styleUrls: ['./page-about.component.scss']\r\n})\r\nexport class PageAboutComponent {\r\n\r\n constructor(\r\n private logger: NGXLogger,\r\n public svc: SharedService,\r\n ) {\r\n this.svc.setPageTitle(`About: ${this.svc.config.webAppName}`);\r\n }\r\n}\r\n","
\n
\n
\n
\n
\n
\n
\n
\n \n

FastApp

\n

\n Click for more info.\n

\n
\n
\n
\n
\n
\n
\n
\n
\n\n","import { Component } from '@angular/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\n\r\n@Component({\r\n selector: 'app-page-not-found',\r\n templateUrl: './page-not-found.component.html',\r\n styleUrls: ['./page-not-found.component.scss'],\r\n})\r\nexport class PageNotFoundComponent {\r\n constructor(private logger: NGXLogger, public svc: SharedService) {\r\n this.svc.setPageTitle(`Page Not Found`);\r\n }\r\n}\r\n","
\n
\n
\n
\n
\n

Page Not Found

\n

\n The page you requested does not exist.
\n It could have moved or maybe there is a typo in the address.
\n Please try again.
\n If this continues, please contact support.\n

\n
\n
\n
\n
\n
\n\n","import { CoreModule } from 'src/app/core/core.module';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { NgModule } from '@angular/core';\r\nimport { SharedModule } from 'src/app/shared/shared.module';\r\n\r\nimport {\r\n PageAboutComponent,\r\n PageNotFoundComponent,\r\n} from '.';\r\n\r\n@NgModule({\r\n declarations: [\r\n PageAboutComponent,\r\n PageNotFoundComponent,\r\n ],\r\n imports: [\r\n CoreModule,\r\n SharedModule,\r\n FormlyModule.forRoot(),\r\n ],\r\n exports: [\r\n ]\r\n})\r\nexport class PublicModule { }\r\n","import { FeatureFlagService } from 'src/app/shared';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { ResolveFn } from '@angular/router';\r\nimport { inject } from '@angular/core';\r\n\r\nexport const applicantResolver: ResolveFn = (\r\n route,\r\n state,\r\n logger: NGXLogger = inject(NGXLogger),\r\n features: FeatureFlagService = inject(FeatureFlagService)\r\n) => {\r\n if (features.resolvers.log) {\r\n logger.warn({ resolver: 'applicantResolver' }); // for test/dev make it stand out from other messages\r\n return true;\r\n }\r\n};\r\n","import { inject } from '@angular/core';\r\nimport { ResolveFn } from '@angular/router';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\n\r\nexport const globalResolver: ResolveFn = (\r\n route,\r\n state,\r\n logger: NGXLogger = inject(NGXLogger),\r\n features: FeatureFlagService = inject(FeatureFlagService)\r\n) => {\r\n if (features.resolvers.log) {\r\n logger.warn({ resolver: 'globalResolver' }); // for test/dev make it stand out from other messages\r\n return true;\r\n }\r\n};\r\n","import { inject } from '@angular/core';\r\nimport { ResolveFn } from '@angular/router';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\n\r\nexport const tenantResolver: ResolveFn = (\r\n route,\r\n state,\r\n logger: NGXLogger = inject(NGXLogger),\r\n features: FeatureFlagService = inject(FeatureFlagService)\r\n) => {\r\n if (features.resolvers.log) {\r\n logger.debug(route.params);\r\n\r\n const bankSlug = route.params.BankId;\r\n\r\n logger.warn({ resolver: 'tenant', bankSlug }); // for test/dev make it stand out from other messages\r\n }\r\n return true;\r\n};\r\n","import { BrowserModule } from '@angular/platform-browser';\r\nimport { ContextmenuComponent } from './poc/contextmenu/contextmenu.component';\r\nimport { KeyDevComponent } from './poc/key-dev/key-dev.component';\r\nimport { NgModule } from '@angular/core';\r\nimport { PageAboutComponent, PageNotFoundComponent } from './features';\r\nimport { PublicModule } from './features/public/public.module';\r\nimport { RepeatPageComponent } from './formly-demo/repeat-page/repeat-page.component';\r\nimport { RepeatTablePageComponent } from './formly-demo/repeat-table-page/repeat-table-page.component';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport {\r\n applicantResolver,\r\n basicResolver,\r\n globalResolver,\r\n privateResolver,\r\n tenantResolver,\r\n} from 'src/resolvers';\r\n\r\nconst basicResolverGroup = {\r\n global: globalResolver,\r\n section: basicResolver,\r\n};\r\n\r\nconst privateResolverGroup = {\r\n global: globalResolver,\r\n section: privateResolver,\r\n tenant: tenantResolver,\r\n};\r\n\r\nconst applicantResolverGroup = {\r\n global: globalResolver,\r\n section: applicantResolver,\r\n tenant: tenantResolver,\r\n};\r\n\r\nconst routes: Routes = [\r\n { path: '', pathMatch: 'full', redirectTo: 'about' },\r\n { path: 'home', pathMatch: 'full', redirectTo: 'about' },\r\n\r\n {\r\n path: 'poc/contextmenu',\r\n component: ContextmenuComponent,\r\n resolve: basicResolverGroup,\r\n data: {},\r\n },\r\n {\r\n path: 'poc/keydev',\r\n component: KeyDevComponent,\r\n resolve: basicResolverGroup,\r\n data: {},\r\n },\r\n\r\n {\r\n path: 'admin', // Lazy loading module.\r\n loadChildren: () =>\r\n import('./features/private/private.module').then((m) => m.PrivateModule),\r\n resolve: privateResolverGroup,\r\n data: {},\r\n },\r\n {\r\n path: 'client', // Lazy loading module.\r\n loadChildren: () =>\r\n import('./features/applicant/applicant.module').then(\r\n (m) => m.ApplicantModule\r\n ),\r\n resolve: applicantResolverGroup,\r\n data: {},\r\n },\r\n {\r\n path: 'about',\r\n component: PageAboutComponent,\r\n resolve: basicResolverGroup,\r\n data: {},\r\n },\r\n {\r\n path: 'demo/repeat/item',\r\n component: RepeatPageComponent,\r\n resolve: basicResolverGroup,\r\n data: {},\r\n },\r\n {\r\n path: 'demo/repeat/table',\r\n component: RepeatTablePageComponent,\r\n resolve: basicResolverGroup,\r\n data: {},\r\n },\r\n {\r\n path: '**',\r\n component: PageNotFoundComponent,\r\n resolve: basicResolverGroup,\r\n data: {},\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n RouterModule.forRoot(routes, {\r\n // https://angular.io/api/router/ExtraOptions\r\n // enableTracing: true, // Log routing to console... DEBUG only!!!\r\n\r\n // Restore the last scroll position\r\n scrollPositionRestoration: 'enabled',\r\n scrollOffset: [0, 0],\r\n // Enable scrolling to anchors\r\n anchorScrolling: 'enabled',\r\n }),\r\n BrowserModule,\r\n PublicModule,\r\n ],\r\n exports: [RouterModule],\r\n})\r\nexport class AppRoutingModule {}\r\n","import { inject } from '@angular/core';\r\nimport { ResolveFn } from '@angular/router';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { FeatureFlagService } from 'src/app/shared';\r\n\r\nexport const basicResolver: ResolveFn = (\r\n route,\r\n state,\r\n logger: NGXLogger = inject(NGXLogger),\r\n features: FeatureFlagService = inject(FeatureFlagService)\r\n) => {\r\n if (features.resolvers.log) {\r\n // console({ resolver: 'basic', route, state });\r\n logger.warn({ resolver: 'basic' }); // for test/dev make it stand out from other messages\r\n return true;\r\n }\r\n};\r\n","import { FeatureFlagService } from 'src/app/shared';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { ResolveFn } from '@angular/router';\r\nimport { inject } from '@angular/core';\r\n\r\nexport const privateResolver: ResolveFn = (\r\n route,\r\n state,\r\n logger: NGXLogger = inject(NGXLogger),\r\n features: FeatureFlagService = inject(FeatureFlagService)\r\n) => {\r\n if (features.resolvers.log) {\r\n logger.warn({ resolver: 'privateResolver' }); // for test/dev make it stand out from other messages\r\n return true;\r\n }\r\n};\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntypedFormGroup } from '@angular/forms';\r\nimport { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\n\r\n@Component({\r\n templateUrl: './repeat-page.component.html',\r\n styleUrls: ['./repeat-page.component.scss'],\r\n})\r\nexport class RepeatPageComponent implements OnInit {\r\n // CHANGE THESE SETTINGS AND CUSTOMIZE THE FIELD GROUP BELOW.\r\n min = 2;\r\n max = 5;\r\n listKey = 'theList';\r\n\r\n form = new UntypedFormGroup({});\r\n model = {};\r\n options: FormlyFormOptions = {};\r\n\r\n fields: FormlyFieldConfig[] = [\r\n {\r\n key: this.listKey,\r\n type: 'repeat',\r\n templateOptions: {\r\n addText: 'Add Another',\r\n headerText: 'My Repeating Group',\r\n debug: true,\r\n min: this.min,\r\n max: this.max,\r\n // showCount: true\r\n showCount: false,\r\n },\r\n fieldArray: {\r\n fieldGroup: [\r\n // CHANGE THESE FIELDS\r\n {\r\n type: 'input',\r\n key: 'name',\r\n focus: true,\r\n templateOptions: {\r\n label: 'Name:',\r\n placeholder: 'Type here',\r\n description: 'Type above',\r\n required: true,\r\n },\r\n },\r\n {\r\n type: 'input',\r\n key: 'words',\r\n focus: true,\r\n templateOptions: {\r\n label: 'Words:',\r\n placeholder: 'Type here',\r\n description: 'Type above',\r\n required: true,\r\n },\r\n },\r\n {\r\n key: 'date',\r\n type: 'input',\r\n templateOptions: {\r\n type: 'date',\r\n label: 'Date',\r\n description: 'Enter date above.',\r\n },\r\n },\r\n ],\r\n },\r\n },\r\n ];\r\n\r\n constructor(private logger: NGXLogger, public svc: SharedService) {\r\n this.svc.setPageTitle(`Table Demo`);\r\n }\r\n\r\n ngOnInit() {\r\n this.model[this.listKey] = [];\r\n\r\n for (let i = 0; i < this.min; i++) {\r\n this.model[this.listKey].push({});\r\n }\r\n }\r\n\r\n submit() {\r\n alert(JSON.stringify(this.model));\r\n }\r\n}\r\n","
Repeat Page
\n
\n
\n
Repeat Form
\n
\n \n
\n \n
\n
\n
\n
\n
Input Data
\n
{{ model | json }}
\n
\n
\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntypedFormGroup } from '@angular/forms';\r\nimport { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core';\r\nimport { NGXLogger } from 'ngx-logger';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\n\r\n@Component({\r\n templateUrl: './repeat-table-page.component.html',\r\n styleUrls: ['./repeat-table-page.component.scss'],\r\n})\r\nexport class RepeatTablePageComponent implements OnInit {\r\n // CHANGE THESE SETTINGS AND CUSTOMIZE THE FIELD GROUP BELOW.\r\n min = 2;\r\n max = 5;\r\n listKey = 'theList';\r\n\r\n form = new UntypedFormGroup({});\r\n model = {};\r\n options: FormlyFormOptions = {};\r\n\r\n fields: FormlyFieldConfig[] = [\r\n {\r\n key: this.listKey,\r\n type: 'repeatTable',\r\n templateOptions: {\r\n addText: 'Add Another',\r\n headerText: 'My Repeating Group',\r\n debug: true,\r\n min: this.min,\r\n max: this.max,\r\n // showCount: true\r\n showCount: false,\r\n },\r\n fieldArray: {\r\n fieldGroup: [\r\n {\r\n type: 'input-td',\r\n key: 'name.first',\r\n templateOptions: {\r\n placeholder: 'First Name',\r\n required: true,\r\n },\r\n },\r\n {\r\n type: 'input-td',\r\n key: 'name.last',\r\n templateOptions: {\r\n placeholder: 'Last Name',\r\n required: true,\r\n },\r\n },\r\n {\r\n type: 'input-td',\r\n key: 'favorite.snack',\r\n templateOptions: {\r\n placeholder: 'Favorite Snack',\r\n },\r\n },\r\n\r\n // TODO starting with input will make all other types *-td soon.\r\n\r\n // {\r\n // key: 'date',\r\n // type: 'input',\r\n // templateOptions: {\r\n // type: 'date',\r\n // label: 'Date',\r\n // description: 'Enter date above.',\r\n // },\r\n // },\r\n ],\r\n },\r\n },\r\n ];\r\n\r\n constructor(private logger: NGXLogger, public svc: SharedService) {\r\n this.svc.setPageTitle(`Repeat Table Demo`);\r\n }\r\n\r\n ngOnInit() {\r\n this.model[this.listKey] = [];\r\n\r\n for (let i = 0; i < this.min; i++) {\r\n this.model[this.listKey].push({});\r\n }\r\n }\r\n\r\n submit() {\r\n alert(JSON.stringify(this.model));\r\n }\r\n}\r\n","
\n
\n \n
\n \n Submit\n \n
\n
\n \n
{{ model | json }}
\n
\n
\n","/**\n * @license Angular v15.2.9\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 [AnimationBuilder.build](api/animations/AnimationBuilder#build)() 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 * [AnimationBuilder.build](api/animations/AnimationBuilder#build)()\n * method.\n *\n * @publicApi\n */\nclass AnimationFactory {\n}\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 * \n *
...
\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 *
\n *
\n *
\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 *
\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 *
\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 *
\n * ...\n *
\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 *
\n * ...\n *
\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 *
\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 *
\n *\n *
\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 *
\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 *
\n *

Title

\n *
\n * Blah blah blah\n *
\n *
\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 * \n * \n *
\n *
\n *
\n * {{ item }}\n *
\n *
\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\nfunction scheduleMicroTask(cb) {\n Promise.resolve().then(cb);\n}\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 * 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\nconst ɵPRE_STYLE = '!';\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\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","/**\n * @license Angular v15.2.9\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\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 * 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\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 * @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.2.9\", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationDriver });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationDriver, decorators: [{\n type: Injectable\n }] });\n/**\n * @publicApi\n */\nclass AnimationDriver {\n}\nAnimationDriver.NOOP = ( /* @__PURE__ */new NoopAnimationDriver());\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\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\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\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\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.easing = null;\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 * @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\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\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 allowedNonAnimatableProps = new Set([\n // 'easing' is a utility/synthetic prop we use to represent\n // easing functions, it represents a property of the animation\n // which is not animatable but different values can be used\n // in different steps\n 'easing'\n ]);\n const invalidNonAnimatableProps = new Set();\n timelines.forEach(({ keyframes }) => {\n const nonAnimatablePropsInitialValues = new Map();\n keyframes.forEach(keyframe => {\n const entriesToCheck = Array.from(keyframe.entries()).filter(([prop]) => !allowedNonAnimatableProps.has(prop));\n for (const [prop, value] of entriesToCheck) {\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\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\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 get params() {\n return this.options.params;\n }\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 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 /** @internal */\n _onRemovalComplete(element, context) {\n this.onRemovalComplete(element, context);\n }\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 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.parentPlayer = null;\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 // @ts-expect-error overwriting a readonly property\n this.domPlayer = 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 * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\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.2.9\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\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.2.9\", ngImport: i0, type: BrowserAnimationBuilder, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserAnimationBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserAnimationBuilder });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: AnimationRendererFactory });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\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.2.9\", 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.2.9\", ngImport: i0, type: InjectableAnimationEngine });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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.2.9\", ngImport: i0, type: BrowserAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserAnimationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserAnimationsModule, exports: [BrowserModule] });\nBrowserAnimationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserAnimationsModule, providers: BROWSER_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: NoopAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNoopAnimationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationsModule, exports: [BrowserModule] });\nNoopAnimationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationsModule, providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\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","export class Utility {\r\n\r\n static loadJson(file: string, defaultObject: T, onError = () => null): T {\r\n const request = new XMLHttpRequest();\r\n request.open('GET', file, false);\r\n request.onerror = onError;\r\n if (request.overrideMimeType) {\r\n request.overrideMimeType('application/json');\r\n }\r\n request.send();\r\n if (request.status === 200) {\r\n return JSON.parse(request.responseText) as T;\r\n }\r\n return defaultObject;\r\n }\r\n\r\n}\r\n","import { AppComponent } from './app.component';\r\nimport { AppRoutingModule } from './app-routing.module';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { BulmaModule } from './shared/bulma-ui/bulma.module';\r\nimport { CoreModule } from './core/core.module';\r\nimport { FormlyBulmaModule } from './shared/ngx-formly/ui-bulma/bulma.module';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';\r\nimport {\r\n LoggerConfig,\r\n LoggerModule,\r\n NGXLogger,\r\n NgxLoggerLevel,\r\n} from 'ngx-logger';\r\nimport { NgModule, Injector, APP_INITIALIZER } from '@angular/core';\r\nimport { PublicModule } from './features/public/public.module';\r\nimport { RouterModule } from '@angular/router';\r\nimport { SharedModule } from './shared/shared.module';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { AngularBillboardModule } from 'angular-billboard';\r\nimport { RepeatPageComponent } from './formly-demo/repeat-page/repeat-page.component';\r\nimport { RepeatTablePageComponent } from './formly-demo/repeat-table-page/repeat-table-page.component';\r\nimport { ClipboardModule } from 'ngx-clipboard';\r\nimport { AuthGuard, JwtInterceptor } from './_helpers';\r\nimport { AppConfigService } from './config.service';\r\nimport { Utility } from './utility';\r\nimport { ApplicantAuthGuard } from './features/applicant/services/applicant.auth.guard';\r\nimport { ContextmenuComponent } from './poc/contextmenu/contextmenu.component';\r\nimport { KeyDevComponent } from './poc/key-dev/key-dev.component';\r\nimport { AppInjector } from './shared';\r\nimport { AgGridModule } from 'ag-grid-angular';\r\nimport { DatePipe, DecimalPipe } from '@angular/common';\r\nimport { MyLinkRendererComponent } from './features/private/app-list2/my-link-renderer.component';\r\nimport { FastAppApiService } from './services/api/FastApp/FastAppApiService';\r\nimport { AppList3ViewDetailCardComponent } from './features/private/app-list3/app-list3-view-detail-card/app-list3-view-detail-card.component';\r\n\r\nconst appInitializerFn = (appConfig: AppConfigService) => {\r\n return () => {\r\n return appConfig.loadAppConfig();\r\n };\r\n};\r\n\r\n@NgModule({\r\n declarations: [\r\n AppComponent,\r\n ContextmenuComponent,\r\n KeyDevComponent,\r\n MyLinkRendererComponent,\r\n RepeatPageComponent,\r\n RepeatTablePageComponent,\r\n AppList3ViewDetailCardComponent,\r\n ],\r\n imports: [\r\n AgGridModule.withComponents([]),\r\n AngularBillboardModule,\r\n AppRoutingModule,\r\n BrowserAnimationsModule,\r\n BrowserModule,\r\n BulmaModule,\r\n ClipboardModule,\r\n CoreModule,\r\n FormlyBulmaModule,\r\n FormlyModule.forRoot(),\r\n FormsModule,\r\n HttpClientModule,\r\n LoggerModule,\r\n PublicModule,\r\n RouterModule,\r\n SharedModule,\r\n ],\r\n providers: [\r\n FastAppApiService,\r\n AuthGuard,\r\n ApplicantAuthGuard,\r\n HttpClientModule,\r\n { provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },\r\n // ErrorInterceptor SEEMS to get in the way of receiving 404s\r\n AppConfigService,\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: appInitializerFn,\r\n multi: true,\r\n deps: [AppConfigService],\r\n },\r\n {\r\n /* NOTE 07/02/2021 Logger level usage\r\n - trace : mini steps / diagnostic\r\n - debug : bigger steps / diagnostic\r\n - info : minor actions : button clicked, option changed, etc\r\n - log : major actions : page visited, login/logout\r\n - warn : user error\r\n - error : system error handled\r\n - fatal : system error unhandled\r\n */\r\n provide: LoggerConfig,\r\n useFactory: () =>\r\n Utility.loadJson(\r\n './assets/data/loggerConfig.json', //\r\n {\r\n // defaults, in case file is not found:\r\n level: NgxLoggerLevel.INFO,\r\n // serverLoggingUrl: '/api/logs',\r\n // serverLogLevel: NgxLoggerLevel.OFF,\r\n // disableConsoleLogging\" : true\r\n enableSourceMaps: true,\r\n }\r\n ),\r\n },\r\n NGXLogger,\r\n AgGridModule,\r\n DatePipe,\r\n DecimalPipe,\r\n ],\r\n bootstrap: [AppComponent],\r\n})\r\nexport class AppModule {\r\n constructor(injector: Injector) {\r\n // Setting the appInjector to be used with the base component class to avoid passing services thru constructor\r\n AppInjector.setInjector(injector);\r\n }\r\n}\r\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\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.error(err));\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { Subscriber } from '../Subscriber';\nexport function distinctUntilChanged(compare, keySelector) {\n return (source) => source.lift(new DistinctUntilChangedOperator(compare, keySelector));\n}\nclass DistinctUntilChangedOperator {\n constructor(compare, keySelector) {\n this.compare = compare;\n this.keySelector = keySelector;\n }\n call(subscriber, source) {\n return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));\n }\n}\nclass DistinctUntilChangedSubscriber extends Subscriber {\n constructor(destination, compare, keySelector) {\n super(destination);\n this.keySelector = keySelector;\n this.hasKey = false;\n if (typeof compare === 'function') {\n this.compare = compare;\n }\n }\n compare(x, y) {\n return x === y;\n }\n _next(value) {\n let key;\n try {\n const { keySelector } = this;\n key = keySelector ? keySelector(value) : value;\n }\n catch (err) {\n return this.destination.error(err);\n }\n let result = false;\n if (this.hasKey) {\n try {\n const { compare } = this;\n result = compare(this.key, key);\n }\n catch (err) {\n return this.destination.error(err);\n }\n }\n else {\n this.hasKey = true;\n }\n if (!result) {\n this.key = key;\n this.destination.next(value);\n }\n }\n}\n","import { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nexport function debounceTime(dueTime, scheduler = async) {\n return (source) => source.lift(new DebounceTimeOperator(dueTime, scheduler));\n}\nclass DebounceTimeOperator {\n constructor(dueTime, scheduler) {\n this.dueTime = dueTime;\n this.scheduler = scheduler;\n }\n call(subscriber, source) {\n return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));\n }\n}\nclass DebounceTimeSubscriber extends Subscriber {\n constructor(destination, dueTime, scheduler) {\n super(destination);\n this.dueTime = dueTime;\n this.scheduler = scheduler;\n this.debouncedSubscription = null;\n this.lastValue = null;\n this.hasValue = false;\n }\n _next(value) {\n this.clearDebounce();\n this.lastValue = value;\n this.hasValue = true;\n this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));\n }\n _complete() {\n this.debouncedNext();\n this.destination.complete();\n }\n debouncedNext() {\n this.clearDebounce();\n if (this.hasValue) {\n const { lastValue } = this;\n this.lastValue = null;\n this.hasValue = false;\n this.destination.next(lastValue);\n }\n }\n clearDebounce() {\n const debouncedSubscription = this.debouncedSubscription;\n if (debouncedSubscription !== null) {\n this.remove(debouncedSubscription);\n debouncedSubscription.unsubscribe();\n this.debouncedSubscription = null;\n }\n }\n}\nfunction dispatchNext(subscriber) {\n subscriber.debouncedNext();\n}\n","import { Observable } from '../Observable';\nexport function isObservable(obj) {\n return !!obj && (obj instanceof Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));\n}\n","import { DOCUMENT, CommonModule } from '@angular/common';\nimport { TemplateRef, Injectable, InjectionToken, NgModule, ANALYZE_FOR_ENTRY_COMPONENTS, Inject, Optional, Component, Input, ChangeDetectionStrategy, EventEmitter, Output, Attribute, ViewChild, ElementRef, NgZone, Directive, Renderer2, ViewContainerRef, ComponentFactoryResolver, Injector, ChangeDetectorRef, defineInjectable, inject, INJECTOR } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { __rest } from 'tslib';\nimport { debounceTime, switchMap, distinctUntilChanged, take, startWith, filter, map } from 'rxjs/operators';\nimport { AbstractControl, FormArray, FormGroup, FormControl, FormGroupDirective, Validators } from '@angular/forms';\nimport { isObservable, Subject, of, merge, Observable } from 'rxjs';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @param {?} form\n * @param {?} callback\n * @return {?}\n */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/forms';\nimport * as ɵngcc2 from '@angular/common';\nimport * as ɵngcc3 from '@angular/platform-browser';\n\nconst _c0 = [\"content\"];\nfunction FormlyForm_formly_field_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"formly-field\", 2);\n} if (rf & 2) {\n const field_r2 = ctx.$implicit;\n ɵngcc0.ɵɵproperty(\"form\", field_r2.form)(\"options\", field_r2.options)(\"model\", field_r2.model)(\"field\", field_r2);\n} }\nconst _c1 = [\"*\"];\nconst _c2 = [\"container\"];\nfunction FormlyField_ng_template_0_Template(rf, ctx) { }\nconst _c3 = [\"fieldComponent\"];\nfunction FormlyGroup_formly_field_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"formly-field\", 1);\n} if (rf & 2) {\n const f_r1 = ctx.$implicit;\n ɵngcc0.ɵɵproperty(\"field\", f_r1);\n} }\nfunction disableTreeValidityCall(form, callback) {\n /** @type {?} */\n const _updateTreeValidity = form._updateTreeValidity.bind(form);\n form._updateTreeValidity = (/**\n * @return {?}\n */\n () => { });\n callback();\n form._updateTreeValidity = _updateTreeValidity;\n}\n/**\n * @param {?} formId\n * @param {?} field\n * @param {?} index\n * @return {?}\n */\nfunction getFieldId(formId, field, index) {\n if (field.id)\n return field.id;\n /** @type {?} */\n let type = field.type;\n if (!type && field.template) {\n type = 'template';\n }\n if (isFunction(type)) {\n type = ((/** @type {?} */ (type))).prototype.constructor.name;\n }\n return [formId, type, field.key, index].join('_');\n}\n/**\n * @param {?} field\n * @return {?}\n */\nfunction getKeyPath(field) {\n if (!field.key) {\n return [];\n }\n /* We store the keyPath in the field for performance reasons. This function will be called frequently. */\n if (!field._keyPath || field._keyPath.key !== field.key) {\n /** @type {?} */\n let path = [];\n if (typeof field.key === 'string') {\n /** @type {?} */\n const key = field.key.indexOf('[') === -1\n ? field.key\n : field.key.replace(/\\[(\\w+)\\]/g, '.$1');\n path = key.indexOf('.') !== -1 ? key.split('.') : [key];\n }\n else if (Array.isArray(field.key)) {\n path = field.key.slice(0);\n }\n else {\n path = [`${field.key}`];\n }\n field._keyPath = { key: field.key, path };\n }\n return field._keyPath.path.slice(0);\n}\n/** @type {?} */\nconst FORMLY_VALIDATORS = ['required', 'pattern', 'minLength', 'maxLength', 'min', 'max'];\n/**\n * @param {?} field\n * @param {?} value\n * @return {?}\n */\nfunction assignFieldValue(field, value) {\n /** @type {?} */\n let paths = getKeyPath(field);\n if (paths.length === 0) {\n return;\n }\n /** @type {?} */\n let root = field;\n while (root.parent) {\n root = root.parent;\n paths = [...getKeyPath(root), ...paths];\n }\n if (value === undefined && field.resetOnHide) {\n /** @type {?} */\n const k = paths.pop();\n /** @type {?} */\n const m = paths.reduce((/**\n * @param {?} model\n * @param {?} path\n * @return {?}\n */\n (model, path) => model[path] || {}), root.model);\n delete m[k];\n return;\n }\n assignModelValue(root.model, paths, value);\n}\n/**\n * @param {?} model\n * @param {?} paths\n * @param {?} value\n * @return {?}\n */\nfunction assignModelValue(model, paths, value) {\n for (let i = 0; i < (paths.length - 1); i++) {\n /** @type {?} */\n const path = paths[i];\n if (!model[path] || !isObject(model[path])) {\n model[path] = /^\\d+$/.test(paths[i + 1]) ? [] : {};\n }\n model = model[path];\n }\n model[paths[paths.length - 1]] = clone(value);\n}\n/**\n * @param {?} field\n * @return {?}\n */\nfunction getFieldValue(field) {\n /** @type {?} */\n let model = field.parent.model;\n for (const path of getKeyPath(field)) {\n if (!model) {\n return model;\n }\n model = model[path];\n }\n return model;\n}\n/**\n * @param {?} dest\n * @param {...?} args\n * @return {?}\n */\nfunction reverseDeepMerge(dest, ...args) {\n args.forEach((/**\n * @param {?} src\n * @return {?}\n */\n src => {\n for (let srcArg in src) {\n if (isNullOrUndefined(dest[srcArg]) || isBlankString(dest[srcArg])) {\n dest[srcArg] = clone(src[srcArg]);\n }\n else if (objAndSameType(dest[srcArg], src[srcArg])) {\n reverseDeepMerge(dest[srcArg], src[srcArg]);\n }\n }\n }));\n return dest;\n}\n/**\n * @param {?} value\n * @return {?}\n */\nfunction isNullOrUndefined(value) {\n return value === undefined || value === null;\n}\n/**\n * @param {?} value\n * @return {?}\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n/**\n * @param {?} value\n * @return {?}\n */\nfunction isBlankString(value) {\n return value === '';\n}\n/**\n * @param {?} value\n * @return {?}\n */\nfunction isFunction(value) {\n return typeof (value) === 'function';\n}\n/**\n * @param {?} obj1\n * @param {?} obj2\n * @return {?}\n */\nfunction objAndSameType(obj1, obj2) {\n return isObject(obj1) && isObject(obj2)\n && Object.getPrototypeOf(obj1) === Object.getPrototypeOf(obj2)\n && !(Array.isArray(obj1) || Array.isArray(obj2));\n}\n/**\n * @param {?} x\n * @return {?}\n */\nfunction isObject(x) {\n return x != null && typeof x === 'object';\n}\n/**\n * @param {?} obj\n * @return {?}\n */\nfunction isPromise(obj) {\n return !!obj && typeof obj.then === 'function';\n}\n/**\n * @param {?} value\n * @return {?}\n */\nfunction clone(value) {\n if (!isObject(value)\n || isObservable(value)\n || (value instanceof TemplateRef)\n || /* instanceof SafeHtmlImpl */ value.changingThisBreaksApplicationSecurity\n || ['RegExp', 'FileList', 'File', 'Blob'].indexOf(value.constructor.name) !== -1) {\n return value;\n }\n if (value instanceof Set) {\n return new Set(value);\n }\n if (value instanceof Map) {\n return new Map(value);\n }\n // https://github.com/moment/moment/blob/master/moment.js#L252\n if (value._isAMomentObject && isFunction(value.clone)) {\n return value.clone();\n }\n if (value instanceof AbstractControl) {\n return null;\n }\n if (value instanceof Date) {\n return new Date(value.getTime());\n }\n if (Array.isArray(value)) {\n return value.slice(0).map((/**\n * @param {?} v\n * @return {?}\n */\n v => clone(v)));\n }\n // best way to clone a js object maybe\n // https://stackoverflow.com/questions/41474986/how-to-clone-a-javascript-es6-class-instance\n /** @type {?} */\n const proto = Object.getPrototypeOf(value);\n /** @type {?} */\n let c = Object.create(proto);\n c = Object.setPrototypeOf(c, proto);\n // need to make a deep copy so we dont use Object.assign\n // also Object.assign wont copy property descriptor exactly\n return Object.keys(value).reduce((/**\n * @param {?} newVal\n * @param {?} prop\n * @return {?}\n */\n (newVal, prop) => {\n /** @type {?} */\n const propDesc = Object.getOwnPropertyDescriptor(value, prop);\n if (propDesc.get) {\n Object.defineProperty(newVal, prop, propDesc);\n }\n else {\n newVal[prop] = clone(value[prop]);\n }\n return newVal;\n }), c);\n}\n/**\n * @param {?} field\n * @param {?} prop\n * @param {?} defaultValue\n * @return {?}\n */\nfunction defineHiddenProp(field, prop, defaultValue) {\n Object.defineProperty(field, prop, { enumerable: false, writable: true, configurable: true });\n field[prop] = defaultValue;\n}\n/**\n * @template T\n * @param {?} o\n * @param {?} prop\n * @param {?} setFn\n * @return {?}\n */\nfunction wrapProperty(o, prop, setFn) {\n if (!o._observers) {\n defineHiddenProp(o, '_observers', {});\n }\n if (!o._observers[prop]) {\n o._observers[prop] = [];\n }\n /** @type {?} */\n let fns = o._observers[prop];\n if (fns.indexOf(setFn) === -1) {\n fns.push(setFn);\n setFn({ currentValue: o[prop], firstChange: true });\n if (fns.length === 1) {\n defineHiddenProp(o, `___$${prop}`, o[prop]);\n Object.defineProperty(o, prop, {\n configurable: true,\n get: (/**\n * @return {?}\n */\n () => o[`___$${prop}`]),\n set: (/**\n * @param {?} currentValue\n * @return {?}\n */\n currentValue => {\n if (currentValue !== o[`___$${prop}`]) {\n /** @type {?} */\n const previousValue = o[`___$${prop}`];\n o[`___$${prop}`] = currentValue;\n fns.forEach((/**\n * @param {?} changeFn\n * @return {?}\n */\n changeFn => changeFn({ previousValue, currentValue, firstChange: false })));\n }\n }),\n });\n }\n }\n return (/**\n * @return {?}\n */\n () => fns.splice(fns.indexOf(setFn), 1));\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/** @type {?} */\nconst FORMLY_CONFIG = new InjectionToken('FORMLY_CONFIG');\n/**\n * Maintains list of formly field directive types. This can be used to register new field templates.\n */\nclass FormlyConfig {\n constructor() {\n this.types = {};\n this.validators = {};\n this.wrappers = {};\n this.messages = {};\n this.templateManipulators = {\n preWrapper: [],\n postWrapper: [],\n };\n this.extras = {\n checkExpressionOn: 'changeDetectionCheck',\n lazyRender: false,\n showError: (/**\n * @param {?} field\n * @return {?}\n */\n function (field) {\n return field.formControl && field.formControl.invalid && (field.formControl.touched || (field.options.parentForm && field.options.parentForm.submitted) || !!(field.field.validation && field.field.validation.show));\n }),\n };\n this.extensions = {};\n }\n /**\n * @param {?} config\n * @return {?}\n */\n addConfig(config) {\n if (config.types) {\n config.types.forEach((/**\n * @param {?} type\n * @return {?}\n */\n type => this.setType(type)));\n }\n if (config.validators) {\n config.validators.forEach((/**\n * @param {?} validator\n * @return {?}\n */\n validator => this.setValidator(validator)));\n }\n if (config.wrappers) {\n config.wrappers.forEach((/**\n * @param {?} wrapper\n * @return {?}\n */\n wrapper => this.setWrapper(wrapper)));\n }\n if (config.manipulators) {\n console.warn(`NgxFormly: passing 'manipulators' config is deprecated, use custom extension instead.`);\n config.manipulators.forEach((/**\n * @param {?} manipulator\n * @return {?}\n */\n manipulator => this.setManipulator(manipulator)));\n }\n if (config.validationMessages) {\n config.validationMessages.forEach((/**\n * @param {?} validation\n * @return {?}\n */\n validation => this.addValidatorMessage(validation.name, validation.message)));\n }\n if (config.extensions) {\n config.extensions.forEach((/**\n * @param {?} c\n * @return {?}\n */\n c => this.extensions[c.name] = c.extension));\n }\n if (config.extras) {\n this.extras = Object.assign({}, this.extras, config.extras);\n }\n }\n /**\n * @param {?} options\n * @return {?}\n */\n setType(options) {\n if (Array.isArray(options)) {\n options.forEach((/**\n * @param {?} option\n * @return {?}\n */\n (option) => this.setType(option)));\n }\n else {\n if (!this.types[options.name]) {\n this.types[options.name] = (/** @type {?} */ ({ name: options.name }));\n }\n ['component', 'extends', 'defaultOptions', 'wrappers'].forEach((/**\n * @param {?} prop\n * @return {?}\n */\n prop => {\n if (options.hasOwnProperty(prop)) {\n this.types[options.name][prop] = options[prop];\n }\n }));\n }\n }\n /**\n * @param {?} name\n * @return {?}\n */\n getType(name) {\n if (!this.types[name]) {\n throw new Error(`[Formly Error] The type \"${name}\" could not be found. Please make sure that is registered through the FormlyModule declaration.`);\n }\n this.mergeExtendedType(name);\n return this.types[name];\n }\n /**\n * @param {?=} field\n * @return {?}\n */\n getMergedField(field = {}) {\n /** @type {?} */\n const type = this.getType(field.type);\n if (type.defaultOptions) {\n reverseDeepMerge(field, type.defaultOptions);\n }\n /** @type {?} */\n const extendDefaults = type.extends && this.getType(type.extends).defaultOptions;\n if (extendDefaults) {\n reverseDeepMerge(field, extendDefaults);\n }\n if (field && field.optionsTypes) {\n field.optionsTypes.forEach((/**\n * @param {?} option\n * @return {?}\n */\n option => {\n /** @type {?} */\n const defaultOptions = this.getType(option).defaultOptions;\n if (defaultOptions) {\n reverseDeepMerge(field, defaultOptions);\n }\n }));\n }\n /** @type {?} */\n const componentRef = this.resolveFieldTypeRef(field);\n if (componentRef && componentRef.instance && componentRef.instance.defaultOptions) {\n reverseDeepMerge(field, componentRef.instance.defaultOptions);\n }\n if (!field.wrappers && type.wrappers) {\n field.wrappers = [...type.wrappers];\n }\n }\n /**\n * \\@internal\n * @param {?=} field\n * @return {?}\n */\n resolveFieldTypeRef(field = {}) {\n if (!field.type) {\n return null;\n }\n /** @type {?} */\n const type = this.getType(field.type);\n if (!type.component || type['_componentRef']) {\n return type['_componentRef'];\n }\n const { _resolver, _injector } = field.parent.options;\n /** @type {?} */\n const componentRef = _resolver\n .resolveComponentFactory(type.component)\n .create(_injector);\n defineHiddenProp(type, '_componentRef', componentRef);\n componentRef.destroy();\n return type['_componentRef'];\n }\n /**\n * @param {?} options\n * @return {?}\n */\n setWrapper(options) {\n this.wrappers[options.name] = options;\n if (options.types) {\n options.types.forEach((/**\n * @param {?} type\n * @return {?}\n */\n (type) => {\n this.setTypeWrapper(type, options.name);\n }));\n }\n }\n /**\n * @param {?} name\n * @return {?}\n */\n getWrapper(name) {\n if (!this.wrappers[name]) {\n throw new Error(`[Formly Error] The wrapper \"${name}\" could not be found. Please make sure that is registered through the FormlyModule declaration.`);\n }\n return this.wrappers[name];\n }\n /**\n * @param {?} type\n * @param {?} name\n * @return {?}\n */\n setTypeWrapper(type, name) {\n if (!this.types[type]) {\n this.types[type] = (/** @type {?} */ ({}));\n }\n if (!this.types[type].wrappers) {\n this.types[type].wrappers = [];\n }\n if (this.types[type].wrappers.indexOf(name) === -1) {\n this.types[type].wrappers.push(name);\n }\n }\n /**\n * @param {?} options\n * @return {?}\n */\n setValidator(options) {\n this.validators[options.name] = options;\n }\n /**\n * @param {?} name\n * @return {?}\n */\n getValidator(name) {\n if (!this.validators[name]) {\n throw new Error(`[Formly Error] The validator \"${name}\" could not be found. Please make sure that is registered through the FormlyModule declaration.`);\n }\n return this.validators[name];\n }\n /**\n * @param {?} name\n * @param {?} message\n * @return {?}\n */\n addValidatorMessage(name, message) {\n this.messages[name] = message;\n }\n /**\n * @param {?} name\n * @return {?}\n */\n getValidatorMessage(name) {\n return this.messages[name];\n }\n /**\n * @param {?} manipulator\n * @return {?}\n */\n setManipulator(manipulator) {\n new manipulator.class()[manipulator.method](this);\n }\n /**\n * @private\n * @param {?} name\n * @return {?}\n */\n mergeExtendedType(name) {\n if (!this.types[name].extends) {\n return;\n }\n /** @type {?} */\n const extendedType = this.getType(this.types[name].extends);\n if (!this.types[name].component) {\n this.types[name].component = extendedType.component;\n }\n if (!this.types[name].wrappers) {\n this.types[name].wrappers = extendedType.wrappers;\n }\n }\n}\nFormlyConfig.ɵfac = function FormlyConfig_Factory(t) { return new (t || FormlyConfig)(); };\nFormlyConfig.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: FormlyConfig, factory: FormlyConfig.ɵfac, providedIn: 'root' });\n/** @nocollapse */ FormlyConfig.ngInjectableDef = defineInjectable({ factory: function FormlyConfig_Factory() { return new FormlyConfig(); }, token: FormlyConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlyConfig, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return []; }, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass FormlyFormBuilder {\n /**\n * @param {?} formlyConfig\n * @param {?} componentFactoryResolver\n * @param {?} injector\n */\n constructor(formlyConfig, componentFactoryResolver, injector) {\n this.formlyConfig = formlyConfig;\n this.componentFactoryResolver = componentFactoryResolver;\n this.injector = injector;\n }\n /**\n * @param {?} formControl\n * @param {?=} fieldGroup\n * @param {?=} model\n * @param {?=} options\n * @return {?}\n */\n buildForm(formControl, fieldGroup = [], model, options) {\n if (!this.formlyConfig.extensions.core) {\n throw new Error('NgxFormly: missing `forRoot()` call. use `forRoot()` when registering the `FormlyModule`.');\n }\n /** @type {?} */\n const field = { fieldGroup, model, formControl, options: this._setOptions(options) };\n disableTreeValidityCall(formControl, (/**\n * @return {?}\n */\n () => {\n this._buildForm(field);\n field.options._checkField(field, true);\n }));\n }\n /**\n * @private\n * @param {?} field\n * @return {?}\n */\n _buildForm(field) {\n this.getExtensions().forEach((/**\n * @param {?} extension\n * @return {?}\n */\n extension => extension.prePopulate && extension.prePopulate(field)));\n this.getExtensions().forEach((/**\n * @param {?} extension\n * @return {?}\n */\n extension => extension.onPopulate && extension.onPopulate(field)));\n if (field.fieldGroup) {\n field.fieldGroup.forEach((/**\n * @param {?} f\n * @return {?}\n */\n (f) => this._buildForm(f)));\n }\n this.getExtensions().forEach((/**\n * @param {?} extension\n * @return {?}\n */\n extension => extension.postPopulate && extension.postPopulate(field)));\n }\n /**\n * @private\n * @return {?}\n */\n getExtensions() {\n return Object.keys(this.formlyConfig.extensions).map((/**\n * @param {?} name\n * @return {?}\n */\n name => this.formlyConfig.extensions[name]));\n }\n /**\n * @private\n * @param {?} options\n * @return {?}\n */\n _setOptions(options) {\n options = options || {};\n options.formState = options.formState || {};\n if (!options.showError) {\n options.showError = this.formlyConfig.extras.showError;\n }\n if (!options.fieldChanges) {\n defineHiddenProp(options, 'fieldChanges', new Subject());\n }\n if (!options._resolver) {\n defineHiddenProp(options, '_resolver', this.componentFactoryResolver);\n }\n if (!options._injector) {\n defineHiddenProp(options, '_injector', this.injector);\n }\n if (!options._hiddenFieldsForCheck) {\n options._hiddenFieldsForCheck = [];\n }\n if (!options._markForCheck) {\n options._markForCheck = (/**\n * @param {?} field\n * @return {?}\n */\n (field) => {\n if (field._componentRefs) {\n field._componentRefs.forEach((/**\n * @param {?} ref\n * @return {?}\n */\n ref => {\n // NOTE: we cannot use ref.changeDetectorRef, see https://github.com/ngx-formly/ngx-formly/issues/2191\n /** @type {?} */\n const changeDetectorRef = ref.injector.get(ChangeDetectorRef);\n changeDetectorRef.markForCheck();\n }));\n }\n if (field.fieldGroup) {\n field.fieldGroup.forEach((/**\n * @param {?} f\n * @return {?}\n */\n f => options._markForCheck(f)));\n }\n });\n }\n if (!options._buildField) {\n options._buildField = (/**\n * @param {?} field\n * @return {?}\n */\n (field) => {\n this._setOptions(field.options);\n this._buildForm(field);\n ((/** @type {?} */ (field.options)))._checkField(field, true);\n return field;\n });\n }\n return options;\n }\n}\nFormlyFormBuilder.ɵfac = function FormlyFormBuilder_Factory(t) { return new (t || FormlyFormBuilder)(ɵngcc0.ɵɵinject(FormlyConfig), ɵngcc0.ɵɵinject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵinject(ɵngcc0.Injector)); };\nFormlyFormBuilder.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: FormlyFormBuilder, factory: FormlyFormBuilder.ɵfac, providedIn: 'root' });\n/** @nocollapse */\nFormlyFormBuilder.ctorParameters = () => [\n { type: FormlyConfig },\n { type: ComponentFactoryResolver },\n { type: Injector }\n];\n/** @nocollapse */ FormlyFormBuilder.ngInjectableDef = defineInjectable({ factory: function FormlyFormBuilder_Factory() { return new FormlyFormBuilder(inject(FormlyConfig), inject(ComponentFactoryResolver), inject(INJECTOR)); }, token: FormlyFormBuilder, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlyFormBuilder, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: FormlyConfig }, { type: ɵngcc0.ComponentFactoryResolver }, { type: ɵngcc0.Injector }]; }, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @param {?} field\n * @param {?=} emitEvent\n * @return {?}\n */\nfunction unregisterControl(field, emitEvent = false) {\n /** @type {?} */\n const control = field.formControl;\n /** @type {?} */\n const fieldIndex = control['_fields'] ? control['_fields'].indexOf(field) : -1;\n if (fieldIndex !== -1) {\n control['_fields'].splice(fieldIndex, 1);\n }\n /** @type {?} */\n const form = (/** @type {?} */ (control.parent));\n if (!form) {\n return;\n }\n /** @type {?} */\n const opts = { emitEvent };\n if (form instanceof FormArray) {\n /** @type {?} */\n const key = form.controls.findIndex((/**\n * @param {?} c\n * @return {?}\n */\n c => c === control));\n if (key !== -1) {\n updateControl(form, opts, (/**\n * @return {?}\n */\n () => form.removeAt(key)));\n }\n }\n else if (form instanceof FormGroup) {\n /** @type {?} */\n const paths = getKeyPath(field);\n /** @type {?} */\n const key = paths[paths.length - 1];\n if (form.get([key]) === control) {\n updateControl(form, opts, (/**\n * @return {?}\n */\n () => form.removeControl(key)));\n }\n }\n control.setParent(null);\n}\n/**\n * @param {?} field\n * @return {?}\n */\nfunction findControl(field) {\n if (field.formControl) {\n return field.formControl;\n }\n if (field['shareFormControl'] === false) {\n return null;\n }\n /** @type {?} */\n const form = (/** @type {?} */ (field.parent.formControl));\n return form ? form.get(getKeyPath(field)) : null;\n}\n/**\n * @param {?} field\n * @param {?=} control\n * @param {?=} emitEvent\n * @return {?}\n */\nfunction registerControl(field, control, emitEvent = false) {\n control = control || field.formControl;\n if (!control['_fields']) {\n defineHiddenProp(control, '_fields', []);\n }\n if (control['_fields'].indexOf(field) === -1) {\n control['_fields'].push(field);\n }\n if (!field.formControl && control) {\n defineHiddenProp(field, 'formControl', control);\n control.setValidators(null);\n control.setAsyncValidators(null);\n field.templateOptions.disabled = !!field.templateOptions.disabled;\n wrapProperty(field.templateOptions, 'disabled', (/**\n * @param {?} __0\n * @return {?}\n */\n ({ firstChange, currentValue }) => {\n if (!firstChange) {\n currentValue ? field.formControl.disable() : field.formControl.enable();\n }\n }));\n if (control.registerOnDisabledChange) {\n control.registerOnDisabledChange((/**\n * @param {?} value\n * @return {?}\n */\n (value) => {\n field.templateOptions['___$disabled'] = value;\n // TODO remove in V6\n field.options && field.options._markForCheck(field);\n }));\n }\n }\n /** @type {?} */\n let parent = (/** @type {?} */ (field.parent.formControl));\n if (!parent || !field.key) {\n return;\n }\n /** @type {?} */\n const paths = getKeyPath(field);\n /** @type {?} */\n const value = getFieldValue(field);\n if (!(isNullOrUndefined(control.value) && isNullOrUndefined(value))\n && control.value !== value\n && control instanceof FormControl) {\n control.patchValue(value);\n }\n for (let i = 0; i < (paths.length - 1); i++) {\n /** @type {?} */\n const path = paths[i];\n if (!parent.get([path])) {\n updateControl(parent, { emitEvent }, (/**\n * @return {?}\n */\n () => parent.setControl(path, new FormGroup({}))));\n }\n parent = (/** @type {?} */ (parent.get([path])));\n }\n /** @type {?} */\n const key = paths[paths.length - 1];\n if (!field._hide && parent.get([key]) !== control) {\n updateControl(parent, { emitEvent }, (/**\n * @return {?}\n */\n () => parent.setControl(key, control)));\n }\n}\n/**\n * @param {?} c\n * @param {?=} onlySelf\n * @return {?}\n */\nfunction updateValidity(c, onlySelf = false) {\n /** @type {?} */\n const status = c.status;\n /** @type {?} */\n const value = c.value;\n c.updateValueAndValidity({ emitEvent: false, onlySelf });\n if (status !== c.status) {\n ((/** @type {?} */ (c.statusChanges))).emit(c.status);\n }\n if (value !== c.value) {\n ((/** @type {?} */ (c.valueChanges))).emit(c.value);\n }\n}\n/**\n * @param {?} form\n * @param {?} opts\n * @param {?} action\n * @return {?}\n */\nfunction updateControl(form, opts, action) {\n /**\n * workaround for https://github.com/angular/angular/issues/27679\n */\n if (form instanceof FormGroup && !form['__patchForEachChild']) {\n defineHiddenProp(form, '__patchForEachChild', true);\n ((/** @type {?} */ (form)))._forEachChild = (/**\n * @param {?} cb\n * @return {?}\n */\n (cb) => {\n Object\n .keys(form.controls)\n .forEach((/**\n * @param {?} k\n * @return {?}\n */\n k => form.controls[k] && cb(form.controls[k], k)));\n });\n }\n /**\n * workaround for https://github.com/angular/angular/issues/20439\n * @type {?}\n */\n const updateValueAndValidity = form.updateValueAndValidity.bind(form);\n if (opts.emitEvent === false) {\n form.updateValueAndValidity = (/**\n * @param {?} opts\n * @return {?}\n */\n (opts) => {\n updateValueAndValidity(Object.assign({}, (opts || {}), { emitEvent: false }));\n });\n }\n action();\n if (opts.emitEvent === false) {\n form.updateValueAndValidity = updateValueAndValidity;\n }\n}\n/**\n * @param {?} form\n * @return {?}\n */\nfunction clearControl(form) {\n form['_fields'] && delete form['_fields'];\n form.setValidators(null);\n form.setAsyncValidators(null);\n if (form instanceof FormGroup || form instanceof FormArray) {\n Object.keys(form.controls)\n .forEach((/**\n * @param {?} k\n * @return {?}\n */\n (k) => clearControl(form.controls[k])));\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass FormlyForm {\n /**\n * @param {?} formlyBuilder\n * @param {?} formlyConfig\n * @param {?} ngZone\n * @param {?} immutable\n * @param {?} parentFormGroup\n */\n constructor(formlyBuilder, formlyConfig, ngZone, \n // tslint:disable-next-line\n immutable, parentFormGroup) {\n this.formlyBuilder = formlyBuilder;\n this.formlyConfig = formlyConfig;\n this.ngZone = ngZone;\n this.parentFormGroup = parentFormGroup;\n this.modelChange = new EventEmitter();\n this.immutable = false;\n this._modelChangeValue = {};\n this.modelChangeSubs = [];\n this.modelChange$ = new Subject();\n this.modelChangeSub = this.modelChange$.pipe(switchMap((/**\n * @return {?}\n */\n () => this.ngZone.onStable.asObservable().pipe(take(1))))).subscribe((/**\n * @return {?}\n */\n () => this.ngZone.runGuarded((/**\n * @return {?}\n */\n () => {\n // runGuarded is used to keep the expression changes in-sync\n // https://github.com/ngx-formly/ngx-formly/issues/2095\n this.checkExpressionChange();\n this.modelChange.emit(this._modelChangeValue = clone(this.model));\n }))));\n if (immutable !== null) {\n console.warn(`NgxFormly: passing 'immutable' attribute to 'formly-form' component is deprecated since v5.5, enable immutable mode through NgModule declaration instead.`);\n }\n this.immutable = (immutable !== null) || !!formlyConfig.extras.immutable;\n }\n /**\n * @param {?} model\n * @return {?}\n */\n set model(model) { this._model = this.immutable ? clone(model) : model; }\n /**\n * @return {?}\n */\n get model() {\n if (!this._model) {\n this._model = {};\n }\n return this._model;\n }\n /**\n * @param {?} fields\n * @return {?}\n */\n set fields(fields) { this._fields = this.immutable ? clone(fields) : fields; }\n /**\n * @return {?}\n */\n get fields() { return this._fields || []; }\n /**\n * @param {?} options\n * @return {?}\n */\n set options(options) { this._options = this.immutable ? clone(options) : options; }\n /**\n * @return {?}\n */\n get options() { return this._options; }\n /**\n * @param {?} content\n * @return {?}\n */\n set content(content) {\n if (content) {\n /** @type {?} */\n let hasContent = false;\n /** @type {?} */\n let node = content.nativeElement.nextSibling;\n while (node && !hasContent) {\n if (node.nodeType === Node.ELEMENT_NODE\n || node.nodeType === Node.TEXT_NODE && node.textContent && node.textContent.trim() !== '') {\n hasContent = true;\n }\n node = node.nextSibling;\n }\n if (hasContent) {\n console.warn(`NgxFormly: content projection for 'formly-form' component is deprecated since v5.5, you should avoid passing content inside the 'formly-form' tag.`);\n }\n }\n }\n /**\n * @return {?}\n */\n ngDoCheck() {\n if (this.formlyConfig.extras.checkExpressionOn === 'changeDetectionCheck') {\n this.checkExpressionChange();\n }\n }\n /**\n * @param {?} changes\n * @return {?}\n */\n ngOnChanges(changes) {\n // https://github.com/ngx-formly/ngx-formly/issues/2294\n if (changes.model && this.field) {\n this.field.model = this.model;\n }\n if (changes.fields && this.form) {\n clearControl(this.form);\n }\n if (changes.fields || changes.form || (changes.model && this._modelChangeValue !== changes.model.currentValue)) {\n this.form = this.form || (new FormGroup({}));\n this.setOptions();\n this.options.updateInitialValue();\n this.clearModelSubscriptions();\n this.formlyBuilder.buildForm(this.form, this.fields, this.model, this.options);\n this.trackModelChanges(this.fields);\n }\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n this.modelChangeSub.unsubscribe();\n this.clearModelSubscriptions();\n }\n /**\n * @param {?} __0\n * @return {?}\n */\n changeModel({ key, value, field }) {\n assignFieldValue(field, value);\n this.modelChange$.next();\n }\n /**\n * @return {?}\n */\n setOptions() {\n if (!this.options) {\n this.options = {};\n }\n if (!this.options.resetModel) {\n this.options.resetModel = (/**\n * @param {?=} model\n * @return {?}\n */\n (model) => {\n model = clone(isNullOrUndefined(model) ? ((/** @type {?} */ (this.options)))._initialModel : model);\n if (this.model) {\n Object.keys(this.model).forEach((/**\n * @param {?} k\n * @return {?}\n */\n k => delete this.model[k]));\n Object.assign(this.model, model || {});\n }\n ((/** @type {?} */ (this.options)))._buildForm();\n // we should call `NgForm::resetForm` to ensure changing `submitted` state after resetting form\n // but only when the current component is a root one.\n if (this.options.parentForm && this.options.parentForm.control === this.form) {\n this.options.parentForm.resetForm(this.model);\n }\n else {\n this.form.reset(this.model);\n }\n });\n }\n if (!this.options.parentForm && this.parentFormGroup) {\n defineHiddenProp(this.options, 'parentForm', this.parentFormGroup);\n wrapProperty(this.options.parentForm, 'submitted', (/**\n * @param {?} __0\n * @return {?}\n */\n ({ firstChange }) => {\n if (!firstChange) {\n this.checkExpressionChange();\n ((/** @type {?} */ (this.options)))._markForCheck({\n fieldGroup: this.fields,\n model: this.model,\n formControl: this.form,\n options: this.options,\n });\n }\n }));\n }\n if (!this.options.updateInitialValue) {\n this.options.updateInitialValue = (/**\n * @return {?}\n */\n () => ((/** @type {?} */ (this.options)))._initialModel = clone(this.model));\n }\n if (!((/** @type {?} */ (this.options)))._buildForm) {\n ((/** @type {?} */ (this.options)))._buildForm = (/**\n * @param {?=} emitModelChange\n * @return {?}\n */\n (emitModelChange = false) => {\n this.clearModelSubscriptions();\n this.formlyBuilder.buildForm(this.form, this.fields, this.model, this.options);\n this.trackModelChanges(this.fields);\n if (emitModelChange) {\n this.modelChange.emit(this._modelChangeValue = clone(this.model));\n }\n });\n }\n if (!((/** @type {?} */ (this.options)))._trackModelChanges) {\n ((/** @type {?} */ (this.options)))._trackModelChanges = (/**\n * @param {?=} emitModelChange\n * @return {?}\n */\n (emitModelChange = false) => {\n this.clearModelSubscriptions();\n this.trackModelChanges(this.fields);\n if (emitModelChange) {\n this.modelChange.emit(this._modelChangeValue = clone(this.model));\n }\n });\n }\n }\n /**\n * @private\n * @return {?}\n */\n checkExpressionChange() {\n if (this.options && ((/** @type {?} */ (this.options)))._checkField) {\n ((/** @type {?} */ (this.options)))._checkField({\n fieldGroup: this.fields,\n model: this.model,\n formControl: this.form,\n options: this.options,\n });\n }\n }\n /**\n * @private\n * @param {?} fields\n * @param {?=} rootKey\n * @return {?}\n */\n trackModelChanges(fields, rootKey = []) {\n fields.forEach((/**\n * @param {?} field\n * @return {?}\n */\n field => {\n if (field.key && !field.fieldGroup && field.formControl) {\n /** @type {?} */\n const control = field.formControl;\n /** @type {?} */\n let valueChanges = control.valueChanges.pipe(distinctUntilChanged((/**\n * @param {?} x\n * @param {?} y\n * @return {?}\n */\n (x, y) => {\n if (x !== y || Array.isArray(x) || isObject(x)) {\n return false;\n }\n return true;\n })));\n const { updateOn, debounce } = field.modelOptions;\n if ((!updateOn || updateOn === 'change') && debounce && debounce.default > 0) {\n valueChanges = control.valueChanges.pipe(debounceTime(debounce.default));\n }\n this.modelChangeSubs.push(valueChanges.subscribe((/**\n * @param {?} value\n * @return {?}\n */\n (value) => {\n // workaround for https://github.com/angular/angular/issues/13792\n if (control instanceof FormControl && control['_fields'] && control['_fields'].length > 1) {\n control.patchValue(value, { emitEvent: false, onlySelf: true });\n }\n if (field.parsers && field.parsers.length > 0) {\n field.parsers.forEach((/**\n * @param {?} parserFn\n * @return {?}\n */\n parserFn => value = parserFn(value)));\n }\n this.changeModel({ key: [...rootKey, ...getKeyPath(field)].join('.'), value, field });\n })));\n // workaround for v5 (https://github.com/ngx-formly/ngx-formly/issues/2061)\n /** @type {?} */\n const observers = control.valueChanges['observers'];\n if (observers && observers.length > 1) {\n observers.unshift(observers.pop());\n }\n }\n if (field.fieldGroup && field.fieldGroup.length > 0) {\n this.trackModelChanges(field.fieldGroup, field.key ? [...rootKey, ...getKeyPath(field)] : rootKey);\n }\n }));\n }\n /**\n * @private\n * @return {?}\n */\n clearModelSubscriptions() {\n this.modelChangeSubs.forEach((/**\n * @param {?} sub\n * @return {?}\n */\n sub => sub.unsubscribe()));\n this.modelChangeSubs = [];\n }\n /**\n * @private\n * @return {?}\n */\n get field() {\n return this.fields && this.fields[0] && this.fields[0].parent;\n }\n}\nFormlyForm.ɵfac = function FormlyForm_Factory(t) { return new (t || FormlyForm)(ɵngcc0.ɵɵdirectiveInject(FormlyFormBuilder), ɵngcc0.ɵɵdirectiveInject(FormlyConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵinjectAttribute('immutable'), ɵngcc0.ɵɵdirectiveInject(ɵngcc1.FormGroupDirective, 8)); };\nFormlyForm.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: FormlyForm, selectors: [[\"formly-form\"]], viewQuery: function FormlyForm_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.content = _t.first);\n } }, inputs: { model: \"model\", fields: \"fields\", options: \"options\", form: \"form\" }, outputs: { modelChange: \"modelChange\" }, features: [ɵngcc0.ɵɵProvidersFeature([FormlyFormBuilder]), ɵngcc0.ɵɵNgOnChangesFeature], ngContentSelectors: _c1, decls: 4, vars: 1, consts: [[\"hide-deprecation\", \"\", 3, \"form\", \"options\", \"model\", \"field\", 4, \"ngFor\", \"ngForOf\"], [\"content\", \"\"], [\"hide-deprecation\", \"\", 3, \"form\", \"options\", \"model\", \"field\"]], template: function FormlyForm_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵprojectionDef();\n ɵngcc0.ɵɵtemplate(0, FormlyForm_formly_field_0_Template, 1, 4, \"formly-field\", 0);\n ɵngcc0.ɵɵelementContainerStart(1, null, 1);\n ɵngcc0.ɵɵprojection(3);\n ɵngcc0.ɵɵelementContainerEnd();\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.fields);\n } }, dependencies: function () { return [ɵngcc2.NgForOf, FormlyField]; }, encapsulation: 2 });\n/** @nocollapse */\nFormlyForm.ctorParameters = () => [\n { type: FormlyFormBuilder },\n { type: FormlyConfig },\n { type: NgZone },\n { type: undefined, decorators: [{ type: Attribute, args: ['immutable',] }] },\n { type: FormGroupDirective, decorators: [{ type: Optional }] }\n];\nFormlyForm.propDecorators = {\n form: [{ type: Input }],\n model: [{ type: Input }],\n fields: [{ type: Input }],\n options: [{ type: Input }],\n modelChange: [{ type: Output }],\n content: [{ type: ViewChild, args: ['content',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlyForm, [{\n type: Component,\n args: [{\n selector: 'formly-form',\n template: `\n \n \n \n \n \n `,\n providers: [FormlyFormBuilder]\n }]\n }], function () { return [{ type: FormlyFormBuilder }, { type: FormlyConfig }, { type: ɵngcc0.NgZone }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['immutable']\n }] }, { type: ɵngcc1.FormGroupDirective, decorators: [{\n type: Optional\n }] }]; }, { modelChange: [{\n type: Output\n }], model: [{\n type: Input\n }], fields: [{\n type: Input\n }], options: [{\n type: Input\n }], content: [{\n type: ViewChild,\n args: ['content']\n }], form: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass FormlyField {\n /**\n * @param {?} formlyConfig\n * @param {?} renderer\n * @param {?} resolver\n * @param {?} elementRef\n * @param {?} hideDeprecation\n */\n constructor(formlyConfig, renderer, resolver, elementRef, \n // tslint:disable-next-line\n hideDeprecation) {\n this.formlyConfig = formlyConfig;\n this.renderer = renderer;\n this.resolver = resolver;\n this.elementRef = elementRef;\n this.warnDeprecation = false;\n this.modelChange = new EventEmitter();\n this.hostObservers = [];\n this.componentRefs = [];\n this.hooksObservers = [];\n this.detectFieldBuild = false;\n this.warnDeprecation = hideDeprecation === null;\n }\n /**\n * @param {?} m\n * @return {?}\n */\n set model(m) {\n this.warnDeprecation && console.warn(`NgxFormly: passing 'model' input to '${this.constructor.name}' component is not required anymore, you may remove it!`);\n }\n /**\n * @param {?} form\n * @return {?}\n */\n set form(form) {\n this.warnDeprecation && console.warn(`NgxFormly: passing 'form' input to '${this.constructor.name}' component is not required anymore, you may remove it!`);\n }\n /**\n * @param {?} options\n * @return {?}\n */\n set options(options) {\n this.warnDeprecation && console.warn(`NgxFormly: passing 'options' input to '${this.constructor.name}' component is not required anymore, you may remove it!`);\n }\n /**\n * @return {?}\n */\n ngAfterContentInit() {\n this.triggerHook('afterContentInit');\n }\n /**\n * @return {?}\n */\n ngAfterContentChecked() {\n this.triggerHook('afterContentChecked');\n }\n /**\n * @return {?}\n */\n ngAfterViewInit() {\n this.triggerHook('afterViewInit');\n }\n /**\n * @return {?}\n */\n ngAfterViewChecked() {\n this.triggerHook('afterViewChecked');\n }\n /**\n * @return {?}\n */\n ngDoCheck() {\n this.triggerHook('doCheck');\n if (this.detectFieldBuild && (this.field && this.field.options)) {\n this.render();\n }\n }\n /**\n * @return {?}\n */\n ngOnInit() {\n this.triggerHook('onInit');\n }\n /**\n * @param {?} changes\n * @return {?}\n */\n ngOnChanges(changes) {\n this.triggerHook('onChanges', changes);\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n this.resetRefs(this.field);\n this.hostObservers.forEach((/**\n * @param {?} unsubscribe\n * @return {?}\n */\n unsubscribe => unsubscribe()));\n this.hooksObservers.forEach((/**\n * @param {?} unsubscribe\n * @return {?}\n */\n unsubscribe => unsubscribe()));\n this.triggerHook('onDestroy');\n }\n /**\n * @private\n * @param {?} containerRef\n * @param {?} f\n * @param {?=} wrappers\n * @return {?}\n */\n renderField(containerRef, f, wrappers = []) {\n if (this.containerRef === containerRef) {\n this.resetRefs(this.field);\n this.containerRef.clear();\n wrappers = this.field ? this.field.wrappers : [];\n }\n if (wrappers && wrappers.length > 0) {\n const [wrapper, ...wps] = wrappers;\n const { component } = this.formlyConfig.getWrapper(wrapper);\n /** @type {?} */\n const ref = containerRef.createComponent(this.resolver.resolveComponentFactory(component));\n this.attachComponentRef(ref, f);\n wrapProperty(ref.instance, 'fieldComponent', (/**\n * @param {?} __0\n * @return {?}\n */\n ({ firstChange, previousValue, currentValue }) => {\n if (currentValue) {\n if (previousValue && previousValue['_lContainer'] === currentValue['_lContainer']) {\n return;\n }\n /** @type {?} */\n const viewRef = previousValue ? previousValue.detach() : null;\n if (viewRef && !viewRef.destroyed) {\n currentValue.insert(viewRef);\n }\n else {\n this.renderField(currentValue, f, wps);\n }\n !firstChange && ref.changeDetectorRef.detectChanges();\n }\n }));\n }\n else if (f && f.type) {\n const { component } = this.formlyConfig.getType(f.type);\n /** @type {?} */\n const ref = containerRef.createComponent(this.resolver.resolveComponentFactory(component));\n this.attachComponentRef(ref, f);\n }\n }\n /**\n * @private\n * @param {?} name\n * @param {?=} changes\n * @return {?}\n */\n triggerHook(name, changes) {\n if (this.field && this.field.hooks && this.field.hooks[name]) {\n if (!changes || changes.field) {\n /** @type {?} */\n const r = this.field.hooks[name](this.field);\n if (isObservable(r) && ['onInit', 'afterContentInit', 'afterViewInit'].indexOf(name) !== -1) {\n /** @type {?} */\n const sub = r.subscribe();\n this.hooksObservers.push((/**\n * @return {?}\n */\n () => sub.unsubscribe()));\n }\n }\n }\n if (this.field && this.field.lifecycle && this.field.lifecycle[name]) {\n this.field.lifecycle[name](this.field.form, this.field, this.field.model, this.field.options);\n }\n if (name === 'onChanges' && changes.field) {\n this.resetRefs(changes.field.previousValue);\n this.render();\n }\n }\n /**\n * @private\n * @template T\n * @param {?} ref\n * @param {?} field\n * @return {?}\n */\n attachComponentRef(ref, field) {\n this.componentRefs.push(ref);\n field._componentRefs.push(ref);\n Object.assign(ref.instance, { field });\n }\n /**\n * @private\n * @return {?}\n */\n render() {\n if (!this.field) {\n return;\n }\n // require Formly build\n if (!this.field.options) {\n this.detectFieldBuild = true;\n return;\n }\n this.detectFieldBuild = false;\n this.hostObservers.forEach((/**\n * @param {?} unsubscribe\n * @return {?}\n */\n unsubscribe => unsubscribe()));\n this.hostObservers = [\n wrapProperty(this.field, 'hide', (/**\n * @param {?} __0\n * @return {?}\n */\n ({ firstChange, currentValue }) => {\n if (!firstChange || (firstChange && currentValue)) {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', currentValue ? 'none' : '');\n }\n if (!this.formlyConfig.extras.lazyRender) {\n firstChange && this.renderField(this.containerRef, this.field);\n }\n else {\n if (currentValue) {\n this.containerRef.clear();\n if (this.field.className) {\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'class');\n }\n }\n else {\n this.renderField(this.containerRef, this.field);\n if (this.field.className) {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'class', this.field.className);\n }\n }\n }\n })),\n wrapProperty(this.field, 'className', (/**\n * @param {?} __0\n * @return {?}\n */\n ({ firstChange, currentValue }) => {\n if ((!firstChange || (firstChange && currentValue))\n && (!this.formlyConfig.extras.lazyRender || (this.field.hide !== true))) {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'class', currentValue);\n }\n })),\n ];\n }\n /**\n * @private\n * @param {?} field\n * @return {?}\n */\n resetRefs(field) {\n if (field) {\n if (field._componentRefs) {\n field._componentRefs = field._componentRefs.filter((/**\n * @param {?} ref\n * @return {?}\n */\n ref => this.componentRefs.indexOf(ref) === -1));\n }\n else {\n defineHiddenProp(this.field, '_componentRefs', []);\n }\n }\n this.componentRefs = [];\n }\n}\nFormlyField.ɵfac = function FormlyField_Factory(t) { return new (t || FormlyField)(ɵngcc0.ɵɵdirectiveInject(FormlyConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵinjectAttribute('hide-deprecation')); };\nFormlyField.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: FormlyField, selectors: [[\"formly-field\"]], viewQuery: function FormlyField_Query(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵviewQuery(_c2, 7, ViewContainerRef);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.containerRef = _t.first);\n } }, inputs: { model: \"model\", form: \"form\", options: \"options\", field: \"field\" }, outputs: { modelChange: \"modelChange\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature], decls: 2, vars: 0, consts: [[\"container\", \"\"]], template: function FormlyField_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, FormlyField_ng_template_0_Template, 0, 0, \"ng-template\", null, 0, ɵngcc0.ɵɵtemplateRefExtractor);\n } }, encapsulation: 2 });\n/** @nocollapse */\nFormlyField.ctorParameters = () => [\n { type: FormlyConfig },\n { type: Renderer2 },\n { type: ComponentFactoryResolver },\n { type: ElementRef },\n { type: undefined, decorators: [{ type: Attribute, args: ['hide-deprecation',] }] }\n];\nFormlyField.propDecorators = {\n field: [{ type: Input }],\n model: [{ type: Input }],\n form: [{ type: Input }],\n options: [{ type: Input }],\n modelChange: [{ type: Output }],\n containerRef: [{ type: ViewChild, args: ['container', (/** @type {?} */ ({ read: ViewContainerRef, static: true })),] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlyField, [{\n type: Component,\n args: [{\n selector: 'formly-field',\n template: ``\n }]\n }], function () { return [{ type: FormlyConfig }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ComponentFactoryResolver }, { type: ɵngcc0.ElementRef }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['hide-deprecation']\n }] }]; }, { modelChange: [{\n type: Output\n }], model: [{\n type: Input\n }], form: [{\n type: Input\n }], options: [{\n type: Input\n }], field: [{\n type: Input\n }], containerRef: [{\n type: ViewChild,\n args: ['container', ( /** @type {?} */({ read: ViewContainerRef, static: true }))]\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass FormlyAttributes {\n /**\n * @param {?} renderer\n * @param {?} elementRef\n * @param {?} _document\n */\n constructor(renderer, elementRef, _document) {\n this.renderer = renderer;\n this.elementRef = elementRef;\n this.uiAttributesCache = {};\n this.uiAttributes = null;\n /**\n * HostBinding doesn't register listeners conditionally which may produce some perf issues.\n *\n * Formly issue: https://github.com/ngx-formly/ngx-formly/issues/1991\n */\n this.uiEvents = {\n listeners: [],\n events: ['click', 'keyup', 'keydown', 'keypress', 'focus', 'blur', 'change'],\n callback: (/**\n * @param {?} eventName\n * @param {?} $event\n * @return {?}\n */\n (eventName, $event) => {\n switch (eventName) {\n case 'focus':\n return this.onFocus($event);\n case 'blur':\n return this.onBlur($event);\n case 'change':\n return this.onChange($event);\n default:\n return this.to[eventName](this.field, $event);\n }\n }),\n };\n this.document = _document;\n }\n /**\n * @return {?}\n */\n get to() { return this.field.templateOptions || {}; }\n /**\n * @private\n * @return {?}\n */\n get fieldAttrElements() { return (this.field && this.field['_elementRefs']) || []; }\n /**\n * @param {?} changes\n * @return {?}\n */\n ngOnChanges(changes) {\n if (changes.field) {\n this.field.name && this.setAttribute('name', this.field.name);\n this.uiEvents.listeners.forEach((/**\n * @param {?} listener\n * @return {?}\n */\n (listener) => listener()));\n this.uiEvents.events.forEach((/**\n * @param {?} eventName\n * @return {?}\n */\n (eventName) => {\n if ((this.to && this.to[eventName]) || ['focus', 'blur', 'change'].indexOf(eventName) !== -1) {\n this.uiEvents.listeners.push(this.renderer.listen(this.elementRef.nativeElement, eventName, (/**\n * @param {?} e\n * @return {?}\n */\n (e) => this.uiEvents.callback(eventName, e))));\n }\n }));\n if (this.to && this.to.attributes) {\n wrapProperty(this.to, 'attributes', (/**\n * @param {?} __0\n * @return {?}\n */\n ({ currentValue, previousValue }) => {\n if (previousValue) {\n Object.keys(previousValue).forEach((/**\n * @param {?} attr\n * @return {?}\n */\n attr => this.removeAttribute(attr)));\n }\n if (currentValue) {\n Object.keys(currentValue).forEach((/**\n * @param {?} attr\n * @return {?}\n */\n attr => {\n if (currentValue[attr] != null) {\n this.setAttribute(attr, currentValue[attr]);\n }\n }));\n }\n }));\n }\n this.detachElementRef(changes.field.previousValue);\n this.attachElementRef(changes.field.currentValue);\n if (this.fieldAttrElements.length === 1) {\n !this.id && this.field.id && this.setAttribute('id', this.field.id);\n wrapProperty(this.field, 'focus', (/**\n * @param {?} __0\n * @return {?}\n */\n ({ currentValue }) => {\n this.toggleFocus(currentValue);\n }));\n }\n }\n if (changes.id) {\n this.setAttribute('id', this.id);\n }\n }\n /**\n * We need to re-evaluate all the attributes on every change detection cycle, because\n * by using a HostBinding we run into certain edge cases. This means that whatever logic\n * is in here has to be super lean or we risk seriously damaging or destroying the performance.\n *\n * Formly issue: https://github.com/ngx-formly/ngx-formly/issues/1317\n * Material issue: https://github.com/angular/components/issues/14024\n * @return {?}\n */\n ngDoCheck() {\n if (!this.uiAttributes) {\n /** @type {?} */\n const element = (/** @type {?} */ (this.elementRef.nativeElement));\n this.uiAttributes = [...FORMLY_VALIDATORS, 'tabindex', 'placeholder', 'readonly', 'disabled', 'step'].filter((/**\n * @param {?} attr\n * @return {?}\n */\n (attr) => !element.hasAttribute || !element.hasAttribute(attr)));\n }\n this.uiAttributes.forEach((/**\n * @param {?} attr\n * @return {?}\n */\n attr => {\n /** @type {?} */\n const value = this.to[attr];\n if (this.uiAttributesCache[attr] !== value\n && (!this.to.attributes || !this.to.attributes.hasOwnProperty(attr.toLowerCase()))) {\n this.uiAttributesCache[attr] = value;\n if (value || value === 0) {\n this.setAttribute(attr, value === true ? attr : `${value}`);\n }\n else {\n this.removeAttribute(attr);\n }\n }\n }));\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n this.uiEvents.listeners.forEach((/**\n * @param {?} listener\n * @return {?}\n */\n listener => listener()));\n this.detachElementRef(this.field);\n }\n /**\n * @param {?} value\n * @return {?}\n */\n toggleFocus(value) {\n /** @type {?} */\n const element = this.fieldAttrElements ? this.fieldAttrElements[0] : null;\n if (!element || !element.nativeElement.focus) {\n return;\n }\n /** @type {?} */\n const isFocused = !!this.document.activeElement\n && this.fieldAttrElements\n .some((/**\n * @param {?} __0\n * @return {?}\n */\n ({ nativeElement }) => this.document.activeElement === nativeElement || nativeElement.contains(this.document.activeElement)));\n if (value && !isFocused) {\n Promise.resolve().then((/**\n * @return {?}\n */\n () => element.nativeElement.focus()));\n }\n else if (!value && isFocused) {\n Promise.resolve().then((/**\n * @return {?}\n */\n () => element.nativeElement.blur()));\n }\n }\n /**\n * @param {?} $event\n * @return {?}\n */\n onFocus($event) {\n this.field['___$focus'] = true;\n if (this.to.focus) {\n this.to.focus(this.field, $event);\n }\n }\n /**\n * @param {?} $event\n * @return {?}\n */\n onBlur($event) {\n this.field['___$focus'] = false;\n if (this.to.blur) {\n this.to.blur(this.field, $event);\n }\n }\n // handle custom `change` event, for regular ones rely on DOM listener\n /**\n * @param {?} $event\n * @return {?}\n */\n onHostChange($event) {\n if ($event instanceof Event) {\n return;\n }\n this.onChange($event);\n }\n /**\n * @param {?} $event\n * @return {?}\n */\n onChange($event) {\n if (this.to.change) {\n this.to.change(this.field, $event);\n }\n if (this.field.formControl) {\n this.field.formControl.markAsDirty();\n }\n }\n /**\n * @private\n * @param {?} f\n * @return {?}\n */\n attachElementRef(f) {\n if (!f) {\n return;\n }\n if (f['_elementRefs'] && f['_elementRefs'].indexOf(this.elementRef) === -1) {\n f['_elementRefs'].push(this.elementRef);\n }\n else {\n defineHiddenProp(f, '_elementRefs', [this.elementRef]);\n }\n }\n /**\n * @private\n * @param {?} f\n * @return {?}\n */\n detachElementRef(f) {\n /** @type {?} */\n const index = f && f['_elementRefs'] ? this.fieldAttrElements.indexOf(this.elementRef) : -1;\n if (index !== -1) {\n this.field['_elementRefs'].splice(index, 1);\n }\n }\n /**\n * @private\n * @param {?} attr\n * @param {?} value\n * @return {?}\n */\n setAttribute(attr, value) {\n this.renderer.setAttribute(this.elementRef.nativeElement, attr, value);\n }\n /**\n * @private\n * @param {?} attr\n * @return {?}\n */\n removeAttribute(attr) {\n this.renderer.removeAttribute(this.elementRef.nativeElement, attr);\n }\n}\nFormlyAttributes.ɵfac = function FormlyAttributes_Factory(t) { return new (t || FormlyAttributes)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(DOCUMENT)); };\nFormlyAttributes.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: FormlyAttributes, selectors: [[\"\", \"formlyAttributes\", \"\"]], hostBindings: function FormlyAttributes_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"change\", function FormlyAttributes_change_HostBindingHandler($event) { return ctx.onHostChange($event); });\n } }, inputs: { field: [\"formlyAttributes\", \"field\"], id: \"id\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature] });\n/** @nocollapse */\nFormlyAttributes.ctorParameters = () => [\n { type: Renderer2 },\n { type: ElementRef },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\nFormlyAttributes.propDecorators = {\n field: [{ type: Input, args: ['formlyAttributes',] }],\n id: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlyAttributes, [{\n type: Directive,\n args: [{\n selector: '[formlyAttributes]',\n host: {\n '(change)': 'onHostChange($event)'\n }\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, { field: [{\n type: Input,\n args: ['formlyAttributes']\n }], id: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @abstract\n * @template F\n */\nclass FieldType {\n /**\n * @return {?}\n */\n get model() { return this.field.model; }\n /**\n * @param {?} m\n * @return {?}\n */\n set model(m) { console.warn(`NgxFormly: passing 'model' input to '${this.constructor.name}' component is not required anymore, you may remove it!`); }\n /**\n * @return {?}\n */\n get form() { return (/** @type {?} */ (this.field.parent.formControl)); }\n /**\n * @param {?} form\n * @return {?}\n */\n set form(form) { console.warn(`NgxFormly: passing 'form' input to '${this.constructor.name}' component is not required anymore, you may remove it!`); }\n /**\n * @return {?}\n */\n get options() { return this.field.options; }\n /**\n * @param {?} options\n * @return {?}\n */\n set options(options) { console.warn(`NgxFormly: passing 'options' input to '${this.constructor.name}' component is not required anymore, you may remove it!`); }\n /**\n * @return {?}\n */\n get key() { return this.field.key; }\n /**\n * @return {?}\n */\n get formControl() { return (/** @type {?} */ (this.field.formControl)); }\n /**\n * @return {?}\n */\n get to() { return this.field.templateOptions || {}; }\n /**\n * @return {?}\n */\n get showError() { return this.options.showError(this); }\n /**\n * @return {?}\n */\n get id() { return this.field.id; }\n /**\n * @return {?}\n */\n get formState() { return this.options.formState || {}; }\n}\nFieldType.ɵfac = function FieldType_Factory(t) { return new (t || FieldType)(); };\nFieldType.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: FieldType, inputs: { model: \"model\", form: \"form\", options: \"options\", field: \"field\" } });\nFieldType.propDecorators = {\n field: [{ type: Input }],\n model: [{ type: Input }],\n form: [{ type: Input }],\n options: [{ type: Input }]\n};\n\n/**\n * @deprecated use `FieldType` instead\n * @abstract\n */\nclass Field extends FieldType {\n constructor() {\n super();\n console.warn(`NgxFormly: 'Field' has been renamed to 'FieldType', extend 'FieldType' instead.`);\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n// TODO remove `selector` in V6\n// tslint:disable-next-line\n/**\n * @abstract\n * @template F\n */\nclass FieldArrayType extends FieldType {\n /**\n * @param {?=} builder\n */\n constructor(builder) {\n super();\n this.defaultOptions = {\n defaultValue: [],\n };\n if (builder instanceof FormlyFormBuilder) {\n console.warn(`NgxFormly: passing 'FormlyFormBuilder' to '${this.constructor.name}' type is not required anymore, you may remove it!`);\n }\n }\n /**\n * @return {?}\n */\n get formControl() {\n return (/** @type {?} */ (this.field.formControl));\n }\n /**\n * @param {?} field\n * @return {?}\n */\n onPopulate(field) {\n if (!field.formControl && field.key) {\n /** @type {?} */\n const control = findControl(field);\n registerControl(field, control ? control : new FormArray([], { updateOn: field.modelOptions.updateOn }));\n }\n field.fieldGroup = field.fieldGroup || [];\n /** @type {?} */\n const length = field.model ? field.model.length : 0;\n if (field.fieldGroup.length > length) {\n for (let i = field.fieldGroup.length - 1; i >= length; --i) {\n unregisterControl(field.fieldGroup[i], true);\n field.fieldGroup.splice(i, 1);\n }\n }\n for (let i = field.fieldGroup.length; i < length; i++) {\n /** @type {?} */\n const f = Object.assign({}, clone(field.fieldArray), { key: `${i}` });\n field.fieldGroup.push(f);\n }\n }\n /**\n * @param {?=} i\n * @param {?=} initialModel\n * @param {?=} __2\n * @return {?}\n */\n add(i, initialModel, { markAsDirty } = { markAsDirty: true }) {\n i = isNullOrUndefined(i) ? this.field.fieldGroup.length : i;\n if (!this.model) {\n assignFieldValue(this.field, []);\n }\n this.model.splice(i, 0, initialModel ? clone(initialModel) : undefined);\n this._build();\n markAsDirty && this.formControl.markAsDirty();\n }\n /**\n * @param {?} i\n * @param {?=} __1\n * @return {?}\n */\n remove(i, { markAsDirty } = { markAsDirty: true }) {\n this.model.splice(i, 1);\n unregisterControl(this.field.fieldGroup[i], true);\n this.field.fieldGroup.splice(i, 1);\n this.field.fieldGroup.forEach((/**\n * @param {?} f\n * @param {?} key\n * @return {?}\n */\n (f, key) => f.key = `${key}`));\n this._build();\n markAsDirty && this.formControl.markAsDirty();\n }\n /**\n * @private\n * @return {?}\n */\n _build() {\n ((/** @type {?} */ (this.options)))._buildField(this.field);\n ((/** @type {?} */ (this.options)))._trackModelChanges(true);\n }\n}\nFieldArrayType.ɵfac = function FieldArrayType_Factory(t) { return new (t || FieldArrayType)(ɵngcc0.ɵɵdirectiveInject(FORMLY_CONFIG, 8)); };\nFieldArrayType.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: FieldArrayType, selectors: [[\"fieldArray\"]], features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\n/** @nocollapse */\nFieldArrayType.ctorParameters = () => [\n { type: FormlyFormBuilder, decorators: [{ type: Inject, args: [FORMLY_CONFIG,] }, { type: Optional }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FieldArrayType, [{\n type: Directive,\n args: [{ selector: '[ɵfieldArray]' }]\n }], function () { return [{ type: FormlyFormBuilder, decorators: [{\n type: Inject,\n args: [FORMLY_CONFIG]\n }, {\n type: Optional\n }] }]; }, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @abstract\n * @template F\n */\nclass FieldWrapper extends FieldType {\n}\nFieldWrapper.ɵfac = /*@__PURE__*/ function () { let ɵFieldWrapper_BaseFactory; return function FieldWrapper_Factory(t) { return (ɵFieldWrapper_BaseFactory || (ɵFieldWrapper_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(FieldWrapper)))(t || FieldWrapper); }; }();\nFieldWrapper.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: FieldWrapper, viewQuery: function FieldWrapper_Query(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵviewQuery(_c3, 5, ViewContainerRef);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.fieldComponent = _t.first);\n } }, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\nFieldWrapper.propDecorators = {\n fieldComponent: [{ type: ViewChild, args: ['fieldComponent', (/** @type {?} */ ({ read: ViewContainerRef, static: false })),] }]\n};\n\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass FormlyGroup extends FieldType {\n constructor() {\n super(...arguments);\n this.defaultOptions = {\n defaultValue: {},\n };\n }\n}\nFormlyGroup.ɵfac = /*@__PURE__*/ function () { let ɵFormlyGroup_BaseFactory; return function FormlyGroup_Factory(t) { return (ɵFormlyGroup_BaseFactory || (ɵFormlyGroup_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(FormlyGroup)))(t || FormlyGroup); }; }();\nFormlyGroup.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: FormlyGroup, selectors: [[\"formly-group\"]], hostVars: 2, hostBindings: function FormlyGroup_HostBindings(rf, ctx) { if (rf & 2) {\n ɵngcc0.ɵɵclassMap(ctx.field.fieldGroupClassName || \"\");\n } }, features: [ɵngcc0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1, decls: 2, vars: 1, consts: [[3, \"field\", 4, \"ngFor\", \"ngForOf\"], [3, \"field\"]], template: function FormlyGroup_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵprojectionDef();\n ɵngcc0.ɵɵtemplate(0, FormlyGroup_formly_field_0_Template, 1, 1, \"formly-field\", 0);\n ɵngcc0.ɵɵprojection(1);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.field.fieldGroup);\n } }, dependencies: [ɵngcc2.NgForOf, FormlyField], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlyGroup, [{\n type: Component,\n args: [{\n selector: 'formly-group',\n template: `\n \n \n `,\n host: {\n '[class]': 'field.fieldGroupClassName || \"\"'\n }\n }]\n }], null, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass FormlyValidationMessage {\n /**\n * @param {?} formlyConfig\n */\n constructor(formlyConfig) {\n this.formlyConfig = formlyConfig;\n }\n /**\n * @return {?}\n */\n ngOnChanges() {\n /** @type {?} */\n const EXPR_VALIDATORS = FORMLY_VALIDATORS.map((/**\n * @param {?} v\n * @return {?}\n */\n v => `templateOptions.${v}`));\n this.errorMessage$ = merge(this.field.formControl.statusChanges, (!this.field.options\n ? of(null)\n : this.field.options.fieldChanges.pipe(filter((/**\n * @param {?} __0\n * @return {?}\n */\n ({ field, type, property }) => {\n return (field === this.field)\n && (type === 'expressionChanges')\n && ((property.indexOf('validation') !== -1)\n || (EXPR_VALIDATORS.indexOf(property) !== -1));\n }))))).pipe(startWith(null), switchMap((/**\n * @return {?}\n */\n () => isObservable(this.errorMessage)\n ? this.errorMessage\n : of(this.errorMessage))));\n }\n /**\n * @return {?}\n */\n get errorMessage() {\n /** @type {?} */\n const fieldForm = this.field.formControl;\n for (let error in fieldForm.errors) {\n if (fieldForm.errors.hasOwnProperty(error)) {\n /** @type {?} */\n let message = this.formlyConfig.getValidatorMessage(error);\n if (isObject(fieldForm.errors[error])) {\n if (fieldForm.errors[error].errorPath) {\n return;\n }\n if (fieldForm.errors[error].message) {\n message = fieldForm.errors[error].message;\n }\n }\n if (this.field.validation && this.field.validation.messages && this.field.validation.messages[error]) {\n message = this.field.validation.messages[error];\n }\n if (this.field.validators && this.field.validators[error] && this.field.validators[error].message) {\n message = this.field.validators[error].message;\n }\n if (this.field.asyncValidators && this.field.asyncValidators[error] && this.field.asyncValidators[error].message) {\n message = this.field.asyncValidators[error].message;\n }\n if (typeof message === 'function') {\n return message(fieldForm.errors[error], this.field);\n }\n return message;\n }\n }\n }\n}\nFormlyValidationMessage.ɵfac = function FormlyValidationMessage_Factory(t) { return new (t || FormlyValidationMessage)(ɵngcc0.ɵɵdirectiveInject(FormlyConfig)); };\nFormlyValidationMessage.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: FormlyValidationMessage, selectors: [[\"formly-validation-message\"]], inputs: { field: \"field\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature], decls: 2, vars: 3, template: function FormlyValidationMessage_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtext(0);\n ɵngcc0.ɵɵpipe(1, \"async\");\n } if (rf & 2) {\n ɵngcc0.ɵɵtextInterpolate(ɵngcc0.ɵɵpipeBind1(1, 1, ctx.errorMessage$));\n } }, dependencies: [ɵngcc2.AsyncPipe], encapsulation: 2, changeDetection: 0 });\n/** @nocollapse */\nFormlyValidationMessage.ctorParameters = () => [\n { type: FormlyConfig }\n];\nFormlyValidationMessage.propDecorators = {\n field: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlyValidationMessage, [{\n type: Component,\n args: [{\n selector: 'formly-validation-message',\n template: `{{ errorMessage$ | async }}`,\n changeDetection: ChangeDetectionStrategy.OnPush\n }]\n }], function () { return [{ type: FormlyConfig }]; }, { field: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass FormlyTemplateType extends FieldType {\n /**\n * @param {?} sanitizer\n */\n constructor(sanitizer) {\n super();\n this.sanitizer = sanitizer;\n this.innerHtml = { content: null, template: null };\n }\n /**\n * @return {?}\n */\n get template() {\n if (this.field && (this.field.template !== this.innerHtml.template)) {\n this.innerHtml = {\n template: this.field.template,\n content: this.to.safeHtml\n ? this.sanitizer.bypassSecurityTrustHtml(this.field.template)\n : this.field.template,\n };\n }\n return this.innerHtml.content;\n }\n}\nFormlyTemplateType.ɵfac = function FormlyTemplateType_Factory(t) { return new (t || FormlyTemplateType)(ɵngcc0.ɵɵdirectiveInject(ɵngcc3.DomSanitizer)); };\nFormlyTemplateType.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: FormlyTemplateType, selectors: [[\"formly-template\"]], features: [ɵngcc0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, \"innerHtml\"]], template: function FormlyTemplateType_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"div\", 0);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"innerHtml\", ctx.template, ɵngcc0.ɵɵsanitizeHtml);\n } }, encapsulation: 2 });\n/** @nocollapse */\nFormlyTemplateType.ctorParameters = () => [\n { type: DomSanitizer }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlyTemplateType, [{\n type: Component,\n args: [{\n selector: 'formly-template',\n template: `
`\n }]\n }], function () { return [{ type: ɵngcc3.DomSanitizer }]; }, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @param {?} expression\n * @param {?} argNames\n * @return {?}\n */\nfunction evalStringExpression(expression, argNames) {\n try {\n if (expression.indexOf('this.field') !== -1) {\n console.warn(`NgxFormly: using 'this.field' in expressionProperties is deprecated since v5.1, use 'field' instead.`);\n }\n return (/** @type {?} */ (Function(...argNames, `return ${expression};`)));\n }\n catch (error) {\n console.error(error);\n }\n}\n/**\n * @param {?} expression\n * @param {?} thisArg\n * @param {?} argVal\n * @return {?}\n */\nfunction evalExpression(expression, thisArg, argVal) {\n if (expression instanceof Function) {\n return expression.apply(thisArg, argVal);\n }\n else {\n return expression ? true : false;\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * \\@experimental\n */\nclass FieldExpressionExtension {\n /**\n * @param {?} field\n * @return {?}\n */\n prePopulate(field) {\n if (field.parent || field.options._checkField) {\n return;\n }\n /** @type {?} */\n let checkLocked = false;\n field.options._checkField = (/**\n * @param {?} f\n * @param {?} ignoreCache\n * @return {?}\n */\n (f, ignoreCache) => {\n if (!checkLocked) {\n checkLocked = true;\n this.checkField(f, ignoreCache);\n checkLocked = false;\n }\n });\n }\n /**\n * @param {?} field\n * @return {?}\n */\n postPopulate(field) {\n if (!field.parent || field._expressionProperties) {\n return;\n }\n // cache built expression\n defineHiddenProp(field, '_expressionProperties', {});\n if (field.expressionProperties) {\n for (const key in field.expressionProperties) {\n /** @type {?} */\n const expressionProperty = field.expressionProperties[key];\n if (typeof expressionProperty === 'string' || isFunction(expressionProperty)) {\n field._expressionProperties[key] = {\n expression: this._evalExpression(key, expressionProperty, key === 'templateOptions.disabled' && field.parent.expressionProperties && field.parent.expressionProperties.hasOwnProperty('templateOptions.disabled')\n ? (/**\n * @return {?}\n */\n () => field.parent.templateOptions.disabled)\n : undefined),\n };\n if (key === 'templateOptions.disabled') {\n Object.defineProperty(field._expressionProperties[key], 'expressionValue', {\n get: (/**\n * @return {?}\n */\n () => field.templateOptions.disabled),\n set: (/**\n * @return {?}\n */\n () => { }),\n enumerable: true,\n configurable: true,\n });\n }\n }\n else if (expressionProperty instanceof Observable) {\n /** @type {?} */\n const subscribe = (/**\n * @return {?}\n */\n () => ((/** @type {?} */ (expressionProperty)))\n .subscribe((/**\n * @param {?} v\n * @return {?}\n */\n v => {\n this.setExprValue(field, key, v);\n if (field.options && field.options._markForCheck) {\n field.options._markForCheck(field);\n }\n })));\n /** @type {?} */\n let subscription = subscribe();\n /** @type {?} */\n const onInit = field.hooks.onInit;\n field.hooks.onInit = (/**\n * @return {?}\n */\n () => {\n if (subscription === null) {\n subscription = subscribe();\n }\n return onInit && onInit(field);\n });\n /** @type {?} */\n const onDestroy = field.hooks.onDestroy;\n field.hooks.onDestroy = (/**\n * @return {?}\n */\n () => {\n onDestroy && onDestroy(field);\n subscription.unsubscribe();\n subscription = null;\n });\n }\n }\n }\n if (field.hideExpression) {\n // delete hide value in order to force re-evaluate it in FormlyFormExpression.\n delete field.hide;\n field.hideExpression = this._evalExpression('hide', field.hideExpression, (/**\n * @return {?}\n */\n () => {\n /** @type {?} */\n let root = field.parent;\n while (root.parent && !root.hide) {\n root = root.parent;\n }\n return root.hide;\n }));\n }\n else {\n wrapProperty(field, 'hide', (/**\n * @param {?} __0\n * @return {?}\n */\n ({ currentValue, firstChange }) => {\n field._hide = currentValue;\n if (!firstChange || (firstChange && currentValue === true)) {\n field.options._hiddenFieldsForCheck.push(field);\n }\n }));\n }\n }\n /**\n * @private\n * @param {?} prop\n * @param {?} expression\n * @param {?=} parentExpression\n * @return {?}\n */\n _evalExpression(prop, expression, parentExpression) {\n return (/**\n * @param {...?} args\n * @return {?}\n */\n (...args) => {\n try {\n if (typeof expression === 'string') {\n expression = evalStringExpression(expression, ['model', 'formState', 'field']);\n }\n if (typeof expression !== 'function') {\n expression = (/**\n * @return {?}\n */\n () => !!expression);\n }\n return (parentExpression && parentExpression()) || expression(...args);\n }\n catch (error) {\n error.message = `[Formly Error] [Expression \"${prop}\"] ${error.message}`;\n throw error;\n }\n });\n }\n /**\n * @private\n * @param {?} field\n * @param {?} prop\n * @return {?}\n */\n _evalExpressionPath(field, prop) {\n if (field._expressionProperties[prop] && field._expressionProperties[prop].expressionPaths) {\n return field._expressionProperties[prop].expressionPaths;\n }\n /** @type {?} */\n let paths = [];\n if (prop.indexOf('[') === -1) {\n paths = prop.split('.');\n }\n else {\n prop\n .split(/[[\\]]{1,2}/) // https://stackoverflow.com/a/20198206\n .filter((/**\n * @param {?} p\n * @return {?}\n */\n p => p))\n .forEach(((/**\n * @param {?} path\n * @return {?}\n */\n path => {\n /** @type {?} */\n const arrayPath = path.match(/['|\"](.*?)['|\"]/);\n if (arrayPath) {\n paths.push(arrayPath[1]);\n }\n else {\n paths.push(...path.split('.').filter((/**\n * @param {?} p\n * @return {?}\n */\n p => p)));\n }\n })));\n }\n if (field._expressionProperties[prop]) {\n field._expressionProperties[prop].expressionPaths = paths;\n }\n return paths;\n }\n /**\n * @private\n * @param {?} field\n * @param {?=} ignoreCache\n * @return {?}\n */\n checkField(field, ignoreCache = false) {\n /** @type {?} */\n const fieldChanged = this._checkField(field, ignoreCache);\n field.options._hiddenFieldsForCheck\n .sort((/**\n * @param {?} f\n * @return {?}\n */\n f => f.hide ? -1 : 1))\n .forEach((/**\n * @param {?} f\n * @return {?}\n */\n f => this.toggleFormControl(f, !!f.hide, !ignoreCache)));\n field.options._hiddenFieldsForCheck = [];\n if (fieldChanged) {\n this.checkField(field);\n if (field.options && field.options._markForCheck) {\n field.options._markForCheck(field);\n }\n }\n }\n /**\n * @private\n * @param {?} field\n * @param {?=} ignoreCache\n * @return {?}\n */\n _checkField(field, ignoreCache = false) {\n /** @type {?} */\n let fieldChanged = false;\n field.fieldGroup.forEach((/**\n * @param {?} f\n * @return {?}\n */\n f => {\n if (!f.options) {\n return;\n }\n this.checkFieldExpressionChange(f, ignoreCache) && (fieldChanged = true);\n if (this.checkFieldVisibilityChange(f, ignoreCache)) {\n field.options._hiddenFieldsForCheck.push(f);\n fieldChanged = true;\n }\n if (f.fieldGroup && f.fieldGroup.length > 0) {\n this._checkField(f, ignoreCache) && (fieldChanged = true);\n }\n }));\n return fieldChanged;\n }\n /**\n * @private\n * @param {?} field\n * @param {?} ignoreCache\n * @return {?}\n */\n checkFieldExpressionChange(field, ignoreCache) {\n if (!field || !field._expressionProperties) {\n return false;\n }\n /** @type {?} */\n let markForCheck = false;\n /** @type {?} */\n const expressionProperties = field._expressionProperties;\n for (const key in expressionProperties) {\n /** @type {?} */\n let expressionValue = evalExpression(expressionProperties[key].expression, { field }, [field.model, field.options.formState, field, ignoreCache]);\n if (key === 'templateOptions.disabled') {\n expressionValue = !!expressionValue;\n }\n if (ignoreCache || (expressionProperties[key].expressionValue !== expressionValue\n && (!(isObject(expressionValue) || isFunction(expressionValue))\n || (isFunction(expressionValue)\n && ('' + expressionProperties[key].expressionValue !== '' + expressionValue))\n || isObservable(expressionValue)\n || JSON.stringify(expressionValue) !== JSON.stringify(expressionProperties[key].expressionValue)))) {\n markForCheck = true;\n expressionProperties[key].expressionValue = expressionValue;\n this.setExprValue(field, key, expressionValue);\n }\n }\n return markForCheck;\n }\n /**\n * @private\n * @param {?} field\n * @param {?} ignoreCache\n * @return {?}\n */\n checkFieldVisibilityChange(field, ignoreCache) {\n if (!field || isNullOrUndefined(field.hideExpression)) {\n return false;\n }\n /** @type {?} */\n const hideExpressionResult = !!evalExpression(field.hideExpression, { field }, [field.model, field.options.formState, field, ignoreCache]);\n /** @type {?} */\n let markForCheck = false;\n if (hideExpressionResult !== field.hide || ignoreCache) {\n markForCheck = true;\n // toggle hide\n field.hide = hideExpressionResult;\n field.templateOptions.hidden = hideExpressionResult;\n }\n return markForCheck;\n }\n /**\n * @private\n * @param {?} field\n * @param {?} value\n * @return {?}\n */\n setDisabledState(field, value) {\n if (field.fieldGroup) {\n field.fieldGroup\n .filter((/**\n * @param {?} f\n * @return {?}\n */\n f => !f.expressionProperties || !f.expressionProperties.hasOwnProperty('templateOptions.disabled')))\n .forEach((/**\n * @param {?} f\n * @return {?}\n */\n f => this.setDisabledState(f, value)));\n }\n if (field.key && field.templateOptions.disabled !== value) {\n field.templateOptions.disabled = value;\n }\n }\n /**\n * @private\n * @param {?} field\n * @param {?} hide\n * @param {?} resetOnHide\n * @return {?}\n */\n toggleFormControl(field, hide, resetOnHide) {\n if (field.fieldGroup) {\n field.fieldGroup\n .filter((/**\n * @param {?} f\n * @return {?}\n */\n f => !f.hideExpression))\n .forEach((/**\n * @param {?} f\n * @return {?}\n */\n f => this.toggleFormControl(f, hide, resetOnHide)));\n }\n if (field.formControl && field.key) {\n defineHiddenProp(field, '_hide', !!(hide || field.hide));\n /** @type {?} */\n const c = field.formControl;\n if (c['_fields'] && c['_fields'].length > 1) {\n updateValidity(c);\n }\n if (hide === true && (!c['_fields'] || c['_fields'].every((/**\n * @param {?} f\n * @return {?}\n */\n f => !!f._hide)))) {\n unregisterControl(field, true);\n if (resetOnHide && field.resetOnHide) {\n field.formControl.reset({ value: undefined, disabled: field.formControl.disabled });\n if (field.fieldGroup) {\n assignFieldValue(field, undefined);\n if (field.formControl instanceof FormArray) {\n field.fieldGroup.length = 0;\n }\n }\n }\n }\n else if (hide === false) {\n if (field.resetOnHide && field.parent && !isUndefined(field.defaultValue) && isUndefined(getFieldValue(field))) {\n assignFieldValue(field, field.defaultValue);\n }\n registerControl(field, undefined, true);\n if (field.resetOnHide && field.fieldArray && (field.fieldGroup || []).length !== (field.model || []).length) {\n ((/** @type {?} */ (field.options)))._buildForm(true);\n }\n }\n }\n if (field.options.fieldChanges) {\n field.options.fieldChanges.next((/** @type {?} */ ({ field, type: 'hidden', value: hide })));\n }\n }\n /**\n * @private\n * @param {?} field\n * @param {?} prop\n * @param {?} value\n * @return {?}\n */\n setExprValue(field, prop, value) {\n try {\n /** @type {?} */\n let target = field;\n /** @type {?} */\n const paths = this._evalExpressionPath(field, prop);\n /** @type {?} */\n const lastIndex = paths.length - 1;\n for (let i = 0; i < lastIndex; i++) {\n target = target[paths[i]];\n }\n target[paths[lastIndex]] = value;\n }\n catch (error) {\n error.message = `[Formly Error] [Expression \"${prop}\"] ${error.message}`;\n throw error;\n }\n if (prop === 'templateOptions.disabled' && field.key) {\n this.setDisabledState(field, value);\n }\n if (prop.indexOf('model.') === 0) {\n /** @type {?} */\n const path = prop.replace(/^model\\./, '');\n /** @type {?} */\n const control = field.key && prop === path ? field.formControl : field.parent.formControl.get(path);\n if (control\n && !(isNullOrUndefined(control.value) && isNullOrUndefined(value))\n && control.value !== value) {\n control.patchValue(value);\n }\n }\n this.emitExpressionChanges(field, prop, value);\n }\n /**\n * @private\n * @param {?} field\n * @param {?} property\n * @param {?} value\n * @return {?}\n */\n emitExpressionChanges(field, property, value) {\n if (!field.options.fieldChanges) {\n return;\n }\n field.options.fieldChanges.next({\n field: field,\n type: 'expressionChanges',\n property,\n value,\n });\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * \\@experimental\n */\nclass FieldValidationExtension {\n /**\n * @param {?} formlyConfig\n */\n constructor(formlyConfig) {\n this.formlyConfig = formlyConfig;\n }\n /**\n * @param {?} field\n * @return {?}\n */\n onPopulate(field) {\n this.initFieldValidation(field, 'validators');\n this.initFieldValidation(field, 'asyncValidators');\n }\n /**\n * @private\n * @param {?} field\n * @param {?} type\n * @return {?}\n */\n initFieldValidation(field, type) {\n /** @type {?} */\n const validators = [];\n if (type === 'validators' && !(field.hasOwnProperty('fieldGroup') && !field.key)) {\n validators.push(this.getPredefinedFieldValidation(field));\n }\n if (field[type]) {\n for (const validatorName in field[type]) {\n if (validatorName === 'validation' && !Array.isArray(field[type].validation)) {\n field[type].validation = [field[type].validation];\n console.warn(`NgxFormly(${field.key}): passing a non array value to the 'validation' is deprecated, pass an array instead`);\n }\n validatorName === 'validation'\n ? validators.push(...field[type].validation.map((/**\n * @param {?} v\n * @return {?}\n */\n v => this.wrapNgValidatorFn(field, v))))\n : validators.push(this.wrapNgValidatorFn(field, field[type][validatorName], validatorName));\n }\n }\n defineHiddenProp(field, '_' + type, validators);\n }\n /**\n * @private\n * @param {?} field\n * @return {?}\n */\n getPredefinedFieldValidation(field) {\n /** @type {?} */\n let VALIDATORS = [];\n FORMLY_VALIDATORS.forEach((/**\n * @param {?} opt\n * @return {?}\n */\n opt => wrapProperty(field.templateOptions, opt, (/**\n * @param {?} __0\n * @return {?}\n */\n ({ currentValue, firstChange }) => {\n VALIDATORS = VALIDATORS.filter((/**\n * @param {?} o\n * @return {?}\n */\n o => o !== opt));\n if (currentValue != null && currentValue !== false) {\n VALIDATORS.push(opt);\n }\n if (!firstChange && field.formControl) {\n updateValidity(field.formControl);\n }\n }))));\n return (/**\n * @param {?} control\n * @return {?}\n */\n (control) => {\n if (VALIDATORS.length === 0) {\n return null;\n }\n return Validators.compose(VALIDATORS.map((/**\n * @param {?} opt\n * @return {?}\n */\n opt => (/**\n * @return {?}\n */\n () => {\n /** @type {?} */\n const value = field.templateOptions[opt];\n switch (opt) {\n case 'required':\n return Validators.required(control);\n case 'pattern':\n return Validators.pattern(value)(control);\n case 'minLength':\n return Validators.minLength(value)(control);\n case 'maxLength':\n return Validators.maxLength(value)(control);\n case 'min':\n return Validators.min(value)(control);\n case 'max':\n return Validators.max(value)(control);\n }\n }))))(control);\n });\n }\n /**\n * @private\n * @param {?} field\n * @param {?} validator\n * @param {?=} validatorName\n * @return {?}\n */\n wrapNgValidatorFn(field, validator, validatorName) {\n /** @type {?} */\n let validatorOption = null;\n if (typeof validator === 'string') {\n validatorOption = clone(this.formlyConfig.getValidator(validator));\n }\n if (typeof validator === 'object' && validator.name) {\n validatorOption = clone(this.formlyConfig.getValidator(validator.name));\n if (validator.options) {\n validatorOption.options = validator.options;\n }\n }\n if (typeof validator === 'object' && validator.expression) {\n const { expression } = validator, options = __rest(validator, [\"expression\"]);\n validatorOption = {\n name: validatorName,\n validation: expression,\n options: Object.keys(options).length > 0 ? options : null,\n };\n }\n if (typeof validator === 'function') {\n validatorOption = {\n name: validatorName,\n validation: validator,\n };\n }\n return (/**\n * @param {?} control\n * @return {?}\n */\n (control) => {\n /** @type {?} */\n const errors = validatorOption.validation(control, field, validatorOption.options);\n if (isPromise(errors)) {\n return errors.then((/**\n * @param {?} v\n * @return {?}\n */\n v => this.handleAsyncResult(field, validatorName ? !!v : v, validatorOption)));\n }\n if (isObservable(errors)) {\n return errors.pipe(map((/**\n * @param {?} v\n * @return {?}\n */\n v => this.handleAsyncResult(field, validatorName ? !!v : v, validatorOption))));\n }\n return this.handleResult(field, validatorName ? !!errors : errors, validatorOption);\n });\n }\n /**\n * @private\n * @param {?} field\n * @param {?} errors\n * @param {?} options\n * @return {?}\n */\n handleAsyncResult(field, errors, options) {\n // workaround for https://github.com/angular/angular/issues/13200\n if (field.options && field.options._markForCheck) {\n field.options._markForCheck(field);\n }\n return this.handleResult(field, errors, options);\n }\n /**\n * @private\n * @param {?} field\n * @param {?} errors\n * @param {?} __2\n * @return {?}\n */\n handleResult(field, errors, { name, options }) {\n if (typeof errors === 'boolean') {\n errors = errors ? null : { [name]: options ? options : true };\n }\n /** @type {?} */\n const ctrl = field.formControl;\n ctrl['_childrenErrors'] && ctrl['_childrenErrors'][name] && ctrl['_childrenErrors'][name]();\n if (isObject(errors)) {\n Object.keys(errors).forEach((/**\n * @param {?} name\n * @return {?}\n */\n name => {\n /** @type {?} */\n const errorPath = errors[name].errorPath\n ? errors[name].errorPath\n : (options || {}).errorPath;\n /** @type {?} */\n const childCtrl = errorPath ? field.formControl.get(errorPath) : null;\n if (childCtrl) {\n const _a = errors[name], opts = __rest(_a, [\"errorPath\"]);\n childCtrl.setErrors(Object.assign({}, (childCtrl.errors || {}), { [name]: opts }));\n !ctrl['_childrenErrors'] && defineHiddenProp(ctrl, '_childrenErrors', {});\n ctrl['_childrenErrors'][name] = (/**\n * @return {?}\n */\n () => {\n const _a = childCtrl.errors || {}, _b = name, toDelete = _a[_b], childErrors = __rest(_a, [typeof _b === \"symbol\" ? _b : _b + \"\"]);\n childCtrl.setErrors(Object.keys(childErrors).length === 0 ? null : childErrors);\n });\n }\n }));\n }\n return errors;\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * \\@experimental\n */\nclass FieldFormExtension {\n /**\n * @param {?} config\n */\n constructor(config) {\n this.config = config;\n }\n /**\n * @param {?} field\n * @return {?}\n */\n prePopulate(field) {\n if (!this.root) {\n this.root = field;\n }\n }\n /**\n * @param {?} field\n * @return {?}\n */\n onPopulate(field) {\n if (!field.parent) {\n return;\n }\n if (field.fieldGroup && !field.key) {\n defineHiddenProp(field, 'formControl', field.parent.formControl);\n }\n else {\n this.addFormControl(field);\n }\n }\n /**\n * @param {?} field\n * @return {?}\n */\n postPopulate(field) {\n if (this.root !== field) {\n return;\n }\n this.root = null;\n this.setValidators(field);\n }\n /**\n * @private\n * @param {?} field\n * @return {?}\n */\n addFormControl(field) {\n /** @type {?} */\n let control = findControl(field);\n if (!control) {\n /** @type {?} */\n const controlOptions = { updateOn: field.modelOptions.updateOn };\n /** @type {?} */\n const value = field.key ? getFieldValue(field) : field.defaultValue;\n /** @type {?} */\n const ref = this.config ? this.config.resolveFieldTypeRef(field) : null;\n if (ref && ref.componentType && ref.componentType['createControl']) {\n /** @type {?} */\n const component = ref.componentType;\n console.warn(`NgxFormly: '${component.name}::createControl' is deprecated since v5.0, use 'prePopulate' hook instead.`);\n control = component['createControl'](value, field);\n }\n else if (field.fieldGroup) {\n // TODO: move to postPopulate\n control = new FormGroup({}, controlOptions);\n }\n else {\n control = new FormControl(value, controlOptions);\n }\n }\n registerControl(field, control);\n }\n /**\n * @private\n * @param {?} field\n * @param {?=} disabled\n * @return {?}\n */\n setValidators(field, disabled = false) {\n /** @type {?} */\n let markForCheck = false;\n if (disabled === false && field.key && field.templateOptions && field.templateOptions.disabled) {\n disabled = true;\n }\n (field.fieldGroup || []).forEach((/**\n * @param {?} f\n * @return {?}\n */\n f => this.setValidators(f, disabled) && (markForCheck = true)));\n if (field.key || !field.parent || (!field.key && !field.fieldGroup)) {\n const { formControl: c } = field;\n field.templateOptions = field.templateOptions || {};\n if (field.key && c && c instanceof FormControl) {\n if (disabled && c.enabled) {\n c.disable({ emitEvent: false, onlySelf: true });\n markForCheck = true;\n }\n if (!disabled && c.disabled) {\n c.enable({ emitEvent: false, onlySelf: true });\n markForCheck = true;\n }\n }\n if (c && (null === c.validator || null === c.asyncValidator)) {\n c.setValidators((/**\n * @return {?}\n */\n () => {\n /** @type {?} */\n const v = Validators.compose(this.mergeValidators(field, '_validators'));\n return v ? v(c) : null;\n }));\n c.setAsyncValidators((/**\n * @return {?}\n */\n () => {\n /** @type {?} */\n const v = Validators.composeAsync(this.mergeValidators(field, '_asyncValidators'));\n return v ? v(c) : of(null);\n }));\n markForCheck = true;\n }\n if (markForCheck) {\n updateValidity(c, true);\n // update validity of `FormGroup` instance created by field with nested key.\n /** @type {?} */\n let parent = c.parent;\n for (let i = 1; i < getKeyPath(field).length; i++) {\n if (parent) {\n updateValidity(parent, true);\n parent = parent.parent;\n }\n }\n }\n }\n return markForCheck;\n }\n /**\n * @private\n * @template T\n * @param {?} field\n * @param {?} type\n * @return {?}\n */\n mergeValidators(field, type) {\n /** @type {?} */\n const validators = [];\n /** @type {?} */\n const c = field.formControl;\n if (c && c['_fields'] && c['_fields'].length > 1) {\n c['_fields']\n .filter((/**\n * @param {?} f\n * @return {?}\n */\n (f) => !f._hide))\n .forEach((/**\n * @param {?} f\n * @return {?}\n */\n (f) => validators.push(...f[type])));\n }\n else if (field[type]) {\n validators.push(...field[type]);\n }\n if (field.fieldGroup) {\n field.fieldGroup\n .filter((/**\n * @param {?} f\n * @return {?}\n */\n f => !f.key && f.fieldGroup))\n .forEach((/**\n * @param {?} f\n * @return {?}\n */\n f => validators.push(...this.mergeValidators(f, type))));\n }\n return validators;\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * \\@experimental\n */\nclass CoreExtension {\n /**\n * @param {?} formlyConfig\n */\n constructor(formlyConfig) {\n this.formlyConfig = formlyConfig;\n this.formId = 0;\n }\n /**\n * @param {?} field\n * @return {?}\n */\n prePopulate(field) {\n this.getFieldComponentInstance(field).prePopulate();\n if (field.parent) {\n return;\n }\n /** @type {?} */\n const fieldTransforms = (field.options && field.options.fieldTransform) || this.formlyConfig.extras.fieldTransform;\n (Array.isArray(fieldTransforms) ? fieldTransforms : [fieldTransforms]).forEach((/**\n * @param {?} fieldTransform\n * @return {?}\n */\n fieldTransform => {\n if (fieldTransform) {\n console.warn(`NgxFormly: fieldTransform is deprecated since v5.0, use custom extension instead.`);\n /** @type {?} */\n const fieldGroup = fieldTransform(field.fieldGroup, field.model, (/** @type {?} */ (field.formControl)), field.options);\n if (!fieldGroup) {\n throw new Error('fieldTransform must return an array of fields');\n }\n }\n }));\n }\n /**\n * @param {?} field\n * @return {?}\n */\n onPopulate(field) {\n this.initFieldOptions(field);\n this.getFieldComponentInstance(field).onPopulate();\n if (field.fieldGroup) {\n field.fieldGroup.forEach((/**\n * @param {?} f\n * @param {?} index\n * @return {?}\n */\n (f, index) => {\n Object.defineProperty(f, 'parent', { get: (/**\n * @return {?}\n */\n () => field), configurable: true });\n Object.defineProperty(f, 'index', { get: (/**\n * @return {?}\n */\n () => index), configurable: true });\n this.formId++;\n }));\n }\n }\n /**\n * @param {?} field\n * @return {?}\n */\n postPopulate(field) {\n this.getFieldComponentInstance(field).postPopulate();\n }\n /**\n * @private\n * @param {?} field\n * @return {?}\n */\n initFieldOptions(field) {\n /** @type {?} */\n const root = (/** @type {?} */ (field.parent));\n if (!root) {\n return;\n }\n Object.defineProperty(field, 'form', { get: (/**\n * @return {?}\n */\n () => root.formControl), configurable: true });\n Object.defineProperty(field, 'options', { get: (/**\n * @return {?}\n */\n () => root.options), configurable: true });\n Object.defineProperty(field, 'model', {\n get: (/**\n * @return {?}\n */\n () => field.key && field.fieldGroup ? getFieldValue(field) : root.model),\n configurable: true,\n });\n reverseDeepMerge(field, {\n id: getFieldId(`formly_${this.formId}`, field, field['index']),\n hooks: {},\n modelOptions: {},\n validation: { messages: {} },\n templateOptions: !field.type || !field.key ? {} : {\n label: '',\n placeholder: '',\n focus: false,\n disabled: false,\n },\n });\n if (this.formlyConfig.extras.resetFieldOnHide && field.resetOnHide !== false) {\n field.resetOnHide = true;\n }\n if (field.lifecycle) {\n console.warn(`NgxFormly: 'lifecycle' is deprecated since v5.0, use 'hooks' instead.`);\n }\n if (field.type !== 'formly-template'\n && (field.template\n || (field.expressionProperties && field.expressionProperties.template))) {\n if (field.type) {\n console.warn(`NgxFormly: passing 'type' property is not allowed when 'template' is set.`);\n }\n field.type = 'formly-template';\n }\n if (!field.type && field.fieldGroup) {\n field.type = 'formly-group';\n }\n if (field.type) {\n this.formlyConfig.getMergedField(field);\n }\n if (field.parent) {\n /** @type {?} */\n let setDefaultValue = !isUndefined(field.key)\n && !isUndefined(field.defaultValue)\n && isUndefined(getFieldValue(field))\n && (!field.resetOnHide || !(field.hide || field.hideExpression));\n if (setDefaultValue && field.resetOnHide) {\n /** @type {?} */\n let parent = field.parent;\n while (parent && !parent.hideExpression && !parent.hide) {\n parent = parent.parent;\n }\n setDefaultValue = !parent || !(parent.hideExpression || parent.hide);\n }\n if (setDefaultValue) {\n assignFieldValue(field, field.defaultValue);\n }\n }\n this.initFieldWrappers(field);\n }\n /**\n * @private\n * @param {?} field\n * @return {?}\n */\n initFieldWrappers(field) {\n field.wrappers = field.wrappers || [];\n /** @type {?} */\n const fieldTemplateManipulators = Object.assign({ preWrapper: [], postWrapper: [] }, (field.templateOptions.templateManipulators || {}));\n field.wrappers = [\n ...this.formlyConfig.templateManipulators.preWrapper.map((/**\n * @param {?} m\n * @return {?}\n */\n m => m(field))),\n ...fieldTemplateManipulators.preWrapper.map((/**\n * @param {?} m\n * @return {?}\n */\n m => m(field))),\n ...field.wrappers,\n ...this.formlyConfig.templateManipulators.postWrapper.map((/**\n * @param {?} m\n * @return {?}\n */\n m => m(field))),\n ...fieldTemplateManipulators.postWrapper.map((/**\n * @param {?} m\n * @return {?}\n */\n m => m(field))),\n ].filter((/**\n * @param {?} el\n * @param {?} i\n * @param {?} a\n * @return {?}\n */\n (el, i, a) => el && i === a.indexOf(el)));\n }\n /**\n * @private\n * @param {?} field\n * @return {?}\n */\n getFieldComponentInstance(field) {\n /** @type {?} */\n const componentRef = this.formlyConfig.resolveFieldTypeRef(field);\n /** @type {?} */\n const instance = componentRef ? (/** @type {?} */ (componentRef.instance)) : {};\n return {\n prePopulate: (/**\n * @return {?}\n */\n () => instance.prePopulate && instance.prePopulate(field)),\n onPopulate: (/**\n * @return {?}\n */\n () => instance.onPopulate && instance.onPopulate(field)),\n postPopulate: (/**\n * @return {?}\n */\n () => instance.postPopulate && instance.postPopulate(field)),\n };\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @param {?} formlyConfig\n * @return {?}\n */\nfunction defaultFormlyConfig(formlyConfig) {\n return {\n types: [\n { name: 'formly-group', component: FormlyGroup },\n { name: 'formly-template', component: FormlyTemplateType },\n ],\n extensions: [\n { name: 'core', extension: new CoreExtension(formlyConfig) },\n { name: 'field-validation', extension: new FieldValidationExtension(formlyConfig) },\n { name: 'field-form', extension: new FieldFormExtension(formlyConfig) },\n { name: 'field-expression', extension: new FieldExpressionExtension() },\n ],\n };\n}\nclass FormlyModule {\n /**\n * @param {?} configService\n * @param {?=} configs\n */\n constructor(configService, configs = []) {\n if (!configs) {\n return;\n }\n configs.forEach((/**\n * @param {?} config\n * @return {?}\n */\n config => configService.addConfig(config)));\n }\n /**\n * @param {?=} config\n * @return {?}\n */\n static forRoot(config = {}) {\n return {\n ngModule: FormlyModule,\n providers: [\n { provide: FORMLY_CONFIG, multi: true, useFactory: defaultFormlyConfig, deps: [FormlyConfig] },\n { provide: FORMLY_CONFIG, useValue: config, multi: true },\n { provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: config, multi: true },\n FormlyConfig,\n FormlyFormBuilder,\n ],\n };\n }\n /**\n * @param {?=} config\n * @return {?}\n */\n static forChild(config = {}) {\n return {\n ngModule: FormlyModule,\n providers: [\n { provide: FORMLY_CONFIG, multi: true, useFactory: defaultFormlyConfig, deps: [FormlyConfig] },\n { provide: FORMLY_CONFIG, useValue: config, multi: true },\n { provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: config, multi: true },\n FormlyFormBuilder,\n ],\n };\n }\n}\nFormlyModule.ɵfac = function FormlyModule_Factory(t) { return new (t || FormlyModule)(ɵngcc0.ɵɵinject(FormlyConfig), ɵngcc0.ɵɵinject(FORMLY_CONFIG, 8)); };\nFormlyModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: FormlyModule });\nFormlyModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [CommonModule] });\n/** @nocollapse */\nFormlyModule.ctorParameters = () => [\n { type: FormlyConfig },\n { type: Array, decorators: [{ type: Optional }, { type: Inject, args: [FORMLY_CONFIG,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormlyModule, [{\n type: NgModule,\n args: [{\n declarations: [\n FormlyForm,\n FormlyField,\n FormlyAttributes,\n FormlyGroup,\n FormlyValidationMessage,\n FormlyTemplateType,\n ( /** @type {?} */(FieldArrayType)),\n ],\n entryComponents: [FormlyGroup, FormlyTemplateType],\n exports: [FormlyForm, FormlyField, FormlyAttributes, FormlyGroup, FormlyValidationMessage],\n imports: [CommonModule]\n }]\n }], function () { return [{ type: FormlyConfig }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [FORMLY_CONFIG]\n }] }]; }, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(FormlyModule, { declarations: function () { return [FormlyForm, FormlyField, FormlyAttributes, FormlyGroup, FormlyValidationMessage, FormlyTemplateType, FieldArrayType]; }, imports: function () { return [CommonModule]; }, exports: function () { return [FormlyForm, FormlyField, FormlyAttributes, FormlyGroup, FormlyValidationMessage]; } }); })();\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\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { FormlyForm, FormlyField, FormlyAttributes, FORMLY_CONFIG, FormlyConfig, FormlyFormBuilder, FieldType, Field, FieldArrayType, FieldWrapper, FormlyModule, defineHiddenProp as ɵdefineHiddenProp, reverseDeepMerge as ɵreverseDeepMerge, getFieldValue as ɵgetFieldValue, clone as ɵclone, wrapProperty as ɵwrapProperty, defaultFormlyConfig as ɵa, CoreExtension as ɵe, FieldExpressionExtension as ɵh, FieldFormExtension as ɵg, FieldValidationExtension as ɵf, FormlyTemplateType as ɵd, FormlyGroup as ɵb, FormlyValidationMessage as ɵc };\n\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { __rest, __decorate, __metadata } from 'tslib';\nimport { ContentChildren, QueryList, Input, Component, NgZone, Injectable, EventEmitter, ElementRef, ViewContainerRef, ComponentFactoryResolver, Output, ViewEncapsulation, ANALYZE_FOR_ENTRY_COMPONENTS, NgModule } from '@angular/core';\nimport { VanillaFrameworkOverrides, AgPromise, BaseComponentWrapper, ComponentUtil, Grid } from 'ag-grid-community';\n\nimport * as ɵngcc0 from '@angular/core';\nvar AgGridColumn_1;\nlet AgGridColumn = AgGridColumn_1 = class AgGridColumn {\n hasChildColumns() {\n if (this.childColumns && this.childColumns.length > 0) {\n // necessary because of https://github.com/angular/angular/issues/10098\n return !(this.childColumns.length === 1 && this.childColumns.first === this);\n }\n return false;\n }\n toColDef() {\n let colDef = this.createColDefFromGridColumn(this);\n if (this.hasChildColumns()) {\n colDef[\"children\"] = this.getChildColDefs(this.childColumns);\n }\n return colDef;\n }\n getChildColDefs(childColumns) {\n return childColumns\n // necessary because of https://github.com/angular/angular/issues/10098\n .filter(column => !column.hasChildColumns())\n .map((column) => {\n return column.toColDef();\n });\n }\n createColDefFromGridColumn(from) {\n let { childColumns } = from, colDef = __rest(from, [\"childColumns\"]);\n return colDef;\n }\n};\nAgGridColumn.ɵfac = function AgGridColumn_Factory(t) { return new (t || AgGridColumn)(); };\nAgGridColumn.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: AgGridColumn, selectors: [[\"ag-grid-column\"]], contentQueries: function AgGridColumn_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n ɵngcc0.ɵɵcontentQuery(dirIndex, AgGridColumn_1, 4);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.childColumns = _t);\n } }, inputs: { filterFramework: \"filterFramework\", filterParams: \"filterParams\", floatingFilterComponent: \"floatingFilterComponent\", floatingFilterComponentParams: \"floatingFilterComponentParams\", floatingFilterComponentFramework: \"floatingFilterComponentFramework\", floatingFilterFramework: \"floatingFilterFramework\", filter: \"filter\", headerName: \"headerName\", headerValueGetter: \"headerValueGetter\", headerTooltip: \"headerTooltip\", headerClass: \"headerClass\", suppressHeaderKeyboardEvent: \"suppressHeaderKeyboardEvent\", columnGroupShow: \"columnGroupShow\", toolPanelClass: \"toolPanelClass\", suppressColumnsToolPanel: \"suppressColumnsToolPanel\", suppressFiltersToolPanel: \"suppressFiltersToolPanel\", tooltipComponent: \"tooltipComponent\", tooltipComponentFramework: \"tooltipComponentFramework\", tooltipComponentParams: \"tooltipComponentParams\", children: \"children\", groupId: \"groupId\", openByDefault: \"openByDefault\", marryChildren: \"marryChildren\", headerGroupComponent: \"headerGroupComponent\", headerGroupComponentFramework: \"headerGroupComponentFramework\", headerGroupComponentParams: \"headerGroupComponentParams\", colId: \"colId\", field: \"field\", type: \"type\", valueGetter: \"valueGetter\", valueFormatter: \"valueFormatter\", refData: \"refData\", keyCreator: \"keyCreator\", equals: \"equals\", tooltipField: \"tooltipField\", tooltipValueGetter: \"tooltipValueGetter\", checkboxSelection: \"checkboxSelection\", icons: \"icons\", suppressNavigable: \"suppressNavigable\", suppressKeyboardEvent: \"suppressKeyboardEvent\", suppressPaste: \"suppressPaste\", suppressFillHandle: \"suppressFillHandle\", hide: \"hide\", initialHide: \"initialHide\", lockVisible: \"lockVisible\", lockPosition: \"lockPosition\", suppressMovable: \"suppressMovable\", editable: \"editable\", valueSetter: \"valueSetter\", valueParser: \"valueParser\", cellEditor: \"cellEditor\", cellEditorFramework: \"cellEditorFramework\", cellEditorParams: \"cellEditorParams\", cellEditorSelector: \"cellEditorSelector\", singleClickEdit: \"singleClickEdit\", newValueHandler: \"newValueHandler\", cellEditorPopup: \"cellEditorPopup\", cellEditorPopupPosition: \"cellEditorPopupPosition\", onCellValueChanged: \"onCellValueChanged\", onCellClicked: \"onCellClicked\", onCellDoubleClicked: \"onCellDoubleClicked\", onCellContextMenu: \"onCellContextMenu\", getQuickFilterText: \"getQuickFilterText\", filterValueGetter: \"filterValueGetter\", floatingFilter: \"floatingFilter\", headerComponent: \"headerComponent\", headerComponentFramework: \"headerComponentFramework\", headerComponentParams: \"headerComponentParams\", menuTabs: \"menuTabs\", columnsMenuParams: \"columnsMenuParams\", suppressMenu: \"suppressMenu\", headerCheckboxSelection: \"headerCheckboxSelection\", headerCheckboxSelectionFilteredOnly: \"headerCheckboxSelectionFilteredOnly\", chartDataType: \"chartDataType\", pinned: \"pinned\", initialPinned: \"initialPinned\", lockPinned: \"lockPinned\", pinnedRowCellRenderer: \"pinnedRowCellRenderer\", pinnedRowCellRendererFramework: \"pinnedRowCellRendererFramework\", pinnedRowCellRendererParams: \"pinnedRowCellRendererParams\", pinnedRowValueFormatter: \"pinnedRowValueFormatter\", pivot: \"pivot\", initialPivot: \"initialPivot\", pivotIndex: \"pivotIndex\", initialPivotIndex: \"initialPivotIndex\", pivotComparator: \"pivotComparator\", enablePivot: \"enablePivot\", cellStyle: \"cellStyle\", cellClass: \"cellClass\", cellClassRules: \"cellClassRules\", cellRenderer: \"cellRenderer\", cellRendererFramework: \"cellRendererFramework\", cellRendererParams: \"cellRendererParams\", cellRendererSelector: \"cellRendererSelector\", autoHeight: \"autoHeight\", wrapText: \"wrapText\", enableCellChangeFlash: \"enableCellChangeFlash\", suppressCellFlash: \"suppressCellFlash\", rowDrag: \"rowDrag\", rowDragText: \"rowDragText\", dndSource: \"dndSource\", dndSourceOnRowDrag: \"dndSourceOnRowDrag\", rowGroup: \"rowGroup\", initialRowGroup: \"initialRowGroup\", rowGroupIndex: \"rowGroupIndex\", initialRowGroupIndex: \"initialRowGroupIndex\", enableRowGroup: \"enableRowGroup\", enableValue: \"enableValue\", aggFunc: \"aggFunc\", initialAggFunc: \"initialAggFunc\", defaultAggFunc: \"defaultAggFunc\", allowedAggFuncs: \"allowedAggFuncs\", showRowGroup: \"showRowGroup\", sortable: \"sortable\", sort: \"sort\", initialSort: \"initialSort\", sortIndex: \"sortIndex\", initialSortIndex: \"initialSortIndex\", sortingOrder: \"sortingOrder\", comparator: \"comparator\", unSortIcon: \"unSortIcon\", sortedAt: \"sortedAt\", colSpan: \"colSpan\", rowSpan: \"rowSpan\", width: \"width\", initialWidth: \"initialWidth\", minWidth: \"minWidth\", maxWidth: \"maxWidth\", flex: \"flex\", initialFlex: \"initialFlex\", resizable: \"resizable\", suppressSizeToFit: \"suppressSizeToFit\", suppressAutoSize: \"suppressAutoSize\" }, decls: 0, vars: 0, template: function AgGridColumn_Template(rf, ctx) { }, encapsulation: 2 });\n__decorate([\n ContentChildren(AgGridColumn_1),\n __metadata(\"design:type\", QueryList)\n], AgGridColumn.prototype, \"childColumns\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"filterFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"filterParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"floatingFilterComponent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"floatingFilterComponentParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"floatingFilterComponentFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"floatingFilterFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"filter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"headerName\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"headerValueGetter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"headerTooltip\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"headerClass\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"suppressHeaderKeyboardEvent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"columnGroupShow\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"toolPanelClass\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"suppressColumnsToolPanel\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"suppressFiltersToolPanel\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"tooltipComponent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"tooltipComponentFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"tooltipComponentParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridColumn.prototype, \"children\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"groupId\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"openByDefault\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"marryChildren\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"headerGroupComponent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"headerGroupComponentFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"headerGroupComponentParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"colId\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"field\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"type\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"valueGetter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"valueFormatter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"refData\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"keyCreator\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"equals\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"tooltipField\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"tooltipValueGetter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"checkboxSelection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"icons\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"suppressNavigable\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"suppressKeyboardEvent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"suppressPaste\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"suppressFillHandle\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"hide\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"initialHide\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"lockVisible\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"lockPosition\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"suppressMovable\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"editable\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"valueSetter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"valueParser\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"cellEditor\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"cellEditorFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"cellEditorParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"cellEditorSelector\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"singleClickEdit\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"newValueHandler\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"cellEditorPopup\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"cellEditorPopupPosition\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"onCellValueChanged\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"onCellClicked\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"onCellDoubleClicked\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"onCellContextMenu\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"getQuickFilterText\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"filterValueGetter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"floatingFilter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"headerComponent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"headerComponentFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"headerComponentParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridColumn.prototype, \"menuTabs\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"columnsMenuParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"suppressMenu\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"headerCheckboxSelection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"headerCheckboxSelectionFilteredOnly\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"chartDataType\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"pinned\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"initialPinned\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"lockPinned\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"pinnedRowCellRenderer\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"pinnedRowCellRendererFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"pinnedRowCellRendererParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"pinnedRowValueFormatter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"pivot\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"initialPivot\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"pivotIndex\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"initialPivotIndex\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"pivotComparator\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"enablePivot\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"cellStyle\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"cellClass\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"cellClassRules\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"cellRenderer\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"cellRendererFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"cellRendererParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"cellRendererSelector\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"autoHeight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"wrapText\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"enableCellChangeFlash\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"suppressCellFlash\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"rowDrag\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"rowDragText\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"dndSource\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"dndSourceOnRowDrag\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"rowGroup\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"initialRowGroup\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"rowGroupIndex\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"initialRowGroupIndex\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"enableRowGroup\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"enableValue\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"aggFunc\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"initialAggFunc\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"defaultAggFunc\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridColumn.prototype, \"allowedAggFuncs\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridColumn.prototype, \"showRowGroup\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"sortable\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"sort\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridColumn.prototype, \"initialSort\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"sortIndex\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"initialSortIndex\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridColumn.prototype, \"sortingOrder\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"comparator\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"unSortIcon\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"sortedAt\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"colSpan\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridColumn.prototype, \"rowSpan\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"width\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"initialWidth\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"minWidth\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"maxWidth\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"flex\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridColumn.prototype, \"initialFlex\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"resizable\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"suppressSizeToFit\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridColumn.prototype, \"suppressAutoSize\", void 0);\n\nlet AngularFrameworkOverrides = class AngularFrameworkOverrides extends VanillaFrameworkOverrides {\n constructor(_ngZone) {\n super();\n this._ngZone = _ngZone;\n }\n setEmitterUsedCallback(isEmitterUsed) {\n this.isEmitterUsed = isEmitterUsed;\n }\n setTimeout(action, timeout) {\n if (this._ngZone) {\n this._ngZone.runOutsideAngular(() => {\n window.setTimeout(() => {\n action();\n }, timeout);\n });\n }\n else {\n window.setTimeout(() => {\n action();\n }, timeout);\n }\n }\n setInterval(action, interval) {\n return new AgPromise(resolve => {\n if (this._ngZone) {\n this._ngZone.runOutsideAngular(() => {\n resolve(window.setInterval(() => {\n action();\n }, interval));\n });\n }\n else {\n resolve(window.setInterval(() => {\n action();\n }, interval));\n }\n });\n }\n addEventListener(element, eventType, listener, useCapture) {\n if (this.isOutsideAngular(eventType) && this._ngZone) {\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener(eventType, listener, useCapture);\n });\n }\n else {\n element.addEventListener(eventType, listener, useCapture);\n }\n }\n dispatchEvent(eventType, listener, global = false) {\n if (this.isOutsideAngular(eventType)) {\n if (this._ngZone) {\n this._ngZone.runOutsideAngular(listener);\n }\n else {\n listener();\n }\n }\n else if (this.isEmitterUsed(eventType) || global) {\n // only trigger off events (and potentially change detection) if actually used\n if (!NgZone.isInAngularZone() && this._ngZone) {\n this._ngZone.run(listener);\n }\n else {\n listener();\n }\n }\n }\n isFrameworkComponent(comp) {\n if (!comp) {\n return false;\n }\n const prototype = comp.prototype;\n const isAngularComp = prototype && 'agInit' in prototype;\n return isAngularComp;\n }\n};\nAngularFrameworkOverrides.ɵfac = function AngularFrameworkOverrides_Factory(t) { return new (t || AngularFrameworkOverrides)(ɵngcc0.ɵɵinject(ɵngcc0.NgZone)); };\nAngularFrameworkOverrides.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: AngularFrameworkOverrides, factory: function (t) { return AngularFrameworkOverrides.ɵfac(t); } });\nAngularFrameworkOverrides.ctorParameters = () => [\n { type: NgZone }\n];\nAngularFrameworkOverrides = __decorate([ __metadata(\"design:paramtypes\", [NgZone])\n], AngularFrameworkOverrides);\n\nlet AngularFrameworkComponentWrapper = class AngularFrameworkComponentWrapper extends BaseComponentWrapper {\n setViewContainerRef(viewContainerRef) {\n this.viewContainerRef = viewContainerRef;\n }\n setComponentFactoryResolver(componentFactoryResolver) {\n this.componentFactoryResolver = componentFactoryResolver;\n }\n createWrapper(OriginalConstructor) {\n let that = this;\n class DynamicAgNg2Component extends BaseGuiComponent {\n init(params) {\n super.init(params);\n this._componentRef.changeDetectorRef.detectChanges();\n }\n createComponent() {\n return that.createComponent(OriginalConstructor);\n }\n hasMethod(name) {\n return wrapper.getFrameworkComponentInstance()[name] != null;\n }\n callMethod(name, args) {\n const componentRef = this.getFrameworkComponentInstance();\n return wrapper.getFrameworkComponentInstance()[name].apply(componentRef, args);\n }\n addMethod(name, callback) {\n wrapper[name] = callback;\n }\n }\n let wrapper = new DynamicAgNg2Component();\n return wrapper;\n }\n createComponent(componentType) {\n // used to cache the factory, but this a) caused issues when used with either webpack/angularcli with --prod\n // but more significantly, the underlying implementation of resolveComponentFactory uses a map too, so us\n // caching the factory here yields no performance benefits\n let factory = this.componentFactoryResolver.resolveComponentFactory(componentType);\n return this.viewContainerRef.createComponent(factory);\n }\n};\nAngularFrameworkComponentWrapper.ɵfac = /*@__PURE__*/ function () { let ɵAngularFrameworkComponentWrapper_BaseFactory; return function AngularFrameworkComponentWrapper_Factory(t) { return (ɵAngularFrameworkComponentWrapper_BaseFactory || (ɵAngularFrameworkComponentWrapper_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(AngularFrameworkComponentWrapper)))(t || AngularFrameworkComponentWrapper); }; }();\nAngularFrameworkComponentWrapper.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: AngularFrameworkComponentWrapper, factory: function (t) { return AngularFrameworkComponentWrapper.ɵfac(t); } });\nclass BaseGuiComponent {\n init(params) {\n this._params = params;\n this._componentRef = this.createComponent();\n this._agAwareComponent = this._componentRef.instance;\n this._frameworkComponentInstance = this._componentRef.instance;\n this._eGui = this._componentRef.location.nativeElement;\n this._agAwareComponent.agInit(this._params);\n }\n getGui() {\n return this._eGui;\n }\n destroy() {\n if (this._frameworkComponentInstance && typeof this._frameworkComponentInstance.destroy === 'function') {\n this._frameworkComponentInstance.destroy();\n }\n if (this._componentRef) {\n this._componentRef.destroy();\n }\n }\n getFrameworkComponentInstance() {\n return this._frameworkComponentInstance;\n }\n}\n\nlet AgGridAngular = class AgGridAngular {\n constructor(elementDef, viewContainerRef, angularFrameworkOverrides, frameworkComponentWrapper, componentFactoryResolver) {\n this.viewContainerRef = viewContainerRef;\n this.angularFrameworkOverrides = angularFrameworkOverrides;\n this.frameworkComponentWrapper = frameworkComponentWrapper;\n this.componentFactoryResolver = componentFactoryResolver;\n this._initialised = false;\n this._destroyed = false;\n // in order to ensure firing of gridReady is deterministic\n this._fullyReady = AgPromise.resolve(true);\n // @START@\n /** Specifies the status bar components to use in the status bar. */\n this.statusBar = undefined;\n /** Specifies the side bar components. */\n this.sideBar = undefined;\n /** Set to `true` to not show the context menu. Use if you don't want to use the default 'right click' context menu. Default: `false` */\n this.suppressContextMenu = undefined;\n /** When using `suppressContextMenu`, you can use the `onCellContextMenu` function to provide your own code to handle cell `contextmenu` events.\n * This flag is useful to prevent the browser from showing its default context menu.\n * Default: `false` */\n this.preventDefaultOnContextMenu = undefined;\n /** Allows context menu to show, even when `Ctrl` key is held down. Default: `false` */\n this.allowContextMenuWithControlKey = undefined;\n /** Set to `true` to always show the column menu button, rather than only showing when the mouse is over the column header. Default: `false` */\n this.suppressMenuHide = undefined;\n /** Set to `true` to use the browser's default tooltip instead of using the grid's Tooltip Component. Default: `false` */\n this.enableBrowserTooltips = undefined;\n /** The delay in milliseconds that it takes for tooltips to show up once an element is hovered over.\n * **Note:** This property does not work if `enableBrowserTooltips` is `true`.\n * Default: `2000` */\n this.tooltipShowDelay = undefined;\n /** The delay in milliseconds that it takes for tooltips to hide once they have been displayed.\n * **Note:** This property does not work if `enableBrowserTooltips` is `true`.\n * Default: `10000` */\n this.tooltipHideDelay = undefined;\n /** Set to `true` to have tooltips follow the cursor once they are displayed. Default: `false` */\n this.tooltipMouseTrack = undefined;\n /** DOM element to use as the popup parent for grid popups (context menu, column menu etc). */\n this.popupParent = undefined;\n /** Set to `true` to also include headers when copying to clipboard using `Ctrl + C` clipboard. Default: `false` */\n this.copyHeadersToClipboard = undefined;\n /** Set to `true` to also include group headers when copying to clipboard using `Ctrl + C` clipboard. Default: `false` */\n this.copyGroupHeadersToClipboard = undefined;\n /** Specify the delimiter to use when copying to clipboard.\n * Default: `\\t` */\n this.clipboardDelimiter = undefined;\n /** Set to `true` to copy the cell range or focused cell to the clipboard and never the selected rows. Default: `false` */\n this.suppressCopyRowsToClipboard = undefined;\n /** Set to `true` to copy rows instead of ranges when a range with only a single cell is selected. Default: `false` */\n this.suppressCopySingleCellRanges = undefined;\n /** Set to `true` to work around a bug with Excel (Windows) that adds an extra empty line at the end of ranges copied to the clipboard. Default: `false` */\n this.suppressLastEmptyLineOnPaste = undefined;\n /** Set to `true` to turn off paste operations within the grid. */\n this.suppressClipboardPaste = undefined;\n /** Set to `true` to stop the grid trying to use the Clipboard API, if it is blocked, and immediately fallback to the workaround. */\n this.suppressClipboardApi = undefined;\n /** Array of Column / Column Group definitions. */\n this.columnDefs = undefined;\n /** A default column definition. Items defined in the actual column definitions get precedence. */\n this.defaultColDef = undefined;\n /** A default column group definition. All column group definitions will use these properties. Items defined in the actual column group definition get precedence. */\n this.defaultColGroupDef = undefined;\n /** An object map of custom column types which contain groups of properties that column definitions can inherit by referencing in their `type` property. */\n this.columnTypes = undefined;\n /** Keeps the order of Columns maintained after new Column Definitions are updated. Default: `false` */\n this.maintainColumnOrder = undefined;\n /** If `true`, then dots in field names (e.g. `'address.firstLine'`) are not treated as deep references. Allows you to use dots in your field name if you prefer. Default: `false` */\n this.suppressFieldDotNotation = undefined;\n /** @deprecated */\n this.deltaColumnMode = undefined;\n /** @deprecated */\n this.applyColumnDefOrder = undefined;\n /** @deprecated */\n this.immutableColumns = undefined;\n /** @deprecated */\n this.suppressSetColumnStateEvents = undefined;\n /** @deprecated */\n this.suppressColumnStateEvents = undefined;\n /** @deprecated Set via `defaultColDef.width`\n */\n this.colWidth = undefined;\n /** @deprecated Set via `defaultColDef.minWidth`\n */\n this.minColWidth = undefined;\n /** @deprecated Set via `defaultColDef.maxWidth`\n */\n this.maxColWidth = undefined;\n /** The height in pixels for the row containing the column label header. If not specified, it uses the theme value of `header-height`. */\n this.headerHeight = undefined;\n /** The height in pixels for the rows containing header column groups. If not specified, it uses `headerHeight`. */\n this.groupHeaderHeight = undefined;\n /** The height in pixels for the row containing the floating filters. If not specified, it uses the theme value of `header-height`. */\n this.floatingFiltersHeight = undefined;\n /** The height in pixels for the row containing the columns when in pivot mode. If not specified, it uses `headerHeight`. */\n this.pivotHeaderHeight = undefined;\n /** The height in pixels for the row containing header column groups when in pivot mode. If not specified, it uses `groupHeaderHeight`. */\n this.pivotGroupHeaderHeight = undefined;\n /** Allow reordering and pinning columns by dragging columns from the Columns Tool Panel to the grid. Default: `false` */\n this.allowDragFromColumnsToolPanel = undefined;\n /** Set to `true` to suppress column moving, i.e. to make the columns fixed position. Default: `false` */\n this.suppressMovableColumns = undefined;\n /** If `true`, the `ag-column-moving` class is not added to the grid while columns are moving. In the default themes, this results in no animation when moving columns. Default: `false` */\n this.suppressColumnMoveAnimation = undefined;\n /** If `true`, when you drag a column out of the grid (e.g. to the group zone) the column is not hidden. Default: `false` */\n this.suppressDragLeaveHidesColumns = undefined;\n /** Set to `'shift'` to have shift-resize as the default resize operation (same as user holding down `Shift` while resizing). */\n this.colResizeDefault = undefined;\n /** Suppresses auto-sizing columns for columns. In other words, double clicking a column's header's edge will not auto-size. Default: `false` */\n this.suppressAutoSize = undefined;\n /** Number of pixels to add to a column width after the [auto-sizing](/column-sizing/#auto-size-columns) calculation.\n * Set this if you want to add extra room to accommodate (for example) sort icons, or some other dynamic nature of the header.\n * Default: `4` */\n this.autoSizePadding = undefined;\n /** Set this to `true` to skip the `headerName` when `autoSize` is called by default. Default: `false` */\n this.skipHeaderOnAutoSize = undefined;\n /** A map of component names to components. */\n this.components = undefined;\n /** @deprecated As of v27, use `components` for framework components too.\n */\n this.frameworkComponents = undefined;\n /** Set to `'fullRow'` to enable Full Row Editing. Otherwise leave blank to edit one cell at a time. */\n this.editType = undefined;\n /** Set to `true` to enable Single Click Editing for cells, to start editing with a single click. Default: `false` */\n this.singleClickEdit = undefined;\n /** Set to `true` so that neither single nor double click starts editing. Default: `false` */\n this.suppressClickEdit = undefined;\n /** Set to `true` so stop the grid updating data after and edit. When this is set, it is intended the application will update the data, eg in an external immutable store, and then pass the new dataset to the grid. */\n this.readOnlyEdit = undefined;\n /** Set this to `true` to stop cell editing when grid loses focus.\n * The default is that the grid stays editing until focus goes onto another cell. For inline (non-popup) editors only.\n * Default: `false` */\n this.stopEditingWhenCellsLoseFocus = undefined;\n /** Set to `true` along with `enterMovesDownAfterEdit` to have Excel-style behaviour for the `Enter` key.\n * i.e. pressing the `Enter` key will move down to the cell beneath.\n * Default: `false` */\n this.enterMovesDown = undefined;\n /** Set to `true` along with `enterMovesDown` to have Excel-style behaviour for the 'Enter' key.\n * i.e. pressing the Enter key will move down to the cell beneath.\n * Default: `false` */\n this.enterMovesDownAfterEdit = undefined;\n /** Set to `true` to enable Undo / Redo while editing. */\n this.undoRedoCellEditing = undefined;\n /** Set the size of the undo / redo stack. Default: `10` */\n this.undoRedoCellEditingLimit = undefined;\n /** @deprecated Use stopEditingWhenCellsLoseFocus instead\n */\n this.stopEditingWhenGridLosesFocus = undefined;\n /** A default configuration object used to export to CSV. */\n this.defaultCsvExportParams = undefined;\n /** Prevents the user from exporting the grid to CSV. Default: `false` */\n this.suppressCsvExport = undefined;\n /** A default configuration object used to export to Excel. */\n this.defaultExcelExportParams = undefined;\n /** Prevents the user from exporting the grid to Excel. Default: `false` */\n this.suppressExcelExport = undefined;\n /** A list (array) of Excel styles to be used when exporting to Excel with styles. */\n this.excelStyles = undefined;\n /** @deprecated Use defaultCsvExportParams or defaultExcelExportParams\n */\n this.defaultExportParams = undefined;\n /** Rows are filtered using this text as a quick filter. */\n this.quickFilterText = undefined;\n /** Set to `true` to turn on the quick filter cache, used to improve performance when using the quick filter. Default: `false` */\n this.cacheQuickFilter = undefined;\n /** Set to `true` to override the default tree data filtering behaviour to instead exclude child nodes from filter results. Default: `false` */\n this.excludeChildrenWhenTreeDataFiltering = undefined;\n /** Set to `true` to Enable Charts. Default: `false` */\n this.enableCharts = undefined;\n /** The list of chart themes to be used. */\n this.chartThemes = undefined;\n /** A map containing custom chart themes. */\n this.customChartThemes = undefined;\n /** Chart theme overrides applied to all themes. */\n this.chartThemeOverrides = undefined;\n /** Provide your own loading cell renderer to use when data is loading via a DataSource.\n * See [Loading Cell Renderer](https://www.ag-grid.com/javascript-data-grid/component-loading-cell-renderer/) for framework specific implementation details. */\n this.loadingCellRenderer = undefined;\n /** @deprecated As of v27, use `loadingCellRenderer` for framework components too.\n */\n this.loadingCellRendererFramework = undefined;\n /** Params to be passed to the `loadingCellRenderer` component. */\n this.loadingCellRendererParams = undefined;\n /** Callback to select which loading cell renderer to be used when data is loading via a DataSource. */\n this.loadingCellRendererSelector = undefined;\n /** A map of key->value pairs for localising text within the grid. */\n this.localeText = undefined;\n /** Set to `true` to enable Master Detail. Default: `false` */\n this.masterDetail = undefined;\n /** Set to `true` to keep detail rows for when they are displayed again. Default: `false` */\n this.keepDetailRows = undefined;\n /** Sets the number of details rows to keep. Default: `10` */\n this.keepDetailRowsCount = undefined;\n /** Provide a custom `detailCellRenderer` to use when a master row is expanded.\n * See [Detail Cell Renderer](https://www.ag-grid.com/javascript-data-grid/master-detail-custom-detail/) for framework specific implementation details. */\n this.detailCellRenderer = undefined;\n /** @deprecated As of v27, use `detailCellRenderer` for framework components too.\n */\n this.detailCellRendererFramework = undefined;\n /** Specifies the params to be used by the Detail Cell Renderer. Can also be a function that provides the params to enable dynamic definitions of the params. */\n this.detailCellRendererParams = undefined;\n /** Set fixed height in pixels for each detail row. */\n this.detailRowHeight = undefined;\n /** Set to `true` to have the detail grid dynamically change it's height to fit it's rows. */\n this.detailRowAutoHeight = undefined;\n /** Provides a context object that is provided to different callbacks the grid uses. Used for passing additional information to the callbacks by your application. */\n this.context = undefined;\n /** A list of grids to treat as Aligned Grids. If grids are aligned then the columns and horizontal scrolling will be kept in sync. */\n this.alignedGrids = undefined;\n /** Change this value to set the tabIndex order of the Grid within your application. Default: `0` */\n this.tabIndex = undefined;\n /** The number of rows rendered outside the viewable area the grid renders.\n * Having a buffer means the grid will have rows ready to show as the user slowly scrolls vertically.\n * Default: `10` */\n this.rowBuffer = undefined;\n /** Set to `true` to turn on the value cache. Default: `false` */\n this.valueCache = undefined;\n /** Set to `true` to configure the value cache to not expire after data updates. Default: `false` */\n this.valueCacheNeverExpires = undefined;\n /** Set to `true` to allow cell expressions. Default: `false` */\n this.enableCellExpressions = undefined;\n /** If `true`, row nodes do not have their parents set.\n * The grid doesn't use the parent reference, but it is included to help the client code navigate the node tree if it wants by providing bi-direction navigation up and down the tree.\n * If this is a problem (e.g. if you need to convert the tree to JSON, which does not allow cyclic dependencies) then set this to `true`.\n * Default: `false` */\n this.suppressParentsInRowNodes = undefined;\n /** Disables touch support (but does not remove the browser's efforts to simulate mouse events on touch). Default: `false` */\n this.suppressTouch = undefined;\n /** Set to `true` to not set focus back on the grid after a refresh. This can avoid issues where you want to keep the focus on another part of the browser. Default: `false` */\n this.suppressFocusAfterRefresh = undefined;\n /** Disables the asynchronous nature of the events introduced in v10, and makes them synchronous. This property only exists for the purpose of supporting legacy code which has a dependency on synchronous events from earlier versions (v9 or earlier) of AG Grid. **It is strongly recommended that you do not change this property unless you have legacy issues.** Default: `false` */\n this.suppressAsyncEvents = undefined;\n /** The grid will check for `ResizeObserver` and use it if it exists in the browser, otherwise it will use the grid's alternative implementation. Some users reported issues with Chrome's `ResizeObserver`. Use this property to always use the grid's alternative implementation should such problems exist. Default: `false` */\n this.suppressBrowserResizeObserver = undefined;\n /** Disables showing a warning message in the console if using a `gridOptions` or `colDef` property that doesn't exist. Default: `false` */\n this.suppressPropertyNamesCheck = undefined;\n /** Disables change detection. Default: `false` */\n this.suppressChangeDetection = undefined;\n /** Set this to `true` to enable debug information from the grid and related components. Will result in additional logging being output, but very useful when investigating problems. Default: `false` */\n this.debug = undefined;\n /** Provide a template for 'loading' overlay. */\n this.overlayLoadingTemplate = undefined;\n /** Provide a custom loading overlay component.\n * See [Loading Overlay Component](https://www.ag-grid.com/javascript-data-grid/component-overlay/#simple-loading-overlay-component) for framework specific implementation details. */\n this.loadingOverlayComponent = undefined;\n /** @deprecated As of v27, use `loadingOverlayComponent` for framework components too.\n */\n this.loadingOverlayComponentFramework = undefined;\n /** Customise the parameters provided to the loading overlay component. */\n this.loadingOverlayComponentParams = undefined;\n /** Disables the 'loading' overlay. Default: `false` */\n this.suppressLoadingOverlay = undefined;\n /** Provide a template for 'no rows' overlay. */\n this.overlayNoRowsTemplate = undefined;\n /** Provide a custom no rows overlay component.\n * See [No Rows Overlay Component](https://www.ag-grid.com/javascript-data-grid/component-overlay/#simple-no-rows-overlay-component) for framework specific implementation details. */\n this.noRowsOverlayComponent = undefined;\n /** @deprecated As of v27, use `noRowsOverlayComponent` for framework components too.\n */\n this.noRowsOverlayComponentFramework = undefined;\n /** Customise the parameters provided to the no rows overlay component. */\n this.noRowsOverlayComponentParams = undefined;\n /** Disables the 'no rows' overlay. Default: `false` */\n this.suppressNoRowsOverlay = undefined;\n /** Set whether pagination is enabled. Default: `false` */\n this.pagination = undefined;\n /** How many rows to load per page. If `paginationAutoPageSize` is specified, this property is ignored. Default: `100` */\n this.paginationPageSize = undefined;\n /** Set to `true` so that the number of rows to load per page is automatically adjusted by the grid so each page shows enough rows to just fill the area designated for the grid. If `false`, `paginationPageSize` is used. Default: `false` */\n this.paginationAutoPageSize = undefined;\n /** Set to `true` to have pages split children of groups when using Row Grouping or detail rows with Master Detail. Default: `false` */\n this.paginateChildRows = undefined;\n /** If `true`, the default grid controls for navigation are hidden.\n * This is useful if `pagination=true` and you want to provide your own pagination controls.\n * Otherwise, when `pagination=true` the grid automatically shows the necessary controls at the bottom so that the user can navigate through the different pages.\n * Default: `false` */\n this.suppressPaginationPanel = undefined;\n /** Set to `true` to enable pivot mode. Default: `false` */\n this.pivotMode = undefined;\n /** When to show the 'pivot panel' (where you drag rows to pivot) at the top. Note that the pivot panel will never show if `pivotMode` is off. Default: `never` */\n this.pivotPanelShow = undefined;\n /** When set and the grid is in pivot mode, automatically calculated totals will appear within the Pivot Column Groups, in the position specified. */\n this.pivotColumnGroupTotals = undefined;\n /** When set and the grid is in pivot mode, automatically calculated totals will appear for each value column in the position specified. */\n this.pivotRowTotals = undefined;\n /** If `true`, the grid will not swap in the grouping column when pivoting. Useful if pivoting using Server Side Row Model or Viewport Row Model and you want full control of all columns including the group column. Default: `false` */\n this.pivotSuppressAutoColumn = undefined;\n /** When enabled, pivot column groups will appear 'fixed', without the ability to expand and collapse the column groups. Default: `false` */\n this.suppressExpandablePivotGroups = undefined;\n /** If `true`, then row group, pivot and value aggregation will be read-only from the GUI. The grid will display what values are used for each, but will not allow the user to change the selection. Default: `false` */\n this.functionsReadOnly = undefined;\n /** A map of 'function name' to 'function' for custom aggregation functions. */\n this.aggFuncs = undefined;\n /** When `true`, column headers won't include the `aggFunc` name, e.g. `'sum(Bank Balance)`' will just be `'Bank Balance'`. Default: `false` */\n this.suppressAggFuncInHeader = undefined;\n /** When `true`, the aggregations won't be computed for the root node of the grid. Default: `false` */\n this.suppressAggAtRootLevel = undefined;\n /** When using change detection, only the updated column will be re-aggregated. Default: `false` */\n this.aggregateOnlyChangedColumns = undefined;\n /** Set to `true` so that aggregations are not impacted by filtering. Default: `false` */\n this.suppressAggFilteredOnly = undefined;\n /** Set to `true` to omit the value Column header when there is only a single value column. Default: `false` */\n this.removePivotHeaderRowWhenSingleValueColumn = undefined;\n /** Set to `true` to enable Row Animation. Default: `false` */\n this.animateRows = undefined;\n /** Set to `true` to have cells flash after data changes. Default: `false` */\n this.enableCellChangeFlash = undefined;\n /** To be used in combination with `enableCellChangeFlash`, this configuration will set the delay in milliseconds of how long a cell should remain in its \"flashed\" state.\n * Default: `500` */\n this.cellFlashDelay = undefined;\n /** To be used in combination with `enableCellChangeFlash`, this configuration will set the delay in milliseconds of how long the \"flashed\" state animation takes to fade away after the timer set by `cellFlashDelay` has completed.\n * Default: `1000` */\n this.cellFadeDelay = undefined;\n /** Switch between layout options: `normal`, `autoHeight`, `print`.\n * Default: `normal` */\n this.domLayout = undefined;\n /** When `true`, the order of rows and columns in the DOM are consistent with what is on screen. Default: `false` */\n this.ensureDomOrder = undefined;\n /** Set to `true` to operate the grid in RTL (Right to Left) mode. Default: `false` */\n this.enableRtl = undefined;\n /** Set to `true` so that the grid doesn't virtualise the columns. For example, if you have 100 columns, but only 10 visible due to scrolling, all 100 will always be rendered. Default: `false` */\n this.suppressColumnVirtualisation = undefined;\n /** By default the grid has a limit of rendering a maximum of 500 rows at once (remember the grid only renders rows you can see, so unless your display shows more than 500 rows without vertically scrolling this will never be an issue).\n *
**This is only relevant if you are manually setting `rowBuffer` to a high value (rendering more rows than can be seen) or if your grid height is able to display more than 500 rows at once.**\n * Default: `false` */\n this.suppressMaxRenderedRowRestriction = undefined;\n /** Set to `true` so that the grid doesn't virtualise the rows. For example, if you have 100 rows, but only 10 visible due to scrolling, all 100 will always be rendered. Default: `false` */\n this.suppressRowVirtualisation = undefined;\n /** Set to `true` to enable Managed Row Dragging. Default: `false` */\n this.rowDragManaged = undefined;\n /** Set to `true` to suppress row dragging. Default: `false` */\n this.suppressRowDrag = undefined;\n /** Set to `true` to suppress moving rows while dragging the `rowDrag` waffle. This option highlights the position where the row will be placed and it will only move the row on mouse up. Default: `false` */\n this.suppressMoveWhenRowDragging = undefined;\n /** Set to `true` to enable clicking and dragging anywhere on the row without the need for a drag handle. Default: `false` */\n this.rowDragEntireRow = undefined;\n /** Set to `true` to enable dragging multiple rows at the same time. Default: `false` */\n this.rowDragMultiRow = undefined;\n /** Provide your own cell renderer component to use for full width rows.\n * See [Full Width Rows](https://www.ag-grid.com/javascript-data-grid/full-width-rows/) for framework specific implementation details. */\n this.fullWidthCellRenderer = undefined;\n /** @deprecated As of v27, use `fullWidthCellRenderer` for framework components too.\n */\n this.fullWidthCellRendererFramework = undefined;\n /** Customise the parameters provided to the `fullWidthCellRenderer` component. */\n this.fullWidthCellRendererParams = undefined;\n /** Set to `true` to have the detail grid embedded in the master grid's container and so link their horizontal scrolling. */\n this.embedFullWidthRows = undefined;\n /** @deprecated */\n this.deprecatedEmbedFullWidthRows = undefined;\n /** Specifies how the results of row grouping should be displayed.\n *\n * The options are:\n *\n * - `'singleColumn'`: single group column automatically added by the grid.\n * - `'multipleColumns'`: a group column per row group is added automatically.\n * - `'groupRows'`: group rows are automatically added instead of group columns.\n * - `'custom'`: informs the grid that group columns will be provided. */\n this.groupDisplayType = undefined;\n /** If grouping, set to the number of levels to expand by default, e.g. `0` for none, `1` for first level only, etc. Set to `-1` to expand everything. Default: `0` */\n this.groupDefaultExpanded = undefined;\n /** Allows specifying the group 'auto column' if you are not happy with the default. If grouping, this column definition is included as the first column in the grid. If not grouping, this column is not included. */\n this.autoGroupColumnDef = undefined;\n /** When `true`, preserves the current group order when sorting on non-group columns. Default: `false` */\n this.groupMaintainOrder = undefined;\n /** When `true`, if you select a group, the children of the group will also be selected. Default: `false` */\n this.groupSelectsChildren = undefined;\n /** Set to determine whether filters should be applied on aggregated group values. Default: `false` */\n this.groupAggFiltering = undefined;\n /** If grouping, this controls whether to show a group footer when the group is expanded.\n * If `true`, then by default, the footer will contain aggregate data (if any) when shown and the header will be blank.\n * When closed, the header will contain the aggregate data regardless of this setting (as the footer is hidden anyway).\n * This is handy for 'total' rows, that are displayed below the data when the group is open, and alongside the group when it is closed.\n * Default: `false` */\n this.groupIncludeFooter = undefined;\n /** Set to `true` to show a 'grand total' group footer across all groups. Default: `false` */\n this.groupIncludeTotalFooter = undefined;\n /** If `true`, and showing footer, aggregate data will always be displayed at both the header and footer levels. This stops the possibly undesirable behaviour of the header details 'jumping' to the footer on expand. Default: `false` */\n this.groupSuppressBlankHeader = undefined;\n /** If using `groupSelectsChildren`, then only the children that pass the current filter will get selected. Default: `false` */\n this.groupSelectsFiltered = undefined;\n /** Shows the open group in the group column for non-group rows. Default: `false` */\n this.showOpenedGroup = undefined;\n /** Set to `true` to collapse groups that only have one child. */\n this.groupRemoveSingleChildren = undefined;\n /** Set to `true` to collapse lowest level groups that only have one child. Default: `false` */\n this.groupRemoveLowestSingleChildren = undefined;\n /** Set to `true` to hide parents that are open. When used with multiple columns for showing groups, it can give a more pleasing user experience. Default: `false` */\n this.groupHideOpenParents = undefined;\n /** When to show the 'row group panel' (where you drag rows to group) at the top. Default: `never` */\n this.rowGroupPanelShow = undefined;\n /** Provide the Cell Renderer to use when `groupDisplayType = 'groupRows'`.\n * See [Group Row Cell Renderer](https://www.ag-grid.com/javascript-data-grid/grouping-group-rows/#providing-cell-renderer) for framework specific implementation details. */\n this.groupRowRenderer = undefined;\n /** @deprecated As of v27, use `groupRowRenderer` for framework components too.\n */\n this.groupRowRendererFramework = undefined;\n /** Customise the parameters provided to the `groupRowRenderer` component. */\n this.groupRowRendererParams = undefined;\n /** By default, when a column is un-grouped, i.e. using the Row Group Panel, it is made visible in the grid. This property stops the column becoming visible again when un-grouping. Default: `false` */\n this.suppressMakeColumnVisibleAfterUnGroup = undefined;\n /** Set to `true` to enable the Grid to work with Tree Data. You must also implement the `getDataPath(data)` callback. */\n this.treeData = undefined;\n /** @deprecated - this is now groupRowRendererParams.innerRenderer\n */\n this.groupRowInnerRenderer = undefined;\n /** @deprecated - this is now groupRowRendererParams.innerRenderer\n */\n this.groupRowInnerRendererFramework = undefined;\n /** @deprecated - Use groupDisplayType = 'multipleColumns' instead\n */\n this.groupMultiAutoColumn = undefined;\n /** @deprecated - Use groupDisplayType = 'groupRows' instead\n */\n this.groupUseEntireRow = undefined;\n /** @deprecated - Use groupDisplayType = 'custom' instead\n */\n this.groupSuppressAutoColumn = undefined;\n /** @deprecated - no longer needed, transaction updates keep group state\n */\n this.rememberGroupStateWhenNewData = undefined;\n /** Data to be displayed as pinned top rows in the grid. */\n this.pinnedTopRowData = undefined;\n /** Data to be displayed as pinned bottom rows in the grid. */\n this.pinnedBottomRowData = undefined;\n /** Sets the row model type. Default: `clientSide` */\n this.rowModelType = undefined;\n /** Set the data to be displayed as rows in the grid. */\n this.rowData = undefined;\n /** @deprecated Immutable Data is on by default when grid callback getRowId() is implemented\n Enables Immutable Data mode, for compatibility with immutable stores. Default: `false`\n */\n this.immutableData = undefined;\n /** How many milliseconds to wait before executing a batch of async transactions. */\n this.asyncTransactionWaitMillis = undefined;\n /** Prevents Transactions changing sort, filter, group or pivot state when transaction only contains updates. Default: `false` */\n this.suppressModelUpdateAfterUpdateTransaction = undefined;\n /** @deprecated */\n this.deltaRowDataMode = undefined;\n /** @deprecated use asyncTransactionWaitMillis instead\n */\n this.batchUpdateWaitMillis = undefined;\n /** Provide the datasource for infinite scrolling. */\n this.datasource = undefined;\n /** How many extra blank rows to display to the user at the end of the dataset, which sets the vertical scroll and then allows the grid to request viewing more rows of data.\n * Default: `1` */\n this.cacheOverflowSize = undefined;\n /** How many extra blank rows to display to the user at the end of the dataset, which sets the vertical scroll and then allows the grid to request viewing more rows of data.\n * Default: `1` */\n this.infiniteInitialRowCount = undefined;\n /** Whether to use Full Store or Partial Store for storing rows. Default: `full` */\n this.serverSideStoreType = undefined;\n /** How many rows for each block in the store, i.e. how many rows returned from the server at a time.\n * Default: `100` */\n this.cacheBlockSize = undefined;\n /** How many blocks to keep in the store. Default is no limit, so every requested block is kept. Use this if you have memory concerns, and blocks that were least recently viewed will be purged when the limit is hit. The grid will additionally make sure it has all the blocks needed to display what is currently visible, in case this property is set to a low value. */\n this.maxBlocksInCache = undefined;\n /** How many requests to hit the server with concurrently. If the max is reached, requests are queued.\n * Set to `-1` for no maximum restriction on requests.\n * Default: `2` */\n this.maxConcurrentDatasourceRequests = undefined;\n /** How many milliseconds to wait before loading a block. Useful when scrolling over many rows, spanning many Partial Store blocks, as it prevents blocks loading until scrolling has settled. */\n this.blockLoadDebounceMillis = undefined;\n /** When enabled, closing group rows will remove children of that row. Next time the row is opened, child rows will be read from the datasource again. This property only applies when there is Row Grouping. Default: `false` */\n this.purgeClosedRowNodes = undefined;\n /** Provide the `serverSideDatasource` for server side row model. */\n this.serverSideDatasource = undefined;\n /** When enabled, always refreshes top level groups regardless of which column was sorted. This property only applies when there is Row Grouping. Default: `false` */\n this.serverSideSortingAlwaysResets = undefined;\n /** When enabled, always refreshes stores after filter has changed. Used by Full Store only, to allow Server-Side Filtering. Default: `false` */\n this.serverSideFilteringAlwaysResets = undefined;\n /** @deprecated */\n this.suppressEnterpriseResetOnNewColumns = undefined;\n /** To use the viewport row model you need to provide the grid with a `viewportDatasource`. */\n this.viewportDatasource = undefined;\n /** When using viewport row model, sets the page size for the viewport. */\n this.viewportRowModelPageSize = undefined;\n /** When using viewport row model, sets the buffer size for the viewport. */\n this.viewportRowModelBufferSize = undefined;\n /** Set to `true` to always show the horizontal scrollbar. Default: `false` */\n this.alwaysShowHorizontalScroll = undefined;\n /** Set to `true` to always show the vertical scrollbar. Default: `false` */\n this.alwaysShowVerticalScroll = undefined;\n /** Set to `true` to debounce the vertical scrollbar. Can provide smoother scrolling on slow machines. Default: `false` */\n this.debounceVerticalScrollbar = undefined;\n /** Set to `true` to never show the horizontal scroll. This is useful if the grid is aligned with another grid and will scroll when the other grid scrolls. (Should not be used in combination with `alwaysShowHorizontalScroll`.) Default: `false` */\n this.suppressHorizontalScroll = undefined;\n /** When `true`, the grid will not scroll to the top when new row data is provided. Use this if you don't want the default behaviour of scrolling to the top every time you load new data. Default: `false` */\n this.suppressScrollOnNewData = undefined;\n /** When `true`, the grid will not allow mousewheel / touchpad scroll when popup elements are present. Default: `false` */\n this.suppressScrollWhenPopupsAreOpen = undefined;\n /** When `true`, the grid will not use animation frames when drawing rows while scrolling. Use this if the grid is working fast enough that you don't need animation frames and you don't want the grid to flicker. Default: `false` */\n this.suppressAnimationFrame = undefined;\n /** If `true`, middle clicks will result in `click` events for cells and rows. Otherwise the browser will use middle click to scroll the grid.
**Note:** Not all browsers fire `click` events with the middle button. Most will fire only `mousedown` and `mouseup` events, which can be used to focus a cell, but will not work to call the `onCellClicked` function. Default: `false` */\n this.suppressMiddleClickScrolls = undefined;\n /** If `true`, mouse wheel events will be passed to the browser. Useful if your grid has no vertical scrolls and you want the mouse to scroll the browser page. Default: `false` */\n this.suppressPreventDefaultOnMouseWheel = undefined;\n /** Tell the grid how wide in pixels the scrollbar is, which is used in grid width calculations. Set only if using non-standard browser-provided scrollbars, so the grid can use the non-standard size in its calculations. */\n this.scrollbarWidth = undefined;\n /** Type of Row Selection: `single`, `multiple`. */\n this.rowSelection = undefined;\n /** Set to `true` to allow multiple rows to be selected using single click. Default: `false` */\n this.rowMultiSelectWithClick = undefined;\n /** If `true`, rows will not be deselected if you hold down `Ctrl` and click the row or press `Space`. Default: `false` */\n this.suppressRowDeselection = undefined;\n /** If `true`, row selection won't happen when rows are clicked. Use when you only want checkbox selection. Default: `false` */\n this.suppressRowClickSelection = undefined;\n /** @deprecated This property has been deprecated. Use `suppressCellFocus` instead.\n */\n this.suppressCellSelection = undefined;\n /** If `true`, cells won't be focusable. This means keyboard navigation will be disabled for grid cells, but remain enabled in other elements of the grid such as column headers, floating filters, tool panels. Default: `false` */\n this.suppressCellFocus = undefined;\n /** If `true`, only a single range can be selected. Default: `false` */\n this.suppressMultiRangeSelection = undefined;\n /** Set to `true` to be able to select the text within cells.\n *\n * **Note:** When this is set to `true`, the clipboard service is disabled.\n * Default: `false` */\n this.enableCellTextSelection = undefined;\n /** Set to `true` to enable Range Selection. Default: `false` */\n this.enableRangeSelection = undefined;\n /** Set to `true` to enable the Range Handle. Default: `false` */\n this.enableRangeHandle = undefined;\n /** Set to `true` to enable the Fill Handle. Default: `false` */\n this.enableFillHandle = undefined;\n /** Set to `'x'` to force the fill handle direction to horizontal, or set to `'y'` to force the fill handle direction to vertical. Default: `xy` */\n this.fillHandleDirection = undefined;\n /** Set this to `true` to prevent cell values from being cleared when the Range Selection is reduced by the Fill Handle. Default: `false` */\n this.suppressClearOnFillReduction = undefined;\n /** Array defining the order in which sorting occurs (if sorting is enabled). Values can be `'asc'`, `'desc'` or `null`. For example: `sortingOrder: ['asc', 'desc']`. Default: `[null, 'asc', 'desc']` */\n this.sortingOrder = undefined;\n /** Set to `true` to specify that the sort should take accented characters into account. If this feature is turned on the sort will be slower. Default: `false` */\n this.accentedSort = undefined;\n /** Set to `true` to show the 'no sort' icon. Default: `false` */\n this.unSortIcon = undefined;\n /** Set to `true` to suppress multi-sort when the user shift-clicks a column header. Default: `false` */\n this.suppressMultiSort = undefined;\n /** Set to `true` to always multi-sort when the user clicks a column header, regardless of key presses. Default: `false` */\n this.alwaysMultiSort = undefined;\n /** Set to `'ctrl'` to have multi sorting work using the `Ctrl` (or `Command ⌘` for Mac) key. */\n this.multiSortKey = undefined;\n /** Set to `true` to suppress sorting of un-sorted data to match original row data. Default: `false` */\n this.suppressMaintainUnsortedOrder = undefined;\n /** Icons to use inside the grid instead of the grid's default icons. */\n this.icons = undefined;\n /** Default row height in pixels. Default: `25` */\n this.rowHeight = undefined;\n /** The style properties to apply to all rows. Set to an object of key (style names) and values (style values) */\n this.rowStyle = undefined;\n /** CSS class(es) for all rows. Provide either a string (class name) or array of strings (array of class names). */\n this.rowClass = undefined;\n /** Rules which can be applied to include certain CSS classes. */\n this.rowClassRules = undefined;\n /** Set to `true` to not highlight rows by adding the `ag-row-hover` CSS class. Default: `false` */\n this.suppressRowHoverHighlight = undefined;\n /** Uses CSS `top` instead of CSS `transform` for positioning rows. Useful if the transform function is causing issues such as used in row spanning. Default: `false` */\n this.suppressRowTransform = undefined;\n /** Set to `true` to highlight columns by adding the `ag-column-hover` CSS class. Default: `false` */\n this.columnHoverHighlight = undefined;\n this.deltaSort = undefined;\n this.treeDataDisplayType = undefined;\n this.angularCompileRows = undefined;\n this.angularCompileFilters = undefined;\n this.functionsPassive = undefined;\n this.enableGroupEdit = undefined;\n /** For customising the context menu. */\n this.getContextMenuItems = undefined;\n /** For customising the main 'column header' menu. */\n this.getMainMenuItems = undefined;\n /** Allows user to process popups after they are created. Applications can use this if they want to, for example, reposition the popup. */\n this.postProcessPopup = undefined;\n /** Allows you to process cells for the clipboard. Handy if for example you have `Date` objects that need to have a particular format if importing into Excel. */\n this.processCellForClipboard = undefined;\n /** Allows you to process header values for the clipboard. */\n this.processHeaderForClipboard = undefined;\n /** Allows you to process group header values for the clipboard. */\n this.processGroupHeaderForClipboard = undefined;\n /** Allows you to process cells from the clipboard. Handy if for example you have number fields, and want to block non-numbers from getting into the grid. */\n this.processCellFromClipboard = undefined;\n /** Allows you to get the data that would otherwise go to the clipboard. To be used when you want to control the 'copy to clipboard' operation yourself. */\n this.sendToClipboard = undefined;\n /** Allows complete control of the paste operation, including cancelling the operation (so nothing happens) or replacing the data with other data. */\n this.processDataFromClipboard = undefined;\n /** Grid calls this method to know if an external filter is present. */\n this.isExternalFilterPresent = undefined;\n /** Should return `true` if external filter passes, otherwise `false`. */\n this.doesExternalFilterPass = undefined;\n /** Callback to be used to customise the chart toolbar items. */\n this.getChartToolbarItems = undefined;\n /** Callback to enable displaying the chart in an alternative chart container. */\n this.createChartContainer = undefined;\n /** Allows overriding the default behaviour for when user hits navigation (arrow) key when a header is focused. Return the next Header position to navigate to or `null` to stay on current header. */\n this.navigateToNextHeader = undefined;\n /** Allows overriding the default behaviour for when user hits `Tab` key when a header is focused. Return the next Header position to navigate to or `null` to stay on current header. */\n this.tabToNextHeader = undefined;\n /** Allows overriding the default behaviour for when user hits navigation (arrow) key when a cell is focused. Return the next Cell position to navigate to or `null` to stay on current cell. */\n this.navigateToNextCell = undefined;\n /** Allows overriding the default behaviour for when user hits `Tab` key when a cell is focused. Return the next Cell position to navigate to or null to stay on current cell. */\n this.tabToNextCell = undefined;\n /** @deprecated - Set via `colDef.suppressKeyboardEvent`. If you need this to be set for every column set via the `defaultColDef.suppressKeyboardEvent` property.\n */\n this.suppressKeyboardEvent = undefined;\n /** @deprecated - Use `getLocaleText` instead.\n */\n this.localeTextFunc = undefined;\n /** A callback for localising text within the grid. */\n this.getLocaleText = undefined;\n /** Allows overriding what `document` is used. Currently used by Drag and Drop (may extend to other places in the future). Use this when you want the grid to use a different `document` than the one available on the global scope. This can happen if docking out components (something which Electron supports) */\n this.getDocument = undefined;\n /** Allows user to format the numbers in the pagination panel, i.e. 'row count' and 'page number' labels. This is for pagination panel only, to format numbers inside the grid's cells (i.e. your data), then use `valueFormatter` in the column definitions. */\n this.paginationNumberFormatter = undefined;\n /** @deprecated - Use `getGroupRowAgg` instead.\n */\n this.groupRowAggNodes = undefined;\n /** Callback to use when you need access to more then the current column for aggregation. */\n this.getGroupRowAgg = undefined;\n /** (Client-side Row Model only) Allows groups to be open by default. */\n this.isGroupOpenByDefault = undefined;\n /** Allows default sorting of groups. */\n this.initialGroupOrderComparator = undefined;\n /** @deprecated - Use `initialGroupOrderComparator` instead\n */\n this.defaultGroupOrderComparator = undefined;\n /** Callback to be used with pivoting, to allow changing the second column definition. */\n this.processSecondaryColDef = undefined;\n /** Callback to be used with pivoting, to allow changing the second column group definition. */\n this.processSecondaryColGroupDef = undefined;\n /** Callback to be used when working with Tree Data when `treeData = true`. */\n this.getDataPath = undefined;\n /** @deprecated - Use initialGroupOrderComparator instead\n */\n this.defaultGroupSortComparator = undefined;\n /** Allows setting the child count for a group row. */\n this.getChildCount = undefined;\n /** Allows providing different params for different levels of grouping. */\n this.getServerSideStoreParams = undefined;\n /** Allows groups to be open by default. */\n this.isServerSideGroupOpenByDefault = undefined;\n /** Allows cancelling transactions. */\n this.isApplyServerSideTransaction = undefined;\n /** SSRM Tree Data: Allows specifying which rows are expandable. */\n this.isServerSideGroup = undefined;\n /** SSRM Tree Data: Allows specifying group keys. */\n this.getServerSideGroupKey = undefined;\n /** Return a business key for the node. If implemented, each row in the DOM will have an attribute `row-id='abc'` where `abc` is what you return as the business key.\n * This is useful for automated testing, as it provides a way for your tool to identify rows based on unique business keys. */\n this.getBusinessKeyForNode = undefined;\n /** @deprecated Use `getRowId` instead - however be aware, `getRowId()` will also set grid option `immutableData=true`\n Allows you to set the ID for a particular row node based on the data.\n */\n this.getRowNodeId = undefined;\n /** Allows setting the ID for a particular row node based on the data. */\n this.getRowId = undefined;\n /** When enabled, getRowId() callback is implemented and new Row Data is set, the grid will disregard all previous rows and treat the new Row Data as new data. As a consequence, all Row State (eg selection, rendered rows) will be reset. Default: `false` */\n this.resetRowDataOnUpdate = undefined;\n /** Allows you to process rows after they are created, so you can do final adding of custom attributes etc. */\n this.processRowPostCreate = undefined;\n /** Callback to be used to determine which rows are selectable. By default rows are selectable, so return `false` to make a row un-selectable. */\n this.isRowSelectable = undefined;\n /** Callback to be used with Master Detail to determine if a row should be a master row. If `false` is returned no detail row will exist for this row. */\n this.isRowMaster = undefined;\n /** Callback to fill values instead of simply copying values or increasing number values using linear progression. */\n this.fillOperation = undefined;\n /** @deprecated Use `postSortRows` instead\n */\n this.postSort = undefined;\n /** Callback to perform additional sorting after the grid has sorted the rows. */\n this.postSortRows = undefined;\n /** Callback version of property `rowStyle` to set style for each row individually. Function should return an object of CSS values or undefined for no styles. */\n this.getRowStyle = undefined;\n /** Callback version of property `rowClass` to set class(es) for each row individually. Function should return either a string (class name), array of strings (array of class names) or undefined for no class. */\n this.getRowClass = undefined;\n /** Callback version of property `rowHeight` to set height for each row individually. Function should return a positive number of pixels, or return `null`/`undefined` to use the default row height. */\n this.getRowHeight = undefined;\n /** @deprecated Use `isFullWidthRow` instead.\n */\n this.isFullWidthCell = undefined;\n /** Tells the grid if this row should be rendered as full width. */\n this.isFullWidthRow = undefined;\n /** The tool panel was hidden or shown. Use `api.isToolPanelShowing()` to get status. */\n this.toolPanelVisibleChanged = new EventEmitter();\n /** Paste operation has started. */\n this.pasteStart = new EventEmitter();\n /** Paste operation has ended. */\n this.pasteEnd = new EventEmitter();\n /** A column, or group of columns, was hidden / shown. */\n this.columnVisible = new EventEmitter();\n /** A column, or group of columns, was pinned / unpinned. */\n this.columnPinned = new EventEmitter();\n /** A column was resized. */\n this.columnResized = new EventEmitter();\n /** A column was moved. To find out when the column move is finished you can use the `dragStopped` event below. */\n this.columnMoved = new EventEmitter();\n /** A value column was added or removed. */\n this.columnValueChanged = new EventEmitter();\n /** The pivot mode flag was changed. */\n this.columnPivotModeChanged = new EventEmitter();\n /** A pivot column was added, removed or order changed. */\n this.columnPivotChanged = new EventEmitter();\n /** A column group was opened / closed. */\n this.columnGroupOpened = new EventEmitter();\n /** User set new columns. */\n this.newColumnsLoaded = new EventEmitter();\n /** The list of grid columns changed. */\n this.gridColumnsChanged = new EventEmitter();\n /** The list of displayed columns changed. This can result from columns open / close, column move, pivot, group, etc. */\n this.displayedColumnsChanged = new EventEmitter();\n /** The list of rendered columns changed (only columns in the visible scrolled viewport are rendered by default). */\n this.virtualColumnsChanged = new EventEmitter();\n /** Shotgun - gets called when either a) new columns are set or b) `columnApi.setState()` is used, so everything has changed. */\n this.columnEverythingChanged = new EventEmitter();\n /** Only used by Angular, React and VueJS AG Grid components (not used if doing plain JavaScript).\n * If the grid receives changes due to bound properties, this event fires after the grid has finished processing the change. */\n this.componentStateChanged = new EventEmitter();\n /** Value has changed after editing. This event will not fire if editing was cancelled (eg ESC was pressed). */\n this.cellValueChanged = new EventEmitter();\n /** Value has changed after editing. Only fires when doing Read Only Edits, ie `readOnlyEdit=true`. */\n this.cellEditRequest = new EventEmitter();\n /** A cell's value within a row has changed. This event corresponds to Full Row Editing only. */\n this.rowValueChanged = new EventEmitter();\n /** Editing a cell has started. */\n this.cellEditingStarted = new EventEmitter();\n /** Editing a cell has stopped. */\n this.cellEditingStopped = new EventEmitter();\n /** Editing a row has started (when row editing is enabled). When row editing, this event will be fired once and `cellEditingStarted` will be fired for each individual cell. Only fires when doing Full Row Editing. */\n this.rowEditingStarted = new EventEmitter();\n /** Editing a row has stopped (when row editing is enabled). When row editing, this event will be fired once and `cellEditingStopped` will be fired for each individual cell. Only fires when doing Full Row Editing. */\n this.rowEditingStopped = new EventEmitter();\n /** Filter has been opened. */\n this.filterOpened = new EventEmitter();\n /** Filter has been modified and applied. */\n this.filterChanged = new EventEmitter();\n /** Filter was modified but not applied. Used when filters have 'Apply' buttons. */\n this.filterModified = new EventEmitter();\n /** A chart has been created. */\n this.chartCreated = new EventEmitter();\n /** The data range for the chart has been changed. */\n this.chartRangeSelectionChanged = new EventEmitter();\n /** Formatting changes have been made by users through the Format Panel. */\n this.chartOptionsChanged = new EventEmitter();\n /** A chart has been destroyed. */\n this.chartDestroyed = new EventEmitter();\n /** DOM event `keyDown` happened on a cell. */\n this.cellKeyDown = new EventEmitter();\n /** DOM event `keyPress` happened on a cell. */\n this.cellKeyPress = new EventEmitter();\n /** The grid has initialised and is ready for most api calls, but may not be fully rendered yet */\n this.gridReady = new EventEmitter();\n /** Fired the first time data is rendered into the grid. Use this event if you want to auto resize columns based on their contents */\n this.firstDataRendered = new EventEmitter();\n /** The size of the grid `div` has changed. In other words, the grid was resized. */\n this.gridSizeChanged = new EventEmitter();\n /** Displayed rows have changed. Triggered after sort, filter or tree expand / collapse events. */\n this.modelUpdated = new EventEmitter();\n /** A row was removed from the DOM, for any reason. Use to clean up resources (if any) used by the row. */\n this.virtualRowRemoved = new EventEmitter();\n /** Which rows are rendered in the DOM has changed. */\n this.viewportChanged = new EventEmitter();\n /** The body was scrolled horizontally or vertically. */\n this.bodyScroll = new EventEmitter();\n /** Main body of the grid has stopped scrolling, either horizontally or vertically. */\n this.bodyScrollEnd = new EventEmitter();\n /** When dragging starts. This could be any action that uses the grid's Drag and Drop service, e.g. Column Moving, Column Resizing, Range Selection, Fill Handle, etc. */\n this.dragStarted = new EventEmitter();\n /** When dragging stops. This could be any action that uses the grid's Drag and Drop service, e.g. Column Moving, Column Resizing, Range Selection, Fill Handle, etc. */\n this.dragStopped = new EventEmitter();\n /** Triggered every time the paging state changes. Some of the most common scenarios for this event to be triggered are:\n *\n * - The page size changes.\n * - The current shown page is changed.\n * - New data is loaded onto the grid. */\n this.paginationChanged = new EventEmitter();\n /** A drag has started, or dragging was already started and the mouse has re-entered the grid having previously left the grid. */\n this.rowDragEnter = new EventEmitter();\n /** The mouse has moved while dragging. */\n this.rowDragMove = new EventEmitter();\n /** The mouse has left the grid while dragging. */\n this.rowDragLeave = new EventEmitter();\n /** The drag has finished over the grid. */\n this.rowDragEnd = new EventEmitter();\n /** A row group column was added or removed. */\n this.columnRowGroupChanged = new EventEmitter();\n /** A row group was opened or closed. */\n this.rowGroupOpened = new EventEmitter();\n /** Fired when calling either of the API methods `expandAll()` or `collapseAll()`. */\n this.expandOrCollapseAll = new EventEmitter();\n /** The client has set new pinned row data into the grid. */\n this.pinnedRowDataChanged = new EventEmitter();\n /** The client has set new data into the grid using `api.setRowData()` or by changing the `rowData` bound property. */\n this.rowDataChanged = new EventEmitter();\n /** The client has updated data for the grid using `api.applyTransaction(transaction)` or by setting new Row Data and Row ID's are provided (as this results in a transaction underneath the hood). */\n this.rowDataUpdated = new EventEmitter();\n /** Async transactions have been applied. Contains a list of all transaction results. */\n this.asyncTransactionsFlushed = new EventEmitter();\n /** Cell is clicked. */\n this.cellClicked = new EventEmitter();\n /** Cell is double clicked. */\n this.cellDoubleClicked = new EventEmitter();\n /** Cell is focused. */\n this.cellFocused = new EventEmitter();\n /** Mouse entered cell. */\n this.cellMouseOver = new EventEmitter();\n /** Mouse left cell. */\n this.cellMouseOut = new EventEmitter();\n /** Mouse down on cell. */\n this.cellMouseDown = new EventEmitter();\n /** Row is clicked. */\n this.rowClicked = new EventEmitter();\n /** Row is double clicked. */\n this.rowDoubleClicked = new EventEmitter();\n /** Row is selected or deselected. The event contains the node in question, so call the node's `isSelected()` method to see if it was just selected or deselected. */\n this.rowSelected = new EventEmitter();\n /** Row selection is changed. Use the grid API `getSelectedNodes()` to get the new list of selected nodes. */\n this.selectionChanged = new EventEmitter();\n /** Cell is right clicked. */\n this.cellContextMenu = new EventEmitter();\n /** A change to range selection has occurred. */\n this.rangeSelectionChanged = new EventEmitter();\n /** Sort has changed. The grid also listens for this and updates the model. */\n this.sortChanged = new EventEmitter();\n this.columnRowGroupChangeRequest = new EventEmitter();\n this.columnPivotChangeRequest = new EventEmitter();\n this.columnValueChangeRequest = new EventEmitter();\n this.columnAggFuncChangeRequest = new EventEmitter();\n this._nativeElement = elementDef.nativeElement;\n }\n ngAfterViewInit() {\n this.frameworkComponentWrapper.setViewContainerRef(this.viewContainerRef);\n this.frameworkComponentWrapper.setComponentFactoryResolver(this.componentFactoryResolver);\n this.angularFrameworkOverrides.setEmitterUsedCallback(this.isEmitterUsed.bind(this));\n this.gridOptions = ComponentUtil.copyAttributesToGridOptions(this.gridOptions, this, true);\n this.gridParams = {\n globalEventListener: this.globalEventListener.bind(this),\n frameworkOverrides: this.angularFrameworkOverrides,\n providedBeanInstances: {\n frameworkComponentWrapper: this.frameworkComponentWrapper\n },\n modules: (this.modules || [])\n };\n if (this.columns && this.columns.length > 0) {\n this.gridOptions.columnDefs = this.columns\n .map((column) => {\n return column.toColDef();\n });\n }\n new Grid(this._nativeElement, this.gridOptions, this.gridParams);\n if (this.gridOptions.api) {\n this.api = this.gridOptions.api;\n }\n if (this.gridOptions.columnApi) {\n this.columnApi = this.gridOptions.columnApi;\n }\n this._initialised = true;\n // sometimes, especially in large client apps gridReady can fire before ngAfterViewInit\n // this ties these together so that gridReady will always fire after agGridAngular's ngAfterViewInit\n // the actual containing component's ngAfterViewInit will fire just after agGridAngular's\n this._fullyReady.resolveNow(null, resolve => resolve);\n }\n ngOnChanges(changes) {\n if (this._initialised) {\n ComponentUtil.processOnChange(changes, this.gridOptions, this.api, this.columnApi);\n }\n }\n ngOnDestroy() {\n if (this._initialised) {\n // need to do this before the destroy, so we know not to emit any events\n // while tearing down the grid.\n this._destroyed = true;\n if (this.api) {\n this.api.destroy();\n }\n }\n }\n // we'll emit the emit if a user is listening for a given event either on the component via normal angular binding\n // or via gridOptions\n isEmitterUsed(eventType) {\n const emitter = this[eventType];\n const hasEmitter = !!emitter && emitter.observers && emitter.observers.length > 0;\n // gridReady => onGridReady\n const asEventName = `on${eventType.charAt(0).toUpperCase()}${eventType.substring(1)}`;\n const hasGridOptionListener = !!this.gridOptions && !!this.gridOptions[asEventName];\n return hasEmitter || hasGridOptionListener;\n }\n globalEventListener(eventType, event) {\n // if we are tearing down, don't emit angular events, as this causes\n // problems with the angular router\n if (this._destroyed) {\n return;\n }\n // generically look up the eventType\n const emitter = this[eventType];\n if (emitter && this.isEmitterUsed(eventType)) {\n if (eventType === 'gridReady') {\n // if the user is listening for gridReady, wait for ngAfterViewInit to fire first, then emit the\n // gridReady event\n this._fullyReady.then((result => {\n emitter.emit(event);\n }));\n }\n else {\n emitter.emit(event);\n }\n }\n }\n};\nAgGridAngular.ɵfac = function AgGridAngular_Factory(t) { return new (t || AgGridAngular)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(AngularFrameworkOverrides), ɵngcc0.ɵɵdirectiveInject(AngularFrameworkComponentWrapper), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ComponentFactoryResolver)); };\nAgGridAngular.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: AgGridAngular, selectors: [[\"ag-grid-angular\"]], contentQueries: function AgGridAngular_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n ɵngcc0.ɵɵcontentQuery(dirIndex, AgGridColumn, 4);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.columns = _t);\n } }, inputs: { statusBar: \"statusBar\", sideBar: \"sideBar\", suppressContextMenu: \"suppressContextMenu\", preventDefaultOnContextMenu: \"preventDefaultOnContextMenu\", allowContextMenuWithControlKey: \"allowContextMenuWithControlKey\", suppressMenuHide: \"suppressMenuHide\", enableBrowserTooltips: \"enableBrowserTooltips\", tooltipShowDelay: \"tooltipShowDelay\", tooltipHideDelay: \"tooltipHideDelay\", tooltipMouseTrack: \"tooltipMouseTrack\", popupParent: \"popupParent\", copyHeadersToClipboard: \"copyHeadersToClipboard\", copyGroupHeadersToClipboard: \"copyGroupHeadersToClipboard\", clipboardDelimiter: \"clipboardDelimiter\", suppressCopyRowsToClipboard: \"suppressCopyRowsToClipboard\", suppressCopySingleCellRanges: \"suppressCopySingleCellRanges\", suppressLastEmptyLineOnPaste: \"suppressLastEmptyLineOnPaste\", suppressClipboardPaste: \"suppressClipboardPaste\", suppressClipboardApi: \"suppressClipboardApi\", columnDefs: \"columnDefs\", defaultColDef: \"defaultColDef\", defaultColGroupDef: \"defaultColGroupDef\", columnTypes: \"columnTypes\", maintainColumnOrder: \"maintainColumnOrder\", suppressFieldDotNotation: \"suppressFieldDotNotation\", deltaColumnMode: \"deltaColumnMode\", applyColumnDefOrder: \"applyColumnDefOrder\", immutableColumns: \"immutableColumns\", suppressSetColumnStateEvents: \"suppressSetColumnStateEvents\", suppressColumnStateEvents: \"suppressColumnStateEvents\", colWidth: \"colWidth\", minColWidth: \"minColWidth\", maxColWidth: \"maxColWidth\", headerHeight: \"headerHeight\", groupHeaderHeight: \"groupHeaderHeight\", floatingFiltersHeight: \"floatingFiltersHeight\", pivotHeaderHeight: \"pivotHeaderHeight\", pivotGroupHeaderHeight: \"pivotGroupHeaderHeight\", allowDragFromColumnsToolPanel: \"allowDragFromColumnsToolPanel\", suppressMovableColumns: \"suppressMovableColumns\", suppressColumnMoveAnimation: \"suppressColumnMoveAnimation\", suppressDragLeaveHidesColumns: \"suppressDragLeaveHidesColumns\", colResizeDefault: \"colResizeDefault\", suppressAutoSize: \"suppressAutoSize\", autoSizePadding: \"autoSizePadding\", skipHeaderOnAutoSize: \"skipHeaderOnAutoSize\", components: \"components\", frameworkComponents: \"frameworkComponents\", editType: \"editType\", singleClickEdit: \"singleClickEdit\", suppressClickEdit: \"suppressClickEdit\", readOnlyEdit: \"readOnlyEdit\", stopEditingWhenCellsLoseFocus: \"stopEditingWhenCellsLoseFocus\", enterMovesDown: \"enterMovesDown\", enterMovesDownAfterEdit: \"enterMovesDownAfterEdit\", undoRedoCellEditing: \"undoRedoCellEditing\", undoRedoCellEditingLimit: \"undoRedoCellEditingLimit\", stopEditingWhenGridLosesFocus: \"stopEditingWhenGridLosesFocus\", defaultCsvExportParams: \"defaultCsvExportParams\", suppressCsvExport: \"suppressCsvExport\", defaultExcelExportParams: \"defaultExcelExportParams\", suppressExcelExport: \"suppressExcelExport\", excelStyles: \"excelStyles\", defaultExportParams: \"defaultExportParams\", quickFilterText: \"quickFilterText\", cacheQuickFilter: \"cacheQuickFilter\", excludeChildrenWhenTreeDataFiltering: \"excludeChildrenWhenTreeDataFiltering\", enableCharts: \"enableCharts\", chartThemes: \"chartThemes\", customChartThemes: \"customChartThemes\", chartThemeOverrides: \"chartThemeOverrides\", loadingCellRenderer: \"loadingCellRenderer\", loadingCellRendererFramework: \"loadingCellRendererFramework\", loadingCellRendererParams: \"loadingCellRendererParams\", loadingCellRendererSelector: \"loadingCellRendererSelector\", localeText: \"localeText\", masterDetail: \"masterDetail\", keepDetailRows: \"keepDetailRows\", keepDetailRowsCount: \"keepDetailRowsCount\", detailCellRenderer: \"detailCellRenderer\", detailCellRendererFramework: \"detailCellRendererFramework\", detailCellRendererParams: \"detailCellRendererParams\", detailRowHeight: \"detailRowHeight\", detailRowAutoHeight: \"detailRowAutoHeight\", context: \"context\", alignedGrids: \"alignedGrids\", tabIndex: \"tabIndex\", rowBuffer: \"rowBuffer\", valueCache: \"valueCache\", valueCacheNeverExpires: \"valueCacheNeverExpires\", enableCellExpressions: \"enableCellExpressions\", suppressParentsInRowNodes: \"suppressParentsInRowNodes\", suppressTouch: \"suppressTouch\", suppressFocusAfterRefresh: \"suppressFocusAfterRefresh\", suppressAsyncEvents: \"suppressAsyncEvents\", suppressBrowserResizeObserver: \"suppressBrowserResizeObserver\", suppressPropertyNamesCheck: \"suppressPropertyNamesCheck\", suppressChangeDetection: \"suppressChangeDetection\", debug: \"debug\", overlayLoadingTemplate: \"overlayLoadingTemplate\", loadingOverlayComponent: \"loadingOverlayComponent\", loadingOverlayComponentFramework: \"loadingOverlayComponentFramework\", loadingOverlayComponentParams: \"loadingOverlayComponentParams\", suppressLoadingOverlay: \"suppressLoadingOverlay\", overlayNoRowsTemplate: \"overlayNoRowsTemplate\", noRowsOverlayComponent: \"noRowsOverlayComponent\", noRowsOverlayComponentFramework: \"noRowsOverlayComponentFramework\", noRowsOverlayComponentParams: \"noRowsOverlayComponentParams\", suppressNoRowsOverlay: \"suppressNoRowsOverlay\", pagination: \"pagination\", paginationPageSize: \"paginationPageSize\", paginationAutoPageSize: \"paginationAutoPageSize\", paginateChildRows: \"paginateChildRows\", suppressPaginationPanel: \"suppressPaginationPanel\", pivotMode: \"pivotMode\", pivotPanelShow: \"pivotPanelShow\", pivotColumnGroupTotals: \"pivotColumnGroupTotals\", pivotRowTotals: \"pivotRowTotals\", pivotSuppressAutoColumn: \"pivotSuppressAutoColumn\", suppressExpandablePivotGroups: \"suppressExpandablePivotGroups\", functionsReadOnly: \"functionsReadOnly\", aggFuncs: \"aggFuncs\", suppressAggFuncInHeader: \"suppressAggFuncInHeader\", suppressAggAtRootLevel: \"suppressAggAtRootLevel\", aggregateOnlyChangedColumns: \"aggregateOnlyChangedColumns\", suppressAggFilteredOnly: \"suppressAggFilteredOnly\", removePivotHeaderRowWhenSingleValueColumn: \"removePivotHeaderRowWhenSingleValueColumn\", animateRows: \"animateRows\", enableCellChangeFlash: \"enableCellChangeFlash\", cellFlashDelay: \"cellFlashDelay\", cellFadeDelay: \"cellFadeDelay\", domLayout: \"domLayout\", ensureDomOrder: \"ensureDomOrder\", enableRtl: \"enableRtl\", suppressColumnVirtualisation: \"suppressColumnVirtualisation\", suppressMaxRenderedRowRestriction: \"suppressMaxRenderedRowRestriction\", suppressRowVirtualisation: \"suppressRowVirtualisation\", rowDragManaged: \"rowDragManaged\", suppressRowDrag: \"suppressRowDrag\", suppressMoveWhenRowDragging: \"suppressMoveWhenRowDragging\", rowDragEntireRow: \"rowDragEntireRow\", rowDragMultiRow: \"rowDragMultiRow\", fullWidthCellRenderer: \"fullWidthCellRenderer\", fullWidthCellRendererFramework: \"fullWidthCellRendererFramework\", fullWidthCellRendererParams: \"fullWidthCellRendererParams\", embedFullWidthRows: \"embedFullWidthRows\", deprecatedEmbedFullWidthRows: \"deprecatedEmbedFullWidthRows\", groupDisplayType: \"groupDisplayType\", groupDefaultExpanded: \"groupDefaultExpanded\", autoGroupColumnDef: \"autoGroupColumnDef\", groupMaintainOrder: \"groupMaintainOrder\", groupSelectsChildren: \"groupSelectsChildren\", groupAggFiltering: \"groupAggFiltering\", groupIncludeFooter: \"groupIncludeFooter\", groupIncludeTotalFooter: \"groupIncludeTotalFooter\", groupSuppressBlankHeader: \"groupSuppressBlankHeader\", groupSelectsFiltered: \"groupSelectsFiltered\", showOpenedGroup: \"showOpenedGroup\", groupRemoveSingleChildren: \"groupRemoveSingleChildren\", groupRemoveLowestSingleChildren: \"groupRemoveLowestSingleChildren\", groupHideOpenParents: \"groupHideOpenParents\", rowGroupPanelShow: \"rowGroupPanelShow\", groupRowRenderer: \"groupRowRenderer\", groupRowRendererFramework: \"groupRowRendererFramework\", groupRowRendererParams: \"groupRowRendererParams\", suppressMakeColumnVisibleAfterUnGroup: \"suppressMakeColumnVisibleAfterUnGroup\", treeData: \"treeData\", groupRowInnerRenderer: \"groupRowInnerRenderer\", groupRowInnerRendererFramework: \"groupRowInnerRendererFramework\", groupMultiAutoColumn: \"groupMultiAutoColumn\", groupUseEntireRow: \"groupUseEntireRow\", groupSuppressAutoColumn: \"groupSuppressAutoColumn\", rememberGroupStateWhenNewData: \"rememberGroupStateWhenNewData\", pinnedTopRowData: \"pinnedTopRowData\", pinnedBottomRowData: \"pinnedBottomRowData\", rowModelType: \"rowModelType\", rowData: \"rowData\", immutableData: \"immutableData\", asyncTransactionWaitMillis: \"asyncTransactionWaitMillis\", suppressModelUpdateAfterUpdateTransaction: \"suppressModelUpdateAfterUpdateTransaction\", deltaRowDataMode: \"deltaRowDataMode\", batchUpdateWaitMillis: \"batchUpdateWaitMillis\", datasource: \"datasource\", cacheOverflowSize: \"cacheOverflowSize\", infiniteInitialRowCount: \"infiniteInitialRowCount\", serverSideStoreType: \"serverSideStoreType\", cacheBlockSize: \"cacheBlockSize\", maxBlocksInCache: \"maxBlocksInCache\", maxConcurrentDatasourceRequests: \"maxConcurrentDatasourceRequests\", blockLoadDebounceMillis: \"blockLoadDebounceMillis\", purgeClosedRowNodes: \"purgeClosedRowNodes\", serverSideDatasource: \"serverSideDatasource\", serverSideSortingAlwaysResets: \"serverSideSortingAlwaysResets\", serverSideFilteringAlwaysResets: \"serverSideFilteringAlwaysResets\", suppressEnterpriseResetOnNewColumns: \"suppressEnterpriseResetOnNewColumns\", viewportDatasource: \"viewportDatasource\", viewportRowModelPageSize: \"viewportRowModelPageSize\", viewportRowModelBufferSize: \"viewportRowModelBufferSize\", alwaysShowHorizontalScroll: \"alwaysShowHorizontalScroll\", alwaysShowVerticalScroll: \"alwaysShowVerticalScroll\", debounceVerticalScrollbar: \"debounceVerticalScrollbar\", suppressHorizontalScroll: \"suppressHorizontalScroll\", suppressScrollOnNewData: \"suppressScrollOnNewData\", suppressScrollWhenPopupsAreOpen: \"suppressScrollWhenPopupsAreOpen\", suppressAnimationFrame: \"suppressAnimationFrame\", suppressMiddleClickScrolls: \"suppressMiddleClickScrolls\", suppressPreventDefaultOnMouseWheel: \"suppressPreventDefaultOnMouseWheel\", scrollbarWidth: \"scrollbarWidth\", rowSelection: \"rowSelection\", rowMultiSelectWithClick: \"rowMultiSelectWithClick\", suppressRowDeselection: \"suppressRowDeselection\", suppressRowClickSelection: \"suppressRowClickSelection\", suppressCellSelection: \"suppressCellSelection\", suppressCellFocus: \"suppressCellFocus\", suppressMultiRangeSelection: \"suppressMultiRangeSelection\", enableCellTextSelection: \"enableCellTextSelection\", enableRangeSelection: \"enableRangeSelection\", enableRangeHandle: \"enableRangeHandle\", enableFillHandle: \"enableFillHandle\", fillHandleDirection: \"fillHandleDirection\", suppressClearOnFillReduction: \"suppressClearOnFillReduction\", sortingOrder: \"sortingOrder\", accentedSort: \"accentedSort\", unSortIcon: \"unSortIcon\", suppressMultiSort: \"suppressMultiSort\", alwaysMultiSort: \"alwaysMultiSort\", multiSortKey: \"multiSortKey\", suppressMaintainUnsortedOrder: \"suppressMaintainUnsortedOrder\", icons: \"icons\", rowHeight: \"rowHeight\", rowStyle: \"rowStyle\", rowClass: \"rowClass\", rowClassRules: \"rowClassRules\", suppressRowHoverHighlight: \"suppressRowHoverHighlight\", suppressRowTransform: \"suppressRowTransform\", columnHoverHighlight: \"columnHoverHighlight\", deltaSort: \"deltaSort\", treeDataDisplayType: \"treeDataDisplayType\", angularCompileRows: \"angularCompileRows\", angularCompileFilters: \"angularCompileFilters\", functionsPassive: \"functionsPassive\", enableGroupEdit: \"enableGroupEdit\", getContextMenuItems: \"getContextMenuItems\", getMainMenuItems: \"getMainMenuItems\", postProcessPopup: \"postProcessPopup\", processCellForClipboard: \"processCellForClipboard\", processHeaderForClipboard: \"processHeaderForClipboard\", processGroupHeaderForClipboard: \"processGroupHeaderForClipboard\", processCellFromClipboard: \"processCellFromClipboard\", sendToClipboard: \"sendToClipboard\", processDataFromClipboard: \"processDataFromClipboard\", isExternalFilterPresent: \"isExternalFilterPresent\", doesExternalFilterPass: \"doesExternalFilterPass\", getChartToolbarItems: \"getChartToolbarItems\", createChartContainer: \"createChartContainer\", navigateToNextHeader: \"navigateToNextHeader\", tabToNextHeader: \"tabToNextHeader\", navigateToNextCell: \"navigateToNextCell\", tabToNextCell: \"tabToNextCell\", suppressKeyboardEvent: \"suppressKeyboardEvent\", localeTextFunc: \"localeTextFunc\", getLocaleText: \"getLocaleText\", getDocument: \"getDocument\", paginationNumberFormatter: \"paginationNumberFormatter\", groupRowAggNodes: \"groupRowAggNodes\", getGroupRowAgg: \"getGroupRowAgg\", isGroupOpenByDefault: \"isGroupOpenByDefault\", initialGroupOrderComparator: \"initialGroupOrderComparator\", defaultGroupOrderComparator: \"defaultGroupOrderComparator\", processSecondaryColDef: \"processSecondaryColDef\", processSecondaryColGroupDef: \"processSecondaryColGroupDef\", getDataPath: \"getDataPath\", defaultGroupSortComparator: \"defaultGroupSortComparator\", getChildCount: \"getChildCount\", getServerSideStoreParams: \"getServerSideStoreParams\", isServerSideGroupOpenByDefault: \"isServerSideGroupOpenByDefault\", isApplyServerSideTransaction: \"isApplyServerSideTransaction\", isServerSideGroup: \"isServerSideGroup\", getServerSideGroupKey: \"getServerSideGroupKey\", getBusinessKeyForNode: \"getBusinessKeyForNode\", getRowNodeId: \"getRowNodeId\", getRowId: \"getRowId\", resetRowDataOnUpdate: \"resetRowDataOnUpdate\", processRowPostCreate: \"processRowPostCreate\", isRowSelectable: \"isRowSelectable\", isRowMaster: \"isRowMaster\", fillOperation: \"fillOperation\", postSort: \"postSort\", postSortRows: \"postSortRows\", getRowStyle: \"getRowStyle\", getRowClass: \"getRowClass\", getRowHeight: \"getRowHeight\", isFullWidthCell: \"isFullWidthCell\", isFullWidthRow: \"isFullWidthRow\", gridOptions: \"gridOptions\", modules: \"modules\" }, outputs: { toolPanelVisibleChanged: \"toolPanelVisibleChanged\", pasteStart: \"pasteStart\", pasteEnd: \"pasteEnd\", columnVisible: \"columnVisible\", columnPinned: \"columnPinned\", columnResized: \"columnResized\", columnMoved: \"columnMoved\", columnValueChanged: \"columnValueChanged\", columnPivotModeChanged: \"columnPivotModeChanged\", columnPivotChanged: \"columnPivotChanged\", columnGroupOpened: \"columnGroupOpened\", newColumnsLoaded: \"newColumnsLoaded\", gridColumnsChanged: \"gridColumnsChanged\", displayedColumnsChanged: \"displayedColumnsChanged\", virtualColumnsChanged: \"virtualColumnsChanged\", columnEverythingChanged: \"columnEverythingChanged\", componentStateChanged: \"componentStateChanged\", cellValueChanged: \"cellValueChanged\", cellEditRequest: \"cellEditRequest\", rowValueChanged: \"rowValueChanged\", cellEditingStarted: \"cellEditingStarted\", cellEditingStopped: \"cellEditingStopped\", rowEditingStarted: \"rowEditingStarted\", rowEditingStopped: \"rowEditingStopped\", filterOpened: \"filterOpened\", filterChanged: \"filterChanged\", filterModified: \"filterModified\", chartCreated: \"chartCreated\", chartRangeSelectionChanged: \"chartRangeSelectionChanged\", chartOptionsChanged: \"chartOptionsChanged\", chartDestroyed: \"chartDestroyed\", cellKeyDown: \"cellKeyDown\", cellKeyPress: \"cellKeyPress\", gridReady: \"gridReady\", firstDataRendered: \"firstDataRendered\", gridSizeChanged: \"gridSizeChanged\", modelUpdated: \"modelUpdated\", virtualRowRemoved: \"virtualRowRemoved\", viewportChanged: \"viewportChanged\", bodyScroll: \"bodyScroll\", bodyScrollEnd: \"bodyScrollEnd\", dragStarted: \"dragStarted\", dragStopped: \"dragStopped\", paginationChanged: \"paginationChanged\", rowDragEnter: \"rowDragEnter\", rowDragMove: \"rowDragMove\", rowDragLeave: \"rowDragLeave\", rowDragEnd: \"rowDragEnd\", columnRowGroupChanged: \"columnRowGroupChanged\", rowGroupOpened: \"rowGroupOpened\", expandOrCollapseAll: \"expandOrCollapseAll\", pinnedRowDataChanged: \"pinnedRowDataChanged\", rowDataChanged: \"rowDataChanged\", rowDataUpdated: \"rowDataUpdated\", asyncTransactionsFlushed: \"asyncTransactionsFlushed\", cellClicked: \"cellClicked\", cellDoubleClicked: \"cellDoubleClicked\", cellFocused: \"cellFocused\", cellMouseOver: \"cellMouseOver\", cellMouseOut: \"cellMouseOut\", cellMouseDown: \"cellMouseDown\", rowClicked: \"rowClicked\", rowDoubleClicked: \"rowDoubleClicked\", rowSelected: \"rowSelected\", selectionChanged: \"selectionChanged\", cellContextMenu: \"cellContextMenu\", rangeSelectionChanged: \"rangeSelectionChanged\", sortChanged: \"sortChanged\", columnRowGroupChangeRequest: \"columnRowGroupChangeRequest\", columnPivotChangeRequest: \"columnPivotChangeRequest\", columnValueChangeRequest: \"columnValueChangeRequest\", columnAggFuncChangeRequest: \"columnAggFuncChangeRequest\" }, features: [ɵngcc0.ɵɵProvidersFeature([\n AngularFrameworkOverrides,\n AngularFrameworkComponentWrapper\n ]), ɵngcc0.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function AgGridAngular_Template(rf, ctx) { }, encapsulation: 2 });\nAgGridAngular.ctorParameters = () => [\n { type: ElementRef },\n { type: ViewContainerRef },\n { type: AngularFrameworkOverrides },\n { type: AngularFrameworkComponentWrapper },\n { type: ComponentFactoryResolver }\n];\n__decorate([\n ContentChildren(AgGridColumn),\n __metadata(\"design:type\", QueryList)\n], AgGridAngular.prototype, \"columns\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"gridOptions\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridAngular.prototype, \"modules\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"statusBar\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"sideBar\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressContextMenu\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"preventDefaultOnContextMenu\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"allowContextMenuWithControlKey\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressMenuHide\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enableBrowserTooltips\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"tooltipShowDelay\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"tooltipHideDelay\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"tooltipMouseTrack\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", HTMLElement)\n], AgGridAngular.prototype, \"popupParent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"copyHeadersToClipboard\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"copyGroupHeadersToClipboard\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"clipboardDelimiter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressCopyRowsToClipboard\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressCopySingleCellRanges\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressLastEmptyLineOnPaste\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressClipboardPaste\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressClipboardApi\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridAngular.prototype, \"columnDefs\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"defaultColDef\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"defaultColGroupDef\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"columnTypes\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"maintainColumnOrder\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressFieldDotNotation\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"deltaColumnMode\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"applyColumnDefOrder\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"immutableColumns\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressSetColumnStateEvents\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressColumnStateEvents\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"colWidth\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"minColWidth\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"maxColWidth\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"headerHeight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"groupHeaderHeight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"floatingFiltersHeight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"pivotHeaderHeight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"pivotGroupHeaderHeight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"allowDragFromColumnsToolPanel\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressMovableColumns\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressColumnMoveAnimation\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressDragLeaveHidesColumns\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"colResizeDefault\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressAutoSize\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"autoSizePadding\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"skipHeaderOnAutoSize\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"components\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"frameworkComponents\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"editType\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"singleClickEdit\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressClickEdit\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"readOnlyEdit\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"stopEditingWhenCellsLoseFocus\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enterMovesDown\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enterMovesDownAfterEdit\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"undoRedoCellEditing\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"undoRedoCellEditingLimit\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"stopEditingWhenGridLosesFocus\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"defaultCsvExportParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressCsvExport\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"defaultExcelExportParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressExcelExport\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridAngular.prototype, \"excelStyles\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"defaultExportParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"quickFilterText\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"cacheQuickFilter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"excludeChildrenWhenTreeDataFiltering\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enableCharts\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridAngular.prototype, \"chartThemes\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"customChartThemes\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"chartThemeOverrides\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"loadingCellRenderer\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"loadingCellRendererFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"loadingCellRendererParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"loadingCellRendererSelector\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"localeText\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"masterDetail\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"keepDetailRows\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"keepDetailRowsCount\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"detailCellRenderer\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"detailCellRendererFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"detailCellRendererParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"detailRowHeight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"detailRowAutoHeight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"context\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridAngular.prototype, \"alignedGrids\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"tabIndex\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"rowBuffer\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"valueCache\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"valueCacheNeverExpires\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enableCellExpressions\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressParentsInRowNodes\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressTouch\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressFocusAfterRefresh\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressAsyncEvents\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressBrowserResizeObserver\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressPropertyNamesCheck\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressChangeDetection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"debug\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"overlayLoadingTemplate\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"loadingOverlayComponent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"loadingOverlayComponentFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"loadingOverlayComponentParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressLoadingOverlay\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"overlayNoRowsTemplate\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"noRowsOverlayComponent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"noRowsOverlayComponentFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"noRowsOverlayComponentParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressNoRowsOverlay\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"pagination\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"paginationPageSize\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"paginationAutoPageSize\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"paginateChildRows\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressPaginationPanel\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"pivotMode\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"pivotPanelShow\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"pivotColumnGroupTotals\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"pivotRowTotals\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"pivotSuppressAutoColumn\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressExpandablePivotGroups\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"functionsReadOnly\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"aggFuncs\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressAggFuncInHeader\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressAggAtRootLevel\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"aggregateOnlyChangedColumns\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressAggFilteredOnly\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"removePivotHeaderRowWhenSingleValueColumn\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"animateRows\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enableCellChangeFlash\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"cellFlashDelay\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"cellFadeDelay\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"domLayout\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"ensureDomOrder\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enableRtl\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressColumnVirtualisation\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressMaxRenderedRowRestriction\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressRowVirtualisation\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"rowDragManaged\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressRowDrag\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressMoveWhenRowDragging\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"rowDragEntireRow\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"rowDragMultiRow\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"fullWidthCellRenderer\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"fullWidthCellRendererFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"fullWidthCellRendererParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"embedFullWidthRows\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"deprecatedEmbedFullWidthRows\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"groupDisplayType\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"groupDefaultExpanded\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"autoGroupColumnDef\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupMaintainOrder\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupSelectsChildren\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"groupAggFiltering\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupIncludeFooter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupIncludeTotalFooter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupSuppressBlankHeader\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupSelectsFiltered\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"showOpenedGroup\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupRemoveSingleChildren\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupRemoveLowestSingleChildren\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupHideOpenParents\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"rowGroupPanelShow\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"groupRowRenderer\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"groupRowRendererFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"groupRowRendererParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressMakeColumnVisibleAfterUnGroup\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"treeData\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"groupRowInnerRenderer\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"groupRowInnerRendererFramework\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupMultiAutoColumn\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupUseEntireRow\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"groupSuppressAutoColumn\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"rememberGroupStateWhenNewData\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridAngular.prototype, \"pinnedTopRowData\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridAngular.prototype, \"pinnedBottomRowData\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"rowModelType\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridAngular.prototype, \"rowData\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"immutableData\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"asyncTransactionWaitMillis\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressModelUpdateAfterUpdateTransaction\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"deltaRowDataMode\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"batchUpdateWaitMillis\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"datasource\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"cacheOverflowSize\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"infiniteInitialRowCount\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"serverSideStoreType\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"cacheBlockSize\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"maxBlocksInCache\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"maxConcurrentDatasourceRequests\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"blockLoadDebounceMillis\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"purgeClosedRowNodes\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"serverSideDatasource\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"serverSideSortingAlwaysResets\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"serverSideFilteringAlwaysResets\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressEnterpriseResetOnNewColumns\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"viewportDatasource\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"viewportRowModelPageSize\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"viewportRowModelBufferSize\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"alwaysShowHorizontalScroll\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"alwaysShowVerticalScroll\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"debounceVerticalScrollbar\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressHorizontalScroll\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressScrollOnNewData\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressScrollWhenPopupsAreOpen\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressAnimationFrame\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressMiddleClickScrolls\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressPreventDefaultOnMouseWheel\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"scrollbarWidth\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"rowSelection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"rowMultiSelectWithClick\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressRowDeselection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressRowClickSelection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressCellSelection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressCellFocus\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressMultiRangeSelection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enableCellTextSelection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enableRangeSelection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enableRangeHandle\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enableFillHandle\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"fillHandleDirection\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressClearOnFillReduction\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Array)\n], AgGridAngular.prototype, \"sortingOrder\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"accentedSort\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"unSortIcon\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressMultiSort\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"alwaysMultiSort\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"multiSortKey\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressMaintainUnsortedOrder\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"icons\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], AgGridAngular.prototype, \"rowHeight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"rowStyle\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"rowClass\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], AgGridAngular.prototype, \"rowClassRules\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressRowHoverHighlight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"suppressRowTransform\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"columnHoverHighlight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"deltaSort\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], AgGridAngular.prototype, \"treeDataDisplayType\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"angularCompileRows\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"angularCompileFilters\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"functionsPassive\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"enableGroupEdit\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getContextMenuItems\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getMainMenuItems\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"postProcessPopup\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"processCellForClipboard\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"processHeaderForClipboard\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"processGroupHeaderForClipboard\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"processCellFromClipboard\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"sendToClipboard\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"processDataFromClipboard\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"isExternalFilterPresent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"doesExternalFilterPass\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getChartToolbarItems\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"createChartContainer\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"navigateToNextHeader\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"tabToNextHeader\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"navigateToNextCell\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"tabToNextCell\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"suppressKeyboardEvent\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"localeTextFunc\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getLocaleText\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getDocument\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"paginationNumberFormatter\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"groupRowAggNodes\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getGroupRowAgg\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"isGroupOpenByDefault\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"initialGroupOrderComparator\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"defaultGroupOrderComparator\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"processSecondaryColDef\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"processSecondaryColGroupDef\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getDataPath\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"defaultGroupSortComparator\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getChildCount\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getServerSideStoreParams\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"isServerSideGroupOpenByDefault\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"isApplyServerSideTransaction\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"isServerSideGroup\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getServerSideGroupKey\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getBusinessKeyForNode\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getRowNodeId\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getRowId\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n], AgGridAngular.prototype, \"resetRowDataOnUpdate\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"processRowPostCreate\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"isRowSelectable\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"isRowMaster\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"fillOperation\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"postSort\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"postSortRows\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getRowStyle\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getRowClass\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"getRowHeight\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"isFullWidthCell\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Function)\n], AgGridAngular.prototype, \"isFullWidthRow\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"toolPanelVisibleChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"pasteStart\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"pasteEnd\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnVisible\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnPinned\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnResized\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnMoved\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnValueChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnPivotModeChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnPivotChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnGroupOpened\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"newColumnsLoaded\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"gridColumnsChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"displayedColumnsChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"virtualColumnsChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnEverythingChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"componentStateChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellValueChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellEditRequest\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowValueChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellEditingStarted\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellEditingStopped\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowEditingStarted\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowEditingStopped\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"filterOpened\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"filterChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"filterModified\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"chartCreated\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"chartRangeSelectionChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"chartOptionsChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"chartDestroyed\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellKeyDown\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellKeyPress\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"gridReady\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"firstDataRendered\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"gridSizeChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"modelUpdated\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"virtualRowRemoved\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"viewportChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"bodyScroll\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"bodyScrollEnd\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"dragStarted\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"dragStopped\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"paginationChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowDragEnter\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowDragMove\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowDragLeave\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowDragEnd\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnRowGroupChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowGroupOpened\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"expandOrCollapseAll\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"pinnedRowDataChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowDataChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowDataUpdated\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"asyncTransactionsFlushed\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellClicked\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellDoubleClicked\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellFocused\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellMouseOver\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellMouseOut\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellMouseDown\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowClicked\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowDoubleClicked\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rowSelected\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"selectionChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"cellContextMenu\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"rangeSelectionChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"sortChanged\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnRowGroupChangeRequest\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnPivotChangeRequest\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnValueChangeRequest\", void 0);\n__decorate([\n Output(),\n __metadata(\"design:type\", EventEmitter)\n], AgGridAngular.prototype, \"columnAggFuncChangeRequest\", void 0);\nAgGridAngular = __decorate([ __metadata(\"design:paramtypes\", [ElementRef,\n ViewContainerRef,\n AngularFrameworkOverrides,\n AngularFrameworkComponentWrapper,\n ComponentFactoryResolver])\n], AgGridAngular);\n\nvar AgGridModule_1;\nlet AgGridModule = AgGridModule_1 = class AgGridModule {\n /**\n * If you are using Angular v9+, with Ivy enabled, you **do not** need to pass your components to the `AgGridModules` via this method.\n * They will automatically be resolved by Angular.\n */\n static withComponents(components) {\n return {\n ngModule: AgGridModule_1,\n providers: [\n { provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: components, multi: true }\n ],\n };\n }\n /**\n * If you are using Angular v9+, with Ivy enabled, you **do not** need to pass your components to the `AgGridModules` via this method.\n * They will automatically be resolved by Angular.\n */\n static forRoot(components) {\n return {\n ngModule: AgGridModule_1,\n providers: [\n { provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: components, multi: true }\n ],\n };\n }\n};\nAgGridModule.ɵfac = function AgGridModule_Factory(t) { return new (t || AgGridModule)(); };\nAgGridModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: AgGridModule });\nAgGridModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AgGridColumn, [{\n type: Component,\n args: [{\n selector: 'ag-grid-column',\n template: ''\n }]\n }], null, { childColumns: [{\n type: ContentChildren,\n args: [AgGridColumn_1]\n }], filterFramework: [{\n type: Input\n }], filterParams: [{\n type: Input\n }], floatingFilterComponent: [{\n type: Input\n }], floatingFilterComponentParams: [{\n type: Input\n }], floatingFilterComponentFramework: [{\n type: Input\n }], floatingFilterFramework: [{\n type: Input\n }], filter: [{\n type: Input\n }], headerName: [{\n type: Input\n }], headerValueGetter: [{\n type: Input\n }], headerTooltip: [{\n type: Input\n }], headerClass: [{\n type: Input\n }], suppressHeaderKeyboardEvent: [{\n type: Input\n }], columnGroupShow: [{\n type: Input\n }], toolPanelClass: [{\n type: Input\n }], suppressColumnsToolPanel: [{\n type: Input\n }], suppressFiltersToolPanel: [{\n type: Input\n }], tooltipComponent: [{\n type: Input\n }], tooltipComponentFramework: [{\n type: Input\n }], tooltipComponentParams: [{\n type: Input\n }], children: [{\n type: Input\n }], groupId: [{\n type: Input\n }], openByDefault: [{\n type: Input\n }], marryChildren: [{\n type: Input\n }], headerGroupComponent: [{\n type: Input\n }], headerGroupComponentFramework: [{\n type: Input\n }], headerGroupComponentParams: [{\n type: Input\n }], colId: [{\n type: Input\n }], field: [{\n type: Input\n }], type: [{\n type: Input\n }], valueGetter: [{\n type: Input\n }], valueFormatter: [{\n type: Input\n }], refData: [{\n type: Input\n }], keyCreator: [{\n type: Input\n }], equals: [{\n type: Input\n }], tooltipField: [{\n type: Input\n }], tooltipValueGetter: [{\n type: Input\n }], checkboxSelection: [{\n type: Input\n }], icons: [{\n type: Input\n }], suppressNavigable: [{\n type: Input\n }], suppressKeyboardEvent: [{\n type: Input\n }], suppressPaste: [{\n type: Input\n }], suppressFillHandle: [{\n type: Input\n }], hide: [{\n type: Input\n }], initialHide: [{\n type: Input\n }], lockVisible: [{\n type: Input\n }], lockPosition: [{\n type: Input\n }], suppressMovable: [{\n type: Input\n }], editable: [{\n type: Input\n }], valueSetter: [{\n type: Input\n }], valueParser: [{\n type: Input\n }], cellEditor: [{\n type: Input\n }], cellEditorFramework: [{\n type: Input\n }], cellEditorParams: [{\n type: Input\n }], cellEditorSelector: [{\n type: Input\n }], singleClickEdit: [{\n type: Input\n }], newValueHandler: [{\n type: Input\n }], cellEditorPopup: [{\n type: Input\n }], cellEditorPopupPosition: [{\n type: Input\n }], onCellValueChanged: [{\n type: Input\n }], onCellClicked: [{\n type: Input\n }], onCellDoubleClicked: [{\n type: Input\n }], onCellContextMenu: [{\n type: Input\n }], getQuickFilterText: [{\n type: Input\n }], filterValueGetter: [{\n type: Input\n }], floatingFilter: [{\n type: Input\n }], headerComponent: [{\n type: Input\n }], headerComponentFramework: [{\n type: Input\n }], headerComponentParams: [{\n type: Input\n }], menuTabs: [{\n type: Input\n }], columnsMenuParams: [{\n type: Input\n }], suppressMenu: [{\n type: Input\n }], headerCheckboxSelection: [{\n type: Input\n }], headerCheckboxSelectionFilteredOnly: [{\n type: Input\n }], chartDataType: [{\n type: Input\n }], pinned: [{\n type: Input\n }], initialPinned: [{\n type: Input\n }], lockPinned: [{\n type: Input\n }], pinnedRowCellRenderer: [{\n type: Input\n }], pinnedRowCellRendererFramework: [{\n type: Input\n }], pinnedRowCellRendererParams: [{\n type: Input\n }], pinnedRowValueFormatter: [{\n type: Input\n }], pivot: [{\n type: Input\n }], initialPivot: [{\n type: Input\n }], pivotIndex: [{\n type: Input\n }], initialPivotIndex: [{\n type: Input\n }], pivotComparator: [{\n type: Input\n }], enablePivot: [{\n type: Input\n }], cellStyle: [{\n type: Input\n }], cellClass: [{\n type: Input\n }], cellClassRules: [{\n type: Input\n }], cellRenderer: [{\n type: Input\n }], cellRendererFramework: [{\n type: Input\n }], cellRendererParams: [{\n type: Input\n }], cellRendererSelector: [{\n type: Input\n }], autoHeight: [{\n type: Input\n }], wrapText: [{\n type: Input\n }], enableCellChangeFlash: [{\n type: Input\n }], suppressCellFlash: [{\n type: Input\n }], rowDrag: [{\n type: Input\n }], rowDragText: [{\n type: Input\n }], dndSource: [{\n type: Input\n }], dndSourceOnRowDrag: [{\n type: Input\n }], rowGroup: [{\n type: Input\n }], initialRowGroup: [{\n type: Input\n }], rowGroupIndex: [{\n type: Input\n }], initialRowGroupIndex: [{\n type: Input\n }], enableRowGroup: [{\n type: Input\n }], enableValue: [{\n type: Input\n }], aggFunc: [{\n type: Input\n }], initialAggFunc: [{\n type: Input\n }], defaultAggFunc: [{\n type: Input\n }], allowedAggFuncs: [{\n type: Input\n }], showRowGroup: [{\n type: Input\n }], sortable: [{\n type: Input\n }], sort: [{\n type: Input\n }], initialSort: [{\n type: Input\n }], sortIndex: [{\n type: Input\n }], initialSortIndex: [{\n type: Input\n }], sortingOrder: [{\n type: Input\n }], comparator: [{\n type: Input\n }], unSortIcon: [{\n type: Input\n }], sortedAt: [{\n type: Input\n }], colSpan: [{\n type: Input\n }], rowSpan: [{\n type: Input\n }], width: [{\n type: Input\n }], initialWidth: [{\n type: Input\n }], minWidth: [{\n type: Input\n }], maxWidth: [{\n type: Input\n }], flex: [{\n type: Input\n }], initialFlex: [{\n type: Input\n }], resizable: [{\n type: Input\n }], suppressSizeToFit: [{\n type: Input\n }], suppressAutoSize: [{\n type: Input\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AngularFrameworkOverrides, [{\n type: Injectable\n }], function () { return [{ type: ɵngcc0.NgZone }]; }, null); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AngularFrameworkComponentWrapper, [{\n type: Injectable\n }], null, null); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AgGridAngular, [{\n type: Component,\n args: [{\n selector: 'ag-grid-angular',\n template: '',\n providers: [\n AngularFrameworkOverrides,\n AngularFrameworkComponentWrapper\n ],\n // tell angular we don't want view encapsulation, we don't want a shadow root\n encapsulation: ViewEncapsulation.None\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.ViewContainerRef }, { type: AngularFrameworkOverrides }, { type: AngularFrameworkComponentWrapper }, { type: ɵngcc0.ComponentFactoryResolver }]; }, { statusBar: [{\n type: Input\n }], sideBar: [{\n type: Input\n }], suppressContextMenu: [{\n type: Input\n }], preventDefaultOnContextMenu: [{\n type: Input\n }], allowContextMenuWithControlKey: [{\n type: Input\n }], suppressMenuHide: [{\n type: Input\n }], enableBrowserTooltips: [{\n type: Input\n }], tooltipShowDelay: [{\n type: Input\n }], tooltipHideDelay: [{\n type: Input\n }], tooltipMouseTrack: [{\n type: Input\n }], popupParent: [{\n type: Input\n }], copyHeadersToClipboard: [{\n type: Input\n }], copyGroupHeadersToClipboard: [{\n type: Input\n }], clipboardDelimiter: [{\n type: Input\n }], suppressCopyRowsToClipboard: [{\n type: Input\n }], suppressCopySingleCellRanges: [{\n type: Input\n }], suppressLastEmptyLineOnPaste: [{\n type: Input\n }], suppressClipboardPaste: [{\n type: Input\n }], suppressClipboardApi: [{\n type: Input\n }], columnDefs: [{\n type: Input\n }], defaultColDef: [{\n type: Input\n }], defaultColGroupDef: [{\n type: Input\n }], columnTypes: [{\n type: Input\n }], maintainColumnOrder: [{\n type: Input\n }], suppressFieldDotNotation: [{\n type: Input\n }], deltaColumnMode: [{\n type: Input\n }], applyColumnDefOrder: [{\n type: Input\n }], immutableColumns: [{\n type: Input\n }], suppressSetColumnStateEvents: [{\n type: Input\n }], suppressColumnStateEvents: [{\n type: Input\n }], colWidth: [{\n type: Input\n }], minColWidth: [{\n type: Input\n }], maxColWidth: [{\n type: Input\n }], headerHeight: [{\n type: Input\n }], groupHeaderHeight: [{\n type: Input\n }], floatingFiltersHeight: [{\n type: Input\n }], pivotHeaderHeight: [{\n type: Input\n }], pivotGroupHeaderHeight: [{\n type: Input\n }], allowDragFromColumnsToolPanel: [{\n type: Input\n }], suppressMovableColumns: [{\n type: Input\n }], suppressColumnMoveAnimation: [{\n type: Input\n }], suppressDragLeaveHidesColumns: [{\n type: Input\n }], colResizeDefault: [{\n type: Input\n }], suppressAutoSize: [{\n type: Input\n }], autoSizePadding: [{\n type: Input\n }], skipHeaderOnAutoSize: [{\n type: Input\n }], components: [{\n type: Input\n }], frameworkComponents: [{\n type: Input\n }], editType: [{\n type: Input\n }], singleClickEdit: [{\n type: Input\n }], suppressClickEdit: [{\n type: Input\n }], readOnlyEdit: [{\n type: Input\n }], stopEditingWhenCellsLoseFocus: [{\n type: Input\n }], enterMovesDown: [{\n type: Input\n }], enterMovesDownAfterEdit: [{\n type: Input\n }], undoRedoCellEditing: [{\n type: Input\n }], undoRedoCellEditingLimit: [{\n type: Input\n }], stopEditingWhenGridLosesFocus: [{\n type: Input\n }], defaultCsvExportParams: [{\n type: Input\n }], suppressCsvExport: [{\n type: Input\n }], defaultExcelExportParams: [{\n type: Input\n }], suppressExcelExport: [{\n type: Input\n }], excelStyles: [{\n type: Input\n }], defaultExportParams: [{\n type: Input\n }], quickFilterText: [{\n type: Input\n }], cacheQuickFilter: [{\n type: Input\n }], excludeChildrenWhenTreeDataFiltering: [{\n type: Input\n }], enableCharts: [{\n type: Input\n }], chartThemes: [{\n type: Input\n }], customChartThemes: [{\n type: Input\n }], chartThemeOverrides: [{\n type: Input\n }], loadingCellRenderer: [{\n type: Input\n }], loadingCellRendererFramework: [{\n type: Input\n }], loadingCellRendererParams: [{\n type: Input\n }], loadingCellRendererSelector: [{\n type: Input\n }], localeText: [{\n type: Input\n }], masterDetail: [{\n type: Input\n }], keepDetailRows: [{\n type: Input\n }], keepDetailRowsCount: [{\n type: Input\n }], detailCellRenderer: [{\n type: Input\n }], detailCellRendererFramework: [{\n type: Input\n }], detailCellRendererParams: [{\n type: Input\n }], detailRowHeight: [{\n type: Input\n }], detailRowAutoHeight: [{\n type: Input\n }], context: [{\n type: Input\n }], alignedGrids: [{\n type: Input\n }], tabIndex: [{\n type: Input\n }], rowBuffer: [{\n type: Input\n }], valueCache: [{\n type: Input\n }], valueCacheNeverExpires: [{\n type: Input\n }], enableCellExpressions: [{\n type: Input\n }], suppressParentsInRowNodes: [{\n type: Input\n }], suppressTouch: [{\n type: Input\n }], suppressFocusAfterRefresh: [{\n type: Input\n }], suppressAsyncEvents: [{\n type: Input\n }], suppressBrowserResizeObserver: [{\n type: Input\n }], suppressPropertyNamesCheck: [{\n type: Input\n }], suppressChangeDetection: [{\n type: Input\n }], debug: [{\n type: Input\n }], overlayLoadingTemplate: [{\n type: Input\n }], loadingOverlayComponent: [{\n type: Input\n }], loadingOverlayComponentFramework: [{\n type: Input\n }], loadingOverlayComponentParams: [{\n type: Input\n }], suppressLoadingOverlay: [{\n type: Input\n }], overlayNoRowsTemplate: [{\n type: Input\n }], noRowsOverlayComponent: [{\n type: Input\n }], noRowsOverlayComponentFramework: [{\n type: Input\n }], noRowsOverlayComponentParams: [{\n type: Input\n }], suppressNoRowsOverlay: [{\n type: Input\n }], pagination: [{\n type: Input\n }], paginationPageSize: [{\n type: Input\n }], paginationAutoPageSize: [{\n type: Input\n }], paginateChildRows: [{\n type: Input\n }], suppressPaginationPanel: [{\n type: Input\n }], pivotMode: [{\n type: Input\n }], pivotPanelShow: [{\n type: Input\n }], pivotColumnGroupTotals: [{\n type: Input\n }], pivotRowTotals: [{\n type: Input\n }], pivotSuppressAutoColumn: [{\n type: Input\n }], suppressExpandablePivotGroups: [{\n type: Input\n }], functionsReadOnly: [{\n type: Input\n }], aggFuncs: [{\n type: Input\n }], suppressAggFuncInHeader: [{\n type: Input\n }], suppressAggAtRootLevel: [{\n type: Input\n }], aggregateOnlyChangedColumns: [{\n type: Input\n }], suppressAggFilteredOnly: [{\n type: Input\n }], removePivotHeaderRowWhenSingleValueColumn: [{\n type: Input\n }], animateRows: [{\n type: Input\n }], enableCellChangeFlash: [{\n type: Input\n }], cellFlashDelay: [{\n type: Input\n }], cellFadeDelay: [{\n type: Input\n }], domLayout: [{\n type: Input\n }], ensureDomOrder: [{\n type: Input\n }], enableRtl: [{\n type: Input\n }], suppressColumnVirtualisation: [{\n type: Input\n }], suppressMaxRenderedRowRestriction: [{\n type: Input\n }], suppressRowVirtualisation: [{\n type: Input\n }], rowDragManaged: [{\n type: Input\n }], suppressRowDrag: [{\n type: Input\n }], suppressMoveWhenRowDragging: [{\n type: Input\n }], rowDragEntireRow: [{\n type: Input\n }], rowDragMultiRow: [{\n type: Input\n }], fullWidthCellRenderer: [{\n type: Input\n }], fullWidthCellRendererFramework: [{\n type: Input\n }], fullWidthCellRendererParams: [{\n type: Input\n }], embedFullWidthRows: [{\n type: Input\n }], deprecatedEmbedFullWidthRows: [{\n type: Input\n }], groupDisplayType: [{\n type: Input\n }], groupDefaultExpanded: [{\n type: Input\n }], autoGroupColumnDef: [{\n type: Input\n }], groupMaintainOrder: [{\n type: Input\n }], groupSelectsChildren: [{\n type: Input\n }], groupAggFiltering: [{\n type: Input\n }], groupIncludeFooter: [{\n type: Input\n }], groupIncludeTotalFooter: [{\n type: Input\n }], groupSuppressBlankHeader: [{\n type: Input\n }], groupSelectsFiltered: [{\n type: Input\n }], showOpenedGroup: [{\n type: Input\n }], groupRemoveSingleChildren: [{\n type: Input\n }], groupRemoveLowestSingleChildren: [{\n type: Input\n }], groupHideOpenParents: [{\n type: Input\n }], rowGroupPanelShow: [{\n type: Input\n }], groupRowRenderer: [{\n type: Input\n }], groupRowRendererFramework: [{\n type: Input\n }], groupRowRendererParams: [{\n type: Input\n }], suppressMakeColumnVisibleAfterUnGroup: [{\n type: Input\n }], treeData: [{\n type: Input\n }], groupRowInnerRenderer: [{\n type: Input\n }], groupRowInnerRendererFramework: [{\n type: Input\n }], groupMultiAutoColumn: [{\n type: Input\n }], groupUseEntireRow: [{\n type: Input\n }], groupSuppressAutoColumn: [{\n type: Input\n }], rememberGroupStateWhenNewData: [{\n type: Input\n }], pinnedTopRowData: [{\n type: Input\n }], pinnedBottomRowData: [{\n type: Input\n }], rowModelType: [{\n type: Input\n }], rowData: [{\n type: Input\n }], immutableData: [{\n type: Input\n }], asyncTransactionWaitMillis: [{\n type: Input\n }], suppressModelUpdateAfterUpdateTransaction: [{\n type: Input\n }], deltaRowDataMode: [{\n type: Input\n }], batchUpdateWaitMillis: [{\n type: Input\n }], datasource: [{\n type: Input\n }], cacheOverflowSize: [{\n type: Input\n }], infiniteInitialRowCount: [{\n type: Input\n }], serverSideStoreType: [{\n type: Input\n }], cacheBlockSize: [{\n type: Input\n }], maxBlocksInCache: [{\n type: Input\n }], maxConcurrentDatasourceRequests: [{\n type: Input\n }], blockLoadDebounceMillis: [{\n type: Input\n }], purgeClosedRowNodes: [{\n type: Input\n }], serverSideDatasource: [{\n type: Input\n }], serverSideSortingAlwaysResets: [{\n type: Input\n }], serverSideFilteringAlwaysResets: [{\n type: Input\n }], suppressEnterpriseResetOnNewColumns: [{\n type: Input\n }], viewportDatasource: [{\n type: Input\n }], viewportRowModelPageSize: [{\n type: Input\n }], viewportRowModelBufferSize: [{\n type: Input\n }], alwaysShowHorizontalScroll: [{\n type: Input\n }], alwaysShowVerticalScroll: [{\n type: Input\n }], debounceVerticalScrollbar: [{\n type: Input\n }], suppressHorizontalScroll: [{\n type: Input\n }], suppressScrollOnNewData: [{\n type: Input\n }], suppressScrollWhenPopupsAreOpen: [{\n type: Input\n }], suppressAnimationFrame: [{\n type: Input\n }], suppressMiddleClickScrolls: [{\n type: Input\n }], suppressPreventDefaultOnMouseWheel: [{\n type: Input\n }], scrollbarWidth: [{\n type: Input\n }], rowSelection: [{\n type: Input\n }], rowMultiSelectWithClick: [{\n type: Input\n }], suppressRowDeselection: [{\n type: Input\n }], suppressRowClickSelection: [{\n type: Input\n }], suppressCellSelection: [{\n type: Input\n }], suppressCellFocus: [{\n type: Input\n }], suppressMultiRangeSelection: [{\n type: Input\n }], enableCellTextSelection: [{\n type: Input\n }], enableRangeSelection: [{\n type: Input\n }], enableRangeHandle: [{\n type: Input\n }], enableFillHandle: [{\n type: Input\n }], fillHandleDirection: [{\n type: Input\n }], suppressClearOnFillReduction: [{\n type: Input\n }], sortingOrder: [{\n type: Input\n }], accentedSort: [{\n type: Input\n }], unSortIcon: [{\n type: Input\n }], suppressMultiSort: [{\n type: Input\n }], alwaysMultiSort: [{\n type: Input\n }], multiSortKey: [{\n type: Input\n }], suppressMaintainUnsortedOrder: [{\n type: Input\n }], icons: [{\n type: Input\n }], rowHeight: [{\n type: Input\n }], rowStyle: [{\n type: Input\n }], rowClass: [{\n type: Input\n }], rowClassRules: [{\n type: Input\n }], suppressRowHoverHighlight: [{\n type: Input\n }], suppressRowTransform: [{\n type: Input\n }], columnHoverHighlight: [{\n type: Input\n }], deltaSort: [{\n type: Input\n }], treeDataDisplayType: [{\n type: Input\n }], angularCompileRows: [{\n type: Input\n }], angularCompileFilters: [{\n type: Input\n }], functionsPassive: [{\n type: Input\n }], enableGroupEdit: [{\n type: Input\n }], getContextMenuItems: [{\n type: Input\n }], getMainMenuItems: [{\n type: Input\n }], postProcessPopup: [{\n type: Input\n }], processCellForClipboard: [{\n type: Input\n }], processHeaderForClipboard: [{\n type: Input\n }], processGroupHeaderForClipboard: [{\n type: Input\n }], processCellFromClipboard: [{\n type: Input\n }], sendToClipboard: [{\n type: Input\n }], processDataFromClipboard: [{\n type: Input\n }], isExternalFilterPresent: [{\n type: Input\n }], doesExternalFilterPass: [{\n type: Input\n }], getChartToolbarItems: [{\n type: Input\n }], createChartContainer: [{\n type: Input\n }], navigateToNextHeader: [{\n type: Input\n }], tabToNextHeader: [{\n type: Input\n }], navigateToNextCell: [{\n type: Input\n }], tabToNextCell: [{\n type: Input\n }], suppressKeyboardEvent: [{\n type: Input\n }], localeTextFunc: [{\n type: Input\n }], getLocaleText: [{\n type: Input\n }], getDocument: [{\n type: Input\n }], paginationNumberFormatter: [{\n type: Input\n }], groupRowAggNodes: [{\n type: Input\n }], getGroupRowAgg: [{\n type: Input\n }], isGroupOpenByDefault: [{\n type: Input\n }], initialGroupOrderComparator: [{\n type: Input\n }], defaultGroupOrderComparator: [{\n type: Input\n }], processSecondaryColDef: [{\n type: Input\n }], processSecondaryColGroupDef: [{\n type: Input\n }], getDataPath: [{\n type: Input\n }], defaultGroupSortComparator: [{\n type: Input\n }], getChildCount: [{\n type: Input\n }], getServerSideStoreParams: [{\n type: Input\n }], isServerSideGroupOpenByDefault: [{\n type: Input\n }], isApplyServerSideTransaction: [{\n type: Input\n }], isServerSideGroup: [{\n type: Input\n }], getServerSideGroupKey: [{\n type: Input\n }], getBusinessKeyForNode: [{\n type: Input\n }], getRowNodeId: [{\n type: Input\n }], getRowId: [{\n type: Input\n }], resetRowDataOnUpdate: [{\n type: Input\n }], processRowPostCreate: [{\n type: Input\n }], isRowSelectable: [{\n type: Input\n }], isRowMaster: [{\n type: Input\n }], fillOperation: [{\n type: Input\n }], postSort: [{\n type: Input\n }], postSortRows: [{\n type: Input\n }], getRowStyle: [{\n type: Input\n }], getRowClass: [{\n type: Input\n }], getRowHeight: [{\n type: Input\n }], isFullWidthCell: [{\n type: Input\n }], isFullWidthRow: [{\n type: Input\n }], toolPanelVisibleChanged: [{\n type: Output\n }], pasteStart: [{\n type: Output\n }], pasteEnd: [{\n type: Output\n }], columnVisible: [{\n type: Output\n }], columnPinned: [{\n type: Output\n }], columnResized: [{\n type: Output\n }], columnMoved: [{\n type: Output\n }], columnValueChanged: [{\n type: Output\n }], columnPivotModeChanged: [{\n type: Output\n }], columnPivotChanged: [{\n type: Output\n }], columnGroupOpened: [{\n type: Output\n }], newColumnsLoaded: [{\n type: Output\n }], gridColumnsChanged: [{\n type: Output\n }], displayedColumnsChanged: [{\n type: Output\n }], virtualColumnsChanged: [{\n type: Output\n }], columnEverythingChanged: [{\n type: Output\n }], componentStateChanged: [{\n type: Output\n }], cellValueChanged: [{\n type: Output\n }], cellEditRequest: [{\n type: Output\n }], rowValueChanged: [{\n type: Output\n }], cellEditingStarted: [{\n type: Output\n }], cellEditingStopped: [{\n type: Output\n }], rowEditingStarted: [{\n type: Output\n }], rowEditingStopped: [{\n type: Output\n }], filterOpened: [{\n type: Output\n }], filterChanged: [{\n type: Output\n }], filterModified: [{\n type: Output\n }], chartCreated: [{\n type: Output\n }], chartRangeSelectionChanged: [{\n type: Output\n }], chartOptionsChanged: [{\n type: Output\n }], chartDestroyed: [{\n type: Output\n }], cellKeyDown: [{\n type: Output\n }], cellKeyPress: [{\n type: Output\n }], gridReady: [{\n type: Output\n }], firstDataRendered: [{\n type: Output\n }], gridSizeChanged: [{\n type: Output\n }], modelUpdated: [{\n type: Output\n }], virtualRowRemoved: [{\n type: Output\n }], viewportChanged: [{\n type: Output\n }], bodyScroll: [{\n type: Output\n }], bodyScrollEnd: [{\n type: Output\n }], dragStarted: [{\n type: Output\n }], dragStopped: [{\n type: Output\n }], paginationChanged: [{\n type: Output\n }], rowDragEnter: [{\n type: Output\n }], rowDragMove: [{\n type: Output\n }], rowDragLeave: [{\n type: Output\n }], rowDragEnd: [{\n type: Output\n }], columnRowGroupChanged: [{\n type: Output\n }], rowGroupOpened: [{\n type: Output\n }], expandOrCollapseAll: [{\n type: Output\n }], pinnedRowDataChanged: [{\n type: Output\n }], rowDataChanged: [{\n type: Output\n }], rowDataUpdated: [{\n type: Output\n }], asyncTransactionsFlushed: [{\n type: Output\n }], cellClicked: [{\n type: Output\n }], cellDoubleClicked: [{\n type: Output\n }], cellFocused: [{\n type: Output\n }], cellMouseOver: [{\n type: Output\n }], cellMouseOut: [{\n type: Output\n }], cellMouseDown: [{\n type: Output\n }], rowClicked: [{\n type: Output\n }], rowDoubleClicked: [{\n type: Output\n }], rowSelected: [{\n type: Output\n }], selectionChanged: [{\n type: Output\n }], cellContextMenu: [{\n type: Output\n }], rangeSelectionChanged: [{\n type: Output\n }], sortChanged: [{\n type: Output\n }], columnRowGroupChangeRequest: [{\n type: Output\n }], columnPivotChangeRequest: [{\n type: Output\n }], columnValueChangeRequest: [{\n type: Output\n }], columnAggFuncChangeRequest: [{\n type: Output\n }], gridOptions: [{\n type: Input\n }], columns: [{\n type: ContentChildren,\n args: [AgGridColumn]\n }], modules: [{\n type: Input\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AgGridModule, [{\n type: NgModule,\n args: [{\n declarations: [AgGridAngular, AgGridColumn],\n imports: [],\n exports: [AgGridAngular, AgGridColumn]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(AgGridModule, { declarations: [AgGridAngular, AgGridColumn], exports: [AgGridAngular, AgGridColumn] }); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AgGridAngular, AgGridColumn, AgGridModule, AngularFrameworkComponentWrapper, AngularFrameworkOverrides };\n\n","/**\n * ag-grid-community - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.3.0\n * @link https://www.ag-grid.com/\n' * @license MIT\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n/**\n * If value is undefined, null or blank, returns null, otherwise returns the value\n * @param {T} value\n * @returns {T | null}\n */\nfunction makeNull(value) {\n if (value == null || value === '') {\n return null;\n }\n return value;\n}\nfunction exists(value, allowEmptyString) {\n if (allowEmptyString === void 0) { allowEmptyString = false; }\n return value != null && (value !== '' || allowEmptyString);\n}\nfunction missing(value) {\n return !exists(value);\n}\nfunction missingOrEmpty(value) {\n return value == null || value.length === 0;\n}\nfunction toStringOrNull(value) {\n return value != null && typeof value.toString === 'function' ? value.toString() : null;\n}\n// for parsing html attributes, where we want empty strings and missing attributes to be undefined\nfunction attrToNumber(value) {\n if (value === undefined) {\n // undefined or empty means ignore the value\n return;\n }\n if (value === null || value === '') {\n // null or blank means clear\n return null;\n }\n if (typeof value === 'number') {\n return isNaN(value) ? undefined : value;\n }\n var valueParsed = parseInt(value, 10);\n return isNaN(valueParsed) ? undefined : valueParsed;\n}\n// for parsing html attributes, where we want empty strings and missing attributes to be undefined\nfunction attrToBoolean(value) {\n if (value === undefined) {\n // undefined or empty means ignore the value\n return;\n }\n if (value === null || value === '') {\n // null means clear\n return false;\n }\n if (typeof value === 'boolean') {\n // if simple boolean, return the boolean\n return value;\n }\n // if equal to the string 'true' (ignoring case) then return true\n return (/true/i).test(value);\n}\n// for parsing html attributes, where we want empty strings and missing attributes to be undefined\nfunction attrToString(value) {\n if (value == null || value === '') {\n return;\n }\n return value;\n}\n/** @deprecated */\nfunction referenceCompare(left, right) {\n if (left == null && right == null) {\n return true;\n }\n if (left == null && right != null) {\n return false;\n }\n if (left != null && right == null) {\n return false;\n }\n return left === right;\n}\nfunction jsonEquals(val1, val2) {\n var val1Json = val1 ? JSON.stringify(val1) : null;\n var val2Json = val2 ? JSON.stringify(val2) : null;\n return val1Json === val2Json;\n}\nfunction defaultComparator(valueA, valueB, accentedCompare) {\n if (accentedCompare === void 0) { accentedCompare = false; }\n var valueAMissing = valueA == null;\n var valueBMissing = valueB == null;\n // this is for aggregations sum and avg, where the result can be a number that is wrapped.\n // if we didn't do this, then the toString() value would be used, which would result in\n // the strings getting used instead of the numbers.\n if (valueA && valueA.toNumber) {\n valueA = valueA.toNumber();\n }\n if (valueB && valueB.toNumber) {\n valueB = valueB.toNumber();\n }\n if (valueAMissing && valueBMissing) {\n return 0;\n }\n if (valueAMissing) {\n return -1;\n }\n if (valueBMissing) {\n return 1;\n }\n function doQuickCompare(a, b) {\n return (a > b ? 1 : (a < b ? -1 : 0));\n }\n if (typeof valueA !== 'string') {\n return doQuickCompare(valueA, valueB);\n }\n if (!accentedCompare) {\n return doQuickCompare(valueA, valueB);\n }\n try {\n // using local compare also allows chinese comparisons\n return valueA.localeCompare(valueB);\n }\n catch (e) {\n // if something wrong with localeCompare, eg not supported\n // by browser, then just continue with the quick one\n return doQuickCompare(valueA, valueB);\n }\n}\nfunction values(object) {\n if (object instanceof Set || object instanceof Map) {\n var arr_1 = [];\n object.forEach(function (value) { return arr_1.push(value); });\n return arr_1;\n }\n return Object.values(object);\n}\n\nvar GenericUtils = /*#__PURE__*/Object.freeze({\n makeNull: makeNull,\n exists: exists,\n missing: missing,\n missingOrEmpty: missingOrEmpty,\n toStringOrNull: toStringOrNull,\n attrToNumber: attrToNumber,\n attrToBoolean: attrToBoolean,\n attrToString: attrToString,\n referenceCompare: referenceCompare,\n jsonEquals: jsonEquals,\n defaultComparator: defaultComparator,\n values: values\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar ColumnKeyCreator = /** @class */ (function () {\n function ColumnKeyCreator() {\n this.existingKeys = {};\n }\n ColumnKeyCreator.prototype.addExistingKeys = function (keys) {\n for (var i = 0; i < keys.length; i++) {\n this.existingKeys[keys[i]] = true;\n }\n };\n ColumnKeyCreator.prototype.getUniqueKey = function (colId, colField) {\n // in case user passed in number for colId, convert to string\n colId = toStringOrNull(colId);\n var count = 0;\n while (true) {\n var idToTry = void 0;\n if (colId) {\n idToTry = colId;\n if (count !== 0) {\n idToTry += '_' + count;\n }\n }\n else if (colField) {\n idToTry = colField;\n if (count !== 0) {\n idToTry += '_' + count;\n }\n }\n else {\n idToTry = '' + count;\n }\n if (!this.existingKeys[idToTry]) {\n this.existingKeys[idToTry] = true;\n return idToTry;\n }\n count++;\n }\n };\n return ColumnKeyCreator;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction iterateObject(object, callback) {\n if (object == null) {\n return;\n }\n if (Array.isArray(object)) {\n object.forEach(function (value, index) { return callback(\"\" + index, value); });\n }\n else {\n Object.keys(object).forEach(function (key) { return callback(key, object[key]); });\n }\n}\nfunction cloneObject(object) {\n var copy = {};\n var keys = Object.keys(object);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = object[key];\n copy[key] = value;\n }\n return copy;\n}\nfunction deepCloneObject(object) {\n return JSON.parse(JSON.stringify(object));\n}\n// returns copy of an object, doing a deep clone of any objects with that object.\n// this is used for eg creating copies of Column Definitions, where we want to\n// deep copy all objects, but do not want to deep copy functions (eg when user provides\n// a function or class for colDef.cellRenderer)\nfunction deepCloneDefinition(object, keysToSkip) {\n if (!object) {\n return;\n }\n var obj = object;\n var res = {};\n Object.keys(obj).forEach(function (key) {\n if (keysToSkip && keysToSkip.indexOf(key) >= 0) {\n return;\n }\n var value = obj[key];\n // 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}. it does\n // NOT include the following:\n // 1) arrays\n // 2) functions or classes (eg ColumnAPI instance)\n var sourceIsSimpleObject = isNonNullObject(value) && value.constructor === Object;\n if (sourceIsSimpleObject) {\n res[key] = deepCloneDefinition(value);\n }\n else {\n res[key] = value;\n }\n });\n return res;\n}\nfunction getProperty(object, key) {\n return object[key];\n}\nfunction setProperty(object, key, value) {\n object[key] = value;\n}\n/**\n * Will copy the specified properties from `source` into the equivalent properties on `target`, ignoring properties with\n * a value of `undefined`.\n */\nfunction copyPropertiesIfPresent(source, target) {\n var properties = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n properties[_i - 2] = arguments[_i];\n }\n properties.forEach(function (p) { return copyPropertyIfPresent(source, target, p); });\n}\n/**\n * Will copy the specified property from `source` into the equivalent property on `target`, unless the property has a\n * value of `undefined`. If a transformation is provided, it will be applied to the value before being set on `target`.\n */\nfunction copyPropertyIfPresent(source, target, property, transform) {\n var value = getProperty(source, property);\n if (value !== undefined) {\n setProperty(target, property, transform ? transform(value) : value);\n }\n}\nfunction getAllKeysInObjects(objects) {\n var allValues = {};\n objects.filter(function (obj) { return obj != null; }).forEach(function (obj) {\n Object.keys(obj).forEach(function (key) { return allValues[key] = null; });\n });\n return Object.keys(allValues);\n}\nfunction getAllValuesInObject(obj) {\n if (!obj) {\n return [];\n }\n var anyObject = Object;\n if (typeof anyObject.values === 'function') {\n return anyObject.values(obj);\n }\n var ret = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj.propertyIsEnumerable(key)) {\n ret.push(obj[key]);\n }\n }\n return ret;\n}\nfunction mergeDeep(dest, source, copyUndefined, makeCopyOfSimpleObjects) {\n if (copyUndefined === void 0) { copyUndefined = true; }\n if (makeCopyOfSimpleObjects === void 0) { makeCopyOfSimpleObjects = false; }\n if (!exists(source)) {\n return;\n }\n iterateObject(source, function (key, sourceValue) {\n var destValue = dest[key];\n if (destValue === sourceValue) {\n return;\n }\n // when creating params, we don't want to just copy objects over. otherwise merging ColDefs (eg DefaultColDef\n // and Column Types) would result in params getting shared between objects.\n // by putting an empty value into destValue first, it means we end up copying over values from\n // the source object, rather than just copying in the source object in it's entirety.\n if (makeCopyOfSimpleObjects) {\n var objectIsDueToBeCopied = destValue == null && sourceValue != null;\n if (objectIsDueToBeCopied) {\n // 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}, as opposed\n // to a Class instance (such as ColumnAPI instance).\n var sourceIsSimpleObject = typeof sourceValue === 'object' && sourceValue.constructor === Object;\n var dontCopy = sourceIsSimpleObject;\n if (dontCopy) {\n destValue = {};\n dest[key] = destValue;\n }\n }\n }\n if (isNonNullObject(sourceValue) && isNonNullObject(destValue) && !Array.isArray(destValue)) {\n mergeDeep(destValue, sourceValue, copyUndefined, makeCopyOfSimpleObjects);\n }\n else if (copyUndefined || sourceValue !== undefined) {\n dest[key] = sourceValue;\n }\n });\n}\nfunction missingOrEmptyObject(value) {\n return missing(value) || Object.keys(value).length === 0;\n}\nfunction get(source, expression, defaultValue) {\n if (source == null) {\n return defaultValue;\n }\n var keys = expression.split('.');\n var objectToRead = source;\n while (keys.length > 1) {\n objectToRead = objectToRead[keys.shift()];\n if (objectToRead == null) {\n return defaultValue;\n }\n }\n var value = objectToRead[keys[0]];\n return value != null ? value : defaultValue;\n}\nfunction set(target, expression, value) {\n if (target == null) {\n return;\n }\n var keys = expression.split('.');\n var objectToUpdate = target;\n while (keys.length > 1) {\n objectToUpdate = objectToUpdate[keys.shift()];\n if (objectToUpdate == null) {\n return;\n }\n }\n objectToUpdate[keys[0]] = value;\n}\nfunction deepFreeze(object) {\n Object.freeze(object);\n values(object).forEach(function (v) {\n if (isNonNullObject(v) || typeof v === 'function') {\n deepFreeze(v);\n }\n });\n return object;\n}\nfunction getValueUsingField(data, field, fieldContainsDots) {\n if (!field || !data) {\n return;\n }\n // if no '.', then it's not a deep value\n if (!fieldContainsDots) {\n return data[field];\n }\n // otherwise it is a deep value, so need to dig for it\n var fields = field.split('.');\n var currentObject = data;\n for (var i = 0; i < fields.length; i++) {\n if (currentObject == null) {\n return undefined;\n }\n currentObject = currentObject[fields[i]];\n }\n return currentObject;\n}\n// used by ColumnAPI and GridAPI to remove all references, so keeping grid in memory resulting in a\n// memory leak if user is not disposing of the GridAPI or ColumnApi references\nfunction removeAllReferences(obj, objectName) {\n Object.keys(obj).forEach(function (key) {\n var value = obj[key];\n // we want to replace all the @autowired services, which are objects. any simple types (boolean, string etc)\n // we don't care about\n if (typeof value === 'object') {\n obj[key] = undefined;\n }\n });\n var proto = Object.getPrototypeOf(obj);\n var properties = {};\n Object.keys(proto).forEach(function (key) {\n var value = proto[key];\n // leave all basic types - this is needed for GridAPI to leave the \"destroyed: boolean\" attribute alone\n if (typeof value === 'function') {\n var func = function () {\n console.warn(\"AG Grid: \" + objectName + \" function \" + key + \"() cannot be called as the grid has been destroyed.\\n Please don't call grid API functions on destroyed grids - as a matter of fact you shouldn't\\n be keeping the API reference, your application has a memory leak! Remove the API reference\\n when the grid is destroyed.\");\n };\n properties[key] = { value: func, writable: true };\n }\n });\n Object.defineProperties(obj, properties);\n}\nfunction isNonNullObject(value) {\n return typeof value === 'object' && value !== null;\n}\n\nvar ObjectUtils = /*#__PURE__*/Object.freeze({\n iterateObject: iterateObject,\n cloneObject: cloneObject,\n deepCloneObject: deepCloneObject,\n deepCloneDefinition: deepCloneDefinition,\n getProperty: getProperty,\n setProperty: setProperty,\n copyPropertiesIfPresent: copyPropertiesIfPresent,\n copyPropertyIfPresent: copyPropertyIfPresent,\n getAllKeysInObjects: getAllKeysInObjects,\n getAllValuesInObject: getAllValuesInObject,\n mergeDeep: mergeDeep,\n missingOrEmptyObject: missingOrEmptyObject,\n get: get,\n set: set,\n deepFreeze: deepFreeze,\n getValueUsingField: getValueUsingField,\n removeAllReferences: removeAllReferences,\n isNonNullObject: isNonNullObject\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar FUNCTION_STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar FUNCTION_ARGUMENT_NAMES = /([^\\s,]+)/g;\nvar doOnceFlags = {};\n/**\n * If the key was passed before, then doesn't execute the func\n * @param {Function} func\n * @param {string} key\n */\nfunction doOnce(func, key) {\n if (doOnceFlags[key]) {\n return;\n }\n func();\n doOnceFlags[key] = true;\n}\nfunction getFunctionName(funcConstructor) {\n // for every other browser in the world\n if (funcConstructor.name) {\n return funcConstructor.name;\n }\n // for the pestilence that is ie11\n var matches = /function\\s+([^\\(]+)/.exec(funcConstructor.toString());\n return matches && matches.length === 2 ? matches[1].trim() : null;\n}\n/** @deprecated */\nfunction getFunctionParameters(func) {\n var fnStr = func.toString().replace(FUNCTION_STRIP_COMMENTS, '');\n return fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(FUNCTION_ARGUMENT_NAMES) || [];\n}\nfunction isFunction(val) {\n return !!(val && val.constructor && val.call && val.apply);\n}\nfunction executeInAWhile(funcs) {\n executeAfter(funcs, 400);\n}\nvar executeNextVMTurnFuncs = [];\nvar executeNextVMTurnPending = false;\nfunction executeNextVMTurn(func) {\n executeNextVMTurnFuncs.push(func);\n if (executeNextVMTurnPending) {\n return;\n }\n executeNextVMTurnPending = true;\n window.setTimeout(function () {\n var funcsCopy = executeNextVMTurnFuncs.slice();\n executeNextVMTurnFuncs.length = 0;\n executeNextVMTurnPending = false;\n funcsCopy.forEach(function (func) { return func(); });\n }, 0);\n}\nfunction executeAfter(funcs, milliseconds) {\n if (milliseconds === void 0) { milliseconds = 0; }\n if (funcs.length > 0) {\n window.setTimeout(function () { return funcs.forEach(function (func) { return func(); }); }, milliseconds);\n }\n}\n/**\n * from https://stackoverflow.com/questions/24004791/can-someone-explain-the-debounce-function-in-javascript\n * @param {Function} func The function to be debounced\n * @param {number} wait The time in ms to debounce\n * @param {boolean} immediate If it should run immediately or wait for the initial debounce delay\n * @return {Function} The debounced function\n */\nfunction debounce(func, wait, immediate) {\n if (immediate === void 0) { immediate = false; }\n // 'private' variable for instance\n // The returned function will be able to reference this due to closure.\n // Each call to the returned function will share this common timer.\n var timeout;\n // Calling debounce returns a new anonymous function\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // reference the context and args for the setTimeout function\n var context = this;\n // Should the function be called now? If immediate is true\n // and not already in a timeout then the answer is: Yes\n var callNow = immediate && !timeout;\n // This is the basic debounce behaviour where you can call this\n // function several times, but it will only execute once\n // [before or after imposing a delay].\n // Each time the returned function is called, the timer starts over.\n window.clearTimeout(timeout);\n // Set the new timeout\n timeout = window.setTimeout(function () {\n // Inside the timeout function, clear the timeout variable\n // which will let the next execution run when in 'immediate' mode\n timeout = null;\n // Check if the function already ran with the immediate flag\n if (!immediate) {\n // Call the original function with apply\n // apply lets you define the 'this' object as well as the arguments\n // (both captured before setTimeout)\n func.apply(context, args);\n }\n }, wait);\n // Immediate mode and no wait timer? Execute the function..\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\n/**\n * @param {Function} func The function to be throttled\n * @param {number} wait The time in ms to throttle\n * @return {Function} The throttled function\n */\nfunction throttle(func, wait) {\n var previousCall = 0;\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var context = this;\n var currentCall = new Date().getTime();\n if (currentCall - previousCall < wait) {\n return;\n }\n previousCall = currentCall;\n func.apply(context, args);\n };\n}\nfunction waitUntil(condition, callback, timeout, timeoutMessage) {\n if (timeout === void 0) { timeout = 100; }\n var timeStamp = new Date().getTime();\n var interval = null;\n var executed = false;\n var internalCallback = function () {\n var reachedTimeout = ((new Date().getTime()) - timeStamp) > timeout;\n if (condition() || reachedTimeout) {\n callback();\n executed = true;\n if (interval != null) {\n window.clearInterval(interval);\n interval = null;\n }\n if (reachedTimeout && timeoutMessage) {\n console.warn(timeoutMessage);\n }\n }\n };\n internalCallback();\n if (!executed) {\n interval = window.setInterval(internalCallback, 10);\n }\n}\nfunction compose() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return function (arg) { return fns.reduce(function (composed, f) { return f(composed); }, arg); };\n}\nfunction callIfPresent(func) {\n if (func) {\n func();\n }\n}\n\nvar FunctionUtils = /*#__PURE__*/Object.freeze({\n doOnce: doOnce,\n getFunctionName: getFunctionName,\n getFunctionParameters: getFunctionParameters,\n isFunction: isFunction,\n executeInAWhile: executeInAWhile,\n executeNextVMTurn: executeNextVMTurn,\n executeAfter: executeAfter,\n debounce: debounce,\n throttle: throttle,\n waitUntil: waitUntil,\n compose: compose,\n callIfPresent: callIfPresent\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar Context = /** @class */ (function () {\n function Context(params, logger) {\n this.beanWrappers = {};\n this.destroyed = false;\n if (!params || !params.beanClasses) {\n return;\n }\n this.contextParams = params;\n this.logger = logger;\n this.logger.log(\">> creating ag-Application Context\");\n this.createBeans();\n var beanInstances = this.getBeanInstances();\n this.wireBeans(beanInstances);\n this.logger.log(\">> ag-Application Context ready - component is alive\");\n }\n Context.prototype.getBeanInstances = function () {\n return values(this.beanWrappers).map(function (beanEntry) { return beanEntry.beanInstance; });\n };\n Context.prototype.createBean = function (bean, afterPreCreateCallback) {\n if (!bean) {\n throw Error(\"Can't wire to bean since it is null\");\n }\n this.wireBeans([bean], afterPreCreateCallback);\n return bean;\n };\n Context.prototype.wireBeans = function (beanInstances, afterPreCreateCallback) {\n this.autoWireBeans(beanInstances);\n this.methodWireBeans(beanInstances);\n this.callLifeCycleMethods(beanInstances, 'preConstructMethods');\n // the callback sets the attributes, so the component has access to attributes\n // before postConstruct methods in the component are executed\n if (exists(afterPreCreateCallback)) {\n beanInstances.forEach(afterPreCreateCallback);\n }\n this.callLifeCycleMethods(beanInstances, 'postConstructMethods');\n };\n Context.prototype.createBeans = function () {\n var _this = this;\n // register all normal beans\n this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this));\n // register override beans, these will overwrite beans above of same name\n // instantiate all beans - overridden beans will be left out\n iterateObject(this.beanWrappers, function (key, beanEntry) {\n var constructorParamsMeta;\n if (beanEntry.bean.__agBeanMetaData && beanEntry.bean.__agBeanMetaData.autowireMethods && beanEntry.bean.__agBeanMetaData.autowireMethods.agConstructor) {\n constructorParamsMeta = beanEntry.bean.__agBeanMetaData.autowireMethods.agConstructor;\n }\n var constructorParams = _this.getBeansForParameters(constructorParamsMeta, beanEntry.bean.name);\n var newInstance = applyToConstructor(beanEntry.bean, constructorParams);\n beanEntry.beanInstance = newInstance;\n });\n var createdBeanNames = Object.keys(this.beanWrappers).join(', ');\n this.logger.log(\"created beans: \" + createdBeanNames);\n };\n // tslint:disable-next-line\n Context.prototype.createBeanWrapper = function (BeanClass) {\n var metaData = BeanClass.__agBeanMetaData;\n if (!metaData) {\n var beanName = void 0;\n if (BeanClass.prototype.constructor) {\n beanName = getFunctionName(BeanClass.prototype.constructor);\n }\n else {\n beanName = \"\" + BeanClass;\n }\n console.error(\"Context item \" + beanName + \" is not a bean\");\n return;\n }\n var beanEntry = {\n bean: BeanClass,\n beanInstance: null,\n beanName: metaData.beanName\n };\n this.beanWrappers[metaData.beanName] = beanEntry;\n };\n Context.prototype.autoWireBeans = function (beanInstances) {\n var _this = this;\n beanInstances.forEach(function (beanInstance) {\n _this.forEachMetaDataInHierarchy(beanInstance, function (metaData, beanName) {\n var attributes = metaData.agClassAttributes;\n if (!attributes) {\n return;\n }\n attributes.forEach(function (attribute) {\n var otherBean = _this.lookupBeanInstance(beanName, attribute.beanName, attribute.optional);\n beanInstance[attribute.attributeName] = otherBean;\n });\n });\n });\n };\n Context.prototype.methodWireBeans = function (beanInstances) {\n var _this = this;\n beanInstances.forEach(function (beanInstance) {\n _this.forEachMetaDataInHierarchy(beanInstance, function (metaData, beanName) {\n iterateObject(metaData.autowireMethods, function (methodName, wireParams) {\n // skip constructor, as this is dealt with elsewhere\n if (methodName === \"agConstructor\") {\n return;\n }\n var initParams = _this.getBeansForParameters(wireParams, beanName);\n beanInstance[methodName].apply(beanInstance, initParams);\n });\n });\n });\n };\n Context.prototype.forEachMetaDataInHierarchy = function (beanInstance, callback) {\n var prototype = Object.getPrototypeOf(beanInstance);\n while (prototype != null) {\n var constructor = prototype.constructor;\n if (constructor.hasOwnProperty('__agBeanMetaData')) {\n var metaData = constructor.__agBeanMetaData;\n var beanName = this.getBeanName(constructor);\n callback(metaData, beanName);\n }\n prototype = Object.getPrototypeOf(prototype);\n }\n };\n Context.prototype.getBeanName = function (constructor) {\n if (constructor.__agBeanMetaData && constructor.__agBeanMetaData.beanName) {\n return constructor.__agBeanMetaData.beanName;\n }\n var constructorString = constructor.toString();\n var beanName = constructorString.substring(9, constructorString.indexOf(\"(\"));\n return beanName;\n };\n Context.prototype.getBeansForParameters = function (parameters, beanName) {\n var _this = this;\n var beansList = [];\n if (parameters) {\n iterateObject(parameters, function (paramIndex, otherBeanName) {\n var otherBean = _this.lookupBeanInstance(beanName, otherBeanName);\n beansList[Number(paramIndex)] = otherBean;\n });\n }\n return beansList;\n };\n Context.prototype.lookupBeanInstance = function (wiringBean, beanName, optional) {\n if (optional === void 0) { optional = false; }\n if (beanName === \"context\") {\n return this;\n }\n if (this.contextParams.providedBeanInstances && this.contextParams.providedBeanInstances.hasOwnProperty(beanName)) {\n return this.contextParams.providedBeanInstances[beanName];\n }\n var beanEntry = this.beanWrappers[beanName];\n if (beanEntry) {\n return beanEntry.beanInstance;\n }\n if (!optional) {\n console.error(\"AG Grid: unable to find bean reference \" + beanName + \" while initialising \" + wiringBean);\n }\n return null;\n };\n Context.prototype.callLifeCycleMethods = function (beanInstances, lifeCycleMethod) {\n var _this = this;\n beanInstances.forEach(function (beanInstance) { return _this.callLifeCycleMethodsOnBean(beanInstance, lifeCycleMethod); });\n };\n Context.prototype.callLifeCycleMethodsOnBean = function (beanInstance, lifeCycleMethod, methodToIgnore) {\n // putting all methods into a map removes duplicates\n var allMethods = {};\n // dump methods from each level of the metadata hierarchy\n this.forEachMetaDataInHierarchy(beanInstance, function (metaData) {\n var methods = metaData[lifeCycleMethod];\n if (methods) {\n methods.forEach(function (methodName) {\n if (methodName != methodToIgnore) {\n allMethods[methodName] = true;\n }\n });\n }\n });\n var allMethodsList = Object.keys(allMethods);\n allMethodsList.forEach(function (methodName) { return beanInstance[methodName](); });\n };\n Context.prototype.getBean = function (name) {\n return this.lookupBeanInstance(\"getBean\", name, true);\n };\n Context.prototype.destroy = function () {\n if (this.destroyed) {\n return;\n }\n this.logger.log(\">> Shutting down ag-Application Context\");\n var beanInstances = this.getBeanInstances();\n this.destroyBeans(beanInstances);\n this.contextParams.providedBeanInstances = null;\n this.destroyed = true;\n this.logger.log(\">> ag-Application Context shut down - component is dead\");\n };\n Context.prototype.destroyBean = function (bean) {\n if (!bean) {\n return;\n }\n this.destroyBeans([bean]);\n };\n Context.prototype.destroyBeans = function (beans) {\n var _this = this;\n if (!beans) {\n return [];\n }\n beans.forEach(function (bean) {\n _this.callLifeCycleMethodsOnBean(bean, 'preDestroyMethods', 'destroy');\n // call destroy() explicitly if it exists\n var beanAny = bean;\n if (typeof beanAny.destroy === 'function') {\n beanAny.destroy();\n }\n });\n return [];\n };\n return Context;\n}());\n// taken from: http://stackoverflow.com/questions/3362471/how-can-i-call-a-javascript-constructor-using-call-or-apply\n// allows calling 'apply' on a constructor\nfunction applyToConstructor(constructor, argArray) {\n var args = [null].concat(argArray);\n var factoryFunction = constructor.bind.apply(constructor, args);\n return new factoryFunction();\n}\nfunction PreConstruct(target, methodName, descriptor) {\n var props = getOrCreateProps(target.constructor);\n if (!props.preConstructMethods) {\n props.preConstructMethods = [];\n }\n props.preConstructMethods.push(methodName);\n}\nfunction PostConstruct(target, methodName, descriptor) {\n var props = getOrCreateProps(target.constructor);\n if (!props.postConstructMethods) {\n props.postConstructMethods = [];\n }\n props.postConstructMethods.push(methodName);\n}\nfunction PreDestroy(target, methodName, descriptor) {\n var props = getOrCreateProps(target.constructor);\n if (!props.preDestroyMethods) {\n props.preDestroyMethods = [];\n }\n props.preDestroyMethods.push(methodName);\n}\nfunction Bean(beanName) {\n return function (classConstructor) {\n var props = getOrCreateProps(classConstructor);\n props.beanName = beanName;\n };\n}\nfunction Autowired(name) {\n return function (target, propertyKey, descriptor) {\n autowiredFunc(target, name, false, target, propertyKey, null);\n };\n}\nfunction Optional(name) {\n return function (target, propertyKey, descriptor) {\n autowiredFunc(target, name, true, target, propertyKey, null);\n };\n}\nfunction autowiredFunc(target, name, optional, classPrototype, methodOrAttributeName, index) {\n if (name === null) {\n console.error(\"AG Grid: Autowired name should not be null\");\n return;\n }\n if (typeof index === \"number\") {\n console.error(\"AG Grid: Autowired should be on an attribute\");\n return;\n }\n // it's an attribute on the class\n var props = getOrCreateProps(target.constructor);\n if (!props.agClassAttributes) {\n props.agClassAttributes = [];\n }\n props.agClassAttributes.push({\n attributeName: methodOrAttributeName,\n beanName: name,\n optional: optional\n });\n}\nfunction Qualifier(name) {\n return function (classPrototype, methodOrAttributeName, index) {\n var constructor = typeof classPrototype == \"function\" ? classPrototype : classPrototype.constructor;\n var props;\n if (typeof index === \"number\") {\n // it's a parameter on a method\n var methodName = void 0;\n if (methodOrAttributeName) {\n props = getOrCreateProps(constructor);\n methodName = methodOrAttributeName;\n }\n else {\n props = getOrCreateProps(constructor);\n methodName = \"agConstructor\";\n }\n if (!props.autowireMethods) {\n props.autowireMethods = {};\n }\n if (!props.autowireMethods[methodName]) {\n props.autowireMethods[methodName] = {};\n }\n props.autowireMethods[methodName][index] = name;\n }\n };\n}\nfunction getOrCreateProps(target) {\n if (!target.hasOwnProperty(\"__agBeanMetaData\")) {\n target.__agBeanMetaData = {};\n }\n return target.__agBeanMetaData;\n}\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate = (undefined && undefined.__decorate) || function (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};\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar EventService = /** @class */ (function () {\n function EventService() {\n this.allSyncListeners = new Map();\n this.allAsyncListeners = new Map();\n this.globalSyncListeners = new Set();\n this.globalAsyncListeners = new Set();\n this.asyncFunctionsQueue = [];\n this.scheduled = false;\n // using an object performs better than a Set for the number of different events we have\n this.firedEvents = {};\n }\n // because this class is used both inside the context and outside the context, we do not\n // use autowired attributes, as that would be confusing, as sometimes the attributes\n // would be wired, and sometimes not.\n //\n // the global event servers used by AG Grid is autowired by the context once, and this\n // setBeans method gets called once.\n //\n // the times when this class is used outside of the context (eg RowNode has an instance of this\n // class) then it is not a bean, and this setBeans method is not called.\n EventService.prototype.setBeans = function (loggerFactory, gridOptionsWrapper, frameworkOverrides, globalEventListener) {\n if (globalEventListener === void 0) { globalEventListener = null; }\n this.frameworkOverrides = frameworkOverrides;\n if (globalEventListener) {\n var async = gridOptionsWrapper.useAsyncEvents();\n this.addGlobalListener(globalEventListener, async);\n }\n };\n EventService.prototype.getListeners = function (eventType, async, autoCreateListenerCollection) {\n var listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;\n var listeners = listenerMap.get(eventType);\n // Note: 'autoCreateListenerCollection' should only be 'true' if a listener is about to be added. For instance\n // getListeners() is also called during event dispatch even though no listeners are added. This measure protects\n // against 'memory bloat' as empty collections will prevent the RowNode's event service from being removed after\n // the RowComp is destroyed, see noRegisteredListenersExist() below.\n if (!listeners && autoCreateListenerCollection) {\n listeners = new Set();\n listenerMap.set(eventType, listeners);\n }\n return listeners;\n };\n EventService.prototype.noRegisteredListenersExist = function () {\n return this.allSyncListeners.size === 0 && this.allAsyncListeners.size === 0 &&\n this.globalSyncListeners.size === 0 && this.globalAsyncListeners.size === 0;\n };\n EventService.prototype.addEventListener = function (eventType, listener, async) {\n if (async === void 0) { async = false; }\n this.getListeners(eventType, async, true).add(listener);\n };\n EventService.prototype.removeEventListener = function (eventType, listener, async) {\n if (async === void 0) { async = false; }\n var listeners = this.getListeners(eventType, async, false);\n if (!listeners) {\n return;\n }\n listeners.delete(listener);\n if (listeners.size === 0) {\n var listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;\n listenerMap.delete(eventType);\n }\n };\n EventService.prototype.addGlobalListener = function (listener, async) {\n if (async === void 0) { async = false; }\n (async ? this.globalAsyncListeners : this.globalSyncListeners).add(listener);\n };\n EventService.prototype.removeGlobalListener = function (listener, async) {\n if (async === void 0) { async = false; }\n (async ? this.globalAsyncListeners : this.globalSyncListeners).delete(listener);\n };\n EventService.prototype.dispatchEvent = function (event) {\n this.dispatchToListeners(event, true);\n this.dispatchToListeners(event, false);\n this.firedEvents[event.type] = true;\n };\n EventService.prototype.dispatchEventOnce = function (event) {\n if (!this.firedEvents[event.type]) {\n this.dispatchEvent(event);\n }\n };\n EventService.prototype.dispatchToListeners = function (event, async) {\n var _this = this;\n var eventType = event.type;\n var processEventListeners = function (listeners) { return listeners.forEach(function (listener) {\n if (async) {\n _this.dispatchAsync(function () { return listener(event); });\n }\n else {\n listener(event);\n }\n }); };\n var listeners = this.getListeners(eventType, async, false);\n if (listeners) {\n processEventListeners(listeners);\n }\n var globalListeners = async ? this.globalAsyncListeners : this.globalSyncListeners;\n globalListeners.forEach(function (listener) {\n if (async) {\n _this.dispatchAsync(function () { return _this.frameworkOverrides.dispatchEvent(eventType, function () { return listener(eventType, event); }, true); });\n }\n else {\n _this.frameworkOverrides.dispatchEvent(eventType, function () { return listener(eventType, event); }, true);\n }\n });\n };\n // this gets called inside the grid's thread, for each event that it\n // wants to set async. the grid then batches the events into one setTimeout()\n // because setTimeout() is an expensive operation. ideally we would have\n // each event in it's own setTimeout(), but we batch for performance.\n EventService.prototype.dispatchAsync = function (func) {\n // add to the queue for executing later in the next VM turn\n this.asyncFunctionsQueue.push(func);\n // check if timeout is already scheduled. the first time the grid calls\n // this within it's thread turn, this should be false, so it will schedule\n // the 'flush queue' method the first time it comes here. then the flag is\n // set to 'true' so it will know it's already scheduled for subsequent calls.\n if (!this.scheduled) {\n // if not scheduled, schedule one\n window.setTimeout(this.flushAsyncQueue.bind(this), 0);\n // mark that it is scheduled\n this.scheduled = true;\n }\n };\n // this happens in the next VM turn only, and empties the queue of events\n EventService.prototype.flushAsyncQueue = function () {\n this.scheduled = false;\n // we take a copy, because the event listener could be using\n // the grid, which would cause more events, which would be potentially\n // added to the queue, so safe to take a copy, the new events will\n // get executed in a later VM turn rather than risk updating the\n // queue as we are flushing it.\n var queueCopy = this.asyncFunctionsQueue.slice();\n this.asyncFunctionsQueue = [];\n // execute the queue\n queueCopy.forEach(function (func) { return func(); });\n };\n __decorate([\n __param(0, Qualifier('loggerFactory')),\n __param(1, Qualifier('gridOptionsWrapper')),\n __param(2, Qualifier('frameworkOverrides')),\n __param(3, Qualifier('globalEventListener'))\n ], EventService.prototype, \"setBeans\", null);\n EventService = __decorate([\n Bean('eventService')\n ], EventService);\n return EventService;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar Constants = /** @class */ (function () {\n function Constants() {\n }\n Constants.ROW_BUFFER_SIZE = 10;\n Constants.LAYOUT_INTERVAL = 500;\n Constants.BATCH_WAIT_MILLIS = 50;\n Constants.EXPORT_TYPE_DRAG_COPY = 'dragCopy';\n Constants.EXPORT_TYPE_CLIPBOARD = 'clipboard';\n Constants.EXPORT_TYPE_EXCEL = 'excel';\n Constants.EXPORT_TYPE_CSV = 'csv';\n Constants.ROW_MODEL_TYPE_INFINITE = 'infinite';\n Constants.ROW_MODEL_TYPE_VIEWPORT = 'viewport';\n Constants.ROW_MODEL_TYPE_CLIENT_SIDE = 'clientSide';\n Constants.ROW_MODEL_TYPE_SERVER_SIDE = 'serverSide';\n Constants.ALWAYS = 'always';\n Constants.ONLY_WHEN_GROUPING = 'onlyWhenGrouping';\n Constants.PINNED_TOP = 'top';\n Constants.PINNED_BOTTOM = 'bottom';\n Constants.DOM_LAYOUT_NORMAL = 'normal';\n Constants.DOM_LAYOUT_PRINT = 'print';\n Constants.DOM_LAYOUT_AUTO_HEIGHT = 'autoHeight';\n Constants.GROUP_AUTO_COLUMN_ID = 'ag-Grid-AutoColumn';\n Constants.SOURCE_PASTE = 'paste';\n Constants.PINNED_RIGHT = 'right';\n Constants.PINNED_LEFT = 'left';\n Constants.SORT_ASC = 'asc';\n Constants.SORT_DESC = 'desc';\n Constants.INPUT_SELECTOR = 'input, select, button, textarea';\n Constants.FOCUSABLE_SELECTOR = '[tabindex], input, select, button, textarea';\n Constants.FOCUSABLE_EXCLUDE = '.ag-hidden, .ag-hidden *, [disabled], .ag-disabled, .ag-disabled *';\n return Constants;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n(function (ModuleNames) {\n // when using modules, user references this\n ModuleNames[\"CommunityCoreModule\"] = \"@ag-grid-community/core\";\n // when not using modules, user references this\n ModuleNames[\"CommunityAllModules\"] = \"@ag-grid-community/all\";\n // community modules\n ModuleNames[\"InfiniteRowModelModule\"] = \"@ag-grid-community/infinite-row-model\";\n ModuleNames[\"ClientSideRowModelModule\"] = \"@ag-grid-community/client-side-row-model\";\n ModuleNames[\"CsvExportModule\"] = \"@ag-grid-community/csv-export\";\n // enterprise core - users never import on this, but other enterprise modules do\n ModuleNames[\"EnterpriseCoreModule\"] = \"@ag-grid-enterprise/core\";\n // when not using modules, user references this\n ModuleNames[\"EnterpriseAllModules\"] = \"@ag-grid-enterprise/all\";\n // enterprise modules\n ModuleNames[\"RowGroupingModule\"] = \"@ag-grid-enterprise/row-grouping\";\n ModuleNames[\"ColumnToolPanelModule\"] = \"@ag-grid-enterprise/column-tool-panel\";\n ModuleNames[\"FiltersToolPanelModule\"] = \"@ag-grid-enterprise/filter-tool-panel\";\n ModuleNames[\"MenuModule\"] = \"@ag-grid-enterprise/menu\";\n ModuleNames[\"SetFilterModule\"] = \"@ag-grid-enterprise/set-filter\";\n ModuleNames[\"MultiFilterModule\"] = \"@ag-grid-enterprise/multi-filter\";\n ModuleNames[\"StatusBarModule\"] = \"@ag-grid-enterprise/status-bar\";\n ModuleNames[\"SideBarModule\"] = \"@ag-grid-enterprise/side-bar\";\n ModuleNames[\"RangeSelectionModule\"] = \"@ag-grid-enterprise/range-selection\";\n ModuleNames[\"MasterDetailModule\"] = \"@ag-grid-enterprise/master-detail\";\n ModuleNames[\"RichSelectModule\"] = \"@ag-grid-enterprise/rich-select\";\n ModuleNames[\"GridChartsModule\"] = \"@ag-grid-enterprise/charts\";\n ModuleNames[\"ViewportRowModelModule\"] = \"@ag-grid-enterprise/viewport-row-model\";\n ModuleNames[\"ServerSideRowModelModule\"] = \"@ag-grid-enterprise/server-side-row-model\";\n ModuleNames[\"ExcelExportModule\"] = \"@ag-grid-enterprise/excel-export\";\n ModuleNames[\"ClipboardModule\"] = \"@ag-grid-enterprise/clipboard\";\n ModuleNames[\"SparklinesModule\"] = \"@ag-grid-enterprise/sparklines\";\n // framework wrappers currently don't provide beans, comps etc, so no need to be modules,\n // however i argue they should be as in theory they 'could' provide beans etc\n ModuleNames[\"AngularModule\"] = \"@ag-grid-community/angular\";\n ModuleNames[\"ReactModule\"] = \"@ag-grid-community/react\";\n ModuleNames[\"VueModule\"] = \"@ag-grid-community/vue\";\n ModuleNames[\"PolymerModule\"] = \"@ag-grid-community/polymer\";\n // and then this, which is definitely not a grid module, as it should not have any dependency\n // on the grid (ie shouldn't even reference the Module interface)\n // ChartsModule = \"@ag-grid-community/charts-core\",\n})(exports.ModuleNames || (exports.ModuleNames = {}));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar ModuleRegistry = /** @class */ (function () {\n function ModuleRegistry() {\n }\n ModuleRegistry.register = function (module, moduleBased) {\n if (moduleBased === void 0) { moduleBased = true; }\n ModuleRegistry.modulesMap[module.moduleName] = module;\n if (ModuleRegistry.moduleBased === undefined) {\n ModuleRegistry.moduleBased = moduleBased;\n }\n else {\n if (ModuleRegistry.moduleBased !== moduleBased) {\n doOnce(function () {\n console.warn(\"AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms.\");\n console.warn('Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.');\n }, 'ModulePackageCheck');\n }\n }\n };\n // noinspection JSUnusedGlobalSymbols\n ModuleRegistry.registerModules = function (modules, moduleBased) {\n if (moduleBased === void 0) { moduleBased = true; }\n if (!modules) {\n return;\n }\n modules.forEach(function (module) { return ModuleRegistry.register(module, moduleBased); });\n };\n ModuleRegistry.assertRegistered = function (moduleName, reason) {\n if (this.isRegistered(moduleName)) {\n return true;\n }\n var warningKey = reason + moduleName;\n var warningMessage;\n if (ModuleRegistry.moduleBased) {\n warningMessage = \"AG Grid: unable to use \" + reason + \" as module \" + moduleName + \" is not present. Please see: https://www.ag-grid.com/javascript-grid/modules/\";\n }\n else {\n warningMessage = \"AG Grid: unable to use \" + reason + \" as package 'ag-grid-enterprise' is not present. Please see: https://www.ag-grid.com/javascript-grid/packages/\";\n }\n doOnce(function () {\n console.warn(warningMessage);\n }, warningKey);\n return false;\n };\n ModuleRegistry.isRegistered = function (moduleName) {\n return !!ModuleRegistry.modulesMap[moduleName];\n };\n ModuleRegistry.getRegisteredModules = function () {\n return values(ModuleRegistry.modulesMap);\n };\n ModuleRegistry.isPackageBased = function () {\n return !ModuleRegistry.moduleBased;\n };\n // having in a map a) removes duplicates and b) allows fast lookup\n ModuleRegistry.modulesMap = {};\n return ModuleRegistry;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$1 = (undefined && undefined.__decorate) || function (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};\nvar instanceIdSequence = 0;\n// Wrapper around a user provide column definition. The grid treats the column definition as ready only.\n// This class contains all the runtime information about a column, plus some logic (the definition has no logic).\n// This class implements both interfaces ColumnGroupChild and ProvidedColumnGroupChild as the class can\n// appear as a child of either the original tree or the displayed tree. However the relevant group classes\n// for each type only implements one, as each group can only appear in it's associated tree (eg ProvidedColumnGroup\n// can only appear in OriginalColumn tree).\nvar Column = /** @class */ (function () {\n function Column(colDef, userProvidedColDef, colId, primary) {\n // used by React (and possibly other frameworks) as key for rendering\n this.instanceId = instanceIdSequence++;\n this.moving = false;\n this.menuVisible = false;\n this.filterActive = false;\n this.eventService = new EventService();\n this.rowGroupActive = false;\n this.pivotActive = false;\n this.aggregationActive = false;\n this.colDef = colDef;\n this.userProvidedColDef = userProvidedColDef;\n this.colId = colId;\n this.primary = primary;\n this.setState(colDef);\n }\n Column.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n Column.prototype.setState = function (colDef) {\n // sort\n if (colDef.sort !== undefined) {\n if (colDef.sort === Constants.SORT_ASC || colDef.sort === Constants.SORT_DESC) {\n this.sort = colDef.sort;\n }\n }\n else {\n if (colDef.initialSort === Constants.SORT_ASC || colDef.initialSort === Constants.SORT_DESC) {\n this.sort = colDef.initialSort;\n }\n }\n // sortIndex\n var sortIndex = attrToNumber(colDef.sortIndex);\n var initialSortIndex = attrToNumber(colDef.initialSortIndex);\n if (sortIndex !== undefined) {\n if (sortIndex !== null) {\n this.sortIndex = sortIndex;\n }\n }\n else {\n if (initialSortIndex !== null) {\n this.sortIndex = initialSortIndex;\n }\n }\n // hide\n var hide = attrToBoolean(colDef.hide);\n var initialHide = attrToBoolean(colDef.initialHide);\n if (hide !== undefined) {\n this.visible = !hide;\n }\n else {\n this.visible = !initialHide;\n }\n // pinned\n if (colDef.pinned !== undefined) {\n this.setPinned(colDef.pinned);\n }\n else {\n this.setPinned(colDef.initialPinned);\n }\n // flex\n var flex = attrToNumber(colDef.flex);\n var initialFlex = attrToNumber(colDef.initialFlex);\n if (flex !== undefined) {\n this.flex = flex;\n }\n else if (initialFlex !== undefined) {\n this.flex = initialFlex;\n }\n };\n // gets called when user provides an alternative colDef, eg\n Column.prototype.setColDef = function (colDef, userProvidedColDef) {\n this.colDef = colDef;\n this.userProvidedColDef = userProvidedColDef;\n this.initMinAndMaxWidths();\n this.initDotNotation();\n };\n /**\n * Returns the column definition provided by the application.\n * This may not be correct, as items can be superseded by default column options.\n * However it's useful for comparison, eg to know which application column definition matches that column.\n */\n Column.prototype.getUserProvidedColDef = function () {\n return this.userProvidedColDef;\n };\n Column.prototype.setParent = function (parent) {\n this.parent = parent;\n };\n /** Returns the parent column group, if column grouping is active. */\n Column.prototype.getParent = function () {\n return this.parent;\n };\n Column.prototype.setOriginalParent = function (originalParent) {\n this.originalParent = originalParent;\n };\n Column.prototype.getOriginalParent = function () {\n return this.originalParent;\n };\n // this is done after constructor as it uses gridOptionsWrapper\n Column.prototype.initialise = function () {\n this.initMinAndMaxWidths();\n this.resetActualWidth('gridInitializing');\n this.initDotNotation();\n this.validate();\n };\n Column.prototype.initDotNotation = function () {\n var suppressDotNotation = this.gridOptionsWrapper.isSuppressFieldDotNotation();\n this.fieldContainsDots = exists(this.colDef.field) && this.colDef.field.indexOf('.') >= 0 && !suppressDotNotation;\n this.tooltipFieldContainsDots = exists(this.colDef.tooltipField) && this.colDef.tooltipField.indexOf('.') >= 0 && !suppressDotNotation;\n };\n Column.prototype.initMinAndMaxWidths = function () {\n var colDef = this.colDef;\n this.minWidth = this.columnUtils.calculateColMinWidth(colDef);\n this.maxWidth = this.columnUtils.calculateColMaxWidth(colDef);\n };\n Column.prototype.resetActualWidth = function (source) {\n if (source === void 0) { source = 'api'; }\n var initialWidth = this.columnUtils.calculateColInitialWidth(this.colDef);\n this.setActualWidth(initialWidth, source, true);\n };\n Column.prototype.isEmptyGroup = function () {\n return false;\n };\n Column.prototype.isRowGroupDisplayed = function (colId) {\n if (missing(this.colDef) || missing(this.colDef.showRowGroup)) {\n return false;\n }\n var showingAllGroups = this.colDef.showRowGroup === true;\n var showingThisGroup = this.colDef.showRowGroup === colId;\n return showingAllGroups || showingThisGroup;\n };\n /** Returns `true` if column is a primary column, `false` if secondary. Secondary columns are used for pivoting. */\n Column.prototype.isPrimary = function () {\n return this.primary;\n };\n /** Returns `true` if column filtering is allowed. */\n Column.prototype.isFilterAllowed = function () {\n // filter defined means it's a string, class or true.\n // if its false, null or undefined then it's false.\n var filterDefined = !!this.colDef.filter || !!this.colDef.filterFramework;\n return filterDefined;\n };\n Column.prototype.isFieldContainsDots = function () {\n return this.fieldContainsDots;\n };\n Column.prototype.isTooltipFieldContainsDots = function () {\n return this.tooltipFieldContainsDots;\n };\n Column.prototype.validate = function () {\n var colDefAny = this.colDef;\n function warnOnce(msg, key, obj) {\n doOnce(function () {\n if (obj) {\n console.warn(msg, obj);\n }\n else {\n doOnce(function () { return console.warn(msg); }, key);\n }\n }, key);\n }\n var usingCSRM = this.gridOptionsWrapper.isRowModelDefault();\n if (usingCSRM && !ModuleRegistry.isRegistered(exports.ModuleNames.RowGroupingModule)) {\n var rowGroupingItems = ['enableRowGroup', 'rowGroup', 'rowGroupIndex', 'enablePivot', 'enableValue', 'pivot', 'pivotIndex', 'aggFunc'];\n rowGroupingItems.forEach(function (item) {\n if (exists(colDefAny[item])) {\n if (ModuleRegistry.isPackageBased()) {\n warnOnce(\"AG Grid: \" + item + \" is only valid in ag-grid-enterprise, your column definition should not have \" + item, 'ColumnRowGroupingMissing' + item);\n }\n else {\n warnOnce(\"AG Grid: \" + item + \" is only valid with AG Grid Enterprise Module \" + exports.ModuleNames.RowGroupingModule + \" - your column definition should not have \" + item, 'ColumnRowGroupingMissing' + item);\n }\n }\n });\n }\n if (!ModuleRegistry.isRegistered(exports.ModuleNames.RichSelectModule)) {\n if (this.colDef.cellEditor === 'agRichSelect') {\n if (ModuleRegistry.isPackageBased()) {\n warnOnce(\"AG Grid: \" + this.colDef.cellEditor + \" can only be used with ag-grid-enterprise\", 'ColumnRichSelectMissing');\n }\n else {\n warnOnce(\"AG Grid: \" + this.colDef.cellEditor + \" can only be used with AG Grid Enterprise Module \" + exports.ModuleNames.RichSelectModule, 'ColumnRichSelectMissing');\n }\n }\n }\n if (this.gridOptionsWrapper.isTreeData()) {\n var itemsNotAllowedWithTreeData = ['rowGroup', 'rowGroupIndex', 'pivot', 'pivotIndex'];\n itemsNotAllowedWithTreeData.forEach(function (item) {\n if (exists(colDefAny[item])) {\n warnOnce(\"AG Grid: \" + item + \" is not possible when doing tree data, your column definition should not have \" + item, 'TreeDataCannotRowGroup');\n }\n });\n }\n if (exists(this.colDef.width) && typeof this.colDef.width !== 'number') {\n warnOnce('AG Grid: colDef.width should be a number, not ' + typeof this.colDef.width, 'ColumnCheck_asdfawef');\n }\n if (colDefAny.pinnedRowCellRenderer) {\n warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n if (colDefAny.pinnedRowCellRendererParams) {\n warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n if (colDefAny.pinnedRowCellRendererFramework) {\n warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n if (colDefAny.pinnedRowValueGetter) {\n warnOnce('AG Grid: pinnedRowCellRenderer is deprecated, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue.', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n };\n /** Add an event listener to the column. */\n Column.prototype.addEventListener = function (eventType, listener) {\n this.eventService.addEventListener(eventType, listener);\n };\n /** Remove event listener from the column. */\n Column.prototype.removeEventListener = function (eventType, listener) {\n this.eventService.removeEventListener(eventType, listener);\n };\n Column.prototype.createColumnFunctionCallbackParams = function (rowNode) {\n return {\n node: rowNode,\n data: rowNode.data,\n column: this,\n colDef: this.colDef,\n context: this.gridOptionsWrapper.getContext(),\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi()\n };\n };\n Column.prototype.isSuppressNavigable = function (rowNode) {\n // if boolean set, then just use it\n if (typeof this.colDef.suppressNavigable === 'boolean') {\n return this.colDef.suppressNavigable;\n }\n // if function, then call the function to find out\n if (typeof this.colDef.suppressNavigable === 'function') {\n var params = this.createColumnFunctionCallbackParams(rowNode);\n var userFunc = this.colDef.suppressNavigable;\n return userFunc(params);\n }\n return false;\n };\n Column.prototype.isCellEditable = function (rowNode) {\n // only allow editing of groups if the user has this option enabled\n if (rowNode.group && !this.gridOptionsWrapper.isEnableGroupEdit()) {\n return false;\n }\n return this.isColumnFunc(rowNode, this.colDef.editable);\n };\n Column.prototype.isSuppressFillHandle = function () {\n return !!attrToBoolean(this.colDef.suppressFillHandle);\n };\n Column.prototype.isAutoHeight = function () {\n return !!attrToBoolean(this.colDef.autoHeight);\n };\n Column.prototype.isRowDrag = function (rowNode) {\n return this.isColumnFunc(rowNode, this.colDef.rowDrag);\n };\n Column.prototype.isDndSource = function (rowNode) {\n return this.isColumnFunc(rowNode, this.colDef.dndSource);\n };\n Column.prototype.isCellCheckboxSelection = function (rowNode) {\n return this.isColumnFunc(rowNode, this.colDef.checkboxSelection);\n };\n Column.prototype.isSuppressPaste = function (rowNode) {\n return this.isColumnFunc(rowNode, this.colDef ? this.colDef.suppressPaste : null);\n };\n Column.prototype.isResizable = function () {\n return !!attrToBoolean(this.colDef.resizable);\n };\n Column.prototype.isColumnFunc = function (rowNode, value) {\n // if boolean set, then just use it\n if (typeof value === 'boolean') {\n return value;\n }\n // if function, then call the function to find out\n if (typeof value === 'function') {\n var params = this.createColumnFunctionCallbackParams(rowNode);\n var editableFunc = value;\n return editableFunc(params);\n }\n return false;\n };\n Column.prototype.setMoving = function (moving, source) {\n if (source === void 0) { source = \"api\"; }\n this.moving = moving;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_MOVING_CHANGED, source));\n };\n Column.prototype.createColumnEvent = function (type, source) {\n return {\n api: this.gridApi,\n columnApi: this.columnApi,\n type: type,\n column: this,\n columns: [this],\n source: source\n };\n };\n Column.prototype.isMoving = function () {\n return this.moving;\n };\n /** If sorting is active, returns the sort direction e.g. `'asc'` or `'desc'`. */\n Column.prototype.getSort = function () {\n return this.sort;\n };\n Column.prototype.setSort = function (sort, source) {\n if (source === void 0) { source = \"api\"; }\n if (this.sort !== sort) {\n this.sort = sort;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_SORT_CHANGED, source));\n }\n };\n Column.prototype.setMenuVisible = function (visible, source) {\n if (source === void 0) { source = \"api\"; }\n if (this.menuVisible !== visible) {\n this.menuVisible = visible;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_MENU_VISIBLE_CHANGED, source));\n }\n };\n Column.prototype.isMenuVisible = function () {\n return this.menuVisible;\n };\n Column.prototype.isSortAscending = function () {\n return this.sort === Constants.SORT_ASC;\n };\n Column.prototype.isSortDescending = function () {\n return this.sort === Constants.SORT_DESC;\n };\n Column.prototype.isSortNone = function () {\n return missing(this.sort);\n };\n Column.prototype.isSorting = function () {\n return exists(this.sort);\n };\n Column.prototype.getSortIndex = function () {\n return this.sortIndex;\n };\n Column.prototype.setSortIndex = function (sortOrder) {\n this.sortIndex = sortOrder;\n };\n Column.prototype.setAggFunc = function (aggFunc) {\n this.aggFunc = aggFunc;\n };\n /** If aggregation is set for the column, returns the aggregation function. */\n Column.prototype.getAggFunc = function () {\n return this.aggFunc;\n };\n Column.prototype.getLeft = function () {\n return this.left;\n };\n Column.prototype.getOldLeft = function () {\n return this.oldLeft;\n };\n Column.prototype.getRight = function () {\n return this.left + this.actualWidth;\n };\n Column.prototype.setLeft = function (left, source) {\n if (source === void 0) { source = \"api\"; }\n this.oldLeft = this.left;\n if (this.left !== left) {\n this.left = left;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_LEFT_CHANGED, source));\n }\n };\n /** Returns `true` if filter is active on the column. */\n Column.prototype.isFilterActive = function () {\n return this.filterActive;\n };\n // additionalEventAttributes is used by provided simple floating filter, so it can add 'floatingFilter=true' to the event\n Column.prototype.setFilterActive = function (active, source, additionalEventAttributes) {\n if (source === void 0) { source = \"api\"; }\n if (this.filterActive !== active) {\n this.filterActive = active;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FILTER_ACTIVE_CHANGED, source));\n }\n var filterChangedEvent = this.createColumnEvent(Column.EVENT_FILTER_CHANGED, source);\n if (additionalEventAttributes) {\n mergeDeep(filterChangedEvent, additionalEventAttributes);\n }\n this.eventService.dispatchEvent(filterChangedEvent);\n };\n Column.prototype.setPinned = function (pinned) {\n if (pinned === true || pinned === Constants.PINNED_LEFT) {\n this.pinned = Constants.PINNED_LEFT;\n }\n else if (pinned === Constants.PINNED_RIGHT) {\n this.pinned = Constants.PINNED_RIGHT;\n }\n else {\n this.pinned = null;\n }\n };\n Column.prototype.setFirstRightPinned = function (firstRightPinned, source) {\n if (source === void 0) { source = \"api\"; }\n if (this.firstRightPinned !== firstRightPinned) {\n this.firstRightPinned = firstRightPinned;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, source));\n }\n };\n Column.prototype.setLastLeftPinned = function (lastLeftPinned, source) {\n if (source === void 0) { source = \"api\"; }\n if (this.lastLeftPinned !== lastLeftPinned) {\n this.lastLeftPinned = lastLeftPinned;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_LAST_LEFT_PINNED_CHANGED, source));\n }\n };\n Column.prototype.isFirstRightPinned = function () {\n return this.firstRightPinned;\n };\n Column.prototype.isLastLeftPinned = function () {\n return this.lastLeftPinned;\n };\n Column.prototype.isPinned = function () {\n return this.pinned === Constants.PINNED_LEFT || this.pinned === Constants.PINNED_RIGHT;\n };\n Column.prototype.isPinnedLeft = function () {\n return this.pinned === Constants.PINNED_LEFT;\n };\n Column.prototype.isPinnedRight = function () {\n return this.pinned === Constants.PINNED_RIGHT;\n };\n Column.prototype.getPinned = function () {\n return this.pinned;\n };\n Column.prototype.setVisible = function (visible, source) {\n if (source === void 0) { source = \"api\"; }\n var newValue = visible === true;\n if (this.visible !== newValue) {\n this.visible = newValue;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_VISIBLE_CHANGED, source));\n }\n };\n Column.prototype.isVisible = function () {\n return this.visible;\n };\n /** Returns the column definition for this column.\n * The column definition will be the result of merging the application provided column definition with any provided defaults\n * (e.g. `defaultColDef` grid option, or column types.\n *\n * Equivalent: `getDefinition` */\n Column.prototype.getColDef = function () {\n return this.colDef;\n };\n Column.prototype.getColumnGroupShow = function () {\n return this.colDef.columnGroupShow;\n };\n /**\n * Returns the unique ID for the column.\n *\n * Equivalent: `getId`, `getUniqueId` */\n Column.prototype.getColId = function () {\n return this.colId;\n };\n /**\n * Returns the unique ID for the column.\n *\n * Equivalent: `getColId`, `getUniqueId` */\n Column.prototype.getId = function () {\n return this.getColId();\n };\n /**\n * Returns the unique ID for the column.\n *\n * Equivalent: `getColId`, `getId` */\n Column.prototype.getUniqueId = function () {\n return this.getId();\n };\n Column.prototype.getDefinition = function () {\n return this.colDef;\n };\n /** Returns the current width of the column. If the column is resized, the actual width is the new size. */\n Column.prototype.getActualWidth = function () {\n return this.actualWidth;\n };\n Column.prototype.createBaseColDefParams = function (rowNode) {\n var params = {\n node: rowNode,\n data: rowNode.data,\n colDef: this.colDef,\n column: this,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n return params;\n };\n Column.prototype.getColSpan = function (rowNode) {\n if (missing(this.colDef.colSpan)) {\n return 1;\n }\n var params = this.createBaseColDefParams(rowNode);\n var colSpan = this.colDef.colSpan(params);\n // colSpan must be number equal to or greater than 1\n return Math.max(colSpan, 1);\n };\n Column.prototype.getRowSpan = function (rowNode) {\n if (missing(this.colDef.rowSpan)) {\n return 1;\n }\n var params = this.createBaseColDefParams(rowNode);\n var rowSpan = this.colDef.rowSpan(params);\n // rowSpan must be number equal to or greater than 1\n return Math.max(rowSpan, 1);\n };\n Column.prototype.setActualWidth = function (actualWidth, source, silent) {\n if (source === void 0) { source = \"api\"; }\n if (silent === void 0) { silent = false; }\n if (this.minWidth != null) {\n actualWidth = Math.max(actualWidth, this.minWidth);\n }\n if (this.maxWidth != null) {\n actualWidth = Math.min(actualWidth, this.maxWidth);\n }\n if (this.actualWidth !== actualWidth) {\n // disable flex for this column if it was manually resized.\n this.actualWidth = actualWidth;\n if (this.flex && source !== 'flex' && source !== 'gridInitializing') {\n this.flex = null;\n }\n if (!silent) {\n this.fireColumnWidthChangedEvent(source);\n }\n }\n };\n Column.prototype.fireColumnWidthChangedEvent = function (source) {\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_WIDTH_CHANGED, source));\n };\n Column.prototype.isGreaterThanMax = function (width) {\n if (this.maxWidth != null) {\n return width > this.maxWidth;\n }\n return false;\n };\n Column.prototype.getMinWidth = function () {\n return this.minWidth;\n };\n Column.prototype.getMaxWidth = function () {\n return this.maxWidth;\n };\n Column.prototype.getFlex = function () {\n return this.flex || 0;\n };\n // this method should only be used by the columnModel to\n // change flex when required by the setColumnState method.\n Column.prototype.setFlex = function (flex) {\n if (this.flex !== flex) {\n this.flex = flex;\n }\n };\n Column.prototype.setMinimum = function (source) {\n if (source === void 0) { source = \"api\"; }\n if (exists(this.minWidth)) {\n this.setActualWidth(this.minWidth, source);\n }\n };\n Column.prototype.setRowGroupActive = function (rowGroup, source) {\n if (source === void 0) { source = \"api\"; }\n if (this.rowGroupActive !== rowGroup) {\n this.rowGroupActive = rowGroup;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_ROW_GROUP_CHANGED, source));\n }\n };\n /** Returns `true` if row group is currently active for this column. */\n Column.prototype.isRowGroupActive = function () {\n return this.rowGroupActive;\n };\n Column.prototype.setPivotActive = function (pivot, source) {\n if (source === void 0) { source = \"api\"; }\n if (this.pivotActive !== pivot) {\n this.pivotActive = pivot;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_PIVOT_CHANGED, source));\n }\n };\n /** Returns `true` if pivot is currently active for this column. */\n Column.prototype.isPivotActive = function () {\n return this.pivotActive;\n };\n Column.prototype.isAnyFunctionActive = function () {\n return this.isPivotActive() || this.isRowGroupActive() || this.isValueActive();\n };\n Column.prototype.isAnyFunctionAllowed = function () {\n return this.isAllowPivot() || this.isAllowRowGroup() || this.isAllowValue();\n };\n Column.prototype.setValueActive = function (value, source) {\n if (source === void 0) { source = \"api\"; }\n if (this.aggregationActive !== value) {\n this.aggregationActive = value;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_VALUE_CHANGED, source));\n }\n };\n /** Returns `true` if value (aggregation) is currently active for this column. */\n Column.prototype.isValueActive = function () {\n return this.aggregationActive;\n };\n Column.prototype.isAllowPivot = function () {\n return this.colDef.enablePivot === true;\n };\n Column.prototype.isAllowValue = function () {\n return this.colDef.enableValue === true;\n };\n Column.prototype.isAllowRowGroup = function () {\n return this.colDef.enableRowGroup === true;\n };\n Column.prototype.getMenuTabs = function (defaultValues) {\n var menuTabs = this.getColDef().menuTabs;\n if (menuTabs == null) {\n menuTabs = defaultValues;\n }\n return menuTabs;\n };\n // this used to be needed, as previous version of ag-grid had lockPosition as column state,\n // so couldn't depend on colDef version.\n Column.prototype.isLockPosition = function () {\n console.warn('AG Grid: since v21, col.isLockPosition() should not be used, please use col.getColDef().lockPosition instead.');\n return this.colDef ? !!this.colDef.lockPosition : false;\n };\n // this used to be needed, as previous version of ag-grid had lockVisible as column state,\n // so couldn't depend on colDef version.\n Column.prototype.isLockVisible = function () {\n console.warn('AG Grid: since v21, col.isLockVisible() should not be used, please use col.getColDef().lockVisible instead.');\n return this.colDef ? !!this.colDef.lockVisible : false;\n };\n // this used to be needed, as previous version of ag-grid had lockPinned as column state,\n // so couldn't depend on colDef version.\n Column.prototype.isLockPinned = function () {\n console.warn('AG Grid: since v21, col.isLockPinned() should not be used, please use col.getColDef().lockPinned instead.');\n return this.colDef ? !!this.colDef.lockPinned : false;\n };\n // + renderedHeaderCell - for making header cell transparent when moving\n Column.EVENT_MOVING_CHANGED = 'movingChanged';\n // + renderedCell - changing left position\n Column.EVENT_LEFT_CHANGED = 'leftChanged';\n // + renderedCell - changing width\n Column.EVENT_WIDTH_CHANGED = 'widthChanged';\n // + renderedCell - for changing pinned classes\n Column.EVENT_LAST_LEFT_PINNED_CHANGED = 'lastLeftPinnedChanged';\n Column.EVENT_FIRST_RIGHT_PINNED_CHANGED = 'firstRightPinnedChanged';\n // + renderedColumn - for changing visibility icon\n Column.EVENT_VISIBLE_CHANGED = 'visibleChanged';\n // + every time the filter changes, used in the floating filters\n Column.EVENT_FILTER_CHANGED = 'filterChanged';\n // + renderedHeaderCell - marks the header with filter icon\n Column.EVENT_FILTER_ACTIVE_CHANGED = 'filterActiveChanged';\n // + renderedHeaderCell - marks the header with sort icon\n Column.EVENT_SORT_CHANGED = 'sortChanged';\n Column.EVENT_MENU_VISIBLE_CHANGED = 'menuVisibleChanged';\n // + toolpanel, for gui updates\n Column.EVENT_ROW_GROUP_CHANGED = 'columnRowGroupChanged';\n // + toolpanel, for gui updates\n Column.EVENT_PIVOT_CHANGED = 'columnPivotChanged';\n // + toolpanel, for gui updates\n Column.EVENT_VALUE_CHANGED = 'columnValueChanged';\n __decorate$1([\n Autowired('gridOptionsWrapper')\n ], Column.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$1([\n Autowired('columnUtils')\n ], Column.prototype, \"columnUtils\", void 0);\n __decorate$1([\n Autowired('columnApi')\n ], Column.prototype, \"columnApi\", void 0);\n __decorate$1([\n Autowired('gridApi')\n ], Column.prototype, \"gridApi\", void 0);\n __decorate$1([\n Autowired('context')\n ], Column.prototype, \"context\", void 0);\n __decorate$1([\n PostConstruct\n ], Column.prototype, \"initialise\", null);\n return Column;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction firstExistingValue() {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n if (exists(value)) {\n return value;\n }\n }\n return null;\n}\nfunction existsAndNotEmpty(value) {\n return value != null && value.length > 0;\n}\nfunction last(arr) {\n if (!arr || !arr.length) {\n return;\n }\n return arr[arr.length - 1];\n}\nfunction areEqual(a, b, comparator) {\n if (a == null && b == null) {\n return true;\n }\n return a != null &&\n b != null &&\n a.length === b.length &&\n a.every(function (value, index) { return comparator ? comparator(value, b[index]) : b[index] === value; });\n}\n/** @deprecated */\nfunction compareArrays(array1, array2) {\n return areEqual(array1, array2);\n}\n/** @deprecated */\nfunction shallowCompare(arr1, arr2) {\n return areEqual(arr1, arr2);\n}\nfunction sortNumerically(array) {\n return array.sort(function (a, b) { return a - b; });\n}\nfunction removeRepeatsFromArray(array, object) {\n if (!array) {\n return;\n }\n for (var index = array.length - 2; index >= 0; index--) {\n var thisOneMatches = array[index] === object;\n var nextOneMatches = array[index + 1] === object;\n if (thisOneMatches && nextOneMatches) {\n array.splice(index + 1, 1);\n }\n }\n}\nfunction removeFromArray(array, object) {\n var index = array.indexOf(object);\n if (index >= 0) {\n array.splice(index, 1);\n }\n}\nfunction removeAllFromArray(array, toRemove) {\n toRemove.forEach(function (item) { return removeFromArray(array, item); });\n}\nfunction insertIntoArray(array, object, toIndex) {\n array.splice(toIndex, 0, object);\n}\nfunction insertArrayIntoArray(dest, src, toIndex) {\n if (dest == null || src == null) {\n return;\n }\n // put items in backwards, otherwise inserted items end up in reverse order\n for (var i = src.length - 1; i >= 0; i--) {\n var item = src[i];\n insertIntoArray(dest, item, toIndex);\n }\n}\nfunction moveInArray(array, objectsToMove, toIndex) {\n // first take out items from the array\n removeAllFromArray(array, objectsToMove);\n // now add the objects, in same order as provided to us, that means we start at the end\n // as the objects will be pushed to the right as they are inserted\n objectsToMove.slice().reverse().forEach(function (obj) { return insertIntoArray(array, obj, toIndex); });\n}\nfunction includes(array, value) {\n return array.indexOf(value) > -1;\n}\nfunction flatten(arrayOfArrays) {\n return [].concat.apply([], arrayOfArrays);\n}\nfunction pushAll(target, source) {\n if (source == null || target == null) {\n return;\n }\n source.forEach(function (value) { return target.push(value); });\n}\nfunction toStrings(array) {\n return array.map(toStringOrNull);\n}\nfunction forEachReverse(list, action) {\n if (list == null) {\n return;\n }\n for (var i = list.length - 1; i >= 0; i--) {\n action(list[i], i);\n }\n}\n\nvar ArrayUtils = /*#__PURE__*/Object.freeze({\n firstExistingValue: firstExistingValue,\n existsAndNotEmpty: existsAndNotEmpty,\n last: last,\n areEqual: areEqual,\n compareArrays: compareArrays,\n shallowCompare: shallowCompare,\n sortNumerically: sortNumerically,\n removeRepeatsFromArray: removeRepeatsFromArray,\n removeFromArray: removeFromArray,\n removeAllFromArray: removeAllFromArray,\n insertIntoArray: insertIntoArray,\n insertArrayIntoArray: insertArrayIntoArray,\n moveInArray: moveInArray,\n includes: includes,\n flatten: flatten,\n pushAll: pushAll,\n toStrings: toStrings,\n forEachReverse: forEachReverse\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$2 = (undefined && undefined.__decorate) || function (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};\nvar ColumnGroup = /** @class */ (function () {\n function ColumnGroup(providedColumnGroup, groupId, instanceId, pinned) {\n // depends on the open/closed state of the group, only displaying columns are stored here\n this.displayedChildren = [];\n this.localEventService = new EventService();\n this.groupId = groupId;\n this.instanceId = instanceId;\n this.providedColumnGroup = providedColumnGroup;\n this.pinned = pinned;\n }\n // this is static, a it is used outside of this class\n ColumnGroup.createUniqueId = function (groupId, instanceId) {\n return groupId + '_' + instanceId;\n };\n // as the user is adding and removing columns, the groups are recalculated.\n // this reset clears out all children, ready for children to be added again\n ColumnGroup.prototype.reset = function () {\n this.parent = null;\n this.children = null;\n this.displayedChildren = null;\n };\n ColumnGroup.prototype.getParent = function () {\n return this.parent;\n };\n ColumnGroup.prototype.setParent = function (parent) {\n this.parent = parent;\n };\n ColumnGroup.prototype.getUniqueId = function () {\n return ColumnGroup.createUniqueId(this.groupId, this.instanceId);\n };\n ColumnGroup.prototype.isEmptyGroup = function () {\n return this.displayedChildren.length === 0;\n };\n ColumnGroup.prototype.isMoving = function () {\n var allLeafColumns = this.getProvidedColumnGroup().getLeafColumns();\n if (!allLeafColumns || allLeafColumns.length === 0) {\n return false;\n }\n return allLeafColumns.every(function (col) { return col.isMoving(); });\n };\n ColumnGroup.prototype.checkLeft = function () {\n // first get all children to setLeft, as it impacts our decision below\n this.displayedChildren.forEach(function (child) {\n if (child instanceof ColumnGroup) {\n child.checkLeft();\n }\n });\n // set our left based on first displayed column\n if (this.displayedChildren.length > 0) {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n var lastChild = last(this.displayedChildren);\n var lastChildLeft = lastChild.getLeft();\n this.setLeft(lastChildLeft);\n }\n else {\n var firstChildLeft = this.displayedChildren[0].getLeft();\n this.setLeft(firstChildLeft);\n }\n }\n else {\n // this should never happen, as if we have no displayed columns, then\n // this groups should not even exist.\n this.setLeft(null);\n }\n };\n ColumnGroup.prototype.getLeft = function () {\n return this.left;\n };\n ColumnGroup.prototype.getOldLeft = function () {\n return this.oldLeft;\n };\n ColumnGroup.prototype.setLeft = function (left) {\n this.oldLeft = left;\n if (this.left !== left) {\n this.left = left;\n this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_LEFT_CHANGED));\n }\n };\n ColumnGroup.prototype.getPinned = function () {\n return this.pinned;\n };\n ColumnGroup.prototype.createAgEvent = function (type) {\n return { type: type };\n };\n ColumnGroup.prototype.addEventListener = function (eventType, listener) {\n this.localEventService.addEventListener(eventType, listener);\n };\n ColumnGroup.prototype.removeEventListener = function (eventType, listener) {\n this.localEventService.removeEventListener(eventType, listener);\n };\n ColumnGroup.prototype.getGroupId = function () {\n return this.groupId;\n };\n ColumnGroup.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n ColumnGroup.prototype.isChildInThisGroupDeepSearch = function (wantedChild) {\n var result = false;\n this.children.forEach(function (foundChild) {\n if (wantedChild === foundChild) {\n result = true;\n }\n if (foundChild instanceof ColumnGroup) {\n if (foundChild.isChildInThisGroupDeepSearch(wantedChild)) {\n result = true;\n }\n }\n });\n return result;\n };\n ColumnGroup.prototype.getActualWidth = function () {\n var groupActualWidth = 0;\n if (this.displayedChildren) {\n this.displayedChildren.forEach(function (child) {\n groupActualWidth += child.getActualWidth();\n });\n }\n return groupActualWidth;\n };\n ColumnGroup.prototype.isResizable = function () {\n if (!this.displayedChildren) {\n return false;\n }\n // if at least one child is resizable, then the group is resizable\n var result = false;\n this.displayedChildren.forEach(function (child) {\n if (child.isResizable()) {\n result = true;\n }\n });\n return result;\n };\n ColumnGroup.prototype.getMinWidth = function () {\n var result = 0;\n this.displayedChildren.forEach(function (groupChild) {\n result += groupChild.getMinWidth() || 0;\n });\n return result;\n };\n ColumnGroup.prototype.addChild = function (child) {\n if (!this.children) {\n this.children = [];\n }\n this.children.push(child);\n };\n ColumnGroup.prototype.getDisplayedChildren = function () {\n return this.displayedChildren;\n };\n ColumnGroup.prototype.getLeafColumns = function () {\n var result = [];\n this.addLeafColumns(result);\n return result;\n };\n ColumnGroup.prototype.getDisplayedLeafColumns = function () {\n var result = [];\n this.addDisplayedLeafColumns(result);\n return result;\n };\n // why two methods here doing the same thing?\n ColumnGroup.prototype.getDefinition = function () {\n return this.providedColumnGroup.getColGroupDef();\n };\n ColumnGroup.prototype.getColGroupDef = function () {\n return this.providedColumnGroup.getColGroupDef();\n };\n ColumnGroup.prototype.isPadding = function () {\n return this.providedColumnGroup.isPadding();\n };\n ColumnGroup.prototype.isExpandable = function () {\n return this.providedColumnGroup.isExpandable();\n };\n ColumnGroup.prototype.isExpanded = function () {\n return this.providedColumnGroup.isExpanded();\n };\n ColumnGroup.prototype.setExpanded = function (expanded) {\n this.providedColumnGroup.setExpanded(expanded);\n };\n ColumnGroup.prototype.addDisplayedLeafColumns = function (leafColumns) {\n this.displayedChildren.forEach(function (child) {\n if (child instanceof Column) {\n leafColumns.push(child);\n }\n else if (child instanceof ColumnGroup) {\n child.addDisplayedLeafColumns(leafColumns);\n }\n });\n };\n ColumnGroup.prototype.addLeafColumns = function (leafColumns) {\n this.children.forEach(function (child) {\n if (child instanceof Column) {\n leafColumns.push(child);\n }\n else if (child instanceof ColumnGroup) {\n child.addLeafColumns(leafColumns);\n }\n });\n };\n ColumnGroup.prototype.getChildren = function () {\n return this.children;\n };\n ColumnGroup.prototype.getColumnGroupShow = function () {\n return this.providedColumnGroup.getColumnGroupShow();\n };\n ColumnGroup.prototype.getProvidedColumnGroup = function () {\n return this.providedColumnGroup;\n };\n /** @deprecated getOriginalColumnGroup is deprecated, use getOriginalColumnGroup. */\n ColumnGroup.prototype.getOriginalColumnGroup = function () {\n console.warn('AG Grid: columnGroup.getOriginalColumnGroup() is deprecated due to a method rename, use columnGroup.getProvidedColumnGroup() instead');\n return this.getProvidedColumnGroup();\n };\n ColumnGroup.prototype.getPaddingLevel = function () {\n var parent = this.getParent();\n if (!this.isPadding() || !parent || !parent.isPadding()) {\n return 0;\n }\n return 1 + parent.getPaddingLevel();\n };\n ColumnGroup.prototype.calculateDisplayedColumns = function () {\n var _this = this;\n // clear out last time we calculated\n this.displayedChildren = [];\n // find the column group that is controlling expandable. this is relevant when we have padding (empty)\n // groups, where the expandable is actually the first parent that is not a padding group.\n var parentWithExpansion = this;\n while (parentWithExpansion != null && parentWithExpansion.isPadding()) {\n parentWithExpansion = parentWithExpansion.getParent();\n }\n var isExpandable = parentWithExpansion ? parentWithExpansion.providedColumnGroup.isExpandable() : false;\n // it not expandable, everything is visible\n if (!isExpandable) {\n this.displayedChildren = this.children;\n this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED));\n return;\n }\n // Add cols based on columnGroupShow\n // Note - the below also adds padding groups, these are always added because they never have\n // colDef.columnGroupShow set.\n this.children.forEach(function (child) {\n // never add empty groups\n var emptyGroup = child instanceof ColumnGroup && (!child.displayedChildren || !child.displayedChildren.length);\n if (emptyGroup) {\n return;\n }\n var headerGroupShow = child.getColumnGroupShow();\n switch (headerGroupShow) {\n case ColumnGroup.HEADER_GROUP_SHOW_OPEN:\n // when set to open, only show col if group is open\n if (parentWithExpansion.providedColumnGroup.isExpanded()) {\n _this.displayedChildren.push(child);\n }\n break;\n case ColumnGroup.HEADER_GROUP_SHOW_CLOSED:\n // when set to open, only show col if group is open\n if (!parentWithExpansion.providedColumnGroup.isExpanded()) {\n _this.displayedChildren.push(child);\n }\n break;\n default:\n _this.displayedChildren.push(child);\n break;\n }\n });\n this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED));\n };\n ColumnGroup.HEADER_GROUP_SHOW_OPEN = 'open';\n ColumnGroup.HEADER_GROUP_SHOW_CLOSED = 'closed';\n ColumnGroup.EVENT_LEFT_CHANGED = 'leftChanged';\n ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED = 'displayedChildrenChanged';\n __decorate$2([\n Autowired('gridOptionsWrapper')\n ], ColumnGroup.prototype, \"gridOptionsWrapper\", void 0);\n return ColumnGroup;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar ProvidedColumnGroup = /** @class */ (function () {\n function ProvidedColumnGroup(colGroupDef, groupId, padding, level) {\n this.localEventService = new EventService();\n this.expandable = false;\n this.colGroupDef = colGroupDef;\n this.groupId = groupId;\n this.expanded = !!colGroupDef && !!colGroupDef.openByDefault;\n this.padding = padding;\n this.level = level;\n }\n ProvidedColumnGroup.prototype.setOriginalParent = function (originalParent) {\n this.originalParent = originalParent;\n };\n ProvidedColumnGroup.prototype.getOriginalParent = function () {\n return this.originalParent;\n };\n ProvidedColumnGroup.prototype.getLevel = function () {\n return this.level;\n };\n ProvidedColumnGroup.prototype.isVisible = function () {\n // return true if at least one child is visible\n if (this.children) {\n return this.children.some(function (child) { return child.isVisible(); });\n }\n return false;\n };\n ProvidedColumnGroup.prototype.isPadding = function () {\n return this.padding;\n };\n ProvidedColumnGroup.prototype.setExpanded = function (expanded) {\n this.expanded = expanded === undefined ? false : expanded;\n var event = {\n type: ProvidedColumnGroup.EVENT_EXPANDED_CHANGED\n };\n this.localEventService.dispatchEvent(event);\n };\n ProvidedColumnGroup.prototype.isExpandable = function () {\n return this.expandable;\n };\n ProvidedColumnGroup.prototype.isExpanded = function () {\n return this.expanded;\n };\n ProvidedColumnGroup.prototype.getGroupId = function () {\n return this.groupId;\n };\n ProvidedColumnGroup.prototype.getId = function () {\n return this.getGroupId();\n };\n ProvidedColumnGroup.prototype.setChildren = function (children) {\n this.children = children;\n };\n ProvidedColumnGroup.prototype.getChildren = function () {\n return this.children;\n };\n ProvidedColumnGroup.prototype.getColGroupDef = function () {\n return this.colGroupDef;\n };\n ProvidedColumnGroup.prototype.getLeafColumns = function () {\n var result = [];\n this.addLeafColumns(result);\n return result;\n };\n ProvidedColumnGroup.prototype.addLeafColumns = function (leafColumns) {\n if (!this.children) {\n return;\n }\n this.children.forEach(function (child) {\n if (child instanceof Column) {\n leafColumns.push(child);\n }\n else if (child instanceof ProvidedColumnGroup) {\n child.addLeafColumns(leafColumns);\n }\n });\n };\n ProvidedColumnGroup.prototype.getColumnGroupShow = function () {\n var colGroupDef = this.colGroupDef;\n if (!colGroupDef) {\n return;\n }\n return colGroupDef.columnGroupShow;\n };\n // need to check that this group has at least one col showing when both expanded and contracted.\n // if not, then we don't allow expanding and contracting on this group\n ProvidedColumnGroup.prototype.setupExpandable = function () {\n var _this = this;\n this.setExpandable();\n // note - we should be removing this event listener\n this.getLeafColumns().forEach(function (col) { return col.addEventListener(Column.EVENT_VISIBLE_CHANGED, _this.onColumnVisibilityChanged.bind(_this)); });\n };\n ProvidedColumnGroup.prototype.setExpandable = function () {\n if (this.isPadding()) {\n return;\n }\n // want to make sure the group doesn't disappear when it's open\n var atLeastOneShowingWhenOpen = false;\n // want to make sure the group doesn't disappear when it's closed\n var atLeastOneShowingWhenClosed = false;\n // want to make sure the group has something to show / hide\n var atLeastOneChangeable = false;\n var children = this.findChildrenRemovingPadding();\n for (var i = 0, j = children.length; i < j; i++) {\n var abstractColumn = children[i];\n if (!abstractColumn.isVisible()) {\n continue;\n }\n // if the abstractColumn is a grid generated group, there will be no colDef\n var headerGroupShow = abstractColumn.getColumnGroupShow();\n if (headerGroupShow === ColumnGroup.HEADER_GROUP_SHOW_OPEN) {\n atLeastOneShowingWhenOpen = true;\n atLeastOneChangeable = true;\n }\n else if (headerGroupShow === ColumnGroup.HEADER_GROUP_SHOW_CLOSED) {\n atLeastOneShowingWhenClosed = true;\n atLeastOneChangeable = true;\n }\n else {\n atLeastOneShowingWhenOpen = true;\n atLeastOneShowingWhenClosed = true;\n }\n }\n var expandable = atLeastOneShowingWhenOpen && atLeastOneShowingWhenClosed && atLeastOneChangeable;\n if (this.expandable !== expandable) {\n this.expandable = expandable;\n var event_1 = {\n type: ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED\n };\n this.localEventService.dispatchEvent(event_1);\n }\n };\n ProvidedColumnGroup.prototype.findChildrenRemovingPadding = function () {\n var res = [];\n var process = function (items) {\n items.forEach(function (item) {\n // if padding, we add this children instead of the padding\n var skipBecausePadding = item instanceof ProvidedColumnGroup && item.isPadding();\n if (skipBecausePadding) {\n process(item.children);\n }\n else {\n res.push(item);\n }\n });\n };\n process(this.children);\n return res;\n };\n ProvidedColumnGroup.prototype.onColumnVisibilityChanged = function () {\n this.setExpandable();\n };\n ProvidedColumnGroup.prototype.addEventListener = function (eventType, listener) {\n this.localEventService.addEventListener(eventType, listener);\n };\n ProvidedColumnGroup.prototype.removeEventListener = function (eventType, listener) {\n this.localEventService.removeEventListener(eventType, listener);\n };\n ProvidedColumnGroup.EVENT_EXPANDED_CHANGED = 'expandedChanged';\n ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED = 'expandableChanged';\n return ProvidedColumnGroup;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar DefaultColumnTypes = {\n numericColumn: {\n headerClass: 'ag-right-aligned-header',\n cellClass: 'ag-right-aligned-cell'\n },\n rightAligned: {\n headerClass: 'ag-right-aligned-header',\n cellClass: 'ag-right-aligned-cell'\n }\n};\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar AG_GRID_STOP_PROPAGATION = '__ag_Grid_Stop_Propagation';\nvar PASSIVE_EVENTS = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];\nvar supports = {};\n/**\n * a user once raised an issue - they said that when you opened a popup (eg context menu)\n * and then clicked on a selection checkbox, the popup wasn't closed. this is because the\n * popup listens for clicks on the body, however ag-grid WAS stopping propagation on the\n * checkbox clicks (so the rows didn't pick them up as row selection selection clicks).\n * to get around this, we have a pattern to stop propagation for the purposes of AG Grid,\n * but we still let the event pass back to the body.\n * @param {Event} event\n */\nfunction stopPropagationForAgGrid(event) {\n event[AG_GRID_STOP_PROPAGATION] = true;\n}\nfunction isStopPropagationForAgGrid(event) {\n return event[AG_GRID_STOP_PROPAGATION] === true;\n}\nvar isEventSupported = (function () {\n var tags = {\n select: 'input',\n change: 'input',\n submit: 'form',\n reset: 'form',\n error: 'img',\n load: 'img',\n abort: 'img'\n };\n var eventChecker = function (eventName) {\n if (typeof supports[eventName] === 'boolean') {\n return supports[eventName];\n }\n var el = document.createElement(tags[eventName] || 'div');\n eventName = 'on' + eventName;\n return supports[eventName] = (eventName in el);\n };\n return eventChecker;\n})();\nfunction getCtrlForEvent(gridOptionsWrapper, event, type) {\n var sourceElement = event.target;\n while (sourceElement) {\n var renderedComp = gridOptionsWrapper.getDomData(sourceElement, type);\n if (renderedComp) {\n return renderedComp;\n }\n sourceElement = sourceElement.parentElement;\n }\n return null;\n}\n/**\n * @deprecated\n * Adds all type of change listeners to an element, intended to be a text field\n * @param {HTMLElement} element\n * @param {EventListener} listener\n */\nfunction addChangeListener(element, listener) {\n element.addEventListener('changed', listener);\n element.addEventListener('paste', listener);\n element.addEventListener('input', listener);\n}\nfunction isElementInEventPath(element, event) {\n if (!event || !element) {\n return false;\n }\n return getEventPath(event).indexOf(element) >= 0;\n}\nfunction createEventPath(event) {\n var res = [];\n var pointer = event.target;\n while (pointer) {\n res.push(pointer);\n pointer = pointer.parentElement;\n }\n return res;\n}\n/**\n * firefox doesn't have event.path set, or any alternative to it, so we hack\n * it in. this is needed as it's to late to work out the path when the item is\n * removed from the dom. used by MouseEventService, where it works out if a click\n * was from the current grid, or a detail grid (master / detail).\n * @param {Event} event\n */\nfunction addAgGridEventPath(event) {\n event.__agGridEventPath = getEventPath(event);\n}\n/**\n * Gets the path for an Event.\n * https://stackoverflow.com/questions/39245488/event-path-undefined-with-firefox-and-vue-js\n * https://developer.mozilla.org/en-US/docs/Web/API/Event\n * @param {Event} event\n * @returns {EventTarget[]}\n */\nfunction getEventPath(event) {\n var eventNoType = event;\n if (eventNoType.path) {\n // Chrome supports path\n return eventNoType.path;\n }\n if (eventNoType.composedPath) {\n // Firefox supports composePath\n return eventNoType.composedPath();\n }\n if (eventNoType.__agGridEventPath) {\n // Firefox supports composePath\n return eventNoType.__agGridEventPath;\n }\n // and finally, if none of the above worked,\n // we create the path ourselves\n return createEventPath(event);\n}\nfunction addSafePassiveEventListener(frameworkOverrides, eElement, event, listener) {\n var isPassive = includes(PASSIVE_EVENTS, event);\n var options = isPassive ? { passive: true } : undefined;\n // this check is here for certain scenarios where I believe the user must be destroying\n // the grid somehow but continuing for it to be used\n if (frameworkOverrides && frameworkOverrides.addEventListener) {\n frameworkOverrides.addEventListener(eElement, event, listener, options);\n }\n}\n\nvar EventUtils = /*#__PURE__*/Object.freeze({\n stopPropagationForAgGrid: stopPropagationForAgGrid,\n isStopPropagationForAgGrid: isStopPropagationForAgGrid,\n isEventSupported: isEventSupported,\n getCtrlForEvent: getCtrlForEvent,\n addChangeListener: addChangeListener,\n isElementInEventPath: isElementInEventPath,\n createEventPath: createEventPath,\n addAgGridEventPath: addAgGridEventPath,\n getEventPath: getEventPath,\n addSafePassiveEventListener: addSafePassiveEventListener\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$3 = (undefined && undefined.__decorate) || function (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};\nvar BeanStub = /** @class */ (function () {\n function BeanStub() {\n var _this = this;\n this.destroyFunctions = [];\n this.destroyed = false;\n // for vue 3 - prevents Vue from trying to make this (and obviously any sub classes) from being reactive\n // prevents vue from creating proxies for created objects and prevents identity related issues\n this.__v_skip = true;\n this.isAlive = function () { return !_this.destroyed; };\n }\n // this was a test constructor niall built, when active, it prints after 5 seconds all beans/components that are\n // not destroyed. to use, create a new grid, then api.destroy() before 5 seconds. then anything that gets printed\n // points to a bean or component that was not properly disposed of.\n // constructor() {\n // setTimeout(()=> {\n // if (this.isAlive()) {\n // let prototype: any = Object.getPrototypeOf(this);\n // const constructor: any = prototype.constructor;\n // const constructorString = constructor.toString();\n // const beanName = constructorString.substring(9, constructorString.indexOf(\"(\"));\n // console.log('is alive ' + beanName);\n // }\n // }, 5000);\n // }\n // CellComp and GridComp and override this because they get the FrameworkOverrides from the Beans bean\n BeanStub.prototype.getFrameworkOverrides = function () {\n return this.frameworkOverrides;\n };\n BeanStub.prototype.getContext = function () {\n return this.context;\n };\n BeanStub.prototype.destroy = function () {\n // let prototype: any = Object.getPrototypeOf(this);\n // const constructor: any = prototype.constructor;\n // const constructorString = constructor.toString();\n // const beanName = constructorString.substring(9, constructorString.indexOf(\"(\"));\n this.destroyFunctions.forEach(function (func) { return func(); });\n this.destroyFunctions.length = 0;\n this.destroyed = true;\n this.dispatchEvent({ type: BeanStub.EVENT_DESTROYED });\n };\n BeanStub.prototype.addEventListener = function (eventType, listener) {\n if (!this.localEventService) {\n this.localEventService = new EventService();\n }\n this.localEventService.addEventListener(eventType, listener);\n };\n BeanStub.prototype.removeEventListener = function (eventType, listener) {\n if (this.localEventService) {\n this.localEventService.removeEventListener(eventType, listener);\n }\n };\n BeanStub.prototype.dispatchEventAsync = function (event) {\n var _this = this;\n window.setTimeout(function () { return _this.dispatchEvent(event); }, 0);\n };\n BeanStub.prototype.dispatchEvent = function (event) {\n if (this.localEventService) {\n this.localEventService.dispatchEvent(event);\n }\n };\n BeanStub.prototype.addManagedListener = function (object, event, listener) {\n var _this = this;\n if (this.destroyed) {\n return;\n }\n if (object instanceof HTMLElement) {\n addSafePassiveEventListener(this.getFrameworkOverrides(), object, event, listener);\n }\n else {\n object.addEventListener(event, listener);\n }\n var destroyFunc = function () {\n object.removeEventListener(event, listener);\n _this.destroyFunctions = _this.destroyFunctions.filter(function (fn) { return fn !== destroyFunc; });\n return null;\n };\n this.destroyFunctions.push(destroyFunc);\n return destroyFunc;\n };\n BeanStub.prototype.addDestroyFunc = function (func) {\n // if we are already destroyed, we execute the func now\n if (this.isAlive()) {\n this.destroyFunctions.push(func);\n }\n else {\n func();\n }\n };\n BeanStub.prototype.createManagedBean = function (bean, context) {\n var res = this.createBean(bean, context);\n this.addDestroyFunc(this.destroyBean.bind(this, bean, context));\n return res;\n };\n BeanStub.prototype.createBean = function (bean, context, afterPreCreateCallback) {\n return (context || this.getContext()).createBean(bean, afterPreCreateCallback);\n };\n BeanStub.prototype.destroyBean = function (bean, context) {\n return (context || this.getContext()).destroyBean(bean);\n };\n BeanStub.prototype.destroyBeans = function (beans, context) {\n var _this = this;\n if (beans) {\n beans.forEach(function (bean) { return _this.destroyBean(bean, context); });\n }\n return [];\n };\n BeanStub.EVENT_DESTROYED = 'destroyed';\n __decorate$3([\n Autowired('frameworkOverrides')\n ], BeanStub.prototype, \"frameworkOverrides\", void 0);\n __decorate$3([\n Autowired('context')\n ], BeanStub.prototype, \"context\", void 0);\n __decorate$3([\n Autowired('eventService')\n ], BeanStub.prototype, \"eventService\", void 0);\n __decorate$3([\n Autowired('gridOptionsWrapper')\n ], BeanStub.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$3([\n PreDestroy\n ], BeanStub.prototype, \"destroy\", null);\n return BeanStub;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$4 = (undefined && undefined.__decorate) || function (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};\nvar __param$1 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\n// takes ColDefs and ColGroupDefs and turns them into Columns and OriginalGroups\nvar ColumnFactory = /** @class */ (function (_super) {\n __extends(ColumnFactory, _super);\n function ColumnFactory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ColumnFactory.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('ColumnFactory');\n };\n ColumnFactory.prototype.createColumnTree = function (defs, primaryColumns, existingTree) {\n // column key creator dishes out unique column id's in a deterministic way,\n // so if we have two grids (that could be master/slave) with same column definitions,\n // then this ensures the two grids use identical id's.\n var columnKeyCreator = new ColumnKeyCreator();\n var _a = this.extractExistingTreeData(existingTree), existingCols = _a.existingCols, existingGroups = _a.existingGroups, existingColKeys = _a.existingColKeys;\n columnKeyCreator.addExistingKeys(existingColKeys);\n // create am unbalanced tree that maps the provided definitions\n var unbalancedTree = this.recursivelyCreateColumns(defs, 0, primaryColumns, existingCols, columnKeyCreator, existingGroups);\n var treeDept = this.findMaxDept(unbalancedTree, 0);\n this.logger.log('Number of levels for grouped columns is ' + treeDept);\n var columnTree = this.balanceColumnTree(unbalancedTree, 0, treeDept, columnKeyCreator);\n var deptFirstCallback = function (child, parent) {\n if (child instanceof ProvidedColumnGroup) {\n child.setupExpandable();\n }\n // we set the original parents at the end, rather than when we go along, as balancing the tree\n // adds extra levels into the tree. so we can only set parents when balancing is done.\n child.setOriginalParent(parent);\n };\n this.columnUtils.depthFirstOriginalTreeSearch(null, columnTree, deptFirstCallback);\n return {\n columnTree: columnTree,\n treeDept: treeDept\n };\n };\n ColumnFactory.prototype.extractExistingTreeData = function (existingTree) {\n var existingCols = [];\n var existingGroups = [];\n var existingColKeys = [];\n if (existingTree) {\n this.columnUtils.depthFirstOriginalTreeSearch(null, existingTree, function (item) {\n if (item instanceof ProvidedColumnGroup) {\n var group = item;\n existingGroups.push(group);\n }\n else {\n var col = item;\n existingColKeys.push(col.getId());\n existingCols.push(col);\n }\n });\n }\n return { existingCols: existingCols, existingGroups: existingGroups, existingColKeys: existingColKeys };\n };\n ColumnFactory.prototype.createForAutoGroups = function (autoGroupCols, gridBalancedTree) {\n var _this = this;\n return autoGroupCols.map(function (col) { return _this.createAutoGroupTreeItem(gridBalancedTree, col); });\n };\n ColumnFactory.prototype.createAutoGroupTreeItem = function (balancedColumnTree, column) {\n var dept = this.findDepth(balancedColumnTree);\n // at the end, this will be the top of the tree item.\n var nextChild = column;\n for (var i = dept - 1; i >= 0; i--) {\n var autoGroup = new ProvidedColumnGroup(null, \"FAKE_PATH_\" + column.getId() + \"}_\" + i, true, i);\n this.context.createBean(autoGroup);\n autoGroup.setChildren([nextChild]);\n nextChild.setOriginalParent(autoGroup);\n nextChild = autoGroup;\n }\n // at this point, the nextChild is the top most item in the tree\n return nextChild;\n };\n ColumnFactory.prototype.findDepth = function (balancedColumnTree) {\n var dept = 0;\n var pointer = balancedColumnTree;\n while (pointer && pointer[0] && pointer[0] instanceof ProvidedColumnGroup) {\n dept++;\n pointer = pointer[0].getChildren();\n }\n return dept;\n };\n ColumnFactory.prototype.balanceColumnTree = function (unbalancedTree, currentDept, columnDept, columnKeyCreator) {\n var result = [];\n // go through each child, for groups, recurse a level deeper,\n // for columns we need to pad\n for (var i = 0; i < unbalancedTree.length; i++) {\n var child = unbalancedTree[i];\n if (child instanceof ProvidedColumnGroup) {\n // child is a group, all we do is go to the next level of recursion\n var originalGroup = child;\n var newChildren = this.balanceColumnTree(originalGroup.getChildren(), currentDept + 1, columnDept, columnKeyCreator);\n originalGroup.setChildren(newChildren);\n result.push(originalGroup);\n }\n else {\n // child is a column - so here we add in the padded column groups if needed\n var firstPaddedGroup = void 0;\n var currentPaddedGroup = void 0;\n // this for loop will NOT run any loops if no padded column groups are needed\n for (var j = columnDept - 1; j >= currentDept; j--) {\n var newColId = columnKeyCreator.getUniqueKey(null, null);\n var colGroupDefMerged = this.createMergedColGroupDef(null);\n var paddedGroup = new ProvidedColumnGroup(colGroupDefMerged, newColId, true, currentDept);\n this.context.createBean(paddedGroup);\n if (currentPaddedGroup) {\n currentPaddedGroup.setChildren([paddedGroup]);\n }\n currentPaddedGroup = paddedGroup;\n if (!firstPaddedGroup) {\n firstPaddedGroup = currentPaddedGroup;\n }\n }\n // likewise this if statement will not run if no padded groups\n if (firstPaddedGroup && currentPaddedGroup) {\n result.push(firstPaddedGroup);\n var hasGroups = unbalancedTree.some(function (leaf) { return leaf instanceof ProvidedColumnGroup; });\n if (hasGroups) {\n currentPaddedGroup.setChildren([child]);\n continue;\n }\n else {\n currentPaddedGroup.setChildren(unbalancedTree);\n break;\n }\n }\n result.push(child);\n }\n }\n return result;\n };\n ColumnFactory.prototype.findMaxDept = function (treeChildren, dept) {\n var maxDeptThisLevel = dept;\n for (var i = 0; i < treeChildren.length; i++) {\n var abstractColumn = treeChildren[i];\n if (abstractColumn instanceof ProvidedColumnGroup) {\n var originalGroup = abstractColumn;\n var newDept = this.findMaxDept(originalGroup.getChildren(), dept + 1);\n if (maxDeptThisLevel < newDept) {\n maxDeptThisLevel = newDept;\n }\n }\n }\n return maxDeptThisLevel;\n };\n ColumnFactory.prototype.recursivelyCreateColumns = function (defs, level, primaryColumns, existingColsCopy, columnKeyCreator, existingGroups) {\n var _this = this;\n return (defs || []).map(function (def) {\n if (_this.isColumnGroup(def)) {\n return _this.createColumnGroup(primaryColumns, def, level, existingColsCopy, columnKeyCreator, existingGroups);\n }\n else {\n return _this.createColumn(primaryColumns, def, existingColsCopy, columnKeyCreator);\n }\n });\n };\n ColumnFactory.prototype.createColumnGroup = function (primaryColumns, colGroupDef, level, existingColumns, columnKeyCreator, existingGroups) {\n var colGroupDefMerged = this.createMergedColGroupDef(colGroupDef);\n var groupId = columnKeyCreator.getUniqueKey(colGroupDefMerged.groupId || null, null);\n var providedGroup = new ProvidedColumnGroup(colGroupDefMerged, groupId, false, level);\n this.context.createBean(providedGroup);\n var existingGroup = this.findExistingGroup(colGroupDef, existingGroups);\n // make sure we remove, so if user provided duplicate id, then we don't have more than\n // one column instance for colDef with common id\n if (existingGroup) {\n removeFromArray(existingGroups, existingGroup);\n }\n if (existingGroup && existingGroup.isExpanded()) {\n providedGroup.setExpanded(true);\n }\n var children = this.recursivelyCreateColumns(colGroupDefMerged.children, level + 1, primaryColumns, existingColumns, columnKeyCreator, existingGroups);\n providedGroup.setChildren(children);\n return providedGroup;\n };\n ColumnFactory.prototype.createMergedColGroupDef = function (colGroupDef) {\n var colGroupDefMerged = {};\n Object.assign(colGroupDefMerged, this.gridOptionsWrapper.getDefaultColGroupDef());\n Object.assign(colGroupDefMerged, colGroupDef);\n this.checkForDeprecatedItems(colGroupDefMerged);\n return colGroupDefMerged;\n };\n ColumnFactory.prototype.createColumn = function (primaryColumns, colDef, existingColsCopy, columnKeyCreator) {\n var colDefMerged = this.mergeColDefs(colDef);\n this.checkForDeprecatedItems(colDefMerged);\n // see if column already exists\n var column = this.findExistingColumn(colDef, existingColsCopy);\n // make sure we remove, so if user provided duplicate id, then we don't have more than\n // one column instance for colDef with common id\n if (existingColsCopy && column) {\n removeFromArray(existingColsCopy, column);\n }\n if (!column) {\n // no existing column, need to create one\n var colId = columnKeyCreator.getUniqueKey(colDefMerged.colId, colDefMerged.field);\n column = new Column(colDefMerged, colDef, colId, primaryColumns);\n this.context.createBean(column);\n }\n else {\n column.setColDef(colDefMerged, colDef);\n this.applyColumnState(column, colDefMerged);\n }\n return column;\n };\n ColumnFactory.prototype.applyColumnState = function (column, colDef) {\n // flex\n var flex = attrToNumber(colDef.flex);\n if (flex !== undefined) {\n column.setFlex(flex);\n }\n // width - we only set width if column is not flexing\n var noFlexThisCol = column.getFlex() <= 0;\n if (noFlexThisCol) {\n // both null and undefined means we skip, as it's not possible to 'clear' width (a column must have a width)\n var width = attrToNumber(colDef.width);\n if (width != null) {\n column.setActualWidth(width);\n }\n else {\n // otherwise set the width again, in case min or max width has changed,\n // and width needs to be adjusted.\n var widthBeforeUpdate = column.getActualWidth();\n column.setActualWidth(widthBeforeUpdate);\n }\n }\n // sort - anything but undefined will set sort, thus null or empty string will clear the sort\n if (colDef.sort !== undefined) {\n if (colDef.sort == Constants.SORT_ASC || colDef.sort == Constants.SORT_DESC) {\n column.setSort(colDef.sort);\n }\n else {\n column.setSort(undefined);\n }\n }\n // sorted at - anything but undefined, thus null will clear the sortIndex\n var sortIndex = attrToNumber(colDef.sortIndex);\n if (sortIndex !== undefined) {\n column.setSortIndex(sortIndex);\n }\n // hide - anything but undefined, thus null will clear the hide\n var hide = attrToBoolean(colDef.hide);\n if (hide !== undefined) {\n column.setVisible(!hide);\n }\n // pinned - anything but undefined, thus null or empty string will remove pinned\n if (colDef.pinned !== undefined) {\n column.setPinned(colDef.pinned);\n }\n };\n ColumnFactory.prototype.findExistingColumn = function (newColDef, existingColsCopy) {\n return (existingColsCopy || []).find(function (existingCol) {\n var existingColDef = existingCol.getUserProvidedColDef();\n if (!existingColDef) {\n return false;\n }\n var newHasId = newColDef.colId != null;\n var newHasField = newColDef.field != null;\n if (newHasId) {\n return existingCol.getId() === newColDef.colId;\n }\n if (newHasField) {\n return existingColDef.field === newColDef.field;\n }\n // if no id or field present, then try object equivalence.\n if (existingColDef === newColDef) {\n return true;\n }\n return false;\n });\n };\n ColumnFactory.prototype.findExistingGroup = function (newGroupDef, existingGroups) {\n return existingGroups.find(function (existingGroup) {\n var existingDef = existingGroup.getColGroupDef();\n if (!existingDef) {\n return false;\n }\n var newHasId = newGroupDef.groupId != null;\n if (newHasId) {\n return existingGroup.getId() === newGroupDef.groupId;\n }\n return false;\n });\n };\n ColumnFactory.prototype.mergeColDefs = function (colDef) {\n // start with empty merged definition\n var colDefMerged = {};\n // merge properties from default column definitions\n var defaultColDef = this.gridOptionsWrapper.getDefaultColDef();\n mergeDeep(colDefMerged, defaultColDef, false, true);\n // merge properties from column type properties\n var columnType = colDef.type;\n if (!columnType) {\n columnType = defaultColDef && defaultColDef.type;\n }\n // if type of both colDef and defaultColDef, then colDef gets preference\n if (columnType) {\n this.assignColumnTypes(columnType, colDefMerged);\n }\n // merge properties from column definitions\n mergeDeep(colDefMerged, colDef, false, true);\n return colDefMerged;\n };\n ColumnFactory.prototype.assignColumnTypes = function (type, colDefMerged) {\n var typeKeys = [];\n if (type instanceof Array) {\n var invalidArray = type.some(function (a) { return typeof a !== 'string'; });\n if (invalidArray) {\n console.warn(\"AG Grid: if colDef.type is supplied an array it should be of type 'string[]'\");\n }\n else {\n typeKeys = type;\n }\n }\n else if (typeof type === 'string') {\n typeKeys = type.split(',');\n }\n else {\n console.warn(\"AG Grid: colDef.type should be of type 'string' | 'string[]'\");\n return;\n }\n // merge user defined with default column types\n var allColumnTypes = Object.assign({}, DefaultColumnTypes);\n var userTypes = this.gridOptionsWrapper.getColumnTypes() || {};\n iterateObject(userTypes, function (key, value) {\n if (key in allColumnTypes) {\n console.warn(\"AG Grid: the column type '\" + key + \"' is a default column type and cannot be overridden.\");\n }\n else {\n allColumnTypes[key] = value;\n }\n });\n typeKeys.forEach(function (t) {\n var typeColDef = allColumnTypes[t.trim()];\n if (typeColDef) {\n mergeDeep(colDefMerged, typeColDef, false, true);\n }\n else {\n console.warn(\"AG Grid: colDef.type '\" + t + \"' does not correspond to defined gridOptions.columnTypes\");\n }\n });\n };\n ColumnFactory.prototype.checkForDeprecatedItems = function (colDef) {\n if (colDef) {\n var colDefNoType = colDef; // take out the type, so we can access attributes not defined in the type\n if (colDefNoType.group !== undefined) {\n console.warn('AG Grid: colDef.group is invalid, please check documentation on how to do grouping as it changed in version 3');\n }\n if (colDefNoType.headerGroup !== undefined) {\n console.warn('AG Grid: colDef.headerGroup is invalid, please check documentation on how to do grouping as it changed in version 3');\n }\n if (colDefNoType.headerGroupShow !== undefined) {\n console.warn('AG Grid: colDef.headerGroupShow is invalid, should be columnGroupShow, please check documentation on how to do grouping as it changed in version 3');\n }\n if (colDefNoType.suppressRowGroup !== undefined) {\n console.warn('AG Grid: colDef.suppressRowGroup is deprecated, please use colDef.type instead');\n }\n if (colDefNoType.suppressAggregation !== undefined) {\n console.warn('AG Grid: colDef.suppressAggregation is deprecated, please use colDef.type instead');\n }\n if (colDefNoType.suppressRowGroup || colDefNoType.suppressAggregation) {\n console.warn('AG Grid: colDef.suppressAggregation and colDef.suppressRowGroup are deprecated, use allowRowGroup, allowPivot and allowValue instead');\n }\n if (colDefNoType.displayName) {\n console.warn(\"AG Grid: Found displayName \" + colDefNoType.displayName + \", please use headerName instead, displayName is deprecated.\");\n colDefNoType.headerName = colDefNoType.displayName;\n }\n }\n };\n // if object has children, we assume it's a group\n ColumnFactory.prototype.isColumnGroup = function (abstractColDef) {\n return abstractColDef.children !== undefined;\n };\n __decorate$4([\n Autowired('columnUtils')\n ], ColumnFactory.prototype, \"columnUtils\", void 0);\n __decorate$4([\n __param$1(0, Qualifier('loggerFactory'))\n ], ColumnFactory.prototype, \"setBeans\", null);\n ColumnFactory = __decorate$4([\n Bean('columnFactory')\n ], ColumnFactory);\n return ColumnFactory;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar Events = /** @class */ (function () {\n function Events() {\n }\n /** Everything has changed with the columns. Either complete new set of columns set, or user called setState() */\n /** @deprecated - grid no longer uses this, and setSate() also fires individual events */\n Events.EVENT_COLUMN_EVERYTHING_CHANGED = 'columnEverythingChanged';\n /** User has set in new columns. */\n Events.EVENT_NEW_COLUMNS_LOADED = 'newColumnsLoaded';\n /** The pivot mode flag was changed */\n Events.EVENT_COLUMN_PIVOT_MODE_CHANGED = 'columnPivotModeChanged';\n /** A row group column was added, removed or order changed. */\n Events.EVENT_COLUMN_ROW_GROUP_CHANGED = 'columnRowGroupChanged';\n /** expandAll / collapseAll was called from the api. */\n Events.EVENT_EXPAND_COLLAPSE_ALL = 'expandOrCollapseAll';\n /** A pivot column was added, removed or order changed. */\n Events.EVENT_COLUMN_PIVOT_CHANGED = 'columnPivotChanged';\n /** The list of grid columns has changed. */\n Events.EVENT_GRID_COLUMNS_CHANGED = 'gridColumnsChanged';\n /** A value column was added, removed or agg function was changed. */\n Events.EVENT_COLUMN_VALUE_CHANGED = 'columnValueChanged';\n /** A column was moved */\n Events.EVENT_COLUMN_MOVED = 'columnMoved';\n /** One or more columns was shown / hidden */\n Events.EVENT_COLUMN_VISIBLE = 'columnVisible';\n /** One or more columns was pinned / unpinned*/\n Events.EVENT_COLUMN_PINNED = 'columnPinned';\n /** A column group was opened / closed */\n Events.EVENT_COLUMN_GROUP_OPENED = 'columnGroupOpened';\n /** One or more columns was resized. If just one, the column in the event is set. */\n Events.EVENT_COLUMN_RESIZED = 'columnResized';\n /** The list of displayed columns has changed, can result from columns open / close, column move, pivot, group, etc */\n Events.EVENT_DISPLAYED_COLUMNS_CHANGED = 'displayedColumnsChanged';\n /** The list of virtual columns has changed, results from viewport changing */\n Events.EVENT_VIRTUAL_COLUMNS_CHANGED = 'virtualColumnsChanged';\n /** Async Transactions Executed */\n Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED = 'asyncTransactionsFlushed';\n /** A row group was opened / closed */\n Events.EVENT_ROW_GROUP_OPENED = 'rowGroupOpened';\n /** The client has set new data into the grid */\n Events.EVENT_ROW_DATA_CHANGED = 'rowDataChanged';\n /** The client has updated data for the grid */\n Events.EVENT_ROW_DATA_UPDATED = 'rowDataUpdated';\n /** The client has set new floating data into the grid */\n Events.EVENT_PINNED_ROW_DATA_CHANGED = 'pinnedRowDataChanged';\n /** Range selection has changed */\n Events.EVENT_RANGE_SELECTION_CHANGED = 'rangeSelectionChanged';\n /** Chart was created */\n Events.EVENT_CHART_CREATED = 'chartCreated';\n /** Chart Range selection has changed */\n Events.EVENT_CHART_RANGE_SELECTION_CHANGED = 'chartRangeSelectionChanged';\n /** Chart Options have changed */\n Events.EVENT_CHART_OPTIONS_CHANGED = 'chartOptionsChanged';\n /** Chart was destroyed */\n Events.EVENT_CHART_DESTROYED = 'chartDestroyed';\n /** For when the tool panel is shown / hidden */\n Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED = 'toolPanelVisibleChanged';\n Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START = 'columnPanelItemDragStart';\n Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END = 'columnPanelItemDragEnd';\n /** Model was updated - grid updates the drawn rows when this happens */\n Events.EVENT_MODEL_UPDATED = 'modelUpdated';\n Events.EVENT_PASTE_START = 'pasteStart';\n Events.EVENT_PASTE_END = 'pasteEnd';\n Events.EVENT_FILL_START = 'fillStart';\n Events.EVENT_FILL_END = 'fillEnd';\n Events.EVENT_CELL_CLICKED = 'cellClicked';\n Events.EVENT_CELL_DOUBLE_CLICKED = 'cellDoubleClicked';\n Events.EVENT_CELL_MOUSE_DOWN = 'cellMouseDown';\n Events.EVENT_CELL_CONTEXT_MENU = 'cellContextMenu';\n Events.EVENT_CELL_VALUE_CHANGED = 'cellValueChanged';\n Events.EVENT_CELL_EDIT_REQUEST = 'cellEditRequest';\n Events.EVENT_ROW_VALUE_CHANGED = 'rowValueChanged';\n Events.EVENT_CELL_FOCUSED = 'cellFocused';\n Events.EVENT_FULL_WIDTH_ROW_FOCUSED = 'fullWidthRowFocused';\n Events.EVENT_ROW_SELECTED = 'rowSelected';\n Events.EVENT_SELECTION_CHANGED = 'selectionChanged';\n Events.EVENT_CELL_KEY_DOWN = 'cellKeyDown';\n Events.EVENT_CELL_KEY_PRESS = 'cellKeyPress';\n Events.EVENT_CELL_MOUSE_OVER = 'cellMouseOver';\n Events.EVENT_CELL_MOUSE_OUT = 'cellMouseOut';\n /** 2 events for filtering. The grid LISTENS for filterChanged and afterFilterChanged */\n Events.EVENT_FILTER_CHANGED = 'filterChanged';\n /** Filter was change but not applied. Only useful if apply buttons are used in filters. */\n Events.EVENT_FILTER_MODIFIED = 'filterModified';\n Events.EVENT_FILTER_OPENED = 'filterOpened';\n Events.EVENT_SORT_CHANGED = 'sortChanged';\n /** A row was removed from the dom, for any reason. Use to clean up resources (if any) used by the row. */\n Events.EVENT_VIRTUAL_ROW_REMOVED = 'virtualRowRemoved';\n Events.EVENT_ROW_CLICKED = 'rowClicked';\n Events.EVENT_ROW_DOUBLE_CLICKED = 'rowDoubleClicked';\n /** Gets called once after the grid has finished initialising. */\n Events.EVENT_GRID_READY = 'gridReady';\n /** Width of height of the main grid div has changed. Grid listens for this and does layout of grid if it's\n * changed, so always filling the space it was given. */\n Events.EVENT_GRID_SIZE_CHANGED = 'gridSizeChanged';\n /** The indexes of the rows rendered has changed, eg user has scrolled to a new vertical position. */\n Events.EVENT_VIEWPORT_CHANGED = 'viewportChanged';\n /* The width of the scrollbar has been calculated */\n Events.EVENT_SCROLLBAR_WIDTH_CHANGED = 'scrollbarWidthChanged';\n /** Rows were rendered for the first time (ie on async data load). */\n Events.EVENT_FIRST_DATA_RENDERED = 'firstDataRendered';\n /** A column drag has started, either resizing a column or moving a column. */\n Events.EVENT_DRAG_STARTED = 'dragStarted';\n /** A column drag has stopped */\n Events.EVENT_DRAG_STOPPED = 'dragStopped';\n Events.EVENT_CHECKBOX_CHANGED = 'checkboxChanged';\n Events.EVENT_ROW_EDITING_STARTED = 'rowEditingStarted';\n Events.EVENT_ROW_EDITING_STOPPED = 'rowEditingStopped';\n Events.EVENT_CELL_EDITING_STARTED = 'cellEditingStarted';\n Events.EVENT_CELL_EDITING_STOPPED = 'cellEditingStopped';\n /** Main body of grid has scrolled, either horizontally or vertically */\n Events.EVENT_BODY_SCROLL = 'bodyScroll';\n /** Main body of the grid has stopped scrolling, either horizontally or vertically */\n Events.EVENT_BODY_SCROLL_END = 'bodyScrollEnd';\n Events.EVENT_HEIGHT_SCALE_CHANGED = 'heightScaleChanged';\n /** The displayed page for pagination has changed. For example the data was filtered or sorted,\n * or the user has moved to a different page. */\n Events.EVENT_PAGINATION_CHANGED = 'paginationChanged';\n /** Only used by React, Angular, Web Components and VueJS AG Grid components\n * (not used if doing plain JavaScript). If the grid receives changes due\n * to bound properties, this event fires after the grid has finished processing the change. */\n Events.EVENT_COMPONENT_STATE_CHANGED = 'componentStateChanged';\n /***************************** INTERNAL EVENTS: START ******************************************* */\n /** Please remember to add to ComponentUtil.EXCLUDED_INTERNAL_EVENTS to not have these events exposed to framework components. */\n /** All items from here down are used internally by the grid, not intended for external use. */\n // not documented, either experimental, or we just don't want users using an depending on them\n Events.EVENT_BODY_HEIGHT_CHANGED = 'bodyHeightChanged';\n Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED = 'displayedColumnsWidthChanged';\n Events.EVENT_SCROLL_VISIBILITY_CHANGED = 'scrollVisibilityChanged';\n Events.EVENT_COLUMN_HOVER_CHANGED = 'columnHoverChanged';\n Events.EVENT_FLASH_CELLS = 'flashCells';\n Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED = 'paginationPixelOffsetChanged';\n Events.EVENT_DISPLAYED_ROWS_CHANGED = 'displayedRowsChanged';\n Events.EVENT_LEFT_PINNED_WIDTH_CHANGED = 'leftPinnedWidthChanged';\n Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED = 'rightPinnedWidthChanged';\n Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED = 'rowContainerHeightChanged';\n Events.EVENT_ROW_DRAG_ENTER = 'rowDragEnter';\n Events.EVENT_ROW_DRAG_MOVE = 'rowDragMove';\n Events.EVENT_ROW_DRAG_LEAVE = 'rowDragLeave';\n Events.EVENT_ROW_DRAG_END = 'rowDragEnd';\n // primarily for charts\n Events.EVENT_POPUP_TO_FRONT = 'popupToFront';\n // these are used for server side group and agg - only used by CS with Viewport Row Model - intention is\n // to design these better around server side functions and then release to general public when fully working with\n // all the row models.\n Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST = 'columnRowGroupChangeRequest';\n Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST = 'columnPivotChangeRequest';\n Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST = 'columnValueChangeRequest';\n Events.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST = 'columnAggFuncChangeRequest';\n Events.EVENT_KEYBOARD_FOCUS = 'keyboardFocus';\n Events.EVENT_MOUSE_FOCUS = 'mouseFocus';\n Events.EVENT_STORE_UPDATED = 'storeUpdated';\n return Events;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n// class returns unique instance id's for columns.\n// eg, the following calls (in this order) will result in:\n//\n// getInstanceIdForKey('country') => 0\n// getInstanceIdForKey('country') => 1\n// getInstanceIdForKey('country') => 2\n// getInstanceIdForKey('country') => 3\n// getInstanceIdForKey('age') => 0\n// getInstanceIdForKey('age') => 1\n// getInstanceIdForKey('country') => 4\nvar GroupInstanceIdCreator = /** @class */ (function () {\n function GroupInstanceIdCreator() {\n // this map contains keys to numbers, so we remember what the last call was\n this.existingIds = {};\n }\n GroupInstanceIdCreator.prototype.getInstanceIdForKey = function (key) {\n var lastResult = this.existingIds[key];\n var result;\n if (typeof lastResult !== 'number') {\n // first time this key\n result = 0;\n }\n else {\n result = lastResult + 1;\n }\n this.existingIds[key] = result;\n return result;\n };\n return GroupInstanceIdCreator;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar reUnescapedHtml = /[&<>\"']/g;\n/**\n * HTML Escapes.\n */\nvar HTML_ESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\n/**\n * It encodes any string in UTF-8 format\n * taken from https://github.com/mathiasbynens/utf8.js\n * @param {string} s\n * @returns {string}\n */\nfunction utf8_encode(s) {\n var stringFromCharCode = String.fromCharCode;\n function ucs2decode(string) {\n var output = [];\n if (!string) {\n return [];\n }\n var len = string.length;\n var counter = 0;\n var value;\n var extra;\n while (counter < len) {\n value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < len) {\n // high surrogate, and there is a next character\n extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // low surrogate\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n }\n else {\n // unmatched surrogate; only append this code unit, in case the next\n // code unit is the high surrogate of a surrogate pair\n output.push(value);\n counter--;\n }\n }\n else {\n output.push(value);\n }\n }\n return output;\n }\n function checkScalarValue(point) {\n if (point >= 0xD800 && point <= 0xDFFF) {\n throw Error('Lone surrogate U+' + point.toString(16).toUpperCase() +\n ' is not a scalar value');\n }\n }\n function createByte(point, shift) {\n return stringFromCharCode(((point >> shift) & 0x3F) | 0x80);\n }\n function encodeCodePoint(point) {\n if ((point >= 0 && point <= 31 && point !== 10)) {\n var convertedCode = point.toString(16).toUpperCase();\n var paddedCode = convertedCode.padStart(4, '0');\n return \"_x\" + paddedCode + \"_\";\n }\n if ((point & 0xFFFFFF80) == 0) { // 1-byte sequence\n return stringFromCharCode(point);\n }\n var symbol = '';\n if ((point & 0xFFFFF800) == 0) { // 2-byte sequence\n symbol = stringFromCharCode(((point >> 6) & 0x1F) | 0xC0);\n }\n else if ((point & 0xFFFF0000) == 0) { // 3-byte sequence\n checkScalarValue(point);\n symbol = stringFromCharCode(((point >> 12) & 0x0F) | 0xE0);\n symbol += createByte(point, 6);\n }\n else if ((point & 0xFFE00000) == 0) { // 4-byte sequence\n symbol = stringFromCharCode(((point >> 18) & 0x07) | 0xF0);\n symbol += createByte(point, 12);\n symbol += createByte(point, 6);\n }\n symbol += stringFromCharCode((point & 0x3F) | 0x80);\n return symbol;\n }\n var codePoints = ucs2decode(s);\n var length = codePoints.length;\n var index = -1;\n var codePoint;\n var byteString = '';\n while (++index < length) {\n codePoint = codePoints[index];\n byteString += encodeCodePoint(codePoint);\n }\n return byteString;\n}\n/**\n * Converts a camelCase string into hyphenated string\n * from https://gist.github.com/youssman/745578062609e8acac9f\n * @param {string} str\n * @return {string}\n */\nfunction camelCaseToHyphen(str) {\n if (str === null || str === undefined) {\n return null;\n }\n return str.replace(/([A-Z])/g, function (g) { return '-' + g[0].toLowerCase(); });\n}\n/**\n * Converts a hyphenated string into camelCase string\n * from https://stackoverflow.com/questions/6660977/convert-hyphens-to-camel-case-camelcase\n * @param {string} str\n * @return {string}\n */\nfunction hyphenToCamelCase(str) {\n if (str === null || str === undefined) {\n return null;\n }\n return str.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });\n}\nfunction capitalise(str) {\n return str[0].toUpperCase() + str.substr(1).toLowerCase();\n}\nfunction escapeString(toEscape) {\n // we call toString() twice, in case value is an object, where user provides\n // a toString() method, and first call to toString() returns back something other\n // than a string (eg a number to render)\n return toEscape == null ? null : toEscape.toString().toString().replace(reUnescapedHtml, function (chr) { return HTML_ESCAPES[chr]; });\n}\n/**\n * Converts a camelCase string into regular text\n * from: https://stackoverflow.com/questions/15369566/putting-space-in-camel-case-string-using-regular-expression\n * @param {string} camelCase\n * @return {string}\n */\nfunction camelCaseToHumanText(camelCase) {\n if (!camelCase || camelCase == null) {\n return null;\n }\n var rex = /([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g;\n var words = camelCase.replace(rex, '$1$4 $2$3$5').replace('.', ' ').split(' ');\n return words.map(function (word) { return word.substring(0, 1).toUpperCase() + ((word.length > 1) ? word.substring(1, word.length) : ''); }).join(' ');\n}\n\nvar StringUtils = /*#__PURE__*/Object.freeze({\n utf8_encode: utf8_encode,\n camelCaseToHyphen: camelCaseToHyphen,\n hyphenToCamelCase: hyphenToCamelCase,\n capitalise: capitalise,\n escapeString: escapeString,\n camelCaseToHumanText: camelCaseToHumanText\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction convertToMap(arr) {\n var map = new Map();\n arr.forEach(function (pair) { return map.set(pair[0], pair[1]); });\n return map;\n}\n// handy for organising a list into a map, where each item is mapped by an attribute, eg mapping Columns by ID\nfunction mapById(arr, callback) {\n var map = new Map();\n arr.forEach(function (item) { return map.set(callback(item), item); });\n return map;\n}\nfunction keys(map) {\n var arr = [];\n map.forEach(function (_, key) { return arr.push(key); });\n return arr;\n}\n\nvar MapUtils = /*#__PURE__*/Object.freeze({\n convertToMap: convertToMap,\n mapById: mapById,\n keys: keys\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$5 = (undefined && undefined.__decorate) || function (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};\nvar __param$2 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar __values = (undefined && undefined.__values) || function(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};\nvar __read = (undefined && undefined.__read) || function (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};\nvar __spread = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n};\nvar ColumnModel = /** @class */ (function (_super) {\n __extends$1(ColumnModel, _super);\n function ColumnModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // header row count, based on user provided columns\n _this.primaryHeaderRowCount = 0;\n _this.secondaryHeaderRowCount = 0;\n // header row count, either above, or based on pivoting if we are pivoting\n _this.gridHeaderRowCount = 0;\n // leave level columns of the displayed trees\n _this.displayedColumnsLeft = [];\n _this.displayedColumnsRight = [];\n _this.displayedColumnsCenter = [];\n // all three lists above combined\n _this.displayedColumns = [];\n // for fast lookup, to see if a column or group is still displayed\n _this.displayedColumnsAndGroupsMap = {};\n // all columns to be rendered\n _this.viewportColumns = [];\n // all columns to be rendered in the centre\n _this.viewportColumnsCenter = [];\n _this.autoHeightActiveAtLeastOnce = false;\n _this.rowGroupColumns = [];\n _this.valueColumns = [];\n _this.pivotColumns = [];\n _this.ready = false;\n _this.autoGroupsNeedBuilding = false;\n _this.forceRecreateAutoGroups = false;\n _this.pivotMode = false;\n _this.bodyWidth = 0;\n _this.leftWidth = 0;\n _this.rightWidth = 0;\n _this.bodyWidthDirty = true;\n _this.colDefVersion = 0;\n _this.flexColsCalculatedAtLestOnce = false;\n return _this;\n }\n ColumnModel.prototype.init = function () {\n var _this = this;\n this.suppressColumnVirtualisation = this.gridOptionsWrapper.isSuppressColumnVirtualisation();\n var pivotMode = this.gridOptionsWrapper.isPivotMode();\n if (this.isPivotSettingAllowed(pivotMode)) {\n this.pivotMode = pivotMode;\n }\n this.usingTreeData = this.gridOptionsWrapper.isTreeData();\n this.addManagedListener(this.gridOptionsWrapper, 'autoGroupColumnDef', function () { return _this.onAutoGroupColumnDefChanged(); });\n this.addManagedListener(this.gridOptionsWrapper, 'defaultColDef', function () { return _this.onDefaultColDefChanged(); });\n };\n ColumnModel.prototype.onAutoGroupColumnDefChanged = function () {\n this.autoGroupsNeedBuilding = true;\n this.forceRecreateAutoGroups = true;\n this.updateGridColumns();\n this.updateDisplayedColumns('gridOptionsChanged');\n };\n ColumnModel.prototype.onDefaultColDefChanged = function () {\n // col def's should get revisited, even if specific column hasn't changed,\n // as the defaultColDef impacts all columns, so each column should assume it's Col Def has changed.\n this.colDefVersion++;\n // likewise for autoGroupCol, the default col def impacts this\n this.forceRecreateAutoGroups = true;\n this.createColumnsFromColumnDefs(true);\n };\n ColumnModel.prototype.getColDefVersion = function () {\n return this.colDefVersion;\n };\n ColumnModel.prototype.setColumnDefs = function (columnDefs, source) {\n if (source === void 0) { source = 'api'; }\n var colsPreviouslyExisted = !!this.columnDefs;\n this.colDefVersion++;\n this.columnDefs = columnDefs;\n this.createColumnsFromColumnDefs(colsPreviouslyExisted, source);\n };\n ColumnModel.prototype.createColumnsFromColumnDefs = function (colsPreviouslyExisted, source) {\n var _this = this;\n if (source === void 0) { source = 'api'; }\n // only need to raise before/after events if updating columns, never if setting columns for first time\n var raiseEventsFunc = colsPreviouslyExisted ? this.compareColumnStatesAndRaiseEvents(source) : undefined;\n // always invalidate cache on changing columns, as the column id's for the new columns\n // could overlap with the old id's, so the cache would return old values for new columns.\n this.valueCache.expire();\n // NOTE ==================\n // we should be destroying the existing columns and groups if they exist, for example, the original column\n // group adds a listener to the columns, it should be also removing the listeners\n this.autoGroupsNeedBuilding = true;\n var oldPrimaryColumns = this.primaryColumns;\n var oldPrimaryTree = this.primaryColumnTree;\n var balancedTreeResult = this.columnFactory.createColumnTree(this.columnDefs, true, oldPrimaryTree);\n this.primaryColumnTree = balancedTreeResult.columnTree;\n this.primaryHeaderRowCount = balancedTreeResult.treeDept + 1;\n this.primaryColumns = this.getColumnsFromTree(this.primaryColumnTree);\n this.primaryColumnsMap = {};\n this.primaryColumns.forEach(function (col) { return _this.primaryColumnsMap[col.getId()] = col; });\n this.extractRowGroupColumns(source, oldPrimaryColumns);\n this.extractPivotColumns(source, oldPrimaryColumns);\n this.extractValueColumns(source, oldPrimaryColumns);\n this.ready = true;\n // if we are showing secondary columns, then no need to update grid columns\n // at this point, as it's the pivot service responsibility to change these\n // if we are no longer pivoting (ie and need to revert back to primary, otherwise\n // we shouldn't be touching the primary).\n var gridColsNotProcessed = this.gridColsArePrimary === undefined;\n var processGridCols = this.gridColsArePrimary || gridColsNotProcessed;\n if (processGridCols) {\n this.updateGridColumns();\n if (colsPreviouslyExisted && !this.gridOptionsWrapper.isMaintainColumnOrder()) {\n this.orderGridColumnsLikePrimary();\n }\n this.updateDisplayedColumns(source);\n this.checkViewportColumns();\n }\n // this event is not used by AG Grid, but left here for backwards compatibility,\n // in case applications use it\n this.dispatchEverythingChanged(source);\n raiseEventsFunc && raiseEventsFunc();\n this.dispatchNewColumnsLoaded();\n };\n ColumnModel.prototype.dispatchNewColumnsLoaded = function () {\n var newColumnsLoadedEvent = {\n type: Events.EVENT_NEW_COLUMNS_LOADED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(newColumnsLoadedEvent);\n };\n // this event is legacy, no grid code listens to it. instead the grid listens to New Columns Loaded\n ColumnModel.prototype.dispatchEverythingChanged = function (source) {\n if (source === void 0) { source = 'api'; }\n var eventEverythingChanged = {\n type: Events.EVENT_COLUMN_EVERYTHING_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(eventEverythingChanged);\n };\n ColumnModel.prototype.orderGridColumnsLikePrimary = function () {\n var _this = this;\n var primaryColumns = this.primaryColumns;\n if (!primaryColumns) {\n return;\n }\n this.gridColumns.sort(function (colA, colB) {\n var primaryIndexA = primaryColumns.indexOf(colA);\n var primaryIndexB = primaryColumns.indexOf(colB);\n // if both cols are present in primary, then we just return the position,\n // so position is maintained.\n var indexAPresent = primaryIndexA >= 0;\n var indexBPresent = primaryIndexB >= 0;\n if (indexAPresent && indexBPresent) {\n return primaryIndexA - primaryIndexB;\n }\n if (indexAPresent) {\n // B is auto group column, so put B first\n return 1;\n }\n if (indexBPresent) {\n // A is auto group column, so put A first\n return -1;\n }\n // otherwise both A and B are auto-group columns. so we just keep the order\n // as they were already in.\n var gridIndexA = _this.gridColumns.indexOf(colA);\n var gridIndexB = _this.gridColumns.indexOf(colB);\n return gridIndexA - gridIndexB;\n });\n };\n ColumnModel.prototype.getAllDisplayedAutoHeightCols = function () {\n return this.displayedAutoHeightCols;\n };\n ColumnModel.prototype.setViewport = function () {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n this.viewportLeft = this.bodyWidth - this.scrollPosition - this.scrollWidth;\n this.viewportRight = this.bodyWidth - this.scrollPosition;\n }\n else {\n this.viewportLeft = this.scrollPosition;\n this.viewportRight = this.scrollWidth + this.scrollPosition;\n }\n };\n // used by clipboard service, to know what columns to paste into\n ColumnModel.prototype.getDisplayedColumnsStartingAt = function (column) {\n var currentColumn = column;\n var columns = [];\n while (currentColumn != null) {\n columns.push(currentColumn);\n currentColumn = this.getDisplayedColAfter(currentColumn);\n }\n return columns;\n };\n // checks what columns are currently displayed due to column virtualisation. fires an event\n // if the list of columns has changed.\n // + setColumnWidth(), setViewportPosition(), setColumnDefs(), sizeColumnsToFit()\n ColumnModel.prototype.checkViewportColumns = function () {\n // check displayCenterColumnTree exists first, as it won't exist when grid is initialising\n if (this.displayedColumnsCenter == null) {\n return;\n }\n var hashBefore = this.viewportColumns.map(function (column) { return column.getId(); }).join('#');\n this.extractViewport();\n var hashAfter = this.viewportColumns.map(function (column) { return column.getId(); }).join('#');\n if (hashBefore !== hashAfter) {\n var event_1 = {\n type: Events.EVENT_VIRTUAL_COLUMNS_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n };\n ColumnModel.prototype.setViewportPosition = function (scrollWidth, scrollPosition) {\n if (scrollWidth !== this.scrollWidth || scrollPosition !== this.scrollPosition || this.bodyWidthDirty) {\n this.scrollWidth = scrollWidth;\n this.scrollPosition = scrollPosition;\n // we need to call setVirtualViewportLeftAndRight() at least once after the body width changes,\n // as the viewport can stay the same, but in RTL, if body width changes, we need to work out the\n // virtual columns again\n this.bodyWidthDirty = true;\n this.setViewport();\n if (this.ready) {\n this.checkViewportColumns();\n }\n }\n };\n ColumnModel.prototype.isPivotMode = function () {\n return this.pivotMode;\n };\n ColumnModel.prototype.isPivotSettingAllowed = function (pivot) {\n if (pivot && this.gridOptionsWrapper.isTreeData()) {\n console.warn(\"AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'\");\n return false;\n }\n return true;\n };\n ColumnModel.prototype.setPivotMode = function (pivotMode, source) {\n if (source === void 0) { source = 'api'; }\n if (pivotMode === this.pivotMode || !this.isPivotSettingAllowed(this.pivotMode)) {\n return;\n }\n this.pivotMode = pivotMode;\n // we need to update grid columns to cover the scenario where user has groupSuppressAutoColumn=true, as\n // this means we don't use auto group column UNLESS we are in pivot mode (it's mandatory in pivot mode),\n // so need to updateGridColumn() to check it autoGroupCol needs to be added / removed\n this.autoGroupsNeedBuilding = true;\n this.updateGridColumns();\n this.updateDisplayedColumns(source);\n var event = {\n type: Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.getSecondaryPivotColumn = function (pivotKeys, valueColKey) {\n if (missing(this.secondaryColumns)) {\n return null;\n }\n var valueColumnToFind = this.getPrimaryColumn(valueColKey);\n var foundColumn = null;\n this.secondaryColumns.forEach(function (column) {\n var thisPivotKeys = column.getColDef().pivotKeys;\n var pivotValueColumn = column.getColDef().pivotValueColumn;\n var pivotKeyMatches = areEqual(thisPivotKeys, pivotKeys);\n var pivotValueMatches = pivotValueColumn === valueColumnToFind;\n if (pivotKeyMatches && pivotValueMatches) {\n foundColumn = column;\n }\n });\n return foundColumn;\n };\n ColumnModel.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('columnModel');\n };\n ColumnModel.prototype.setFirstRightAndLastLeftPinned = function (source) {\n var lastLeft;\n var firstRight;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n lastLeft = this.displayedColumnsLeft ? this.displayedColumnsLeft[0] : null;\n firstRight = this.displayedColumnsRight ? last(this.displayedColumnsRight) : null;\n }\n else {\n lastLeft = this.displayedColumnsLeft ? last(this.displayedColumnsLeft) : null;\n firstRight = this.displayedColumnsRight ? this.displayedColumnsRight[0] : null;\n }\n this.gridColumns.forEach(function (column) {\n column.setLastLeftPinned(column === lastLeft, source);\n column.setFirstRightPinned(column === firstRight, source);\n });\n };\n ColumnModel.prototype.autoSizeColumns = function (params) {\n var _this = this;\n var columns = params.columns, skipHeader = params.skipHeader, skipHeaderGroups = params.skipHeaderGroups, stopAtGroup = params.stopAtGroup, _a = params.source, source = _a === void 0 ? 'api' : _a;\n // because of column virtualisation, we can only do this function on columns that are\n // actually rendered, as non-rendered columns (outside the viewport and not rendered\n // due to column virtualisation) are not present. this can result in all rendered columns\n // getting narrowed, which in turn introduces more rendered columns on the RHS which\n // did not get autosized in the original run, leaving the visible grid with columns on\n // the LHS sized, but RHS no. so we keep looping through the visible columns until\n // no more cols are available (rendered) to be resized\n // we autosize after animation frames finish in case any cell renderers need to complete first. this can\n // happen eg if client code is calling api.autoSizeAllColumns() straight after grid is initialised, but grid\n // hasn't fully drawn out all the cells yet (due to cell renderers in animation frames).\n this.animationFrameService.flushAllFrames();\n // keep track of which cols we have resized in here\n var columnsAutosized = [];\n // initialise with anything except 0 so that while loop executes at least once\n var changesThisTimeAround = -1;\n var shouldSkipHeader = skipHeader != null ? skipHeader : this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n var shouldSkipHeaderGroups = skipHeaderGroups != null ? skipHeaderGroups : shouldSkipHeader;\n while (changesThisTimeAround !== 0) {\n changesThisTimeAround = 0;\n this.actionOnGridColumns(columns, function (column) {\n // if already autosized, skip it\n if (columnsAutosized.indexOf(column) >= 0) {\n return false;\n }\n // get how wide this col should be\n var preferredWidth = _this.autoWidthCalculator.getPreferredWidthForColumn(column, shouldSkipHeader);\n // preferredWidth = -1 if this col is not on the screen\n if (preferredWidth > 0) {\n var newWidth = _this.normaliseColumnWidth(column, preferredWidth);\n column.setActualWidth(newWidth, source);\n columnsAutosized.push(column);\n changesThisTimeAround++;\n }\n return true;\n }, source);\n }\n if (!shouldSkipHeaderGroups) {\n this.autoSizeColumnGroupsByColumns(columns, stopAtGroup);\n }\n this.fireColumnResizedEvent(columnsAutosized, true, 'autosizeColumns');\n };\n ColumnModel.prototype.fireColumnResizedEvent = function (columns, finished, source, flexColumns) {\n if (flexColumns === void 0) { flexColumns = null; }\n if (columns && columns.length) {\n var event_2 = {\n type: Events.EVENT_COLUMN_RESIZED,\n columns: columns,\n column: columns.length === 1 ? columns[0] : null,\n flexColumns: flexColumns,\n finished: finished,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event_2);\n }\n };\n ColumnModel.prototype.autoSizeColumn = function (key, skipHeader, source) {\n if (source === void 0) { source = \"api\"; }\n if (key) {\n this.autoSizeColumns({ columns: [key], skipHeader: skipHeader, skipHeaderGroups: true, source: source });\n }\n };\n ColumnModel.prototype.autoSizeColumnGroupsByColumns = function (keys, stopAtGroup) {\n var e_1, _a, e_2, _b;\n var columnGroups = new Set();\n var columns = this.getGridColumns(keys);\n columns.forEach(function (col) {\n var parent = col.getParent();\n while (parent && parent != stopAtGroup) {\n if (!parent.isPadding()) {\n columnGroups.add(parent);\n }\n parent = parent.getParent();\n }\n });\n var headerGroupCtrl;\n var resizedColumns = [];\n try {\n for (var columnGroups_1 = __values(columnGroups), columnGroups_1_1 = columnGroups_1.next(); !columnGroups_1_1.done; columnGroups_1_1 = columnGroups_1.next()) {\n var columnGroup = columnGroups_1_1.value;\n try {\n for (var _c = (e_2 = void 0, __values(this.ctrlsService.getHeaderRowContainerCtrls())), _d = _c.next(); !_d.done; _d = _c.next()) {\n var headerContainerCtrl = _d.value;\n headerGroupCtrl = headerContainerCtrl.getHeaderCtrlForColumn(columnGroup);\n if (headerGroupCtrl) {\n break;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n }\n finally { if (e_2) throw e_2.error; }\n }\n if (headerGroupCtrl) {\n headerGroupCtrl.resizeLeafColumnsToFit();\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (columnGroups_1_1 && !columnGroups_1_1.done && (_a = columnGroups_1.return)) _a.call(columnGroups_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return resizedColumns;\n };\n ColumnModel.prototype.autoSizeAllColumns = function (skipHeader, source) {\n if (source === void 0) { source = \"api\"; }\n var allDisplayedColumns = this.getAllDisplayedColumns();\n this.autoSizeColumns({ columns: allDisplayedColumns, skipHeader: skipHeader, source: source });\n };\n // Possible candidate for reuse (alot of recursive traversal duplication)\n ColumnModel.prototype.getColumnsFromTree = function (rootColumns) {\n var result = [];\n var recursiveFindColumns = function (childColumns) {\n for (var i = 0; i < childColumns.length; i++) {\n var child = childColumns[i];\n if (child instanceof Column) {\n result.push(child);\n }\n else if (child instanceof ProvidedColumnGroup) {\n recursiveFindColumns(child.getChildren());\n }\n }\n };\n recursiveFindColumns(rootColumns);\n return result;\n };\n ColumnModel.prototype.getAllDisplayedTrees = function () {\n if (this.displayedTreeLeft && this.displayedTreeRight && this.displayedTreeCentre) {\n return this.displayedTreeLeft\n .concat(this.displayedTreeCentre)\n .concat(this.displayedTreeRight);\n }\n return null;\n };\n // + columnSelectPanel\n ColumnModel.prototype.getPrimaryColumnTree = function () {\n return this.primaryColumnTree;\n };\n // + gridPanel -> for resizing the body and setting top margin\n ColumnModel.prototype.getHeaderRowCount = function () {\n return this.gridHeaderRowCount;\n };\n // + headerRenderer -> setting pinned body width\n ColumnModel.prototype.getDisplayedTreeLeft = function () {\n return this.displayedTreeLeft;\n };\n // + headerRenderer -> setting pinned body width\n ColumnModel.prototype.getDisplayedTreeRight = function () {\n return this.displayedTreeRight;\n };\n // + headerRenderer -> setting pinned body width\n ColumnModel.prototype.getDisplayedTreeCentre = function () {\n return this.displayedTreeCentre;\n };\n // gridPanel -> ensureColumnVisible\n ColumnModel.prototype.isColumnDisplayed = function (column) {\n return this.getAllDisplayedColumns().indexOf(column) >= 0;\n };\n // + csvCreator\n ColumnModel.prototype.getAllDisplayedColumns = function () {\n return this.displayedColumns;\n };\n ColumnModel.prototype.getViewportColumns = function () {\n return this.viewportColumns;\n };\n ColumnModel.prototype.getDisplayedLeftColumnsForRow = function (rowNode) {\n if (!this.colSpanActive) {\n return this.displayedColumnsLeft;\n }\n return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsLeft);\n };\n ColumnModel.prototype.getDisplayedRightColumnsForRow = function (rowNode) {\n if (!this.colSpanActive) {\n return this.displayedColumnsRight;\n }\n return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsRight);\n };\n ColumnModel.prototype.getDisplayedColumnsForRow = function (rowNode, displayedColumns, filterCallback, emptySpaceBeforeColumn) {\n var result = [];\n var lastConsideredCol = null;\n var _loop_1 = function (i) {\n var col = displayedColumns[i];\n var maxAllowedColSpan = displayedColumns.length - i;\n var colSpan = Math.min(col.getColSpan(rowNode), maxAllowedColSpan);\n var columnsToCheckFilter = [col];\n if (colSpan > 1) {\n var colsToRemove = colSpan - 1;\n for (var j = 1; j <= colsToRemove; j++) {\n columnsToCheckFilter.push(displayedColumns[i + j]);\n }\n i += colsToRemove;\n }\n // see which cols we should take out for column virtualisation\n var filterPasses;\n if (filterCallback) {\n // if user provided a callback, means some columns may not be in the viewport.\n // the user will NOT provide a callback if we are talking about pinned areas,\n // as pinned areas have no horizontal scroll and do not virtualise the columns.\n // if lots of columns, that means column spanning, and we set filterPasses = true\n // if one or more of the columns spanned pass the filter.\n filterPasses = false;\n columnsToCheckFilter.forEach(function (colForFilter) {\n if (filterCallback(colForFilter)) {\n filterPasses = true;\n }\n });\n }\n else {\n filterPasses = true;\n }\n if (filterPasses) {\n if (result.length === 0 && lastConsideredCol) {\n var gapBeforeColumn = emptySpaceBeforeColumn ? emptySpaceBeforeColumn(col) : false;\n if (gapBeforeColumn) {\n result.push(lastConsideredCol);\n }\n }\n result.push(col);\n }\n lastConsideredCol = col;\n out_i_1 = i;\n };\n var out_i_1;\n for (var i = 0; i < displayedColumns.length; i++) {\n _loop_1(i);\n i = out_i_1;\n }\n return result;\n };\n // + rowRenderer\n // if we are not column spanning, this just returns back the virtual centre columns,\n // however if we are column spanning, then different rows can have different virtual\n // columns, so we have to work out the list for each individual row.\n ColumnModel.prototype.getViewportCenterColumnsForRow = function (rowNode) {\n var _this = this;\n if (!this.colSpanActive) {\n return this.viewportColumnsCenter;\n }\n var emptySpaceBeforeColumn = function (col) {\n var left = col.getLeft();\n return exists(left) && left > _this.viewportLeft;\n };\n // if doing column virtualisation, then we filter based on the viewport.\n var filterCallback = this.suppressColumnVirtualisation ? null : this.isColumnInViewport.bind(this);\n return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsCenter, filterCallback, emptySpaceBeforeColumn);\n };\n ColumnModel.prototype.getAriaColumnIndex = function (col) {\n return this.getAllGridColumns().indexOf(col) + 1;\n };\n ColumnModel.prototype.isColumnInViewport = function (col) {\n // we never filter out autoHeight columns, as we need them in the DOM for calculating Auto Height\n if (col.isAutoHeight()) {\n return true;\n }\n var columnLeft = col.getLeft() || 0;\n var columnRight = columnLeft + col.getActualWidth();\n // adding 200 for buffer size, so some cols off viewport are rendered.\n // this helps horizontal scrolling so user rarely sees white space (unless\n // they scroll horizontally fast). however we are conservative, as the more\n // buffer the slower the vertical redraw speed\n var leftBounds = this.viewportLeft - 200;\n var rightBounds = this.viewportRight + 200;\n var columnToMuchLeft = columnLeft < leftBounds && columnRight < leftBounds;\n var columnToMuchRight = columnLeft > rightBounds && columnRight > rightBounds;\n return !columnToMuchLeft && !columnToMuchRight;\n };\n // used by:\n // + angularGrid -> setting pinned body width\n // note: this should be cached\n ColumnModel.prototype.getDisplayedColumnsLeftWidth = function () {\n return this.getWidthOfColsInList(this.displayedColumnsLeft);\n };\n // note: this should be cached\n ColumnModel.prototype.getDisplayedColumnsRightWidth = function () {\n return this.getWidthOfColsInList(this.displayedColumnsRight);\n };\n ColumnModel.prototype.updatePrimaryColumnList = function (keys, masterList, actionIsAdd, columnCallback, eventType, source) {\n var _this = this;\n if (source === void 0) { source = \"api\"; }\n if (!keys || missingOrEmpty(keys)) {\n return;\n }\n var atLeastOne = false;\n keys.forEach(function (key) {\n var columnToAdd = _this.getPrimaryColumn(key);\n if (!columnToAdd) {\n return;\n }\n if (actionIsAdd) {\n if (masterList.indexOf(columnToAdd) >= 0) {\n return;\n }\n masterList.push(columnToAdd);\n }\n else {\n if (masterList.indexOf(columnToAdd) < 0) {\n return;\n }\n removeFromArray(masterList, columnToAdd);\n }\n columnCallback(columnToAdd);\n atLeastOne = true;\n });\n if (!atLeastOne) {\n return;\n }\n if (this.autoGroupsNeedBuilding) {\n this.updateGridColumns();\n }\n this.updateDisplayedColumns(source);\n var event = {\n type: eventType,\n columns: masterList,\n column: masterList.length === 1 ? masterList[0] : null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.setRowGroupColumns = function (colKeys, source) {\n if (source === void 0) { source = \"api\"; }\n this.autoGroupsNeedBuilding = true;\n this.setPrimaryColumnList(colKeys, this.rowGroupColumns, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.setRowGroupActive.bind(this), source);\n };\n ColumnModel.prototype.setRowGroupActive = function (active, column, source) {\n if (active === column.isRowGroupActive()) {\n return;\n }\n column.setRowGroupActive(active, source);\n if (!active && !this.gridOptionsWrapper.isSuppressMakeColumnVisibleAfterUnGroup()) {\n column.setVisible(true, source);\n }\n };\n ColumnModel.prototype.addRowGroupColumn = function (key, source) {\n if (source === void 0) { source = \"api\"; }\n if (key) {\n this.addRowGroupColumns([key], source);\n }\n };\n ColumnModel.prototype.addRowGroupColumns = function (keys, source) {\n if (source === void 0) { source = \"api\"; }\n this.autoGroupsNeedBuilding = true;\n this.updatePrimaryColumnList(keys, this.rowGroupColumns, true, this.setRowGroupActive.bind(this, true), Events.EVENT_COLUMN_ROW_GROUP_CHANGED, source);\n };\n ColumnModel.prototype.removeRowGroupColumns = function (keys, source) {\n if (source === void 0) { source = \"api\"; }\n this.autoGroupsNeedBuilding = true;\n this.updatePrimaryColumnList(keys, this.rowGroupColumns, false, this.setRowGroupActive.bind(this, false), Events.EVENT_COLUMN_ROW_GROUP_CHANGED, source);\n };\n ColumnModel.prototype.removeRowGroupColumn = function (key, source) {\n if (source === void 0) { source = \"api\"; }\n if (key) {\n this.removeRowGroupColumns([key], source);\n }\n };\n ColumnModel.prototype.addPivotColumns = function (keys, source) {\n if (source === void 0) { source = \"api\"; }\n this.updatePrimaryColumnList(keys, this.pivotColumns, true, function (column) { return column.setPivotActive(true, source); }, Events.EVENT_COLUMN_PIVOT_CHANGED, source);\n };\n ColumnModel.prototype.setPivotColumns = function (colKeys, source) {\n if (source === void 0) { source = \"api\"; }\n this.setPrimaryColumnList(colKeys, this.pivotColumns, Events.EVENT_COLUMN_PIVOT_CHANGED, function (added, column) {\n column.setPivotActive(added, source);\n }, source);\n };\n ColumnModel.prototype.addPivotColumn = function (key, source) {\n if (source === void 0) { source = \"api\"; }\n this.addPivotColumns([key], source);\n };\n ColumnModel.prototype.removePivotColumns = function (keys, source) {\n if (source === void 0) { source = \"api\"; }\n this.updatePrimaryColumnList(keys, this.pivotColumns, false, function (column) { return column.setPivotActive(false, source); }, Events.EVENT_COLUMN_PIVOT_CHANGED, source);\n };\n ColumnModel.prototype.removePivotColumn = function (key, source) {\n if (source === void 0) { source = \"api\"; }\n this.removePivotColumns([key], source);\n };\n ColumnModel.prototype.setPrimaryColumnList = function (colKeys, masterList, eventName, columnCallback, source) {\n var _this = this;\n masterList.length = 0;\n if (exists(colKeys)) {\n colKeys.forEach(function (key) {\n var column = _this.getPrimaryColumn(key);\n if (column) {\n masterList.push(column);\n }\n });\n }\n (this.primaryColumns || []).forEach(function (column) {\n var added = masterList.indexOf(column) >= 0;\n columnCallback(added, column);\n });\n if (this.autoGroupsNeedBuilding) {\n this.updateGridColumns();\n }\n this.updateDisplayedColumns(source);\n this.fireColumnEvent(eventName, masterList, source);\n };\n ColumnModel.prototype.setValueColumns = function (colKeys, source) {\n if (source === void 0) { source = \"api\"; }\n this.setPrimaryColumnList(colKeys, this.valueColumns, Events.EVENT_COLUMN_VALUE_CHANGED, this.setValueActive.bind(this), source);\n };\n ColumnModel.prototype.setValueActive = function (active, column, source) {\n if (active === column.isValueActive()) {\n return;\n }\n column.setValueActive(active, source);\n if (active && !column.getAggFunc()) {\n var initialAggFunc = this.aggFuncService.getDefaultAggFunc(column);\n column.setAggFunc(initialAggFunc);\n }\n };\n ColumnModel.prototype.addValueColumns = function (keys, source) {\n if (source === void 0) { source = \"api\"; }\n this.updatePrimaryColumnList(keys, this.valueColumns, true, this.setValueActive.bind(this, true), Events.EVENT_COLUMN_VALUE_CHANGED, source);\n };\n ColumnModel.prototype.addValueColumn = function (colKey, source) {\n if (source === void 0) { source = \"api\"; }\n if (colKey) {\n this.addValueColumns([colKey], source);\n }\n };\n ColumnModel.prototype.removeValueColumn = function (colKey, source) {\n if (source === void 0) { source = \"api\"; }\n this.removeValueColumns([colKey], source);\n };\n ColumnModel.prototype.removeValueColumns = function (keys, source) {\n if (source === void 0) { source = \"api\"; }\n this.updatePrimaryColumnList(keys, this.valueColumns, false, this.setValueActive.bind(this, false), Events.EVENT_COLUMN_VALUE_CHANGED, source);\n };\n // returns the width we can set to this col, taking into consideration min and max widths\n ColumnModel.prototype.normaliseColumnWidth = function (column, newWidth) {\n var minWidth = column.getMinWidth();\n if (exists(minWidth) && newWidth < minWidth) {\n newWidth = minWidth;\n }\n var maxWidth = column.getMaxWidth();\n if (exists(maxWidth) && column.isGreaterThanMax(newWidth)) {\n newWidth = maxWidth;\n }\n return newWidth;\n };\n ColumnModel.prototype.getPrimaryOrGridColumn = function (key) {\n var column = this.getPrimaryColumn(key);\n return column || this.getGridColumn(key);\n };\n ColumnModel.prototype.setColumnWidths = function (columnWidths, shiftKey, // @takeFromAdjacent - if user has 'shift' pressed, then pixels are taken from adjacent column\n finished, // @finished - ends up in the event, tells the user if more events are to come\n source) {\n var _this = this;\n if (source === void 0) { source = \"api\"; }\n var sets = [];\n columnWidths.forEach(function (columnWidth) {\n var col = _this.getPrimaryOrGridColumn(columnWidth.key);\n if (!col) {\n return;\n }\n sets.push({\n width: columnWidth.newWidth,\n ratios: [1],\n columns: [col]\n });\n // if user wants to do shift resize by default, then we invert the shift operation\n var defaultIsShift = _this.gridOptionsWrapper.getColResizeDefault() === 'shift';\n if (defaultIsShift) {\n shiftKey = !shiftKey;\n }\n if (shiftKey) {\n var otherCol = _this.getDisplayedColAfter(col);\n if (!otherCol) {\n return;\n }\n var widthDiff = col.getActualWidth() - columnWidth.newWidth;\n var otherColWidth = otherCol.getActualWidth() + widthDiff;\n sets.push({\n width: otherColWidth,\n ratios: [1],\n columns: [otherCol]\n });\n }\n });\n if (sets.length === 0) {\n return;\n }\n this.resizeColumnSets({\n resizeSets: sets,\n finished: finished,\n source: source\n });\n };\n ColumnModel.prototype.checkMinAndMaxWidthsForSet = function (columnResizeSet) {\n var columns = columnResizeSet.columns, width = columnResizeSet.width;\n // every col has a min width, so sum them all up and see if we have enough room\n // for all the min widths\n var minWidthAccumulated = 0;\n var maxWidthAccumulated = 0;\n var maxWidthActive = true;\n columns.forEach(function (col) {\n var minWidth = col.getMinWidth();\n minWidthAccumulated += minWidth || 0;\n var maxWidth = col.getMaxWidth();\n if (exists(maxWidth) && maxWidth > 0) {\n maxWidthAccumulated += maxWidth;\n }\n else {\n // if at least one columns has no max width, it means the group of columns\n // then has no max width, as at least one column can take as much width as possible\n maxWidthActive = false;\n }\n });\n var minWidthPasses = width >= minWidthAccumulated;\n var maxWidthPasses = !maxWidthActive || (width <= maxWidthAccumulated);\n return minWidthPasses && maxWidthPasses;\n };\n // method takes sets of columns and resizes them. either all sets will be resized, or nothing\n // be resized. this is used for example when user tries to resize a group and holds shift key,\n // then both the current group (grows), and the adjacent group (shrinks), will get resized,\n // so that's two sets for this method.\n ColumnModel.prototype.resizeColumnSets = function (params) {\n var _this = this;\n var resizeSets = params.resizeSets, finished = params.finished, source = params.source;\n var passMinMaxCheck = !resizeSets || resizeSets.every(function (columnResizeSet) { return _this.checkMinAndMaxWidthsForSet(columnResizeSet); });\n if (!passMinMaxCheck) {\n // even though we are not going to resize beyond min/max size, we still need to raise event when finished\n if (finished) {\n var columns = resizeSets && resizeSets.length > 0 ? resizeSets[0].columns : null;\n this.fireColumnResizedEvent(columns, finished, source);\n }\n return; // don't resize!\n }\n var changedCols = [];\n var allResizedCols = [];\n resizeSets.forEach(function (set) {\n var width = set.width, columns = set.columns, ratios = set.ratios;\n // keep track of pixels used, and last column gets the remaining,\n // to cater for rounding errors, and min width adjustments\n var newWidths = {};\n var finishedCols = {};\n columns.forEach(function (col) { return allResizedCols.push(col); });\n // the loop below goes through each col. if a col exceeds it's min/max width,\n // it then gets set to its min/max width and the column is removed marked as 'finished'\n // and the calculation is done again leaving this column out. take for example columns\n // {A, width: 50, maxWidth: 100}\n // {B, width: 50}\n // {C, width: 50}\n // and then the set is set to width 600 - on the first pass the grid tries to set each column\n // to 200. it checks A and sees 200 > 100 and so sets the width to 100. col A is then marked\n // as 'finished' and the calculation is done again with the remaining cols B and C, which end up\n // splitting the remaining 500 pixels.\n var finishedColsGrew = true;\n var loopCount = 0;\n var _loop_2 = function () {\n loopCount++;\n if (loopCount > 1000) {\n // this should never happen, but in the future, someone might introduce a bug here,\n // so we stop the browser from hanging and report bug properly\n console.error('AG Grid: infinite loop in resizeColumnSets');\n return \"break\";\n }\n finishedColsGrew = false;\n var subsetCols = [];\n var subsetRatioTotal = 0;\n var pixelsToDistribute = width;\n columns.forEach(function (col, index) {\n var thisColFinished = finishedCols[col.getId()];\n if (thisColFinished) {\n pixelsToDistribute -= newWidths[col.getId()];\n }\n else {\n subsetCols.push(col);\n var ratioThisCol = ratios[index];\n subsetRatioTotal += ratioThisCol;\n }\n });\n // because we are not using all of the ratios (cols can be missing),\n // we scale the ratio. if all columns are included, then subsetRatioTotal=1,\n // and so the ratioScale will be 1.\n var ratioScale = 1 / subsetRatioTotal;\n subsetCols.forEach(function (col, index) {\n var lastCol = index === (subsetCols.length - 1);\n var colNewWidth;\n if (lastCol) {\n colNewWidth = pixelsToDistribute;\n }\n else {\n colNewWidth = Math.round(ratios[index] * width * ratioScale);\n pixelsToDistribute -= colNewWidth;\n }\n var minWidth = col.getMinWidth();\n var maxWidth = col.getMaxWidth();\n if (exists(minWidth) && colNewWidth < minWidth) {\n colNewWidth = minWidth;\n finishedCols[col.getId()] = true;\n finishedColsGrew = true;\n }\n else if (exists(maxWidth) && maxWidth > 0 && colNewWidth > maxWidth) {\n colNewWidth = maxWidth;\n finishedCols[col.getId()] = true;\n finishedColsGrew = true;\n }\n newWidths[col.getId()] = colNewWidth;\n });\n };\n while (finishedColsGrew) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n columns.forEach(function (col) {\n var newWidth = newWidths[col.getId()];\n var actualWidth = col.getActualWidth();\n if (actualWidth !== newWidth) {\n col.setActualWidth(newWidth, source);\n changedCols.push(col);\n }\n });\n });\n // if no cols changed, then no need to update more or send event.\n var atLeastOneColChanged = changedCols.length > 0;\n var flexedCols = [];\n if (atLeastOneColChanged) {\n flexedCols = this.refreshFlexedColumns({ resizingCols: allResizedCols, skipSetLeft: true });\n this.setLeftValues(source);\n this.updateBodyWidths();\n this.checkViewportColumns();\n }\n // check for change first, to avoid unnecessary firing of events\n // however we always fire 'finished' events. this is important\n // when groups are resized, as if the group is changing slowly,\n // eg 1 pixel at a time, then each change will fire change events\n // in all the columns in the group, but only one with get the pixel.\n var colsForEvent = allResizedCols.concat(flexedCols);\n if (atLeastOneColChanged || finished) {\n this.fireColumnResizedEvent(colsForEvent, finished, source, flexedCols);\n }\n };\n ColumnModel.prototype.setColumnAggFunc = function (key, aggFunc, source) {\n if (source === void 0) { source = \"api\"; }\n if (!key) {\n return;\n }\n var column = this.getPrimaryColumn(key);\n if (!column) {\n return;\n }\n column.setAggFunc(aggFunc);\n this.fireColumnEvent(Events.EVENT_COLUMN_VALUE_CHANGED, [column], source);\n };\n ColumnModel.prototype.fireColumnEvent = function (type, columns, source) {\n var event = {\n type: type,\n columns: columns,\n column: (columns && columns.length == 1) ? columns[0] : null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.moveRowGroupColumn = function (fromIndex, toIndex, source) {\n if (source === void 0) { source = \"api\"; }\n var column = this.rowGroupColumns[fromIndex];\n this.rowGroupColumns.splice(fromIndex, 1);\n this.rowGroupColumns.splice(toIndex, 0, column);\n var event = {\n type: Events.EVENT_COLUMN_ROW_GROUP_CHANGED,\n columns: this.rowGroupColumns,\n column: this.rowGroupColumns.length === 1 ? this.rowGroupColumns[0] : null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.moveColumns = function (columnsToMoveKeys, toIndex, source) {\n if (source === void 0) { source = \"api\"; }\n this.columnAnimationService.start();\n if (toIndex > this.gridColumns.length - columnsToMoveKeys.length) {\n console.warn('AG Grid: tried to insert columns in invalid location, toIndex = ' + toIndex);\n console.warn('AG Grid: remember that you should not count the moving columns when calculating the new index');\n return;\n }\n // we want to pull all the columns out first and put them into an ordered list\n var columnsToMove = this.getGridColumns(columnsToMoveKeys);\n var failedRules = !this.doesMovePassRules(columnsToMove, toIndex);\n if (failedRules) {\n return;\n }\n moveInArray(this.gridColumns, columnsToMove, toIndex);\n this.updateDisplayedColumns(source);\n var event = {\n type: Events.EVENT_COLUMN_MOVED,\n columns: columnsToMove,\n column: columnsToMove.length === 1 ? columnsToMove[0] : null,\n toIndex: toIndex,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n this.columnAnimationService.finish();\n };\n ColumnModel.prototype.doesMovePassRules = function (columnsToMove, toIndex) {\n // make a copy of what the grid columns would look like after the move\n var proposedColumnOrder = this.gridColumns.slice();\n moveInArray(proposedColumnOrder, columnsToMove, toIndex);\n // then check that the new proposed order of the columns passes all rules\n if (!this.doesMovePassMarryChildren(proposedColumnOrder)) {\n return false;\n }\n if (!this.doesMovePassLockedPositions(proposedColumnOrder)) {\n return false;\n }\n return true;\n };\n // returns the provided cols sorted in same order as they appear in grid columns. eg if grid columns\n // contains [a,b,c,d,e] and col passed is [e,a] then the passed cols are sorted into [a,e]\n ColumnModel.prototype.sortColumnsLikeGridColumns = function (cols) {\n var _this = this;\n if (!cols || cols.length <= 1) {\n return;\n }\n var notAllColsInGridColumns = cols.filter(function (c) { return _this.gridColumns.indexOf(c) < 0; }).length > 0;\n if (notAllColsInGridColumns) {\n return;\n }\n cols.sort(function (a, b) {\n var indexA = _this.gridColumns.indexOf(a);\n var indexB = _this.gridColumns.indexOf(b);\n return indexA - indexB;\n });\n };\n ColumnModel.prototype.doesMovePassLockedPositions = function (proposedColumnOrder) {\n // Placement is a number indicating 'left' 'center' or 'right' as 0 1 2\n var lastPlacement = 0;\n var rulePassed = true;\n var lockPositionToPlacement = function (position) {\n if (!position) { // false or undefined\n return 1;\n }\n if (position === true) {\n return 0;\n }\n return position === 'left' ? 0 : 2; // Otherwise 'right'\n };\n proposedColumnOrder.forEach(function (col) {\n var placement = lockPositionToPlacement(col.getColDef().lockPosition);\n if (placement < lastPlacement) { // If placement goes down, we're not in the correct order\n rulePassed = false;\n }\n lastPlacement = placement;\n });\n return rulePassed;\n };\n ColumnModel.prototype.doesMovePassMarryChildren = function (allColumnsCopy) {\n var rulePassed = true;\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (child) {\n if (!(child instanceof ProvidedColumnGroup)) {\n return;\n }\n var columnGroup = child;\n var colGroupDef = columnGroup.getColGroupDef();\n var marryChildren = colGroupDef && colGroupDef.marryChildren;\n if (!marryChildren) {\n return;\n }\n var newIndexes = [];\n columnGroup.getLeafColumns().forEach(function (col) {\n var newColIndex = allColumnsCopy.indexOf(col);\n newIndexes.push(newColIndex);\n });\n var maxIndex = Math.max.apply(Math, newIndexes);\n var minIndex = Math.min.apply(Math, newIndexes);\n // spread is how far the first column in this group is away from the last column\n var spread = maxIndex - minIndex;\n var maxSpread = columnGroup.getLeafColumns().length - 1;\n // if the columns\n if (spread > maxSpread) {\n rulePassed = false;\n }\n // console.log(`maxIndex = ${maxIndex}, minIndex = ${minIndex}, spread = ${spread}, maxSpread = ${maxSpread}, fail = ${spread > (count-1)}`)\n // console.log(allColumnsCopy.map( col => col.getColDef().field).join(','));\n });\n return rulePassed;\n };\n ColumnModel.prototype.moveColumn = function (key, toIndex, source) {\n if (source === void 0) { source = \"api\"; }\n this.moveColumns([key], toIndex, source);\n };\n ColumnModel.prototype.moveColumnByIndex = function (fromIndex, toIndex, source) {\n if (source === void 0) { source = \"api\"; }\n var column = this.gridColumns[fromIndex];\n this.moveColumn(column, toIndex, source);\n };\n ColumnModel.prototype.getColumnDefs = function () {\n var _this = this;\n if (!this.primaryColumns) {\n return;\n }\n var cols = this.primaryColumns.slice();\n if (this.gridColsArePrimary) {\n cols.sort(function (a, b) { return _this.gridColumns.indexOf(a) - _this.gridColumns.indexOf(b); });\n }\n else if (this.lastPrimaryOrder) {\n cols.sort(function (a, b) { return _this.lastPrimaryOrder.indexOf(a) - _this.lastPrimaryOrder.indexOf(b); });\n }\n return this.columnDefFactory.buildColumnDefs(cols, this.rowGroupColumns, this.pivotColumns);\n };\n // used by:\n // + angularGrid -> for setting body width\n // + rowController -> setting main row widths (when inserting and resizing)\n // need to cache this\n ColumnModel.prototype.getBodyContainerWidth = function () {\n return this.bodyWidth;\n };\n ColumnModel.prototype.getContainerWidth = function (pinned) {\n switch (pinned) {\n case Constants.PINNED_LEFT:\n return this.leftWidth;\n case Constants.PINNED_RIGHT:\n return this.rightWidth;\n default:\n return this.bodyWidth;\n }\n };\n // after setColumnWidth or updateGroupsAndDisplayedColumns\n ColumnModel.prototype.updateBodyWidths = function () {\n var newBodyWidth = this.getWidthOfColsInList(this.displayedColumnsCenter);\n var newLeftWidth = this.getWidthOfColsInList(this.displayedColumnsLeft);\n var newRightWidth = this.getWidthOfColsInList(this.displayedColumnsRight);\n // this is used by virtual col calculation, for RTL only, as a change to body width can impact displayed\n // columns, due to RTL inverting the y coordinates\n this.bodyWidthDirty = this.bodyWidth !== newBodyWidth;\n var atLeastOneChanged = this.bodyWidth !== newBodyWidth || this.leftWidth !== newLeftWidth || this.rightWidth !== newRightWidth;\n if (atLeastOneChanged) {\n this.bodyWidth = newBodyWidth;\n this.leftWidth = newLeftWidth;\n this.rightWidth = newRightWidth;\n // when this fires, it is picked up by the gridPanel, which ends up in\n // gridPanel calling setWidthAndScrollPosition(), which in turn calls setViewportPosition()\n var event_3 = {\n type: Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_3);\n }\n };\n // + rowController\n ColumnModel.prototype.getValueColumns = function () {\n return this.valueColumns ? this.valueColumns : [];\n };\n // + rowController\n ColumnModel.prototype.getPivotColumns = function () {\n return this.pivotColumns ? this.pivotColumns : [];\n };\n // + clientSideRowModel\n ColumnModel.prototype.isPivotActive = function () {\n return this.pivotColumns && this.pivotColumns.length > 0 && this.pivotMode;\n };\n // + toolPanel\n ColumnModel.prototype.getRowGroupColumns = function () {\n return this.rowGroupColumns ? this.rowGroupColumns : [];\n };\n // + rowController -> while inserting rows\n ColumnModel.prototype.getDisplayedCenterColumns = function () {\n return this.displayedColumnsCenter;\n };\n // + rowController -> while inserting rows\n ColumnModel.prototype.getDisplayedLeftColumns = function () {\n return this.displayedColumnsLeft;\n };\n ColumnModel.prototype.getDisplayedRightColumns = function () {\n return this.displayedColumnsRight;\n };\n ColumnModel.prototype.getDisplayedColumns = function (type) {\n switch (type) {\n case Constants.PINNED_LEFT:\n return this.getDisplayedLeftColumns();\n case Constants.PINNED_RIGHT:\n return this.getDisplayedRightColumns();\n default:\n return this.getDisplayedCenterColumns();\n }\n };\n // used by:\n // + clientSideRowController -> sorting, building quick filter text\n // + headerRenderer -> sorting (clearing icon)\n ColumnModel.prototype.getAllPrimaryColumns = function () {\n return this.primaryColumns ? this.primaryColumns.slice() : null;\n };\n ColumnModel.prototype.getSecondaryColumns = function () {\n return this.secondaryColumns ? this.secondaryColumns.slice() : null;\n };\n ColumnModel.prototype.getAllColumnsForQuickFilter = function () {\n return this.columnsForQuickFilter;\n };\n // + moveColumnController\n ColumnModel.prototype.getAllGridColumns = function () {\n return this.gridColumns;\n };\n ColumnModel.prototype.isEmpty = function () {\n return missingOrEmpty(this.gridColumns);\n };\n ColumnModel.prototype.isRowGroupEmpty = function () {\n return missingOrEmpty(this.rowGroupColumns);\n };\n ColumnModel.prototype.setColumnVisible = function (key, visible, source) {\n if (source === void 0) { source = \"api\"; }\n this.setColumnsVisible([key], visible, source);\n };\n ColumnModel.prototype.setColumnsVisible = function (keys, visible, source) {\n var _this = this;\n if (visible === void 0) { visible = false; }\n if (source === void 0) { source = \"api\"; }\n this.columnAnimationService.start();\n this.actionOnGridColumns(keys, function (column) {\n if (column.isVisible() !== visible) {\n column.setVisible(visible, source);\n return true;\n }\n return false;\n }, source, function () {\n var event = {\n type: Events.EVENT_COLUMN_VISIBLE,\n visible: visible,\n column: null,\n columns: null,\n api: _this.gridApi,\n columnApi: _this.columnApi,\n source: source\n };\n return event;\n });\n this.columnAnimationService.finish();\n };\n ColumnModel.prototype.setColumnPinned = function (key, pinned, source) {\n if (source === void 0) { source = \"api\"; }\n if (key) {\n this.setColumnsPinned([key], pinned, source);\n }\n };\n ColumnModel.prototype.setColumnsPinned = function (keys, pinned, source) {\n var _this = this;\n if (source === void 0) { source = \"api\"; }\n if (this.gridOptionsWrapper.getDomLayout() === 'print') {\n console.warn(\"Changing the column pinning status is not allowed with domLayout='print'\");\n return;\n }\n this.columnAnimationService.start();\n var actualPinned;\n if (pinned === true || pinned === Constants.PINNED_LEFT) {\n actualPinned = Constants.PINNED_LEFT;\n }\n else if (pinned === Constants.PINNED_RIGHT) {\n actualPinned = Constants.PINNED_RIGHT;\n }\n else {\n actualPinned = null;\n }\n this.actionOnGridColumns(keys, function (col) {\n if (col.getPinned() !== actualPinned) {\n col.setPinned(actualPinned);\n return true;\n }\n return false;\n }, source, function () {\n var event = {\n type: Events.EVENT_COLUMN_PINNED,\n pinned: actualPinned,\n column: null,\n columns: null,\n api: _this.gridApi,\n columnApi: _this.columnApi,\n source: source\n };\n return event;\n });\n this.columnAnimationService.finish();\n };\n // does an action on a set of columns. provides common functionality for looking up the\n // columns based on key, getting a list of effected columns, and then updated the event\n // with either one column (if it was just one col) or a list of columns\n // used by: autoResize, setVisible, setPinned\n ColumnModel.prototype.actionOnGridColumns = function (// the column keys this action will be on\n keys, \n // the action to do - if this returns false, the column was skipped\n // and won't be included in the event\n action, \n // should return back a column event of the right type\n source, createEvent) {\n var _this = this;\n if (missingOrEmpty(keys)) {\n return;\n }\n var updatedColumns = [];\n keys.forEach(function (key) {\n var column = _this.getGridColumn(key);\n if (!column) {\n return;\n }\n // need to check for false with type (ie !== instead of !=)\n // as not returning anything (undefined) would also be false\n var resultOfAction = action(column);\n if (resultOfAction !== false) {\n updatedColumns.push(column);\n }\n });\n if (!updatedColumns.length) {\n return;\n }\n this.updateDisplayedColumns(source);\n if (exists(createEvent) && createEvent) {\n var event_4 = createEvent();\n event_4.columns = updatedColumns;\n event_4.column = updatedColumns.length === 1 ? updatedColumns[0] : null;\n this.eventService.dispatchEvent(event_4);\n }\n };\n ColumnModel.prototype.getDisplayedColBefore = function (col) {\n var allDisplayedColumns = this.getAllDisplayedColumns();\n var oldIndex = allDisplayedColumns.indexOf(col);\n if (oldIndex > 0) {\n return allDisplayedColumns[oldIndex - 1];\n }\n return null;\n };\n // used by:\n // + rowRenderer -> for navigation\n ColumnModel.prototype.getDisplayedColAfter = function (col) {\n var allDisplayedColumns = this.getAllDisplayedColumns();\n var oldIndex = allDisplayedColumns.indexOf(col);\n if (oldIndex < (allDisplayedColumns.length - 1)) {\n return allDisplayedColumns[oldIndex + 1];\n }\n return null;\n };\n ColumnModel.prototype.getDisplayedGroupAfter = function (columnGroup) {\n return this.getDisplayedGroupAtDirection(columnGroup, 'After');\n };\n ColumnModel.prototype.getDisplayedGroupBefore = function (columnGroup) {\n return this.getDisplayedGroupAtDirection(columnGroup, 'Before');\n };\n ColumnModel.prototype.getDisplayedGroupAtDirection = function (columnGroup, direction) {\n // pick the last displayed column in this group\n var requiredLevel = columnGroup.getProvidedColumnGroup().getLevel() + columnGroup.getPaddingLevel();\n var colGroupLeafColumns = columnGroup.getDisplayedLeafColumns();\n var col = direction === 'After' ? last(colGroupLeafColumns) : colGroupLeafColumns[0];\n var getDisplayColMethod = \"getDisplayedCol\" + direction;\n while (true) {\n // keep moving to the next col, until we get to another group\n var column = this[getDisplayColMethod](col);\n if (!column) {\n return null;\n }\n var groupPointer = this.getColumnGroupAtLevel(column, requiredLevel);\n if (groupPointer !== columnGroup) {\n return groupPointer;\n }\n }\n };\n ColumnModel.prototype.getColumnGroupAtLevel = function (column, level) {\n // get group at same level as the one we are looking for\n var groupPointer = column.getParent();\n var originalGroupLevel;\n var groupPointerLevel;\n while (true) {\n var groupPointerProvidedColumnGroup = groupPointer.getProvidedColumnGroup();\n originalGroupLevel = groupPointerProvidedColumnGroup.getLevel();\n groupPointerLevel = groupPointer.getPaddingLevel();\n if (originalGroupLevel + groupPointerLevel <= level) {\n break;\n }\n groupPointer = groupPointer.getParent();\n }\n return groupPointer;\n };\n ColumnModel.prototype.isPinningLeft = function () {\n return this.displayedColumnsLeft.length > 0;\n };\n ColumnModel.prototype.isPinningRight = function () {\n return this.displayedColumnsRight.length > 0;\n };\n ColumnModel.prototype.getPrimaryAndSecondaryAndAutoColumns = function () {\n var _a;\n return (_a = []).concat.apply(_a, __spread([\n this.primaryColumns || [],\n this.groupAutoColumns || [],\n this.secondaryColumns || [],\n ]));\n };\n ColumnModel.prototype.getPrimaryAndAutoGroupCols = function () {\n var _a;\n return (_a = []).concat.apply(_a, __spread([\n this.primaryColumns || [],\n this.groupAutoColumns || [],\n ]));\n };\n ColumnModel.prototype.getPrimaryAndSecondaryColumns = function () {\n var _a;\n return (_a = []).concat.apply(_a, __spread([\n this.primaryColumns || [],\n this.secondaryColumns || [],\n ]));\n };\n ColumnModel.prototype.createStateItemFromColumn = function (column) {\n var rowGroupIndex = column.isRowGroupActive() ? this.rowGroupColumns.indexOf(column) : null;\n var pivotIndex = column.isPivotActive() ? this.pivotColumns.indexOf(column) : null;\n var aggFunc = column.isValueActive() ? column.getAggFunc() : null;\n var sort = column.getSort() != null ? column.getSort() : null;\n var sortIndex = column.getSortIndex() != null ? column.getSortIndex() : null;\n var flex = column.getFlex() != null && column.getFlex() > 0 ? column.getFlex() : null;\n var res = {\n colId: column.getColId(),\n width: column.getActualWidth(),\n hide: !column.isVisible(),\n pinned: column.getPinned(),\n sort: sort,\n sortIndex: sortIndex,\n aggFunc: aggFunc,\n rowGroup: column.isRowGroupActive(),\n rowGroupIndex: rowGroupIndex,\n pivot: column.isPivotActive(),\n pivotIndex: pivotIndex,\n flex: flex\n };\n return res;\n };\n ColumnModel.prototype.getColumnState = function () {\n if (missing(this.primaryColumns) || !this.isAlive()) {\n return [];\n }\n var colsForState = this.getPrimaryAndSecondaryAndAutoColumns();\n var res = colsForState.map(this.createStateItemFromColumn.bind(this));\n this.orderColumnStateList(res);\n return res;\n };\n ColumnModel.prototype.orderColumnStateList = function (columnStateList) {\n // for fast looking, store the index of each column\n var colIdToGridIndexMap = convertToMap(this.gridColumns.map(function (col, index) { return [col.getColId(), index]; }));\n columnStateList.sort(function (itemA, itemB) {\n var posA = colIdToGridIndexMap.has(itemA.colId) ? colIdToGridIndexMap.get(itemA.colId) : -1;\n var posB = colIdToGridIndexMap.has(itemB.colId) ? colIdToGridIndexMap.get(itemB.colId) : -1;\n return posA - posB;\n });\n };\n ColumnModel.prototype.resetColumnState = function (source) {\n // NOTE = there is one bug here that no customer has noticed - if a column has colDef.lockPosition,\n // this is ignored below when ordering the cols. to work, we should always put lockPosition cols first.\n // As a work around, developers should just put lockPosition columns first in their colDef list.\n if (source === void 0) { source = \"api\"; }\n // we can't use 'allColumns' as the order might of messed up, so get the primary ordered list\n var primaryColumns = this.getColumnsFromTree(this.primaryColumnTree);\n var columnStates = [];\n // we start at 1000, so if user has mix of rowGroup and group specified, it will work with both.\n // eg IF user has ColA.rowGroupIndex=0, ColB.rowGroupIndex=1, ColC.rowGroup=true,\n // THEN result will be ColA.rowGroupIndex=0, ColB.rowGroupIndex=1, ColC.rowGroup=1000\n var letRowGroupIndex = 1000;\n var letPivotIndex = 1000;\n var colsToProcess = [];\n if (this.groupAutoColumns) {\n colsToProcess = colsToProcess.concat(this.groupAutoColumns);\n }\n if (primaryColumns) {\n colsToProcess = colsToProcess.concat(primaryColumns);\n }\n colsToProcess.forEach(function (column) {\n var getValueOrNull = function (a, b) { return a != null ? a : b != null ? b : null; };\n var colDef = column.getColDef();\n var sort = getValueOrNull(colDef.sort, colDef.initialSort);\n var sortIndex = getValueOrNull(colDef.sortIndex, colDef.initialSortIndex);\n var hide = getValueOrNull(colDef.hide, colDef.initialHide);\n var pinned = getValueOrNull(colDef.pinned, colDef.initialPinned);\n var width = getValueOrNull(colDef.width, colDef.initialWidth);\n var flex = getValueOrNull(colDef.flex, colDef.initialFlex);\n var rowGroupIndex = getValueOrNull(colDef.rowGroupIndex, colDef.initialRowGroupIndex);\n var rowGroup = getValueOrNull(colDef.rowGroup, colDef.initialRowGroup);\n if (rowGroupIndex == null && (rowGroup == null || rowGroup == false)) {\n rowGroupIndex = null;\n rowGroup = null;\n }\n var pivotIndex = getValueOrNull(colDef.pivotIndex, colDef.initialPivotIndex);\n var pivot = getValueOrNull(colDef.pivot, colDef.initialPivot);\n if (pivotIndex == null && (pivot == null || pivot == false)) {\n pivotIndex = null;\n pivot = null;\n }\n var aggFunc = getValueOrNull(colDef.aggFunc, colDef.initialAggFunc);\n var stateItem = {\n colId: column.getColId(),\n sort: sort,\n sortIndex: sortIndex,\n hide: hide,\n pinned: pinned,\n width: width,\n flex: flex,\n rowGroup: rowGroup,\n rowGroupIndex: rowGroupIndex,\n pivot: pivot,\n pivotIndex: pivotIndex,\n aggFunc: aggFunc,\n };\n if (missing(rowGroupIndex) && rowGroup) {\n stateItem.rowGroupIndex = letRowGroupIndex++;\n }\n if (missing(pivotIndex) && pivot) {\n stateItem.pivotIndex = letPivotIndex++;\n }\n columnStates.push(stateItem);\n });\n this.applyColumnState({ state: columnStates, applyOrder: true }, source);\n };\n ColumnModel.prototype.applyColumnState = function (params, source) {\n var _this = this;\n if (source === void 0) { source = \"api\"; }\n if (missingOrEmpty(this.primaryColumns)) {\n return false;\n }\n if (params && params.state && !params.state.forEach) {\n console.warn('AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.');\n return false;\n }\n var applyStates = function (states, existingColumns, getById) {\n var raiseEventsFunc = _this.compareColumnStatesAndRaiseEvents(source);\n _this.autoGroupsNeedBuilding = true;\n // at the end below, this list will have all columns we got no state for\n var columnsWithNoState = existingColumns.slice();\n var rowGroupIndexes = {};\n var pivotIndexes = {};\n var autoGroupColumnStates = [];\n // If pivoting is modified, these are the states we try to reapply after\n // the secondary columns are re-generated\n var unmatchedAndAutoStates = [];\n var unmatchedCount = 0;\n var previousRowGroupCols = _this.rowGroupColumns.slice();\n var previousPivotCols = _this.pivotColumns.slice();\n states.forEach(function (state) {\n var colId = state.colId || '';\n // auto group columns are re-created so deferring syncing with ColumnState\n var isAutoGroupColumn = colId.startsWith(Constants.GROUP_AUTO_COLUMN_ID);\n if (isAutoGroupColumn) {\n autoGroupColumnStates.push(state);\n unmatchedAndAutoStates.push(state);\n return;\n }\n var column = getById(colId);\n if (!column) {\n unmatchedAndAutoStates.push(state);\n unmatchedCount += 1;\n }\n else {\n _this.syncColumnWithStateItem(column, state, params.defaultState, rowGroupIndexes, pivotIndexes, false, source);\n removeFromArray(columnsWithNoState, column);\n }\n });\n // anything left over, we got no data for, so add in the column as non-value, non-rowGroup and hidden\n var applyDefaultsFunc = function (col) {\n return _this.syncColumnWithStateItem(col, null, params.defaultState, rowGroupIndexes, pivotIndexes, false, source);\n };\n columnsWithNoState.forEach(applyDefaultsFunc);\n // sort the lists according to the indexes that were provided\n var comparator = function (indexes, oldList, colA, colB) {\n var indexA = indexes[colA.getId()];\n var indexB = indexes[colB.getId()];\n var aHasIndex = indexA != null;\n var bHasIndex = indexB != null;\n if (aHasIndex && bHasIndex) {\n // both a and b are new cols with index, so sort on index\n return indexA - indexB;\n }\n if (aHasIndex) {\n // a has an index, so it should be before a\n return -1;\n }\n if (bHasIndex) {\n // b has an index, so it should be before a\n return 1;\n }\n var oldIndexA = oldList.indexOf(colA);\n var oldIndexB = oldList.indexOf(colB);\n var aHasOldIndex = oldIndexA >= 0;\n var bHasOldIndex = oldIndexB >= 0;\n if (aHasOldIndex && bHasOldIndex) {\n // both a and b are old cols, so sort based on last order\n return oldIndexA - oldIndexB;\n }\n if (aHasOldIndex) {\n // a is old, b is new, so b is first\n return -1;\n }\n // this bit does matter, means both are new cols\n // but without index or that b is old and a is new\n return 1;\n };\n _this.rowGroupColumns.sort(comparator.bind(_this, rowGroupIndexes, previousRowGroupCols));\n _this.pivotColumns.sort(comparator.bind(_this, pivotIndexes, previousPivotCols));\n _this.updateGridColumns();\n // sync newly created auto group columns with ColumnState\n var autoGroupColsCopy = _this.groupAutoColumns ? _this.groupAutoColumns.slice() : [];\n autoGroupColumnStates.forEach(function (stateItem) {\n var autoCol = _this.getAutoColumn(stateItem.colId);\n removeFromArray(autoGroupColsCopy, autoCol);\n _this.syncColumnWithStateItem(autoCol, stateItem, params.defaultState, null, null, true, source);\n });\n // autogroup cols with nothing else, apply the default\n autoGroupColsCopy.forEach(applyDefaultsFunc);\n _this.applyOrderAfterApplyState(params);\n _this.updateDisplayedColumns(source);\n _this.dispatchEverythingChanged(source);\n raiseEventsFunc(); // Will trigger secondary column changes if pivoting modified\n return { unmatchedAndAutoStates: unmatchedAndAutoStates, unmatchedCount: unmatchedCount };\n };\n this.columnAnimationService.start();\n var _a = applyStates(params.state || [], this.primaryColumns || [], function (id) { return _this.getPrimaryColumn(id); }), unmatchedAndAutoStates = _a.unmatchedAndAutoStates, unmatchedCount = _a.unmatchedCount;\n // If there are still states left over, see if we can apply them to newly generated\n // secondary or auto columns. Also if defaults exist, ensure they are applied to secondary cols\n if (unmatchedAndAutoStates.length > 0 || exists(params.defaultState)) {\n unmatchedCount = applyStates(unmatchedAndAutoStates, this.secondaryColumns || [], function (id) { return _this.getSecondaryColumn(id); }).unmatchedCount;\n }\n this.columnAnimationService.finish();\n return unmatchedCount === 0; // Successful if no states unaccounted for\n };\n ColumnModel.prototype.applyOrderAfterApplyState = function (params) {\n var _this = this;\n if (!params.applyOrder || !params.state) {\n return;\n }\n var newOrder = [];\n var processedColIds = {};\n params.state.forEach(function (item) {\n if (!item.colId || processedColIds[item.colId]) {\n return;\n }\n var col = _this.gridColumnsMap[item.colId];\n if (col) {\n newOrder.push(col);\n processedColIds[item.colId] = true;\n }\n });\n // add in all other columns\n var autoGroupInsertIndex = 0;\n this.gridColumns.forEach(function (col) {\n var colId = col.getColId();\n var alreadyProcessed = processedColIds[colId] != null;\n if (alreadyProcessed) {\n return;\n }\n var isAutoGroupCol = colId.startsWith(Constants.GROUP_AUTO_COLUMN_ID);\n if (isAutoGroupCol) {\n // auto group columns, if missing from state list, are added to the start.\n // it's common to have autoGroup missing, as grouping could be on by default\n // on a column, but the user could of since removed the grouping via the UI.\n // if we don't inc the insert index, autoGroups will be inserted in reverse order\n insertIntoArray(newOrder, col, autoGroupInsertIndex++);\n }\n else {\n // normal columns, if missing from state list, are added at the end\n newOrder.push(col);\n }\n });\n // this is already done in updateGridColumns, however we changed the order above (to match the order of the state\n // columns) so we need to do it again. we could of put logic into the order above to take into account fixed\n // columns, however if we did then we would have logic for updating fixed columns twice. reusing the logic here\n // is less sexy for the code here, but it keeps consistency.\n newOrder = this.placeLockedColumns(newOrder);\n if (!this.doesMovePassMarryChildren(newOrder)) {\n console.warn('AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.');\n return;\n }\n this.gridColumns = newOrder;\n };\n ColumnModel.prototype.compareColumnStatesAndRaiseEvents = function (source) {\n var _this = this;\n var startState = {\n rowGroupColumns: this.rowGroupColumns.slice(),\n pivotColumns: this.pivotColumns.slice(),\n valueColumns: this.valueColumns.slice()\n };\n var columnStateBefore = this.getColumnState();\n var columnStateBeforeMap = {};\n columnStateBefore.forEach(function (col) {\n columnStateBeforeMap[col.colId] = col;\n });\n return function () {\n if (_this.gridOptionsWrapper.isSuppressColumnStateEvents()) {\n return;\n }\n var colsForState = _this.getPrimaryAndSecondaryAndAutoColumns();\n // raises generic ColumnEvents where all columns are returned rather than what has changed\n var raiseWhenListsDifferent = function (eventType, colsBefore, colsAfter, idMapper) {\n var beforeList = colsBefore.map(idMapper);\n var afterList = colsAfter.map(idMapper);\n var unchanged = areEqual(beforeList, afterList);\n if (unchanged) {\n return;\n }\n // returning all columns rather than what has changed!\n var event = {\n type: eventType,\n columns: colsAfter,\n column: colsAfter.length === 1 ? colsAfter[0] : null,\n api: _this.gridApi,\n columnApi: _this.columnApi,\n source: source\n };\n _this.eventService.dispatchEvent(event);\n };\n // determines which columns have changed according to supplied predicate\n var getChangedColumns = function (changedPredicate) {\n var changedColumns = [];\n colsForState.forEach(function (column) {\n var colStateBefore = columnStateBeforeMap[column.getColId()];\n if (colStateBefore && changedPredicate(colStateBefore, column)) {\n changedColumns.push(column);\n }\n });\n return changedColumns;\n };\n var columnIdMapper = function (c) { return c.getColId(); };\n raiseWhenListsDifferent(Events.EVENT_COLUMN_ROW_GROUP_CHANGED, startState.rowGroupColumns, _this.rowGroupColumns, columnIdMapper);\n raiseWhenListsDifferent(Events.EVENT_COLUMN_PIVOT_CHANGED, startState.pivotColumns, _this.pivotColumns, columnIdMapper);\n var valueChangePredicate = function (cs, c) {\n var oldActive = cs.aggFunc != null;\n var activeChanged = oldActive != c.isValueActive();\n // we only check aggFunc if the agg is active\n var aggFuncChanged = oldActive && cs.aggFunc != c.getAggFunc();\n return activeChanged || aggFuncChanged;\n };\n var changedValues = getChangedColumns(valueChangePredicate);\n if (changedValues.length > 0) {\n // we pass all value columns, now the ones that changed. this is the same\n // as pivot and rowGroup cols, but different to all other properties below.\n // this is more for backwards compatibility, as it's always been this way.\n // really it should be the other way, as the order of the cols makes no difference\n // for valueColumns (apart from displaying them in the tool panel).\n _this.fireColumnEvent(Events.EVENT_COLUMN_VALUE_CHANGED, _this.valueColumns, source);\n }\n var resizeChangePredicate = function (cs, c) { return cs.width != c.getActualWidth(); };\n _this.fireColumnResizedEvent(getChangedColumns(resizeChangePredicate), true, source);\n var pinnedChangePredicate = function (cs, c) { return cs.pinned != c.getPinned(); };\n _this.raiseColumnPinnedEvent(getChangedColumns(pinnedChangePredicate), source);\n var visibilityChangePredicate = function (cs, c) { return cs.hide == c.isVisible(); };\n _this.raiseColumnVisibleEvent(getChangedColumns(visibilityChangePredicate), source);\n var sortChangePredicate = function (cs, c) { return cs.sort != c.getSort() || cs.sortIndex != c.getSortIndex(); };\n if (getChangedColumns(sortChangePredicate).length > 0) {\n _this.sortController.dispatchSortChangedEvents(source);\n }\n // special handling for moved column events\n _this.raiseColumnMovedEvent(columnStateBefore, source);\n };\n };\n ColumnModel.prototype.raiseColumnPinnedEvent = function (changedColumns, source) {\n if (!changedColumns.length) {\n return;\n }\n // if just one column, we use this, otherwise we don't include the col\n var column = changedColumns.length === 1 ? changedColumns[0] : null;\n // only include visible if it's common in all columns\n var pinned = this.getCommonValue(changedColumns, function (col) { return col.getPinned(); });\n var event = {\n type: Events.EVENT_COLUMN_PINNED,\n // mistake in typing, 'undefined' should be allowed, as 'null' means 'not pinned'\n pinned: pinned != null ? pinned : null,\n columns: changedColumns,\n column: column,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.getCommonValue = function (cols, valueGetter) {\n if (!cols || cols.length == 0) {\n return undefined;\n }\n // compare each value to the first value. if nothing differs, then value is common so return it.\n var firstValue = valueGetter(cols[0]);\n for (var i = 1; i < cols.length; i++) {\n if (firstValue !== valueGetter(cols[i])) {\n // values differ, no common value\n return undefined;\n }\n }\n return firstValue;\n };\n ColumnModel.prototype.raiseColumnVisibleEvent = function (changedColumns, source) {\n if (!changedColumns.length) {\n return;\n }\n // if just one column, we use this, otherwise we don't include the col\n var column = changedColumns.length === 1 ? changedColumns[0] : null;\n // only include visible if it's common in all columns\n var visible = this.getCommonValue(changedColumns, function (col) { return col.isVisible(); });\n var event = {\n type: Events.EVENT_COLUMN_VISIBLE,\n visible: visible,\n columns: changedColumns,\n column: column,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.raiseColumnMovedEvent = function (colStateBefore, source) {\n // we are only interested in columns that were both present and visible before and after\n var _this = this;\n var colStateAfter = this.getColumnState();\n var colStateAfterMapped = {};\n colStateAfter.forEach(function (s) { return colStateAfterMapped[s.colId] = s; });\n // get id's of cols in both before and after lists\n var colsIntersectIds = {};\n colStateBefore.forEach(function (s) {\n if (colStateAfterMapped[s.colId]) {\n colsIntersectIds[s.colId] = true;\n }\n });\n // filter state lists, so we only have cols that were present before and after\n var beforeFiltered = colStateBefore.filter(function (c) { return colsIntersectIds[c.colId]; });\n var afterFiltered = colStateAfter.filter(function (c) { return colsIntersectIds[c.colId]; });\n // see if any cols are in a different location\n var movedColumns = [];\n afterFiltered.forEach(function (csAfter, index) {\n var csBefore = beforeFiltered && beforeFiltered[index];\n if (csBefore && csBefore.colId !== csAfter.colId) {\n var gridCol = _this.getGridColumn(csBefore.colId);\n if (gridCol) {\n movedColumns.push(gridCol);\n }\n }\n });\n if (!movedColumns.length) {\n return;\n }\n var event = {\n type: Events.EVENT_COLUMN_MOVED,\n columns: movedColumns,\n column: null,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.syncColumnWithStateItem = function (column, stateItem, defaultState, rowGroupIndexes, pivotIndexes, autoCol, source) {\n if (!column) {\n return;\n }\n var getValue = function (key1, key2) {\n var obj = { value1: undefined, value2: undefined };\n var calculated = false;\n if (stateItem) {\n if (stateItem[key1] !== undefined) {\n obj.value1 = stateItem[key1];\n calculated = true;\n }\n if (exists(key2) && stateItem[key2] !== undefined) {\n obj.value2 = stateItem[key2];\n calculated = true;\n }\n }\n if (!calculated && defaultState) {\n if (defaultState[key1] !== undefined) {\n obj.value1 = defaultState[key1];\n }\n if (exists(key2) && defaultState[key2] !== undefined) {\n obj.value2 = defaultState[key2];\n }\n }\n return obj;\n };\n // following ensures we are left with boolean true or false, eg converts (null, undefined, 0) all to true\n var hide = getValue('hide').value1;\n if (hide !== undefined) {\n column.setVisible(!hide, source);\n }\n // sets pinned to 'left' or 'right'\n var pinned = getValue('pinned').value1;\n if (pinned !== undefined) {\n column.setPinned(pinned);\n }\n // if width provided and valid, use it, otherwise stick with the old width\n var minColWidth = this.columnUtils.calculateColMinWidth(column.getColDef());\n // flex\n var flex = getValue('flex').value1;\n if (flex !== undefined) {\n column.setFlex(flex);\n }\n // width - we only set width if column is not flexing\n var noFlexThisCol = column.getFlex() <= 0;\n if (noFlexThisCol) {\n // both null and undefined means we skip, as it's not possible to 'clear' width (a column must have a width)\n var width = getValue('width').value1;\n if (width != null) {\n if (minColWidth != null && width >= minColWidth) {\n column.setActualWidth(width, source);\n }\n }\n }\n var sort = getValue('sort').value1;\n if (sort !== undefined) {\n if (sort === Constants.SORT_DESC || sort === Constants.SORT_ASC) {\n column.setSort(sort, source);\n }\n else {\n column.setSort(undefined, source);\n }\n }\n var sortIndex = getValue('sortIndex').value1;\n if (sortIndex !== undefined) {\n column.setSortIndex(sortIndex);\n }\n // we do not do aggFunc, rowGroup or pivot for auto cols or secondary cols\n if (autoCol || !column.isPrimary()) {\n return;\n }\n var aggFunc = getValue('aggFunc').value1;\n if (aggFunc !== undefined) {\n if (typeof aggFunc === 'string') {\n column.setAggFunc(aggFunc);\n if (!column.isValueActive()) {\n column.setValueActive(true, source);\n this.valueColumns.push(column);\n }\n }\n else {\n if (exists(aggFunc)) {\n console.warn('AG Grid: stateItem.aggFunc must be a string. if using your own aggregation ' +\n 'functions, register the functions first before using them in get/set state. This is because it is ' +\n 'intended for the column state to be stored and retrieved as simple JSON.');\n }\n // Note: we do not call column.setAggFunc(null), so that next time we aggregate\n // by this column (eg drag the column to the agg section int he toolpanel) it will\n // default to the last aggregation function.\n if (column.isValueActive()) {\n column.setValueActive(false, source);\n removeFromArray(this.valueColumns, column);\n }\n }\n }\n var _a = getValue('rowGroup', 'rowGroupIndex'), rowGroup = _a.value1, rowGroupIndex = _a.value2;\n if (rowGroup !== undefined || rowGroupIndex !== undefined) {\n if (typeof rowGroupIndex === 'number' || rowGroup) {\n if (!column.isRowGroupActive()) {\n column.setRowGroupActive(true, source);\n this.rowGroupColumns.push(column);\n }\n if (rowGroupIndexes && typeof rowGroupIndex === 'number') {\n rowGroupIndexes[column.getId()] = rowGroupIndex;\n }\n }\n else {\n if (column.isRowGroupActive()) {\n column.setRowGroupActive(false, source);\n removeFromArray(this.rowGroupColumns, column);\n }\n }\n }\n var _b = getValue('pivot', 'pivotIndex'), pivot = _b.value1, pivotIndex = _b.value2;\n if (pivot !== undefined || pivotIndex !== undefined) {\n if (typeof pivotIndex === 'number' || pivot) {\n if (!column.isPivotActive()) {\n column.setPivotActive(true, source);\n this.pivotColumns.push(column);\n }\n if (pivotIndexes && typeof pivotIndex === 'number') {\n pivotIndexes[column.getId()] = pivotIndex;\n }\n }\n else {\n if (column.isPivotActive()) {\n column.setPivotActive(false, source);\n removeFromArray(this.pivotColumns, column);\n }\n }\n }\n };\n ColumnModel.prototype.getGridColumns = function (keys) {\n return this.getColumns(keys, this.getGridColumn.bind(this));\n };\n ColumnModel.prototype.getColumns = function (keys, columnLookupCallback) {\n var foundColumns = [];\n if (keys) {\n keys.forEach(function (key) {\n var column = columnLookupCallback(key);\n if (column) {\n foundColumns.push(column);\n }\n });\n }\n return foundColumns;\n };\n // used by growGroupPanel\n ColumnModel.prototype.getColumnWithValidation = function (key) {\n if (key == null) {\n return null;\n }\n var column = this.getGridColumn(key);\n if (!column) {\n console.warn('AG Grid: could not find column ' + key);\n }\n return column;\n };\n ColumnModel.prototype.getPrimaryColumn = function (key) {\n if (!this.primaryColumns) {\n return null;\n }\n return this.getColumn(key, this.primaryColumns, this.primaryColumnsMap);\n };\n ColumnModel.prototype.getGridColumn = function (key) {\n return this.getColumn(key, this.gridColumns, this.gridColumnsMap);\n };\n ColumnModel.prototype.getSecondaryColumn = function (key) {\n if (!this.secondaryColumns) {\n return null;\n }\n return this.getColumn(key, this.secondaryColumns, this.secondaryColumnsMap);\n };\n ColumnModel.prototype.getColumn = function (key, columnList, columnMap) {\n if (!key) {\n return null;\n }\n // most of the time this method gets called the key is a string, so we put this shortcut in\n // for performance reasons, to see if we can match for ID (it doesn't do auto columns, that's done below)\n if (typeof key == 'string' && columnMap[key]) {\n return columnMap[key];\n }\n for (var i = 0; i < columnList.length; i++) {\n if (this.columnsMatch(columnList[i], key)) {\n return columnList[i];\n }\n }\n return this.getAutoColumn(key);\n };\n ColumnModel.prototype.getAutoColumn = function (key) {\n var _this = this;\n if (!this.groupAutoColumns ||\n !exists(this.groupAutoColumns) ||\n missing(this.groupAutoColumns)) {\n return null;\n }\n return this.groupAutoColumns.find(function (groupCol) { return _this.columnsMatch(groupCol, key); }) || null;\n };\n ColumnModel.prototype.columnsMatch = function (column, key) {\n var columnMatches = column === key;\n var colDefMatches = column.getColDef() === key;\n var idMatches = column.getColId() == key;\n return columnMatches || colDefMatches || idMatches;\n };\n ColumnModel.prototype.getDisplayNameForColumn = function (column, location, includeAggFunc) {\n if (includeAggFunc === void 0) { includeAggFunc = false; }\n if (!column) {\n return null;\n }\n var headerName = this.getHeaderName(column.getColDef(), column, null, null, location);\n if (includeAggFunc) {\n return this.wrapHeaderNameWithAggFunc(column, headerName);\n }\n return headerName;\n };\n ColumnModel.prototype.getDisplayNameForProvidedColumnGroup = function (columnGroup, providedColumnGroup, location) {\n var colGroupDef = providedColumnGroup ? providedColumnGroup.getColGroupDef() : null;\n if (colGroupDef) {\n return this.getHeaderName(colGroupDef, null, columnGroup, providedColumnGroup, location);\n }\n return null;\n };\n ColumnModel.prototype.getDisplayNameForColumnGroup = function (columnGroup, location) {\n return this.getDisplayNameForProvidedColumnGroup(columnGroup, columnGroup.getProvidedColumnGroup(), location);\n };\n // location is where the column is going to appear, ie who is calling us\n ColumnModel.prototype.getHeaderName = function (colDef, column, columnGroup, providedColumnGroup, location) {\n var headerValueGetter = colDef.headerValueGetter;\n if (headerValueGetter) {\n var params = {\n colDef: colDef,\n column: column,\n columnGroup: columnGroup,\n providedColumnGroup: providedColumnGroup,\n location: location,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n if (typeof headerValueGetter === 'function') {\n // valueGetter is a function, so just call it\n return headerValueGetter(params);\n }\n else if (typeof headerValueGetter === 'string') {\n // valueGetter is an expression, so execute the expression\n return this.expressionService.evaluate(headerValueGetter, params);\n }\n console.warn('ag-grid: headerValueGetter must be a function or a string');\n return '';\n }\n else if (colDef.headerName != null) {\n return colDef.headerName;\n }\n else if (colDef.field) {\n return camelCaseToHumanText(colDef.field);\n }\n return '';\n };\n ColumnModel.prototype.wrapHeaderNameWithAggFunc = function (column, headerName) {\n if (this.gridOptionsWrapper.isSuppressAggFuncInHeader()) {\n return headerName;\n }\n // only columns with aggregation active can have aggregations\n var pivotValueColumn = column.getColDef().pivotValueColumn;\n var pivotActiveOnThisColumn = exists(pivotValueColumn);\n var aggFunc = null;\n var aggFuncFound;\n // otherwise we have a measure that is active, and we are doing aggregation on it\n if (pivotActiveOnThisColumn) {\n var isCollapsedHeaderEnabled = this.gridOptionsWrapper.isRemovePivotHeaderRowWhenSingleValueColumn() && this.valueColumns.length === 1;\n var isTotalColumn = column.getColDef().pivotTotalColumnIds !== undefined;\n if (isCollapsedHeaderEnabled && !isTotalColumn) {\n return headerName; // Skip decorating the header - in this case the label is the pivot key, not the value col\n }\n aggFunc = pivotValueColumn ? pivotValueColumn.getAggFunc() : null;\n aggFuncFound = true;\n }\n else {\n var measureActive = column.isValueActive();\n var aggregationPresent = this.pivotMode || !this.isRowGroupEmpty();\n if (measureActive && aggregationPresent) {\n aggFunc = column.getAggFunc();\n aggFuncFound = true;\n }\n else {\n aggFuncFound = false;\n }\n }\n if (aggFuncFound) {\n var aggFuncString = (typeof aggFunc === 'string') ? aggFunc : 'func';\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var aggFuncStringTranslated = localeTextFunc(aggFuncString, aggFuncString);\n return aggFuncStringTranslated + \"(\" + headerName + \")\";\n }\n return headerName;\n };\n // returns the group with matching colId and instanceId. If instanceId is missing,\n // matches only on the colId.\n ColumnModel.prototype.getColumnGroup = function (colId, instanceId) {\n if (!colId) {\n return null;\n }\n if (colId instanceof ColumnGroup) {\n return colId;\n }\n var allColumnGroups = this.getAllDisplayedTrees();\n var checkInstanceId = typeof instanceId === 'number';\n var result = null;\n this.columnUtils.depthFirstAllColumnTreeSearch(allColumnGroups, function (child) {\n if (child instanceof ColumnGroup) {\n var columnGroup = child;\n var matched = void 0;\n if (checkInstanceId) {\n matched = colId === columnGroup.getGroupId() && instanceId === columnGroup.getInstanceId();\n }\n else {\n matched = colId === columnGroup.getGroupId();\n }\n if (matched) {\n result = columnGroup;\n }\n }\n });\n return result;\n };\n ColumnModel.prototype.isReady = function () {\n return this.ready;\n };\n ColumnModel.prototype.extractValueColumns = function (source, oldPrimaryColumns) {\n this.valueColumns = this.extractColumns(oldPrimaryColumns, this.valueColumns, function (col, flag) { return col.setValueActive(flag, source); }, \n // aggFunc doesn't have index variant, cos order of value cols doesn't matter, so always return null\n function () { return undefined; }, function () { return undefined; }, \n // aggFunc is a string, so return it's existence\n function (colDef) {\n var aggFunc = colDef.aggFunc;\n // null or empty string means clear\n if (aggFunc === null || aggFunc === '') {\n return null;\n }\n if (aggFunc === undefined) {\n return;\n }\n return !!aggFunc;\n }, function (colDef) {\n // return false if any of the following: null, undefined, empty string\n return colDef.initialAggFunc != null && colDef.initialAggFunc != '';\n });\n // all new columns added will have aggFunc missing, so set it to what is in the colDef\n this.valueColumns.forEach(function (col) {\n var colDef = col.getColDef();\n // if aggFunc provided, we always override, as reactive property\n if (colDef.aggFunc != null && colDef.aggFunc != '') {\n col.setAggFunc(colDef.aggFunc);\n }\n else {\n // otherwise we use initialAggFunc only if no agg func set - which happens when new column only\n if (!col.getAggFunc()) {\n col.setAggFunc(colDef.initialAggFunc);\n }\n }\n });\n };\n ColumnModel.prototype.extractRowGroupColumns = function (source, oldPrimaryColumns) {\n this.rowGroupColumns = this.extractColumns(oldPrimaryColumns, this.rowGroupColumns, function (col, flag) { return col.setRowGroupActive(flag, source); }, function (colDef) { return colDef.rowGroupIndex; }, function (colDef) { return colDef.initialRowGroupIndex; }, function (colDef) { return colDef.rowGroup; }, function (colDef) { return colDef.initialRowGroup; });\n };\n ColumnModel.prototype.extractColumns = function (oldPrimaryColumns, previousCols, setFlagFunc, getIndexFunc, getInitialIndexFunc, getValueFunc, getInitialValueFunc) {\n if (oldPrimaryColumns === void 0) { oldPrimaryColumns = []; }\n if (previousCols === void 0) { previousCols = []; }\n var colsWithIndex = [];\n var colsWithValue = [];\n // go though all cols.\n // if value, change\n // if default only, change only if new\n (this.primaryColumns || []).forEach(function (col) {\n var colIsNew = oldPrimaryColumns.indexOf(col) < 0;\n var colDef = col.getColDef();\n var value = attrToBoolean(getValueFunc(colDef));\n var initialValue = attrToBoolean(getInitialValueFunc(colDef));\n var index = attrToNumber(getIndexFunc(colDef));\n var initialIndex = attrToNumber(getInitialIndexFunc(colDef));\n var include;\n var valuePresent = value !== undefined;\n var indexPresent = index !== undefined;\n var initialValuePresent = initialValue !== undefined;\n var initialIndexPresent = initialIndex !== undefined;\n if (valuePresent) {\n include = value; // boolean value is guaranteed as attrToBoolean() is used above\n }\n else if (indexPresent) {\n if (index === null) {\n // if col is new we don't want to use the default / initial if index is set to null. Similarly,\n // we don't want to include the property for existing columns, i.e. we want to 'clear' it.\n include = false;\n }\n else {\n // note that 'null >= 0' evaluates to true which means 'rowGroupIndex = null' would enable row\n // grouping if the null check didn't exist above.\n include = index >= 0;\n }\n }\n else {\n if (colIsNew) {\n // as no value or index is 'present' we use the default / initial when col is new\n if (initialValuePresent) {\n include = initialValue;\n }\n else if (initialIndexPresent) {\n include = initialIndex != null && initialIndex >= 0;\n }\n else {\n include = false;\n }\n }\n else {\n // otherwise include it if included last time, e.g. if we are extracting row group cols and this col\n // is an existing row group col (i.e. it exists in 'previousCols') then we should include it.\n include = previousCols.indexOf(col) >= 0;\n }\n }\n if (include) {\n var useIndex = colIsNew ? (index != null || initialIndex != null) : index != null;\n useIndex ? colsWithIndex.push(col) : colsWithValue.push(col);\n }\n });\n var getIndexForCol = function (col) {\n var index = getIndexFunc(col.getColDef());\n var defaultIndex = getInitialIndexFunc(col.getColDef());\n return index != null ? index : defaultIndex;\n };\n // sort cols with index, and add these first\n colsWithIndex.sort(function (colA, colB) {\n var indexA = getIndexForCol(colA);\n var indexB = getIndexForCol(colB);\n if (indexA === indexB) {\n return 0;\n }\n if (indexA < indexB) {\n return -1;\n }\n return 1;\n });\n var res = [].concat(colsWithIndex);\n // second add columns that were there before and in the same order as they were before,\n // so we are preserving order of current grouping of columns that simply have rowGroup=true\n previousCols.forEach(function (col) {\n if (colsWithValue.indexOf(col) >= 0) {\n res.push(col);\n }\n });\n // lastly put in all remaining cols\n colsWithValue.forEach(function (col) {\n if (res.indexOf(col) < 0) {\n res.push(col);\n }\n });\n // set flag=false for removed cols\n previousCols.forEach(function (col) {\n if (res.indexOf(col) < 0) {\n setFlagFunc(col, false);\n }\n });\n // set flag=true for newly added cols\n res.forEach(function (col) {\n if (previousCols.indexOf(col) < 0) {\n setFlagFunc(col, true);\n }\n });\n return res;\n };\n ColumnModel.prototype.extractPivotColumns = function (source, oldPrimaryColumns) {\n this.pivotColumns = this.extractColumns(oldPrimaryColumns, this.pivotColumns, function (col, flag) { return col.setPivotActive(flag, source); }, function (colDef) { return colDef.pivotIndex; }, function (colDef) { return colDef.initialPivotIndex; }, function (colDef) { return colDef.pivot; }, function (colDef) { return colDef.initialPivot; });\n };\n ColumnModel.prototype.resetColumnGroupState = function (source) {\n if (source === void 0) { source = \"api\"; }\n var stateItems = [];\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.primaryColumnTree, function (child) {\n if (child instanceof ProvidedColumnGroup) {\n var colGroupDef = child.getColGroupDef();\n var groupState = {\n groupId: child.getGroupId(),\n open: !colGroupDef ? undefined : colGroupDef.openByDefault\n };\n stateItems.push(groupState);\n }\n });\n this.setColumnGroupState(stateItems, source);\n };\n ColumnModel.prototype.getColumnGroupState = function () {\n var columnGroupState = [];\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (node) {\n if (node instanceof ProvidedColumnGroup) {\n columnGroupState.push({\n groupId: node.getGroupId(),\n open: node.isExpanded()\n });\n }\n });\n return columnGroupState;\n };\n ColumnModel.prototype.setColumnGroupState = function (stateItems, source) {\n var _this = this;\n if (source === void 0) { source = \"api\"; }\n this.columnAnimationService.start();\n var impactedGroups = [];\n stateItems.forEach(function (stateItem) {\n var groupKey = stateItem.groupId;\n var newValue = stateItem.open;\n var providedColumnGroup = _this.getProvidedColumnGroup(groupKey);\n if (!providedColumnGroup) {\n return;\n }\n if (providedColumnGroup.isExpanded() === newValue) {\n return;\n }\n _this.logger.log('columnGroupOpened(' + providedColumnGroup.getGroupId() + ',' + newValue + ')');\n providedColumnGroup.setExpanded(newValue);\n impactedGroups.push(providedColumnGroup);\n });\n this.updateGroupsAndDisplayedColumns(source);\n this.setFirstRightAndLastLeftPinned(source);\n impactedGroups.forEach(function (providedColumnGroup) {\n var event = {\n type: Events.EVENT_COLUMN_GROUP_OPENED,\n columnGroup: providedColumnGroup,\n api: _this.gridApi,\n columnApi: _this.columnApi\n };\n _this.eventService.dispatchEvent(event);\n });\n this.columnAnimationService.finish();\n };\n // called by headerRenderer - when a header is opened or closed\n ColumnModel.prototype.setColumnGroupOpened = function (key, newValue, source) {\n if (source === void 0) { source = \"api\"; }\n var keyAsString;\n if (key instanceof ProvidedColumnGroup) {\n keyAsString = key.getId();\n }\n else {\n keyAsString = key || '';\n }\n this.setColumnGroupState([{ groupId: keyAsString, open: newValue }], source);\n };\n ColumnModel.prototype.getProvidedColumnGroup = function (key) {\n // if (key instanceof ProvidedColumnGroup) { return key; }\n if (typeof key !== 'string') {\n console.error('AG Grid: group key must be a string');\n }\n // otherwise, search for the column group by id\n var res = null;\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (node) {\n if (node instanceof ProvidedColumnGroup) {\n if (node.getId() === key) {\n res = node;\n }\n }\n });\n return res;\n };\n ColumnModel.prototype.calculateColumnsForDisplay = function () {\n var _this = this;\n var columnsForDisplay;\n if (this.pivotMode && missing(this.secondaryColumns)) {\n // pivot mode is on, but we are not pivoting, so we only\n // show columns we are aggregating on\n columnsForDisplay = this.gridColumns.filter(function (column) {\n var isAutoGroupCol = _this.groupAutoColumns && includes(_this.groupAutoColumns, column);\n var isValueCol = _this.valueColumns && includes(_this.valueColumns, column);\n return isAutoGroupCol || isValueCol;\n });\n }\n else {\n // otherwise continue as normal. this can be working on the primary\n // or secondary columns, whatever the gridColumns are set to\n columnsForDisplay = this.gridColumns.filter(function (column) {\n // keep col if a) it's auto-group or b) it's visible\n var isAutoGroupCol = _this.groupAutoColumns && includes(_this.groupAutoColumns, column);\n return isAutoGroupCol || column.isVisible();\n });\n }\n return columnsForDisplay;\n };\n ColumnModel.prototype.checkColSpanActiveInCols = function (columns) {\n var result = false;\n columns.forEach(function (col) {\n if (exists(col.getColDef().colSpan)) {\n result = true;\n }\n });\n return result;\n };\n ColumnModel.prototype.calculateColumnsForGroupDisplay = function () {\n var _this = this;\n this.groupDisplayColumns = [];\n var checkFunc = function (col) {\n var colDef = col.getColDef();\n if (colDef && exists(colDef.showRowGroup)) {\n _this.groupDisplayColumns.push(col);\n }\n };\n this.gridColumns.forEach(checkFunc);\n if (this.groupAutoColumns) {\n this.groupAutoColumns.forEach(checkFunc);\n }\n };\n ColumnModel.prototype.getGroupDisplayColumns = function () {\n return this.groupDisplayColumns;\n };\n ColumnModel.prototype.updateDisplayedColumns = function (source) {\n var columnsForDisplay = this.calculateColumnsForDisplay();\n this.buildDisplayedTrees(columnsForDisplay);\n this.calculateColumnsForGroupDisplay();\n // also called when group opened/closed\n this.updateGroupsAndDisplayedColumns(source);\n // also called when group opened/closed\n this.setFirstRightAndLastLeftPinned(source);\n };\n ColumnModel.prototype.isSecondaryColumnsPresent = function () {\n return exists(this.secondaryColumns);\n };\n ColumnModel.prototype.setSecondaryColumns = function (colDefs, source) {\n var _this = this;\n if (source === void 0) { source = \"api\"; }\n var newColsPresent = colDefs && colDefs.length > 0;\n // if not cols passed, and we had no cols anyway, then do nothing\n if (!newColsPresent && missing(this.secondaryColumns)) {\n return;\n }\n if (newColsPresent) {\n this.processSecondaryColumnDefinitions(colDefs);\n var balancedTreeResult = this.columnFactory.createColumnTree(colDefs, false, this.secondaryBalancedTree || this.previousSecondaryColumns || undefined);\n this.secondaryBalancedTree = balancedTreeResult.columnTree;\n this.secondaryHeaderRowCount = balancedTreeResult.treeDept + 1;\n this.secondaryColumns = this.getColumnsFromTree(this.secondaryBalancedTree);\n this.secondaryColumnsMap = {};\n this.secondaryColumns.forEach(function (col) { return _this.secondaryColumnsMap[col.getId()] = col; });\n this.previousSecondaryColumns = null;\n }\n else {\n this.previousSecondaryColumns = this.secondaryBalancedTree;\n this.secondaryBalancedTree = null;\n this.secondaryHeaderRowCount = -1;\n this.secondaryColumns = null;\n this.secondaryColumnsMap = {};\n }\n this.updateGridColumns();\n this.updateDisplayedColumns(source);\n };\n ColumnModel.prototype.processSecondaryColumnDefinitions = function (colDefs) {\n var columnCallback = this.gridOptionsWrapper.getProcessSecondaryColDefFunc();\n var groupCallback = this.gridOptionsWrapper.getProcessSecondaryColGroupDefFunc();\n if (!columnCallback && !groupCallback) {\n return undefined;\n }\n var searchForColDefs = function (colDefs2) {\n colDefs2.forEach(function (abstractColDef) {\n var isGroup = exists(abstractColDef.children);\n if (isGroup) {\n var colGroupDef = abstractColDef;\n if (groupCallback) {\n groupCallback(colGroupDef);\n }\n searchForColDefs(colGroupDef.children);\n }\n else {\n var colDef = abstractColDef;\n if (columnCallback) {\n columnCallback(colDef);\n }\n }\n });\n };\n if (colDefs) {\n searchForColDefs(colDefs);\n }\n };\n // called from: setColumnState, setColumnDefs, setSecondaryColumns\n ColumnModel.prototype.updateGridColumns = function () {\n var _this = this;\n if (this.gridColsArePrimary) {\n this.lastPrimaryOrder = this.gridColumns;\n }\n else {\n this.lastSecondaryOrder = this.gridColumns;\n }\n if (this.secondaryColumns && this.secondaryBalancedTree) {\n var hasSameColumns = this.secondaryColumns.every(function (col) {\n return _this.gridColumnsMap[col.getColId()] !== undefined;\n });\n this.gridBalancedTree = this.secondaryBalancedTree.slice();\n this.gridHeaderRowCount = this.secondaryHeaderRowCount;\n this.gridColumns = this.secondaryColumns.slice();\n this.gridColsArePrimary = false;\n // If the current columns are the same or a subset of the previous\n // we keep the previous order, otherwise we go back to the order the pivot\n // cols are generated in\n if (hasSameColumns) {\n this.orderGridColsLike(this.lastSecondaryOrder);\n }\n }\n else if (this.primaryColumns) {\n this.gridBalancedTree = this.primaryColumnTree.slice();\n this.gridHeaderRowCount = this.primaryHeaderRowCount;\n this.gridColumns = this.primaryColumns.slice();\n this.gridColsArePrimary = true;\n // updateGridColumns gets called after user adds a row group. we want to maintain the order of the columns\n // when this happens (eg if user moved a column) rather than revert back to the original column order.\n // likewise if changing in/out of pivot mode, we want to maintain the order of the cols\n this.orderGridColsLike(this.lastPrimaryOrder);\n }\n this.addAutoGroupToGridColumns();\n this.gridColumns = this.placeLockedColumns(this.gridColumns);\n this.setupQuickFilterColumns();\n this.clearDisplayedAndViewportColumns();\n this.colSpanActive = this.checkColSpanActiveInCols(this.gridColumns);\n this.gridColumnsMap = {};\n this.gridColumns.forEach(function (col) { return _this.gridColumnsMap[col.getId()] = col; });\n this.setAutoHeightActive();\n var event = {\n type: Events.EVENT_GRID_COLUMNS_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.setAutoHeightActive = function () {\n this.autoHeightActive = this.gridColumns.filter(function (col) { return col.isAutoHeight(); }).length > 0;\n if (this.autoHeightActive) {\n this.autoHeightActiveAtLeastOnce = true;\n var rowModelType = this.rowModel.getType();\n var supportedRowModel = rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE || rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE;\n if (!supportedRowModel) {\n var message_1 = 'AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.';\n doOnce(function () { return console.warn(message_1); }, 'autoHeightActive.wrongRowModel');\n }\n }\n };\n ColumnModel.prototype.orderGridColsLike = function (colsOrder) {\n if (missing(colsOrder)) {\n return;\n }\n var lastOrderMapped = convertToMap(colsOrder.map(function (col, index) { return [col, index]; }));\n // only do the sort if at least one column is accounted for. columns will be not accounted for\n // if changing from secondary to primary columns\n var noColsFound = true;\n this.gridColumns.forEach(function (col) {\n if (lastOrderMapped.has(col)) {\n noColsFound = false;\n }\n });\n if (noColsFound) {\n return;\n }\n // order cols in the same order as before. we need to make sure that all\n // cols still exists, so filter out any that no longer exist.\n var gridColsMap = convertToMap(this.gridColumns.map(function (col) { return [col, true]; }));\n var oldColsOrdered = colsOrder.filter(function (col) { return gridColsMap.has(col); });\n var oldColsMap = convertToMap(oldColsOrdered.map(function (col) { return [col, true]; }));\n var newColsOrdered = this.gridColumns.filter(function (col) { return !oldColsMap.has(col); });\n // add in the new columns, at the end (if no group), or at the end of the group (if a group)\n var newGridColumns = oldColsOrdered.slice();\n newColsOrdered.forEach(function (newCol) {\n var parent = newCol.getOriginalParent();\n // if no parent, means we are not grouping, so just add the column to the end\n if (!parent) {\n newGridColumns.push(newCol);\n return;\n }\n // find the group the column belongs to. if no siblings at the current level (eg col in group on it's\n // own) then go up one level and look for siblings there.\n var siblings = [];\n while (!siblings.length && parent) {\n var leafCols = parent.getLeafColumns();\n leafCols.forEach(function (leafCol) {\n var presentInNewGriColumns = newGridColumns.indexOf(leafCol) >= 0;\n var noYetInSiblings = siblings.indexOf(leafCol) < 0;\n if (presentInNewGriColumns && noYetInSiblings) {\n siblings.push(leafCol);\n }\n });\n parent = parent.getOriginalParent();\n }\n // if no siblings exist at any level, this means the col is in a group (or parent groups) on it's own\n if (!siblings.length) {\n newGridColumns.push(newCol);\n return;\n }\n // find index of last column in the group\n var indexes = siblings.map(function (col) { return newGridColumns.indexOf(col); });\n var lastIndex = Math.max.apply(Math, __spread(indexes));\n insertIntoArray(newGridColumns, newCol, lastIndex + 1);\n });\n this.gridColumns = newGridColumns;\n };\n ColumnModel.prototype.isPrimaryColumnGroupsPresent = function () {\n return this.primaryHeaderRowCount > 1;\n };\n // if we are using autoGroupCols, then they should be included for quick filter. this covers the\n // following scenarios:\n // a) user provides 'field' into autoGroupCol of normal grid, so now because a valid col to filter leafs on\n // b) using tree data and user depends on autoGroupCol for first col, and we also want to filter on this\n // (tree data is a bit different, as parent rows can be filtered on, unlike row grouping)\n ColumnModel.prototype.setupQuickFilterColumns = function () {\n if (this.groupAutoColumns) {\n this.columnsForQuickFilter = (this.primaryColumns || []).concat(this.groupAutoColumns);\n }\n else if (this.primaryColumns) {\n this.columnsForQuickFilter = this.primaryColumns;\n }\n };\n ColumnModel.prototype.placeLockedColumns = function (cols) {\n var left = [];\n var normal = [];\n var right = [];\n cols.forEach(function (col) {\n var position = col.getColDef().lockPosition;\n if (position === 'right') {\n right.push(col);\n }\n else if (position === 'left' || position === true) {\n left.push(col);\n }\n else {\n normal.push(col);\n }\n });\n return __spread(left, normal, right);\n };\n ColumnModel.prototype.addAutoGroupToGridColumns = function () {\n // add in auto-group here\n this.createGroupAutoColumnsIfNeeded();\n if (missing(this.groupAutoColumns)) {\n return;\n }\n this.gridColumns = this.groupAutoColumns ? this.groupAutoColumns.concat(this.gridColumns) : this.gridColumns;\n var autoColBalancedTree = this.columnFactory.createForAutoGroups(this.groupAutoColumns, this.gridBalancedTree);\n this.gridBalancedTree = autoColBalancedTree.concat(this.gridBalancedTree);\n };\n // gets called after we copy down grid columns, to make sure any part of the gui\n // that tries to draw, eg the header, it will get empty lists of columns rather\n // than stale columns. for example, the header will received gridColumnsChanged\n // event, so will try and draw, but it will draw successfully when it acts on the\n // virtualColumnsChanged event\n ColumnModel.prototype.clearDisplayedAndViewportColumns = function () {\n this.displayedTreeLeft = [];\n this.displayedTreeRight = [];\n this.displayedTreeCentre = [];\n this.viewportRowLeft = {};\n this.viewportRowRight = {};\n this.viewportRowCenter = {};\n this.displayedColumnsLeft = [];\n this.displayedColumnsRight = [];\n this.displayedColumnsCenter = [];\n this.displayedColumns = [];\n this.viewportColumns = [];\n };\n ColumnModel.prototype.updateGroupsAndDisplayedColumns = function (source) {\n this.updateOpenClosedVisibilityInColumnGroups();\n this.deriveDisplayedColumns(source);\n this.refreshFlexedColumns();\n this.extractViewport();\n this.updateBodyWidths();\n // this event is picked up by the gui, headerRenderer and rowRenderer, to recalculate what columns to display\n var event = {\n type: Events.EVENT_DISPLAYED_COLUMNS_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.deriveDisplayedColumns = function (source) {\n this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft, this.displayedColumnsLeft);\n this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre, this.displayedColumnsCenter);\n this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight, this.displayedColumnsRight);\n this.joinDisplayedColumns();\n this.setLeftValues(source);\n this.displayedAutoHeightCols = this.displayedColumns.filter(function (col) { return col.isAutoHeight(); });\n };\n ColumnModel.prototype.isAutoRowHeightActive = function () {\n return this.autoHeightActive;\n };\n ColumnModel.prototype.wasAutoRowHeightEverActive = function () {\n return this.autoHeightActiveAtLeastOnce;\n };\n ColumnModel.prototype.joinDisplayedColumns = function () {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n this.displayedColumns = this.displayedColumnsRight\n .concat(this.displayedColumnsCenter)\n .concat(this.displayedColumnsLeft);\n }\n else {\n this.displayedColumns = this.displayedColumnsLeft\n .concat(this.displayedColumnsCenter)\n .concat(this.displayedColumnsRight);\n }\n };\n // sets the left pixel position of each column\n ColumnModel.prototype.setLeftValues = function (source) {\n this.setLeftValuesOfColumns(source);\n this.setLeftValuesOfGroups();\n };\n ColumnModel.prototype.setLeftValuesOfColumns = function (source) {\n var _this = this;\n if (!this.primaryColumns) {\n return;\n }\n // go through each list of displayed columns\n var allColumns = this.primaryColumns.slice(0);\n // let totalColumnWidth = this.getWidthOfColsInList()\n var doingRtl = this.gridOptionsWrapper.isEnableRtl();\n [\n this.displayedColumnsLeft,\n this.displayedColumnsRight,\n this.displayedColumnsCenter\n ].forEach(function (columns) {\n if (doingRtl) {\n // when doing RTL, we start at the top most pixel (ie RHS) and work backwards\n var left_1 = _this.getWidthOfColsInList(columns);\n columns.forEach(function (column) {\n left_1 -= column.getActualWidth();\n column.setLeft(left_1, source);\n });\n }\n else {\n // otherwise normal LTR, we start at zero\n var left_2 = 0;\n columns.forEach(function (column) {\n column.setLeft(left_2, source);\n left_2 += column.getActualWidth();\n });\n }\n removeAllFromArray(allColumns, columns);\n });\n // items left in allColumns are columns not displayed, so remove the left position. this is\n // important for the rows, as if a col is made visible, then taken out, then made visible again,\n // we don't want the animation of the cell floating in from the old position, whatever that was.\n allColumns.forEach(function (column) {\n column.setLeft(null, source);\n });\n };\n ColumnModel.prototype.setLeftValuesOfGroups = function () {\n // a groups left value is the lest left value of it's children\n [\n this.displayedTreeLeft,\n this.displayedTreeRight,\n this.displayedTreeCentre\n ].forEach(function (columns) {\n columns.forEach(function (column) {\n if (column instanceof ColumnGroup) {\n var columnGroup = column;\n columnGroup.checkLeft();\n }\n });\n });\n };\n ColumnModel.prototype.derivedDisplayedColumnsFromDisplayedTree = function (tree, columns) {\n columns.length = 0;\n this.columnUtils.depthFirstDisplayedColumnTreeSearch(tree, function (child) {\n if (child instanceof Column) {\n columns.push(child);\n }\n });\n };\n ColumnModel.prototype.extractViewportColumns = function () {\n if (this.suppressColumnVirtualisation) {\n // no virtualisation, so don't filter\n this.viewportColumnsCenter = this.displayedColumnsCenter;\n }\n else {\n // filter out what should be visible\n this.viewportColumnsCenter = this.filterOutColumnsWithinViewport();\n }\n this.viewportColumns = this.viewportColumnsCenter\n .concat(this.displayedColumnsLeft)\n .concat(this.displayedColumnsRight);\n };\n ColumnModel.prototype.getVirtualHeaderGroupRow = function (type, dept) {\n var result;\n switch (type) {\n case Constants.PINNED_LEFT:\n result = this.viewportRowLeft[dept];\n break;\n case Constants.PINNED_RIGHT:\n result = this.viewportRowRight[dept];\n break;\n default:\n result = this.viewportRowCenter[dept];\n break;\n }\n if (missing(result)) {\n result = [];\n }\n return result;\n };\n ColumnModel.prototype.extractViewportRows = function () {\n // go through each group, see if any of it's cols are displayed, and if yes,\n // then this group is included\n this.viewportRowLeft = {};\n this.viewportRowRight = {};\n this.viewportRowCenter = {};\n // for easy lookup when building the groups.\n var virtualColIds = {};\n this.viewportColumns.forEach(function (col) { return virtualColIds[col.getId()] = true; });\n var testGroup = function (children, result, dept) {\n var returnValue = false;\n for (var i = 0; i < children.length; i++) {\n // see if this item is within viewport\n var child = children[i];\n var addThisItem = false;\n if (child instanceof Column) {\n // for column, test if column is included\n addThisItem = virtualColIds[child.getId()] === true;\n }\n else {\n // if group, base decision on children\n var columnGroup = child;\n var displayedChildren = columnGroup.getDisplayedChildren();\n if (displayedChildren) {\n addThisItem = testGroup(displayedChildren, result, dept + 1);\n }\n }\n if (addThisItem) {\n returnValue = true;\n if (!result[dept]) {\n result[dept] = [];\n }\n result[dept].push(child);\n }\n }\n return returnValue;\n };\n testGroup(this.displayedTreeLeft, this.viewportRowLeft, 0);\n testGroup(this.displayedTreeRight, this.viewportRowRight, 0);\n testGroup(this.displayedTreeCentre, this.viewportRowCenter, 0);\n };\n ColumnModel.prototype.extractViewport = function () {\n this.extractViewportColumns();\n this.extractViewportRows();\n };\n ColumnModel.prototype.filterOutColumnsWithinViewport = function () {\n return this.displayedColumnsCenter.filter(this.isColumnInViewport.bind(this));\n };\n ColumnModel.prototype.refreshFlexedColumns = function (params) {\n var _this = this;\n if (params === void 0) { params = {}; }\n var source = params.source ? params.source : 'flex';\n if (params.viewportWidth != null) {\n this.flexViewportWidth = params.viewportWidth;\n }\n if (!this.flexViewportWidth) {\n return [];\n }\n // If the grid has left-over space, divide it between flexing columns in proportion to their flex value.\n // A \"flexing column\" is one that has a 'flex' value set and is not currently being constrained by its\n // minWidth or maxWidth rules.\n var flexAfterDisplayIndex = -1;\n if (params.resizingCols) {\n params.resizingCols.forEach(function (col) {\n var indexOfCol = _this.displayedColumnsCenter.indexOf(col);\n if (flexAfterDisplayIndex < indexOfCol) {\n flexAfterDisplayIndex = indexOfCol;\n }\n });\n }\n var isColFlex = function (col) {\n var afterResizingCols = _this.displayedColumnsCenter.indexOf(col) > flexAfterDisplayIndex;\n return col.getFlex() && afterResizingCols;\n };\n var knownWidthColumns = this.displayedColumnsCenter.filter(function (col) { return !isColFlex(col); });\n var flexingColumns = this.displayedColumnsCenter.filter(function (col) { return isColFlex(col); });\n var changedColumns = [];\n if (!flexingColumns.length) {\n return [];\n }\n var flexingColumnSizes = [];\n var spaceForFlexingColumns;\n outer: while (true) {\n var totalFlex = flexingColumns.reduce(function (count, col) { return count + col.getFlex(); }, 0);\n spaceForFlexingColumns = this.flexViewportWidth - this.getWidthOfColsInList(knownWidthColumns);\n for (var i = 0; i < flexingColumns.length; i++) {\n var col = flexingColumns[i];\n var widthByFlexRule = spaceForFlexingColumns * col.getFlex() / totalFlex;\n var constrainedWidth = 0;\n var minWidth = col.getMinWidth();\n var maxWidth = col.getMaxWidth();\n if (exists(minWidth) && widthByFlexRule < minWidth) {\n constrainedWidth = minWidth;\n }\n else if (exists(maxWidth) && widthByFlexRule > maxWidth) {\n constrainedWidth = maxWidth;\n }\n if (constrainedWidth) {\n // This column is not in fact flexing as it is being constrained to a specific size\n // so remove it from the list of flexing columns and start again\n col.setActualWidth(constrainedWidth, source);\n removeFromArray(flexingColumns, col);\n changedColumns.push(col);\n knownWidthColumns.push(col);\n continue outer;\n }\n flexingColumnSizes[i] = Math.round(widthByFlexRule);\n }\n break;\n }\n var remainingSpace = spaceForFlexingColumns;\n flexingColumns.forEach(function (col, i) {\n col.setActualWidth(Math.min(flexingColumnSizes[i], remainingSpace), source);\n changedColumns.push(col);\n remainingSpace -= flexingColumnSizes[i];\n });\n if (!params.skipSetLeft) {\n this.setLeftValues(source);\n }\n if (params.updateBodyWidths) {\n this.updateBodyWidths();\n }\n if (params.fireResizedEvent) {\n this.fireColumnResizedEvent(changedColumns, true, source, flexingColumns);\n }\n // if the user sets rowData directly into GridOptions, then the row data is set before\n // grid is attached to the DOM. this means the columns are not flexed, and then the rows\n // have the wrong height (as they depend on column widths). so once the columns have\n // been flexed for the first time (only happens once grid is attached to DOM, as dependency\n // on getting the grid width, which only happens after attached after ResizeObserver fires)\n // we get get rows to re-calc their heights.\n if (!this.flexColsCalculatedAtLestOnce) {\n if (this.gridOptionsWrapper.isRowModelDefault()) {\n this.rowModel.resetRowHeights();\n }\n this.flexColsCalculatedAtLestOnce = true;\n }\n return flexingColumns;\n };\n // called from api\n ColumnModel.prototype.sizeColumnsToFit = function (gridWidth, source, silent) {\n if (source === void 0) { source = \"sizeColumnsToFit\"; }\n // avoid divide by zero\n var allDisplayedColumns = this.getAllDisplayedColumns();\n if (gridWidth <= 0 || !allDisplayedColumns.length) {\n return;\n }\n var colsToSpread = [];\n var colsToNotSpread = [];\n allDisplayedColumns.forEach(function (column) {\n if (column.getColDef().suppressSizeToFit === true) {\n colsToNotSpread.push(column);\n }\n else {\n colsToSpread.push(column);\n }\n });\n // make a copy of the cols that are going to be resized\n var colsToFireEventFor = colsToSpread.slice(0);\n var finishedResizing = false;\n var moveToNotSpread = function (column) {\n removeFromArray(colsToSpread, column);\n colsToNotSpread.push(column);\n };\n // resetting cols to their original width makes the sizeColumnsToFit more deterministic,\n // rather than depending on the current size of the columns. most users call sizeColumnsToFit\n // immediately after grid is created, so will make no difference. however if application is calling\n // sizeColumnsToFit repeatedly (eg after column group is opened / closed repeatedly) we don't want\n // the columns to start shrinking / growing over time.\n //\n // NOTE: the process below will assign values to `this.actualWidth` of each column without firing events\n // for this reason we need to manually fire resize events after the resize has been done for each column.\n colsToSpread.forEach(function (column) { return column.resetActualWidth(source); });\n while (!finishedResizing) {\n finishedResizing = true;\n var availablePixels = gridWidth - this.getWidthOfColsInList(colsToNotSpread);\n if (availablePixels <= 0) {\n // no width, set everything to minimum\n colsToSpread.forEach(function (column) {\n column.setMinimum(source);\n });\n }\n else {\n var scale = availablePixels / this.getWidthOfColsInList(colsToSpread);\n // we set the pixels for the last col based on what's left, as otherwise\n // we could be a pixel or two short or extra because of rounding errors.\n var pixelsForLastCol = availablePixels;\n // backwards through loop, as we are removing items as we go\n for (var i = colsToSpread.length - 1; i >= 0; i--) {\n var column = colsToSpread[i];\n var minWidth = column.getMinWidth();\n var maxWidth = column.getMaxWidth();\n var newWidth = Math.round(column.getActualWidth() * scale);\n if (exists(minWidth) && newWidth < minWidth) {\n newWidth = minWidth;\n moveToNotSpread(column);\n finishedResizing = false;\n }\n else if (exists(maxWidth) && column.isGreaterThanMax(newWidth)) {\n newWidth = maxWidth;\n moveToNotSpread(column);\n finishedResizing = false;\n }\n else if (i === 0) { // if this is the last column\n newWidth = pixelsForLastCol;\n }\n column.setActualWidth(newWidth, source, true);\n pixelsForLastCol -= newWidth;\n }\n }\n }\n // see notes above\n colsToFireEventFor.forEach(function (col) {\n col.fireColumnWidthChangedEvent(source);\n });\n this.setLeftValues(source);\n this.updateBodyWidths();\n if (silent) {\n return;\n }\n this.fireColumnResizedEvent(colsToFireEventFor, true, source);\n };\n ColumnModel.prototype.buildDisplayedTrees = function (visibleColumns) {\n var leftVisibleColumns = [];\n var rightVisibleColumns = [];\n var centerVisibleColumns = [];\n visibleColumns.forEach(function (column) {\n switch (column.getPinned()) {\n case \"left\":\n leftVisibleColumns.push(column);\n break;\n case \"right\":\n rightVisibleColumns.push(column);\n break;\n default:\n centerVisibleColumns.push(column);\n break;\n }\n });\n var groupInstanceIdCreator = new GroupInstanceIdCreator();\n this.displayedTreeLeft = this.displayedGroupCreator.createDisplayedGroups(leftVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, Constants.PINNED_LEFT, this.displayedTreeLeft);\n this.displayedTreeRight = this.displayedGroupCreator.createDisplayedGroups(rightVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, Constants.PINNED_RIGHT, this.displayedTreeRight);\n this.displayedTreeCentre = this.displayedGroupCreator.createDisplayedGroups(centerVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, null, this.displayedTreeCentre);\n this.updateDisplayedMap();\n };\n ColumnModel.prototype.updateDisplayedMap = function () {\n var _this = this;\n this.displayedColumnsAndGroupsMap = {};\n var func = function (child) {\n _this.displayedColumnsAndGroupsMap[child.getUniqueId()] = child;\n };\n this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre, func);\n this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft, func);\n this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight, func);\n };\n ColumnModel.prototype.isDisplayed = function (item) {\n var fromMap = this.displayedColumnsAndGroupsMap[item.getUniqueId()];\n // check for reference, in case new column / group with same id is now present\n return fromMap === item;\n };\n ColumnModel.prototype.updateOpenClosedVisibilityInColumnGroups = function () {\n var allColumnGroups = this.getAllDisplayedTrees();\n this.columnUtils.depthFirstAllColumnTreeSearch(allColumnGroups, function (child) {\n if (child instanceof ColumnGroup) {\n var columnGroup = child;\n columnGroup.calculateDisplayedColumns();\n }\n });\n };\n ColumnModel.prototype.getGroupAutoColumns = function () {\n return this.groupAutoColumns;\n };\n ColumnModel.prototype.createGroupAutoColumnsIfNeeded = function () {\n if (!this.autoGroupsNeedBuilding) {\n return;\n }\n this.autoGroupsNeedBuilding = false;\n var groupFullWidthRow = this.gridOptionsWrapper.isGroupUseEntireRow(this.pivotMode);\n // we need to allow suppressing auto-column separately for group and pivot as the normal situation\n // is CSRM and user provides group column themselves for normal view, but when they go into pivot the\n // columns are generated by the grid so no opportunity for user to provide group column. so need a way\n // to suppress auto-col for grouping only, and not pivot.\n // however if using Viewport RM or SSRM and user is providing the columns, the user may wish full control\n // of the group column in this instance.\n var suppressAutoColumn = this.pivotMode ?\n this.gridOptionsWrapper.isPivotSuppressAutoColumn() : this.gridOptionsWrapper.isGroupSuppressAutoColumn();\n var groupingActive = this.rowGroupColumns.length > 0 || this.usingTreeData;\n var needAutoColumns = groupingActive && !suppressAutoColumn && !groupFullWidthRow;\n if (needAutoColumns) {\n var existingCols = this.groupAutoColumns || [];\n var newAutoGroupCols = this.autoGroupColService.createAutoGroupColumns(existingCols, this.rowGroupColumns);\n var autoColsDifferent = !this.autoColsEqual(newAutoGroupCols, this.groupAutoColumns);\n // we force recreate when suppressColumnStateEvents changes, so new group cols pick up the new\n // definitions. otherwise we could ignore the new cols because they appear to be the same.\n if (autoColsDifferent || this.forceRecreateAutoGroups) {\n this.groupAutoColumns = newAutoGroupCols;\n }\n }\n else {\n this.groupAutoColumns = null;\n }\n };\n ColumnModel.prototype.autoColsEqual = function (colsA, colsB) {\n return areEqual(colsA, colsB, function (a, b) { return a.getColId() === b.getColId(); });\n };\n ColumnModel.prototype.getWidthOfColsInList = function (columnList) {\n return columnList.reduce(function (width, col) { return width + col.getActualWidth(); }, 0);\n };\n ColumnModel.prototype.getGridBalancedTree = function () {\n return this.gridBalancedTree;\n };\n ColumnModel.prototype.hasFloatingFilters = function () {\n if (!this.gridColumns) {\n return false;\n }\n var res = this.gridColumns.some(function (col) { return col.getColDef().floatingFilter; });\n return res;\n };\n ColumnModel.prototype.getFirstDisplayedColumn = function () {\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n var queryOrder = [\n 'getDisplayedLeftColumns',\n 'getDisplayedCenterColumns',\n 'getDisplayedRightColumns'\n ];\n if (isRtl) {\n queryOrder.reverse();\n }\n for (var i = 0; i < queryOrder.length; i++) {\n var container = this[queryOrder[i]]();\n if (container.length) {\n return isRtl ? last(container) : container[0];\n }\n }\n return null;\n };\n __decorate$5([\n Autowired('expressionService')\n ], ColumnModel.prototype, \"expressionService\", void 0);\n __decorate$5([\n Autowired('columnFactory')\n ], ColumnModel.prototype, \"columnFactory\", void 0);\n __decorate$5([\n Autowired('displayedGroupCreator')\n ], ColumnModel.prototype, \"displayedGroupCreator\", void 0);\n __decorate$5([\n Autowired('ctrlsService')\n ], ColumnModel.prototype, \"ctrlsService\", void 0);\n __decorate$5([\n Autowired('autoWidthCalculator')\n ], ColumnModel.prototype, \"autoWidthCalculator\", void 0);\n __decorate$5([\n Autowired('columnUtils')\n ], ColumnModel.prototype, \"columnUtils\", void 0);\n __decorate$5([\n Autowired('columnAnimationService')\n ], ColumnModel.prototype, \"columnAnimationService\", void 0);\n __decorate$5([\n Autowired('autoGroupColService')\n ], ColumnModel.prototype, \"autoGroupColService\", void 0);\n __decorate$5([\n Optional('aggFuncService')\n ], ColumnModel.prototype, \"aggFuncService\", void 0);\n __decorate$5([\n Optional('valueCache')\n ], ColumnModel.prototype, \"valueCache\", void 0);\n __decorate$5([\n Optional('animationFrameService')\n ], ColumnModel.prototype, \"animationFrameService\", void 0);\n __decorate$5([\n Autowired('rowModel')\n ], ColumnModel.prototype, \"rowModel\", void 0);\n __decorate$5([\n Autowired('columnApi')\n ], ColumnModel.prototype, \"columnApi\", void 0);\n __decorate$5([\n Autowired('gridApi')\n ], ColumnModel.prototype, \"gridApi\", void 0);\n __decorate$5([\n Autowired('sortController')\n ], ColumnModel.prototype, \"sortController\", void 0);\n __decorate$5([\n Autowired('columnDefFactory')\n ], ColumnModel.prototype, \"columnDefFactory\", void 0);\n __decorate$5([\n PostConstruct\n ], ColumnModel.prototype, \"init\", null);\n __decorate$5([\n __param$2(0, Qualifier('loggerFactory'))\n ], ColumnModel.prototype, \"setBeans\", null);\n ColumnModel = __decorate$5([\n Bean('columnModel')\n ], ColumnModel);\n return ColumnModel;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$6 = (undefined && undefined.__decorate) || function (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// takes in a list of columns, as specified by the column definitions, and returns column groups\nvar ColumnUtils = /** @class */ (function (_super) {\n __extends$2(ColumnUtils, _super);\n function ColumnUtils() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ColumnUtils.prototype.calculateColMinWidth = function (colDef) {\n return colDef.minWidth != null ? colDef.minWidth : this.gridOptionsWrapper.getMinColWidth();\n };\n ColumnUtils.prototype.calculateColMaxWidth = function (colDef) {\n return colDef.maxWidth != null ? colDef.maxWidth : (this.gridOptionsWrapper.getMaxColWidth() || Number.MAX_SAFE_INTEGER);\n };\n ColumnUtils.prototype.calculateColInitialWidth = function (colDef) {\n var minColWidth = this.calculateColMinWidth(colDef);\n var maxColWidth = this.calculateColMaxWidth(colDef);\n var width;\n var colDefWidth = attrToNumber(colDef.width);\n var colDefInitialWidth = attrToNumber(colDef.initialWidth);\n if (colDefWidth != null) {\n width = colDefWidth;\n }\n else if (colDefInitialWidth != null) {\n width = colDefInitialWidth;\n }\n else {\n width = this.gridOptionsWrapper.getColWidth();\n }\n return Math.max(Math.min(width, maxColWidth), minColWidth);\n };\n ColumnUtils.prototype.getOriginalPathForColumn = function (column, originalBalancedTree) {\n var result = [];\n var found = false;\n var recursePath = function (balancedColumnTree, dept) {\n for (var i = 0; i < balancedColumnTree.length; i++) {\n if (found) {\n return;\n }\n // quit the search, so 'result' is kept with the found result\n var node = balancedColumnTree[i];\n if (node instanceof ProvidedColumnGroup) {\n var nextNode = node;\n recursePath(nextNode.getChildren(), dept + 1);\n result[dept] = node;\n }\n else if (node === column) {\n found = true;\n }\n }\n };\n recursePath(originalBalancedTree, 0);\n // we should always find the path, but in case there is a bug somewhere, returning null\n // will make it fail rather than provide a 'hard to track down' bug\n return found ? result : null;\n };\n ColumnUtils.prototype.depthFirstOriginalTreeSearch = function (parent, tree, callback) {\n var _this = this;\n if (!tree) {\n return;\n }\n tree.forEach(function (child) {\n if (child instanceof ProvidedColumnGroup) {\n _this.depthFirstOriginalTreeSearch(child, child.getChildren(), callback);\n }\n callback(child, parent);\n });\n };\n ColumnUtils.prototype.depthFirstAllColumnTreeSearch = function (tree, callback) {\n var _this = this;\n if (!tree) {\n return;\n }\n tree.forEach(function (child) {\n if (child instanceof ColumnGroup) {\n _this.depthFirstAllColumnTreeSearch(child.getChildren(), callback);\n }\n callback(child);\n });\n };\n ColumnUtils.prototype.depthFirstDisplayedColumnTreeSearch = function (tree, callback) {\n var _this = this;\n if (!tree) {\n return;\n }\n tree.forEach(function (child) {\n if (child instanceof ColumnGroup) {\n _this.depthFirstDisplayedColumnTreeSearch(child.getDisplayedChildren(), callback);\n }\n callback(child);\n });\n };\n ColumnUtils = __decorate$6([\n Bean('columnUtils')\n ], ColumnUtils);\n return ColumnUtils;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$3 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$7 = (undefined && undefined.__decorate) || function (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// takes in a list of columns, as specified by the column definitions, and returns column groups\nvar DisplayedGroupCreator = /** @class */ (function (_super) {\n __extends$3(DisplayedGroupCreator, _super);\n function DisplayedGroupCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DisplayedGroupCreator.prototype.createDisplayedGroups = function (\n // all displayed columns sorted - this is the columns the grid should show\n sortedVisibleColumns, \n // the tree of columns, as provided by the users, used to know what groups columns roll up into\n balancedColumnTree, \n // creates unique id's for the group\n groupInstanceIdCreator, \n // whether it's left, right or center col\n pinned, \n // we try to reuse old groups if we can, to allow gui to do animation\n oldDisplayedGroups) {\n var _this = this;\n var result = [];\n var previousRealPath;\n var previousOriginalPath;\n var oldColumnsMapped = this.mapOldGroupsById(oldDisplayedGroups);\n // go through each column, then do a bottom up comparison to the previous column, and start\n // to share groups if they converge at any point.\n sortedVisibleColumns.forEach(function (currentColumn) {\n var currentOriginalPath = _this.getOriginalPathForColumn(balancedColumnTree, currentColumn);\n var currentRealPath = [];\n var firstColumn = !previousOriginalPath;\n for (var i = 0; i < currentOriginalPath.length; i++) {\n if (firstColumn || currentOriginalPath[i] !== previousOriginalPath[i]) {\n // new group needed\n var newGroup = _this.createColumnGroup(currentOriginalPath[i], groupInstanceIdCreator, oldColumnsMapped, pinned);\n currentRealPath[i] = newGroup;\n // if top level, add to result, otherwise add to parent\n if (i == 0) {\n result.push(newGroup);\n }\n else {\n currentRealPath[i - 1].addChild(newGroup);\n }\n }\n else {\n // reuse old group\n currentRealPath[i] = previousRealPath[i];\n }\n }\n var noColumnGroups = currentRealPath.length === 0;\n if (noColumnGroups) {\n // if we are not grouping, then the result of the above is an empty\n // path (no groups), and we just add the column to the root list.\n result.push(currentColumn);\n }\n else {\n var leafGroup = last(currentRealPath);\n leafGroup.addChild(currentColumn);\n }\n previousRealPath = currentRealPath;\n previousOriginalPath = currentOriginalPath;\n });\n this.setupParentsIntoColumns(result, null);\n return result;\n };\n DisplayedGroupCreator.prototype.createColumnGroup = function (providedGroup, groupInstanceIdCreator, oldColumnsMapped, pinned) {\n var groupId = providedGroup.getGroupId();\n var instanceId = groupInstanceIdCreator.getInstanceIdForKey(groupId);\n var uniqueId = ColumnGroup.createUniqueId(groupId, instanceId);\n var columnGroup = oldColumnsMapped[uniqueId];\n // if the user is setting new colDefs, it is possible that the id's overlap, and we\n // would have a false match from above. so we double check we are talking about the\n // same original column group.\n if (columnGroup && columnGroup.getProvidedColumnGroup() !== providedGroup) {\n columnGroup = null;\n }\n if (exists(columnGroup)) {\n // clean out the old column group here, as we will be adding children into it again\n columnGroup.reset();\n }\n else {\n columnGroup = new ColumnGroup(providedGroup, groupId, instanceId, pinned);\n this.context.createBean(columnGroup);\n }\n return columnGroup;\n };\n // returns back a 2d map of ColumnGroup as follows: groupId -> instanceId -> ColumnGroup\n DisplayedGroupCreator.prototype.mapOldGroupsById = function (displayedGroups) {\n var result = {};\n var recursive = function (columnsOrGroups) {\n columnsOrGroups.forEach(function (columnOrGroup) {\n if (columnOrGroup instanceof ColumnGroup) {\n var columnGroup = columnOrGroup;\n result[columnOrGroup.getUniqueId()] = columnGroup;\n recursive(columnGroup.getChildren());\n }\n });\n };\n if (displayedGroups) {\n recursive(displayedGroups);\n }\n return result;\n };\n DisplayedGroupCreator.prototype.setupParentsIntoColumns = function (columnsOrGroups, parent) {\n var _this = this;\n columnsOrGroups.forEach(function (columnsOrGroup) {\n columnsOrGroup.setParent(parent);\n if (columnsOrGroup instanceof ColumnGroup) {\n var columnGroup = columnsOrGroup;\n _this.setupParentsIntoColumns(columnGroup.getChildren(), columnGroup);\n }\n });\n };\n DisplayedGroupCreator.prototype.getOriginalPathForColumn = function (balancedColumnTree, column) {\n var result = [];\n var found = false;\n var recursePath = function (columnTree, dept) {\n for (var i = 0; i < columnTree.length; i++) {\n // quit the search, so 'result' is kept with the found result\n if (found) {\n return;\n }\n var node = columnTree[i];\n if (node instanceof ProvidedColumnGroup) {\n recursePath(node.getChildren(), dept + 1);\n result[dept] = node;\n }\n else if (node === column) {\n found = true;\n }\n }\n };\n recursePath(balancedColumnTree, 0);\n // it's possible we didn't find a path. this happens if the column is generated\n // by the grid (auto-group), in that the definition didn't come from the client. in this case,\n // we create a fake original path.\n if (found) {\n return result;\n }\n console.warn('AG Grid: could not get path');\n return null;\n };\n DisplayedGroupCreator = __decorate$7([\n Bean('displayedGroupCreator')\n ], DisplayedGroupCreator);\n return DisplayedGroupCreator;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __read$1 = (undefined && undefined.__read) || function (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};\nvar __spread$1 = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$1(arguments[i]));\n return ar;\n};\n/**\n * These keys are used for validating properties supplied on a gridOptions object, and for code generation.\n * If you change the properties on the gridOptions interface, you *must* update this file as well to be consistent.\n */\nvar PropertyKeys = /** @class */ (function () {\n function PropertyKeys() {\n }\n PropertyKeys.STRING_PROPERTIES = [\n 'sortingOrder', 'rowClass', 'rowSelection', 'overlayLoadingTemplate', 'overlayNoRowsTemplate',\n 'quickFilterText', 'rowModelType', 'editType', 'domLayout', 'clipboardDelimiter', 'rowGroupPanelShow',\n 'multiSortKey', 'pivotColumnGroupTotals', 'pivotRowTotals', 'pivotPanelShow', 'fillHandleDirection',\n 'serverSideStoreType', 'groupDisplayType', 'treeDataDisplayType'\n ];\n PropertyKeys.OBJECT_PROPERTIES = [\n 'components', 'frameworkComponents', 'rowStyle', 'context', 'autoGroupColumnDef', 'localeText', 'icons',\n 'datasource', 'serverSideDatasource', 'viewportDatasource', 'groupRowRendererParams', 'aggFuncs', 'fullWidthCellRendererParams',\n 'defaultColGroupDef', 'defaultColDef', 'defaultExportParams', 'defaultCsvExportParams', 'defaultExcelExportParams', 'columnTypes',\n 'rowClassRules', 'detailCellRendererParams', 'loadingCellRendererParams', 'loadingOverlayComponentParams',\n 'noRowsOverlayComponentParams', 'popupParent', 'colResizeDefault', 'statusBar', 'sideBar', 'chartThemeOverrides',\n 'customChartThemes'\n ];\n PropertyKeys.ARRAY_PROPERTIES = [\n 'alignedGrids', 'rowData', 'columnDefs', 'excelStyles', 'pinnedTopRowData', 'pinnedBottomRowData', 'chartThemes'\n ];\n PropertyKeys.NUMBER_PROPERTIES = [\n 'rowHeight', 'detailRowHeight', 'rowBuffer', 'colWidth', 'headerHeight', 'groupHeaderHeight', 'floatingFiltersHeight',\n 'pivotHeaderHeight', 'pivotGroupHeaderHeight', 'groupDefaultExpanded', 'minColWidth', 'maxColWidth', 'viewportRowModelPageSize',\n 'viewportRowModelBufferSize', 'autoSizePadding', 'maxBlocksInCache', 'maxConcurrentDatasourceRequests', 'tooltipShowDelay',\n 'tooltipHideDelay', 'cacheOverflowSize', 'paginationPageSize', 'cacheBlockSize', 'infiniteInitialRowCount', 'scrollbarWidth',\n 'batchUpdateWaitMillis', 'asyncTransactionWaitMillis', 'blockLoadDebounceMillis', 'keepDetailRowsCount',\n 'undoRedoCellEditingLimit', 'cellFlashDelay', 'cellFadeDelay', 'tabIndex'\n ];\n PropertyKeys.BOOLEAN_PROPERTIES = [\n 'suppressMakeColumnVisibleAfterUnGroup', 'suppressRowClickSelection', 'suppressCellSelection', 'suppressCellFocus', 'suppressHorizontalScroll',\n 'alwaysShowHorizontalScroll', 'alwaysShowVerticalScroll', 'debug', 'enableBrowserTooltips', 'enableCellExpressions',\n 'angularCompileRows', 'angularCompileFilters', 'groupSuppressAutoColumn', 'groupSelectsChildren', 'groupIncludeFooter',\n 'groupIncludeTotalFooter', 'groupUseEntireRow', 'groupSuppressBlankHeader', 'suppressMenuHide', 'suppressRowDeselection',\n 'unSortIcon', 'suppressMultiSort', 'alwaysMultiSort', 'singleClickEdit', 'suppressLoadingOverlay', 'suppressNoRowsOverlay', 'suppressAutoSize',\n 'skipHeaderOnAutoSize', 'suppressParentsInRowNodes', 'suppressColumnMoveAnimation', 'suppressMovableColumns',\n 'suppressFieldDotNotation', 'enableRangeSelection', 'enableRangeHandle', 'enableFillHandle', 'suppressClearOnFillReduction',\n 'deltaSort', 'suppressTouch', 'suppressAsyncEvents', 'allowContextMenuWithControlKey', 'suppressContextMenu',\n 'rememberGroupStateWhenNewData', 'enableCellChangeFlash', 'suppressDragLeaveHidesColumns', 'suppressMiddleClickScrolls',\n 'suppressPreventDefaultOnMouseWheel', 'suppressCopyRowsToClipboard', 'copyHeadersToClipboard', 'copyGroupHeadersToClipboard',\n 'pivotMode', 'suppressAggFuncInHeader', 'suppressColumnVirtualisation', 'suppressAggAtRootLevel', 'suppressFocusAfterRefresh',\n 'functionsPassive', 'functionsReadOnly', 'animateRows', 'groupSelectsFiltered', 'groupRemoveSingleChildren',\n 'groupRemoveLowestSingleChildren', 'enableRtl', 'suppressClickEdit', 'rowDragEntireRow', 'rowDragManaged', 'suppressRowDrag',\n 'suppressMoveWhenRowDragging', 'rowDragMultiRow', 'enableGroupEdit', 'embedFullWidthRows', 'deprecatedEmbedFullWidthRows',\n 'suppressPaginationPanel', 'groupHideOpenParents', 'groupMultiAutoColumn', 'pagination',\n 'stopEditingWhenGridLosesFocus', 'paginationAutoPageSize', 'suppressScrollOnNewData', 'suppressScrollWhenPopupsAreOpen',\n 'purgeClosedRowNodes', 'cacheQuickFilter', 'deltaRowDataMode', 'ensureDomOrder', 'accentedSort', 'suppressChangeDetection',\n 'valueCache', 'valueCacheNeverExpires', 'aggregateOnlyChangedColumns', 'suppressAnimationFrame', 'suppressExcelExport',\n 'suppressCsvExport', 'treeData', 'masterDetail', 'suppressMultiRangeSelection', 'enterMovesDownAfterEdit', 'enterMovesDown',\n 'suppressPropertyNamesCheck', 'rowMultiSelectWithClick', 'suppressEnterpriseResetOnNewColumns',\n 'suppressRowHoverHighlight', 'suppressRowTransform', 'suppressClipboardPaste', 'suppressLastEmptyLineOnPaste',\n 'serverSideSortingAlwaysResets', 'suppressSetColumnStateEvents', 'suppressColumnStateEvents', 'enableCharts', 'deltaColumnMode',\n 'suppressMaintainUnsortedOrder', 'enableCellTextSelection', 'suppressBrowserResizeObserver', 'suppressMaxRenderedRowRestriction',\n 'excludeChildrenWhenTreeDataFiltering', 'tooltipMouseTrack', 'keepDetailRows', 'paginateChildRows', 'preventDefaultOnContextMenu',\n 'undoRedoCellEditing', 'allowDragFromColumnsToolPanel', 'immutableData', 'immutableColumns', 'pivotSuppressAutoColumn',\n 'suppressExpandablePivotGroups', 'applyColumnDefOrder', 'debounceVerticalScrollbar', 'detailRowAutoHeight',\n 'serverSideFilteringAlwaysResets', 'suppressAggFilteredOnly', 'showOpenedGroup', 'suppressClipboardApi',\n 'suppressModelUpdateAfterUpdateTransaction', 'stopEditingWhenCellsLoseFocus', 'maintainColumnOrder', 'groupMaintainOrder',\n 'columnHoverHighlight', 'reactUi', 'suppressReactUi', 'readOnlyEdit', 'suppressRowVirtualisation',\n 'resetRowDataOnUpdate', 'removePivotHeaderRowWhenSingleValueColumn', 'suppressCopySingleCellRanges'\n ];\n /** You do not need to include event callbacks in this list, as they are generated automatically. */\n PropertyKeys.FUNCTION_PROPERTIES = [\n 'localeTextFunc', 'getLocaleText', 'groupRowInnerRenderer', 'groupRowInnerRendererFramework',\n 'groupRowRenderer', 'groupRowRendererFramework', 'isExternalFilterPresent', 'getRowHeight', 'doesExternalFilterPass',\n 'getRowClass', 'getRowStyle', 'getContextMenuItems', 'getMainMenuItems', 'processRowPostCreate', 'processCellForClipboard',\n 'groupRowAggNodes', 'getGroupRowAgg', 'getRowNodeId', 'isFullWidthCell', 'isFullWidthRow', 'fullWidthCellRenderer', 'fullWidthCellRendererFramework',\n 'processSecondaryColDef', 'processSecondaryColGroupDef',\n 'getBusinessKeyForNode', 'sendToClipboard', 'navigateToNextHeader',\n 'tabToNextHeader', 'navigateToNextCell', 'tabToNextCell', 'processCellFromClipboard', 'getDocument', 'postProcessPopup',\n 'getChildCount', 'getDataPath', 'loadingCellRenderer', 'loadingCellRendererFramework', 'loadingOverlayComponent',\n 'loadingOverlayComponentFramework', 'noRowsOverlayComponent', 'noRowsOverlayComponentFramework', 'detailCellRenderer',\n 'detailCellRendererFramework', 'isRowMaster', 'isRowSelectable', 'postSort', 'postSortRows', 'processHeaderForClipboard', 'processGroupHeaderForClipboard',\n 'paginationNumberFormatter', 'processDataFromClipboard', 'getServerSideGroupKey', 'isServerSideGroup', 'suppressKeyboardEvent',\n 'createChartContainer', 'getChartToolbarItems', 'fillOperation', 'isApplyServerSideTransaction', 'getServerSideStoreParams',\n 'isServerSideGroupOpenByDefault', 'isGroupOpenByDefault', 'defaultGroupSortComparator', 'defaultGroupOrderComparator', 'initialGroupOrderComparator',\n 'loadingCellRendererSelector', 'getRowId', 'groupAggFiltering'\n ];\n PropertyKeys.ALL_PROPERTIES = __spread$1(PropertyKeys.ARRAY_PROPERTIES, PropertyKeys.OBJECT_PROPERTIES, PropertyKeys.STRING_PROPERTIES, PropertyKeys.NUMBER_PROPERTIES, PropertyKeys.FUNCTION_PROPERTIES, PropertyKeys.BOOLEAN_PROPERTIES);\n /**\n * Used when performing property checks. This avoids noise caused when using frameworks, which can add their own\n * framework-specific properties to colDefs, gridOptions etc.\n */\n PropertyKeys.FRAMEWORK_PROPERTIES = [\n '__ob__', '__v_skip', '__metadata__', 'mappedColumnProperties', 'hasChildColumns', 'toColDef', 'createColDefFromGridColumn'\n ];\n return PropertyKeys;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read$2 = (undefined && undefined.__read) || function (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};\nvar __spread$2 = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$2(arguments[i]));\n return ar;\n};\nvar ComponentUtil = /** @class */ (function () {\n function ComponentUtil() {\n }\n ComponentUtil.getEventCallbacks = function () {\n if (!ComponentUtil.EVENT_CALLBACKS) {\n ComponentUtil.EVENT_CALLBACKS = ComponentUtil.EVENTS.map(function (event) { return ComponentUtil.getCallbackForEvent(event); });\n }\n return ComponentUtil.EVENT_CALLBACKS;\n };\n ComponentUtil.copyAttributesToGridOptions = function (gridOptions, component, skipEventDeprecationCheck) {\n // create empty grid options if none were passed\n if (typeof gridOptions !== 'object') {\n gridOptions = {};\n }\n // to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'\n var pGridOptions = gridOptions;\n var keyExists = function (key) { return typeof component[key] !== 'undefined'; };\n // if groupAggFiltering exists and isn't a function, handle as a boolean.\n if (keyExists('groupAggFiltering') && typeof component.groupAggFiltering !== 'function') {\n pGridOptions.groupAggFiltering = ComponentUtil.toBoolean(component.groupAggFiltering);\n delete component.groupAggFiltering;\n }\n // add in all the simple properties\n __spread$2(ComponentUtil.ARRAY_PROPERTIES, ComponentUtil.STRING_PROPERTIES, ComponentUtil.OBJECT_PROPERTIES, ComponentUtil.FUNCTION_PROPERTIES, ComponentUtil.getEventCallbacks()).filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = component[key]; });\n ComponentUtil.BOOLEAN_PROPERTIES\n .filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toBoolean(component[key]); });\n ComponentUtil.NUMBER_PROPERTIES\n .filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toNumber(component[key]); });\n return gridOptions;\n };\n ComponentUtil.getCallbackForEvent = function (eventName) {\n if (!eventName || eventName.length < 2) {\n return eventName;\n }\n return 'on' + eventName[0].toUpperCase() + eventName.substr(1);\n };\n ComponentUtil.processOnChange = function (changes, gridOptions, api, columnApi) {\n if (!changes) {\n return;\n }\n var changesToApply = __assign({}, changes);\n // to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'\n var pGridOptions = gridOptions;\n var keyExists = function (key) { return changesToApply[key]; };\n // if groupAggFiltering exists and isn't a function, handle as a boolean.\n if (keyExists('groupAggFiltering')) {\n if (typeof changesToApply.groupAggFiltering === 'function') {\n pGridOptions.groupAggFiltering = changesToApply.groupAggFiltering;\n }\n else {\n pGridOptions.groupAggFiltering = ComponentUtil.toBoolean(changesToApply.groupAggFiltering);\n }\n delete changesToApply.groupAggFiltering;\n }\n // we need to do this before the generic handling, otherwise value gets set before we\n // try to set it, and the grid then doesn't refresh the rows as it doesn't see any change.\n // also it's possible we use the generic code setXXX below and put it up there instead,\n // cover all cases.\n if (changesToApply.rowClass) {\n api.setRowClass(changesToApply.rowClass.currentValue);\n delete changesToApply.rowClass;\n }\n // check if any change for the simple types, and if so, then just copy in the new value\n __spread$2(ComponentUtil.ARRAY_PROPERTIES, ComponentUtil.OBJECT_PROPERTIES, ComponentUtil.STRING_PROPERTIES, ComponentUtil.getEventCallbacks()).filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = changesToApply[key].currentValue; });\n ComponentUtil.BOOLEAN_PROPERTIES\n .filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toBoolean(changesToApply[key].currentValue); });\n ComponentUtil.NUMBER_PROPERTIES\n .filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toNumber(changesToApply[key].currentValue); });\n if (changesToApply.enableCellTextSelection) {\n api.setEnableCellTextSelection(ComponentUtil.toBoolean(changesToApply.enableCellTextSelection.currentValue));\n delete changesToApply.enableCellTextSelection;\n }\n if (changesToApply.quickFilterText) {\n api.setQuickFilter(changesToApply.quickFilterText.currentValue);\n delete changesToApply.quickFilterText;\n }\n if (changesToApply.autoGroupColumnDef) {\n api.setAutoGroupColumnDef(changesToApply.autoGroupColumnDef.currentValue, \"gridOptionsChanged\");\n delete changesToApply.autoGroupColumnDef;\n }\n if (changesToApply.columnDefs) {\n api.setColumnDefs(changesToApply.columnDefs.currentValue, \"gridOptionsChanged\");\n delete changesToApply.columnDefs;\n }\n if (changesToApply.defaultColDef) {\n api.setDefaultColDef(changesToApply.defaultColDef.currentValue, \"gridOptionsChanged\");\n delete changesToApply.defaultColDef;\n }\n if (changesToApply.paginationPageSize) {\n api.paginationSetPageSize(ComponentUtil.toNumber(changesToApply.paginationPageSize.currentValue));\n delete changesToApply.paginationPageSize;\n }\n if (changesToApply.pivotMode) {\n columnApi.setPivotMode(ComponentUtil.toBoolean(changesToApply.pivotMode.currentValue));\n delete changesToApply.pivotMode;\n }\n if (changesToApply.groupRemoveSingleChildren) {\n api.setGroupRemoveSingleChildren(ComponentUtil.toBoolean(changesToApply.groupRemoveSingleChildren.currentValue));\n delete changesToApply.groupRemoveSingleChildren;\n }\n if (changesToApply.suppressRowDrag) {\n api.setSuppressRowDrag(ComponentUtil.toBoolean(changesToApply.suppressRowDrag.currentValue));\n delete changesToApply.suppressRowDrag;\n }\n if (changesToApply.suppressMoveWhenRowDragging) {\n api.setSuppressMoveWhenRowDragging(ComponentUtil.toBoolean(changesToApply.suppressMoveWhenRowDragging.currentValue));\n delete changesToApply.suppressMoveWhenRowDragging;\n }\n if (changesToApply.suppressRowClickSelection) {\n api.setSuppressRowClickSelection(ComponentUtil.toBoolean(changesToApply.suppressRowClickSelection.currentValue));\n delete changesToApply.suppressRowClickSelection;\n }\n if (changesToApply.suppressClipboardPaste) {\n api.setSuppressClipboardPaste(ComponentUtil.toBoolean(changesToApply.suppressClipboardPaste.currentValue));\n delete changesToApply.suppressClipboardPaste;\n }\n if (changesToApply.headerHeight) {\n api.setHeaderHeight(ComponentUtil.toNumber(changesToApply.headerHeight.currentValue));\n delete changesToApply.headerHeight;\n }\n // any remaining properties can be set in a generic way\n // ie the setter takes the form of setXXX and the argument requires no formatting/translation first\n var dynamicApi = api;\n Object.keys(changesToApply)\n .forEach(function (property) {\n var setterName = \"set\" + property.charAt(0).toUpperCase() + property.substring(1);\n if (dynamicApi[setterName]) {\n dynamicApi[setterName](changes[property].currentValue);\n }\n });\n // copy changes into an event for dispatch\n var event = {\n type: Events.EVENT_COMPONENT_STATE_CHANGED,\n api: gridOptions.api,\n columnApi: gridOptions.columnApi\n };\n iterateObject(changes, function (key, value) {\n event[key] = value;\n });\n api.dispatchEvent(event);\n };\n ComponentUtil.toBoolean = function (value) {\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'string') {\n // for boolean, compare to empty String to allow attributes appearing with\n // no value to be treated as 'true'\n return value.toUpperCase() === 'TRUE' || value == '';\n }\n return false;\n };\n ComponentUtil.toNumber = function (value) {\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'string') {\n return Number(value);\n }\n };\n // all the events are populated in here AFTER this class (at the bottom of the file).\n ComponentUtil.EVENTS = [];\n // events that are available for use by users of AG Grid and so should be documented\n ComponentUtil.PUBLIC_EVENTS = [];\n // events that are internal to AG Grid and should not be exposed to users via documentation or generated framework components\n ComponentUtil.EXCLUDED_INTERNAL_EVENTS = [];\n ComponentUtil.STRING_PROPERTIES = PropertyKeys.STRING_PROPERTIES;\n ComponentUtil.OBJECT_PROPERTIES = PropertyKeys.OBJECT_PROPERTIES;\n ComponentUtil.ARRAY_PROPERTIES = PropertyKeys.ARRAY_PROPERTIES;\n ComponentUtil.NUMBER_PROPERTIES = PropertyKeys.NUMBER_PROPERTIES;\n ComponentUtil.BOOLEAN_PROPERTIES = PropertyKeys.BOOLEAN_PROPERTIES;\n ComponentUtil.FUNCTION_PROPERTIES = PropertyKeys.FUNCTION_PROPERTIES;\n ComponentUtil.ALL_PROPERTIES = PropertyKeys.ALL_PROPERTIES;\n return ComponentUtil;\n}());\nComponentUtil.EVENTS = values(Events);\n/** Exclude the following internal events from code generation to prevent exposing these events via framework components */\nComponentUtil.EXCLUDED_INTERNAL_EVENTS = [\n Events.EVENT_SCROLLBAR_WIDTH_CHANGED,\n Events.EVENT_CHECKBOX_CHANGED,\n Events.EVENT_HEIGHT_SCALE_CHANGED,\n Events.EVENT_BODY_HEIGHT_CHANGED,\n Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,\n Events.EVENT_SCROLL_VISIBILITY_CHANGED,\n Events.EVENT_COLUMN_HOVER_CHANGED,\n Events.EVENT_FLASH_CELLS,\n Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,\n Events.EVENT_DISPLAYED_ROWS_CHANGED,\n Events.EVENT_LEFT_PINNED_WIDTH_CHANGED,\n Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED,\n Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,\n Events.EVENT_POPUP_TO_FRONT,\n Events.EVENT_KEYBOARD_FOCUS,\n Events.EVENT_MOUSE_FOCUS,\n Events.EVENT_STORE_UPDATED,\n Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,\n Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END,\n Events.EVENT_FILL_START,\n Events.EVENT_FILL_END,\n Events.EVENT_FULL_WIDTH_ROW_FOCUSED\n];\n/** EVENTS that should be exposed via code generation for the framework components. */\nComponentUtil.PUBLIC_EVENTS = ComponentUtil.EVENTS.filter(function (e) { return !includes(ComponentUtil.EXCLUDED_INTERNAL_EVENTS, e); });\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$4 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$8 = (undefined && undefined.__decorate) || function (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};\nvar AgStackComponentsRegistry = /** @class */ (function (_super) {\n __extends$4(AgStackComponentsRegistry, _super);\n function AgStackComponentsRegistry() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.componentsMappedByName = {};\n return _this;\n }\n AgStackComponentsRegistry.prototype.setupComponents = function (components) {\n var _this = this;\n if (components) {\n components.forEach(function (componentMeta) { return _this.addComponent(componentMeta); });\n }\n };\n AgStackComponentsRegistry.prototype.addComponent = function (componentMeta) {\n // get name of the class as a string\n // let className = getNameOfClass(ComponentClass);\n // insert a dash after every capital letter\n // let classEscaped = className.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n var classEscaped = componentMeta.componentName.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n // put all to upper case\n var classUpperCase = classEscaped.toUpperCase();\n // finally store\n this.componentsMappedByName[classUpperCase] = componentMeta.componentClass;\n };\n AgStackComponentsRegistry.prototype.getComponentClass = function (htmlTag) {\n return this.componentsMappedByName[htmlTag];\n };\n AgStackComponentsRegistry = __decorate$8([\n Bean('agStackComponentsRegistry')\n ], AgStackComponentsRegistry);\n return AgStackComponentsRegistry;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __read$3 = (undefined && undefined.__read) || function (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};\nvar __spread$3 = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$3(arguments[i]));\n return ar;\n};\nvar ColDefUtil = /** @class */ (function () {\n function ColDefUtil() {\n }\n ColDefUtil.STRING_PROPERTIES = [\n 'headerName',\n 'columnGroupShow',\n 'headerClass',\n 'toolPanelClass',\n 'headerValueGetter',\n 'pivotKeys',\n 'groupId',\n 'colId',\n 'sort',\n 'initialSort',\n 'field',\n 'type',\n 'tooltipComponent',\n 'tooltipField',\n 'headerTooltip',\n 'cellClass',\n 'showRowGroup',\n 'filter',\n 'initialAggFunc',\n 'defaultAggFunc',\n 'aggFunc',\n 'pinned',\n 'initialPinned',\n 'chartDataType',\n 'cellEditorPopupPosition'\n ];\n ColDefUtil.OBJECT_PROPERTIES = [\n 'headerGroupComponent',\n 'headerGroupComponentFramework',\n 'headerGroupComponentParams',\n 'cellStyle',\n 'cellRenderer',\n 'cellRendererParams',\n 'cellRendererFramework',\n 'cellEditor',\n 'cellEditorFramework',\n 'cellEditorParams',\n 'pinnedRowCellRendererFramework',\n 'pinnedRowCellRendererParams',\n 'filterFramework',\n 'filterParams',\n 'pivotValueColumn',\n 'headerComponent',\n 'headerComponentFramework',\n 'headerComponentParams',\n 'floatingFilterComponent',\n 'floatingFilterComponentParams',\n 'floatingFilterComponentFramework',\n 'floatingFilterFramework',\n 'tooltipComponent',\n 'tooltipComponentParams',\n 'tooltipComponentFramework',\n 'refData',\n 'columnsMenuParams'\n ];\n ColDefUtil.ARRAY_PROPERTIES = [\n 'children',\n 'sortingOrder',\n 'allowedAggFuncs',\n 'menuTabs',\n 'pivotTotalColumnIds',\n 'cellClassRules',\n 'icons'\n ];\n ColDefUtil.NUMBER_PROPERTIES = [\n 'sortedAt',\n 'sortIndex',\n 'initialSortIndex',\n 'flex',\n 'initialFlex',\n 'width',\n 'initialWidth',\n 'minWidth',\n 'maxWidth',\n 'rowGroupIndex',\n 'initialRowGroupIndex',\n 'pivotIndex',\n 'initialPivotIndex'\n ];\n ColDefUtil.BOOLEAN_PROPERTIES = [\n 'suppressCellFlash',\n 'suppressColumnsToolPanel',\n 'suppressFiltersToolPanel',\n 'openByDefault',\n 'marryChildren',\n 'hide',\n 'initialHide',\n 'rowGroup',\n 'initialRowGroup',\n 'pivot',\n 'initialPivot',\n 'checkboxSelection',\n 'headerCheckboxSelection',\n 'headerCheckboxSelectionFilteredOnly',\n 'suppressMenu',\n 'suppressMovable',\n 'lockPosition',\n 'lockVisible',\n 'lockPinned',\n 'unSortIcon',\n 'suppressSizeToFit',\n 'suppressAutoSize',\n 'enableRowGroup',\n 'enablePivot',\n 'enableValue',\n 'editable',\n 'suppressPaste',\n 'suppressNavigable',\n 'enableCellChangeFlash',\n 'rowDrag',\n 'dndSource',\n 'autoHeight',\n 'wrapText',\n 'sortable',\n 'resizable',\n 'singleClickEdit',\n 'floatingFilter',\n 'cellEditorPopup',\n 'suppressFillHandle'\n ];\n ColDefUtil.FUNCTION_PROPERTIES = [\n 'dndSourceOnRowDrag',\n 'valueGetter',\n 'valueSetter',\n 'filterValueGetter',\n 'keyCreator',\n 'pinnedRowCellRenderer',\n 'valueFormatter',\n 'pinnedRowValueFormatter',\n 'valueParser',\n 'comparator',\n 'equals',\n 'pivotComparator',\n 'suppressKeyboardEvent',\n 'suppressHeaderKeyboardEvent',\n 'colSpan',\n 'rowSpan',\n 'getQuickFilterText',\n 'newValueHandler',\n 'onCellValueChanged',\n 'onCellClicked',\n 'onCellDoubleClicked',\n 'onCellContextMenu',\n 'rowDragText',\n 'tooltipValueGetter',\n 'tooltipComponent',\n 'tooltipComponentFramework',\n 'cellRendererSelector',\n 'cellEditorSelector'\n ];\n ColDefUtil.ALL_PROPERTIES = __spread$3(ColDefUtil.ARRAY_PROPERTIES, ColDefUtil.OBJECT_PROPERTIES, ColDefUtil.STRING_PROPERTIES, ColDefUtil.NUMBER_PROPERTIES, ColDefUtil.FUNCTION_PROPERTIES, ColDefUtil.BOOLEAN_PROPERTIES);\n // used when doing property checks - this causes noise when using frameworks which can add their own fw specific\n // properties to colDefs, gridOptions etc\n ColDefUtil.FRAMEWORK_PROPERTIES = [\n '__ob__',\n '__v_skip',\n '__metadata__',\n 'mappedColumnProperties',\n 'hasChildColumns',\n 'toColDef',\n 'createColDefFromGridColumn'\n ];\n return ColDefUtil;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __read$4 = (undefined && undefined.__read) || function (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};\nvar Color = /** @class */ (function () {\n /**\n * Every color component should be in the [0, 1] range.\n * Some easing functions (such as elastic easing) can overshoot the target value by some amount.\n * So, when animating colors, if the source or target color components are already near\n * or at the edge of the allowed [0, 1] range, it is possible for the intermediate color\n * component value to end up outside of that range mid-animation. For this reason the constructor\n * performs range checking/constraining.\n * @param r Red component.\n * @param g Green component.\n * @param b Blue component.\n * @param a Alpha (opacity) component.\n */\n function Color(r, g, b, a) {\n if (a === void 0) { a = 1; }\n // NaN is treated as 0.\n this.r = Math.min(1, Math.max(0, r || 0));\n this.g = Math.min(1, Math.max(0, g || 0));\n this.b = Math.min(1, Math.max(0, b || 0));\n this.a = Math.min(1, Math.max(0, a || 0));\n }\n /**\n * The given string can be in one of the following formats:\n * - #rgb\n * - #rrggbb\n * - rgb(r, g, b)\n * - rgba(r, g, b, a)\n * - CSS color name such as 'white', 'orange', 'cyan', etc.\n * @param str\n */\n Color.fromString = function (str) {\n // hexadecimal notation\n if (str.indexOf('#') >= 0) { // there can be some leading whitespace\n return Color.fromHexString(str);\n }\n // color name\n var hex = Color.nameToHex[str];\n if (hex) {\n return Color.fromHexString(hex);\n }\n // rgb(a) notation\n if (str.indexOf('rgb') >= 0) {\n return Color.fromRgbaString(str);\n }\n throw new Error(\"Invalid color string: '\" + str + \"'\");\n };\n // See https://drafts.csswg.org/css-color/#hex-notation\n Color.parseHex = function (input) {\n input = input.replace(/ /g, '').slice(1);\n var parts;\n switch (input.length) {\n case 6:\n case 8:\n parts = [];\n for (var i = 0; i < input.length; i += 2) {\n parts.push(parseInt(\"\" + input[i] + input[i + 1], 16));\n }\n break;\n case 3:\n case 4:\n parts = input.split('').map(function (p) { return parseInt(p, 16); }).map(function (p) { return p + p * 16; });\n break;\n }\n if (parts.length >= 3) {\n if (parts.every(function (p) { return p >= 0; })) {\n if (parts.length === 3) {\n parts.push(255);\n }\n return parts;\n }\n }\n };\n Color.fromHexString = function (str) {\n var values = Color.parseHex(str);\n if (values) {\n var _a = __read$4(values, 4), r = _a[0], g = _a[1], b = _a[2], a = _a[3];\n return new Color(r / 255, g / 255, b / 255, a / 255);\n }\n throw new Error(\"Malformed hexadecimal color string: '\" + str + \"'\");\n };\n Color.stringToRgba = function (str) {\n // Find positions of opening and closing parentheses.\n var _a = __read$4([NaN, NaN], 2), po = _a[0], pc = _a[1];\n for (var i = 0; i < str.length; i++) {\n var c = str[i];\n if (!po && c === '(') {\n po = i;\n }\n else if (c === ')') {\n pc = i;\n break;\n }\n }\n var contents = po && pc && str.substring(po + 1, pc);\n if (!contents) {\n return;\n }\n var parts = contents.split(',');\n var rgba = [];\n for (var i = 0; i < parts.length; i++) {\n var part = parts[i];\n var value = parseFloat(part);\n if (isNaN(value)) {\n return;\n }\n if (part.indexOf('%') >= 0) { // percentage r, g, or b value\n value = Math.max(0, Math.min(100, value));\n value /= 100;\n }\n else {\n if (i === 3) { // alpha component\n value = Math.max(0, Math.min(1, value));\n }\n else { // absolute r, g, or b value\n value = Math.max(0, Math.min(255, value));\n value /= 255;\n }\n }\n rgba.push(value);\n }\n return rgba;\n };\n Color.fromRgbaString = function (str) {\n var rgba = Color.stringToRgba(str);\n if (rgba) {\n if (rgba.length === 3) {\n return new Color(rgba[0], rgba[1], rgba[2]);\n }\n else if (rgba.length === 4) {\n return new Color(rgba[0], rgba[1], rgba[2], rgba[3]);\n }\n }\n throw new Error(\"Malformed rgb/rgba color string: '\" + str + \"'\");\n };\n Color.fromArray = function (arr) {\n if (arr.length === 4) {\n return new Color(arr[0], arr[1], arr[2], arr[3]);\n }\n if (arr.length === 3) {\n return new Color(arr[0], arr[1], arr[2]);\n }\n throw new Error('The given array should contain 3 or 4 color components (numbers).');\n };\n Color.fromHSB = function (h, s, b, alpha) {\n if (alpha === void 0) { alpha = 1; }\n var rgb = Color.HSBtoRGB(h, s, b);\n return new Color(rgb[0], rgb[1], rgb[2], alpha);\n };\n Color.padHex = function (str) {\n // Can't use `padStart(2, '0')` here because of IE.\n return str.length === 1 ? '0' + str : str;\n };\n Color.prototype.toHexString = function () {\n var hex = '#'\n + Color.padHex(Math.round(this.r * 255).toString(16))\n + Color.padHex(Math.round(this.g * 255).toString(16))\n + Color.padHex(Math.round(this.b * 255).toString(16));\n if (this.a < 1) {\n hex += Color.padHex(Math.round(this.a * 255).toString(16));\n }\n return hex;\n };\n Color.prototype.toRgbaString = function (fractionDigits) {\n if (fractionDigits === void 0) { fractionDigits = 3; }\n var components = [\n Math.round(this.r * 255),\n Math.round(this.g * 255),\n Math.round(this.b * 255)\n ];\n var k = Math.pow(10, fractionDigits);\n if (this.a !== 1) {\n components.push(Math.round(this.a * k) / k);\n return \"rgba(\" + components.join(', ') + \")\";\n }\n return \"rgb(\" + components.join(', ') + \")\";\n };\n Color.prototype.toString = function () {\n if (this.a === 1) {\n return this.toHexString();\n }\n return this.toRgbaString();\n };\n Color.prototype.toHSB = function () {\n return Color.RGBtoHSB(this.r, this.g, this.b);\n };\n /**\n * Converts the given RGB triple to an array of HSB (HSV) components.\n * The hue component will be `NaN` for achromatic colors.\n */\n Color.RGBtoHSB = function (r, g, b) {\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var S = max !== 0 ? (max - min) / max : 0;\n var H = NaN;\n // min == max, means all components are the same\n // and the color is a shade of gray with no hue (H is NaN)\n if (min !== max) {\n var delta = max - min;\n var rc = (max - r) / delta;\n var gc = (max - g) / delta;\n var bc = (max - b) / delta;\n if (r === max) {\n H = bc - gc;\n }\n else if (g === max) {\n H = 2.0 + rc - bc;\n }\n else {\n H = 4.0 + gc - rc;\n }\n H /= 6.0;\n if (H < 0) {\n H = H + 1.0;\n }\n }\n return [H * 360, S, max];\n };\n /**\n * Converts the given HSB (HSV) triple to an array of RGB components.\n */\n Color.HSBtoRGB = function (H, S, B) {\n if (isNaN(H)) {\n H = 0;\n }\n H = (((H % 360) + 360) % 360) / 360; // normalize hue to [0, 360] interval, then scale to [0, 1]\n var r = 0;\n var g = 0;\n var b = 0;\n if (S === 0) {\n r = g = b = B;\n }\n else {\n var h = (H - Math.floor(H)) * 6;\n var f = h - Math.floor(h);\n var p = B * (1 - S);\n var q = B * (1 - S * f);\n var t = B * (1 - (S * (1 - f)));\n switch (h >> 0) { // discard the floating point part of the number\n case 0:\n r = B;\n g = t;\n b = p;\n break;\n case 1:\n r = q;\n g = B;\n b = p;\n break;\n case 2:\n r = p;\n g = B;\n b = t;\n break;\n case 3:\n r = p;\n g = q;\n b = B;\n break;\n case 4:\n r = t;\n g = p;\n b = B;\n break;\n case 5:\n r = B;\n g = p;\n b = q;\n break;\n }\n }\n return [r, g, b];\n };\n Color.prototype.derive = function (hueShift, saturationFactor, brightnessFactor, opacityFactor) {\n var hsb = Color.RGBtoHSB(this.r, this.g, this.b);\n var b = hsb[2];\n if (b == 0 && brightnessFactor > 1.0) {\n b = 0.05;\n }\n var h = (((hsb[0] + hueShift) % 360) + 360) % 360;\n var s = Math.max(Math.min(hsb[1] * saturationFactor, 1.0), 0.0);\n b = Math.max(Math.min(b * brightnessFactor, 1.0), 0.0);\n var a = Math.max(Math.min(this.a * opacityFactor, 1.0), 0.0);\n var rgba = Color.HSBtoRGB(h, s, b);\n rgba.push(a);\n return Color.fromArray(rgba);\n };\n Color.prototype.brighter = function () {\n return this.derive(0, 1.0, 1.0 / 0.7, 1.0);\n };\n Color.prototype.darker = function () {\n return this.derive(0, 1.0, 0.7, 1.0);\n };\n /**\n * CSS Color Module Level 4:\n * https://drafts.csswg.org/css-color/#named-colors\n */\n Color.nameToHex = Object.freeze({\n aliceblue: '#F0F8FF',\n antiquewhite: '#FAEBD7',\n aqua: '#00FFFF',\n aquamarine: '#7FFFD4',\n azure: '#F0FFFF',\n beige: '#F5F5DC',\n bisque: '#FFE4C4',\n black: '#000000',\n blanchedalmond: '#FFEBCD',\n blue: '#0000FF',\n blueviolet: '#8A2BE2',\n brown: '#A52A2A',\n burlywood: '#DEB887',\n cadetblue: '#5F9EA0',\n chartreuse: '#7FFF00',\n chocolate: '#D2691E',\n coral: '#FF7F50',\n cornflowerblue: '#6495ED',\n cornsilk: '#FFF8DC',\n crimson: '#DC143C',\n cyan: '#00FFFF',\n darkblue: '#00008B',\n darkcyan: '#008B8B',\n darkgoldenrod: '#B8860B',\n darkgray: '#A9A9A9',\n darkgreen: '#006400',\n darkgrey: '#A9A9A9',\n darkkhaki: '#BDB76B',\n darkmagenta: '#8B008B',\n darkolivegreen: '#556B2F',\n darkorange: '#FF8C00',\n darkorchid: '#9932CC',\n darkred: '#8B0000',\n darksalmon: '#E9967A',\n darkseagreen: '#8FBC8F',\n darkslateblue: '#483D8B',\n darkslategray: '#2F4F4F',\n darkslategrey: '#2F4F4F',\n darkturquoise: '#00CED1',\n darkviolet: '#9400D3',\n deeppink: '#FF1493',\n deepskyblue: '#00BFFF',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1E90FF',\n firebrick: '#B22222',\n floralwhite: '#FFFAF0',\n forestgreen: '#228B22',\n fuchsia: '#FF00FF',\n gainsboro: '#DCDCDC',\n ghostwhite: '#F8F8FF',\n gold: '#FFD700',\n goldenrod: '#DAA520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#ADFF2F',\n grey: '#808080',\n honeydew: '#F0FFF0',\n hotpink: '#FF69B4',\n indianred: '#CD5C5C',\n indigo: '#4B0082',\n ivory: '#FFFFF0',\n khaki: '#F0E68C',\n lavender: '#E6E6FA',\n lavenderblush: '#FFF0F5',\n lawngreen: '#7CFC00',\n lemonchiffon: '#FFFACD',\n lightblue: '#ADD8E6',\n lightcoral: '#F08080',\n lightcyan: '#E0FFFF',\n lightgoldenrodyellow: '#FAFAD2',\n lightgray: '#D3D3D3',\n lightgreen: '#90EE90',\n lightgrey: '#D3D3D3',\n lightpink: '#FFB6C1',\n lightsalmon: '#FFA07A',\n lightseagreen: '#20B2AA',\n lightskyblue: '#87CEFA',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#B0C4DE',\n lightyellow: '#FFFFE0',\n lime: '#00FF00',\n limegreen: '#32CD32',\n linen: '#FAF0E6',\n magenta: '#FF00FF',\n maroon: '#800000',\n mediumaquamarine: '#66CDAA',\n mediumblue: '#0000CD',\n mediumorchid: '#BA55D3',\n mediumpurple: '#9370DB',\n mediumseagreen: '#3CB371',\n mediumslateblue: '#7B68EE',\n mediumspringgreen: '#00FA9A',\n mediumturquoise: '#48D1CC',\n mediumvioletred: '#C71585',\n midnightblue: '#191970',\n mintcream: '#F5FFFA',\n mistyrose: '#FFE4E1',\n moccasin: '#FFE4B5',\n navajowhite: '#FFDEAD',\n navy: '#000080',\n oldlace: '#FDF5E6',\n olive: '#808000',\n olivedrab: '#6B8E23',\n orange: '#FFA500',\n orangered: '#FF4500',\n orchid: '#DA70D6',\n palegoldenrod: '#EEE8AA',\n palegreen: '#98FB98',\n paleturquoise: '#AFEEEE',\n palevioletred: '#DB7093',\n papayawhip: '#FFEFD5',\n peachpuff: '#FFDAB9',\n peru: '#CD853F',\n pink: '#FFC0CB',\n plum: '#DDA0DD',\n powderblue: '#B0E0E6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#FF0000',\n rosybrown: '#BC8F8F',\n royalblue: '#4169E1',\n saddlebrown: '#8B4513',\n salmon: '#FA8072',\n sandybrown: '#F4A460',\n seagreen: '#2E8B57',\n seashell: '#FFF5EE',\n sienna: '#A0522D',\n silver: '#C0C0C0',\n skyblue: '#87CEEB',\n slateblue: '#6A5ACD',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#FFFAFA',\n springgreen: '#00FF7F',\n steelblue: '#4682B4',\n tan: '#D2B48C',\n teal: '#008080',\n thistle: '#D8BFD8',\n tomato: '#FF6347',\n turquoise: '#40E0D0',\n violet: '#EE82EE',\n wheat: '#F5DEB3',\n white: '#FFFFFF',\n whitesmoke: '#F5F5F5',\n yellow: '#FFFF00',\n yellowgreen: '#9ACD32'\n });\n return Color;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n// Based on https://stackoverflow.com/a/14991797\n// This will parse a delimited string into an array of arrays.\nfunction stringToArray(strData, delimiter) {\n if (delimiter === void 0) { delimiter = ','; }\n var data = [];\n var isNewline = function (char) { return char === '\\r' || char === '\\n'; };\n var insideQuotedField = false;\n if (strData === '') {\n return [['']];\n }\n var _loop_1 = function (row, column, position) {\n var previousChar = strData[position - 1];\n var currentChar = strData[position];\n var nextChar = strData[position + 1];\n var ensureDataExists = function () {\n if (!data[row]) {\n // create row if it doesn't exist\n data[row] = [];\n }\n if (!data[row][column]) {\n // create column if it doesn't exist\n data[row][column] = '';\n }\n };\n ensureDataExists();\n if (currentChar === '\"') {\n if (insideQuotedField) {\n if (nextChar === '\"') {\n // unescape double quote\n data[row][column] += '\"';\n position++;\n }\n else {\n // exit quoted field\n insideQuotedField = false;\n }\n return out_row_1 = row, out_column_1 = column, out_position_1 = position, \"continue\";\n }\n else if (previousChar === undefined || previousChar === delimiter || isNewline(previousChar)) {\n // enter quoted field\n insideQuotedField = true;\n return out_row_1 = row, out_column_1 = column, out_position_1 = position, \"continue\";\n }\n }\n if (!insideQuotedField) {\n if (currentChar === delimiter) {\n // move to next column\n column++;\n ensureDataExists();\n return out_row_1 = row, out_column_1 = column, out_position_1 = position, \"continue\";\n }\n else if (isNewline(currentChar)) {\n // move to next row\n column = 0;\n row++;\n ensureDataExists();\n if (currentChar === '\\r' && nextChar === '\\n') {\n // skip over second newline character if it exists\n position++;\n }\n return out_row_1 = row, out_column_1 = column, out_position_1 = position, \"continue\";\n }\n }\n // add current character to current column\n data[row][column] += currentChar;\n out_row_1 = row;\n out_column_1 = column;\n out_position_1 = position;\n };\n var out_row_1, out_column_1, out_position_1;\n // iterate over each character, keep track of current row and column (of the returned array)\n for (var row = 0, column = 0, position = 0; position < strData.length; position++) {\n _loop_1(row, column, position);\n row = out_row_1;\n column = out_column_1;\n position = out_position_1;\n }\n return data;\n}\n\nvar CsvUtils = /*#__PURE__*/Object.freeze({\n stringToArray: stringToArray\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __values$1 = (undefined && undefined.__values) || function(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/**\n * These variables are lazy loaded, as otherwise they try and get initialised when we are loading\n * unit tests and we don't have references to window or document in the unit tests\n * from http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\n */\nvar isSafari;\nvar isIE;\nvar isEdge;\nvar isChrome;\nvar isFirefox;\nvar isIOS;\nvar invisibleScrollbar;\nvar browserScrollbarWidth;\nfunction isBrowserIE() {\n if (isIE === undefined) {\n isIE = /*@cc_on!@*/ !!document.documentMode; // At least IE6\n }\n return isIE;\n}\nfunction isBrowserEdge() {\n if (isEdge === undefined) {\n isEdge = !isBrowserIE() && !!window.StyleMedia;\n }\n return isEdge;\n}\nfunction isBrowserSafari() {\n if (isSafari === undefined) {\n // taken from https://stackoverflow.com/a/23522755/1388233\n isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n }\n return isSafari;\n}\nfunction isBrowserChrome() {\n if (isChrome === undefined) {\n var win = window;\n isChrome = (!!win.chrome && (!!win.chrome.webstore || !!win.chrome.runtime)) ||\n (/Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor));\n }\n return isChrome;\n}\nfunction isBrowserFirefox() {\n if (isFirefox === undefined) {\n var win = window;\n isFirefox = typeof win.InstallTrigger !== 'undefined';\n }\n return isFirefox;\n}\nfunction isIOSUserAgent() {\n if (isIOS === undefined) {\n // taken from https://stackoverflow.com/a/58064481/1388233\n isIOS = (/iPad|iPhone|iPod/.test(navigator.platform) ||\n // eslint-disable-next-line\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\n // @ts-ignore\n !window.MSStream;\n }\n return isIOS;\n}\nfunction getTabIndex(el) {\n if (!el) {\n return null;\n }\n var numberTabIndex = el.tabIndex;\n var tabIndex = el.getAttribute('tabIndex');\n if (numberTabIndex === -1 && (tabIndex === null || (tabIndex === '' && !isBrowserFirefox()))) {\n return null;\n }\n return numberTabIndex.toString();\n}\nfunction getMaxDivHeight() {\n if (!document.body) {\n return -1;\n }\n var res = 1000000;\n // FF reports the height back but still renders blank after ~6M px\n var testUpTo = navigator.userAgent.toLowerCase().match(/firefox/) ? 6000000 : 1000000000;\n var div = document.createElement('div');\n document.body.appendChild(div);\n while (true) {\n var test = res * 2;\n div.style.height = test + 'px';\n if (test > testUpTo || div.clientHeight !== test) {\n break;\n }\n else {\n res = test;\n }\n }\n document.body.removeChild(div);\n return res;\n}\nfunction getScrollbarWidth() {\n if (browserScrollbarWidth == null) {\n initScrollbarWidthAndVisibility();\n }\n return browserScrollbarWidth;\n}\nfunction initScrollbarWidthAndVisibility() {\n var body = document.body;\n var div = document.createElement('div');\n div.style.width = div.style.height = '100px';\n div.style.opacity = '0';\n div.style.overflow = 'scroll';\n div.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps\n div.style.position = 'absolute';\n body.appendChild(div);\n var width = div.offsetWidth - div.clientWidth;\n // if width is 0 and client width is 0, means the DOM isn't ready\n if (width === 0 && div.clientWidth === 0) {\n width = null;\n }\n // remove div\n if (div.parentNode) {\n div.parentNode.removeChild(div);\n }\n if (width != null) {\n browserScrollbarWidth = width;\n invisibleScrollbar = width === 0;\n }\n}\nfunction isInvisibleScrollbar() {\n if (invisibleScrollbar == null) {\n initScrollbarWidthAndVisibility();\n }\n return invisibleScrollbar;\n}\n/** @deprecated */\nfunction hasOverflowScrolling() {\n var e_1, _a;\n var prefixes = ['webkit', 'moz', 'o', 'ms'];\n var div = document.createElement('div');\n var body = document.getElementsByTagName('body')[0];\n var found = false;\n var p;\n body.appendChild(div);\n div.setAttribute('style', prefixes.map(function (prefix) { return \"-\" + prefix + \"-overflow-scrolling: touch\"; }).concat('overflow-scrolling: touch').join(';'));\n var computedStyle = window.getComputedStyle(div);\n if (computedStyle.overflowScrolling === 'touch') {\n found = true;\n }\n if (!found) {\n try {\n for (var prefixes_1 = __values$1(prefixes), prefixes_1_1 = prefixes_1.next(); !prefixes_1_1.done; prefixes_1_1 = prefixes_1.next()) {\n p = prefixes_1_1.value;\n if (computedStyle[p + \"OverflowScrolling\"] === 'touch') {\n found = true;\n break;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (prefixes_1_1 && !prefixes_1_1.done && (_a = prefixes_1.return)) _a.call(prefixes_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n if (div.parentNode) {\n div.parentNode.removeChild(div);\n }\n return found;\n}\n/**\n * Gets the document body width\n * from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code\n * @returns {number}\n */\nfunction getBodyWidth() {\n if (document.body) {\n return document.body.clientWidth;\n }\n if (window.innerHeight) {\n return window.innerWidth;\n }\n if (document.documentElement && document.documentElement.clientWidth) {\n return document.documentElement.clientWidth;\n }\n return -1;\n}\n/**\n * Gets the body height\n * from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code\n * @returns {number}\n */\nfunction getBodyHeight() {\n if (document.body) {\n return document.body.clientHeight;\n }\n if (window.innerHeight) {\n return window.innerHeight;\n }\n if (document.documentElement && document.documentElement.clientHeight) {\n return document.documentElement.clientHeight;\n }\n return -1;\n}\n\nvar BrowserUtils = /*#__PURE__*/Object.freeze({\n isBrowserEdge: isBrowserEdge,\n isBrowserSafari: isBrowserSafari,\n isBrowserChrome: isBrowserChrome,\n isBrowserFirefox: isBrowserFirefox,\n isIOSUserAgent: isIOSUserAgent,\n getTabIndex: getTabIndex,\n getMaxDivHeight: getMaxDivHeight,\n getScrollbarWidth: getScrollbarWidth,\n isInvisibleScrollbar: isInvisibleScrollbar,\n hasOverflowScrolling: hasOverflowScrolling,\n getBodyWidth: getBodyWidth,\n getBodyHeight: getBodyHeight\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar rtlNegativeScroll;\n/**\n * This method adds a class to an element and remove that class from all siblings.\n * Useful for toggling state.\n * @param {HTMLElement} element The element to receive the class\n * @param {string} elementClass The class to be assigned to the element\n * @param {boolean} otherElementClass The class to be assigned to siblings of the element, but not the element itself\n */\nfunction radioCssClass(element, elementClass, otherElementClass) {\n var parent = element.parentElement;\n var sibling = parent && parent.firstChild;\n while (sibling) {\n if (elementClass) {\n sibling.classList.toggle(elementClass, sibling === element);\n }\n if (otherElementClass) {\n sibling.classList.toggle(otherElementClass, sibling !== element);\n }\n sibling = sibling.nextSibling;\n }\n}\nfunction isFocusableFormField(element) {\n var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;\n var isFocusable = matches.call(element, Constants.INPUT_SELECTOR);\n var isNotFocusable = matches.call(element, Constants.FOCUSABLE_EXCLUDE);\n var isElementVisible = isVisible(element);\n var focusable = isFocusable && !isNotFocusable && isElementVisible;\n return focusable;\n}\nfunction setDisplayed(element, displayed) {\n element.classList.toggle('ag-hidden', !displayed);\n}\nfunction setVisible(element, visible) {\n element.classList.toggle('ag-invisible', !visible);\n}\nfunction setDisabled(element, disabled) {\n var attributeName = 'disabled';\n var addOrRemoveDisabledAttribute = disabled ?\n function (e) { return e.setAttribute(attributeName, ''); } :\n function (e) { return e.removeAttribute(attributeName); };\n addOrRemoveDisabledAttribute(element);\n nodeListForEach(element.querySelectorAll('input'), function (input) { return addOrRemoveDisabledAttribute(input); });\n}\nfunction isElementChildOfClass(element, cls, maxNest) {\n var counter = 0;\n while (element) {\n if (element.classList.contains(cls)) {\n return true;\n }\n element = element.parentElement;\n if (maxNest && ++counter > maxNest) {\n break;\n }\n }\n return false;\n}\n// returns back sizes as doubles instead of strings. similar to\n// getBoundingClientRect, however getBoundingClientRect does not:\n// a) work with fractions (eg browser is zooming)\n// b) has CSS transitions applied (eg CSS scale, browser zoom), which we don't want, we want the un-transitioned values\nfunction getElementSize(el) {\n var _a = window.getComputedStyle(el), height = _a.height, width = _a.width, paddingTop = _a.paddingTop, paddingRight = _a.paddingRight, paddingBottom = _a.paddingBottom, paddingLeft = _a.paddingLeft, marginTop = _a.marginTop, marginRight = _a.marginRight, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, boxSizing = _a.boxSizing;\n return {\n height: parseFloat(height),\n width: parseFloat(width),\n paddingTop: parseFloat(paddingTop),\n paddingRight: parseFloat(paddingRight),\n paddingBottom: parseFloat(paddingBottom),\n paddingLeft: parseFloat(paddingLeft),\n marginTop: parseFloat(marginTop),\n marginRight: parseFloat(marginRight),\n marginBottom: parseFloat(marginBottom),\n marginLeft: parseFloat(marginLeft),\n boxSizing: boxSizing\n };\n}\nfunction getInnerHeight(el) {\n var size = getElementSize(el);\n if (size.boxSizing === 'border-box') {\n return size.height - size.paddingTop - size.paddingBottom;\n }\n return size.height;\n}\nfunction getInnerWidth(el) {\n var size = getElementSize(el);\n if (size.boxSizing === 'border-box') {\n return size.width - size.paddingLeft - size.paddingRight;\n }\n return size.width;\n}\nfunction getAbsoluteHeight(el) {\n var size = getElementSize(el);\n var marginRight = size.marginBottom + size.marginTop;\n return Math.ceil(el.offsetHeight + marginRight);\n}\nfunction getAbsoluteWidth(el) {\n var size = getElementSize(el);\n var marginWidth = size.marginLeft + size.marginRight;\n return Math.ceil(el.offsetWidth + marginWidth);\n}\nfunction isRtlNegativeScroll() {\n if (typeof rtlNegativeScroll === \"boolean\") {\n return rtlNegativeScroll;\n }\n var template = document.createElement('div');\n template.style.direction = 'rtl';\n template.style.width = '1px';\n template.style.height = '1px';\n template.style.position = 'fixed';\n template.style.top = '0px';\n template.style.overflow = 'hidden';\n template.dir = 'rtl';\n template.innerHTML = /* html */\n \"
\\n \\n \\n
\";\n document.body.appendChild(template);\n template.scrollLeft = 1;\n rtlNegativeScroll = Math.floor(template.scrollLeft) === 0;\n document.body.removeChild(template);\n return rtlNegativeScroll;\n}\nfunction getScrollLeft(element, rtl) {\n var scrollLeft = element.scrollLeft;\n if (rtl) {\n // Absolute value - for FF that reports RTL scrolls in negative numbers\n scrollLeft = Math.abs(scrollLeft);\n if (isBrowserChrome() && !isRtlNegativeScroll()) {\n scrollLeft = element.scrollWidth - element.clientWidth - scrollLeft;\n }\n }\n return scrollLeft;\n}\nfunction setScrollLeft(element, value, rtl) {\n if (rtl) {\n // Chrome and Safari when doing RTL have the END position of the scroll as zero, not the start\n if (isRtlNegativeScroll()) {\n value *= -1;\n }\n else if (isBrowserSafari() || isBrowserChrome()) {\n value = element.scrollWidth - element.clientWidth - value;\n }\n }\n element.scrollLeft = value;\n}\nfunction clearElement(el) {\n while (el && el.firstChild) {\n el.removeChild(el.firstChild);\n }\n}\n/** @deprecated */\nfunction removeElement(parent, cssSelector) {\n removeFromParent(parent.querySelector(cssSelector));\n}\nfunction removeFromParent(node) {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\nfunction isVisible(element) {\n return element.offsetParent !== null;\n}\n/**\n * Loads the template and returns it as an element. makes up for no simple way in\n * the dom api to load html directly, eg we cannot do this: document.createElement(template)\n * @param {string} template\n * @returns {HTMLElement}\n */\nfunction loadTemplate(template) {\n // we try the DOMParser first, as SalesForce doesn't like using innerHTML on a div\n if (DOMParser !== null) {\n var parser = new DOMParser();\n var doc = parser.parseFromString(template, \"text/html\");\n return doc.body.firstChild;\n }\n var tempDiv = document.createElement('div');\n tempDiv.innerHTML = (template || '').trim();\n return tempDiv.firstChild;\n}\nfunction appendHtml(eContainer, htmlTemplate) {\n if (eContainer.lastChild) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML\n // we put the items at the start, so new items appear underneath old items,\n // so when expanding/collapsing groups, the new rows don't go on top of the\n // rows below that are moving our of the way\n eContainer.insertAdjacentHTML('afterbegin', htmlTemplate);\n }\n else {\n eContainer.innerHTML = htmlTemplate;\n }\n}\n/** @deprecated */\nfunction getElementAttribute(element, attributeName) {\n if (element.attributes && element.attributes[attributeName]) {\n var attribute = element.attributes[attributeName];\n return attribute.value;\n }\n return null;\n}\nfunction offsetHeight(element) {\n return element && element.clientHeight ? element.clientHeight : 0;\n}\nfunction offsetWidth(element) {\n return element && element.clientWidth ? element.clientWidth : 0;\n}\nfunction ensureDomOrder(eContainer, eChild, eChildBefore) {\n // if already in right order, do nothing\n if (eChildBefore && eChildBefore.nextSibling === eChild) {\n return;\n }\n if (eChildBefore) {\n if (eChildBefore.nextSibling) {\n // insert between the eRowBefore and the row after it\n eContainer.insertBefore(eChild, eChildBefore.nextSibling);\n }\n else {\n // if nextSibling is missing, means other row is at end, so just append new row at the end\n eContainer.appendChild(eChild);\n }\n }\n else {\n // otherwise put at start\n if (eContainer.firstChild && eContainer.firstChild !== eChild) {\n // insert it at the first location\n eContainer.insertAdjacentElement('afterbegin', eChild);\n }\n }\n}\nfunction setDomChildOrder(eContainer, orderedChildren) {\n for (var i = 0; i < orderedChildren.length; i++) {\n var correctCellAtIndex = orderedChildren[i];\n var actualCellAtIndex = eContainer.children[i];\n if (actualCellAtIndex !== correctCellAtIndex) {\n eContainer.insertBefore(correctCellAtIndex, actualCellAtIndex);\n }\n }\n}\nfunction insertWithDomOrder(eContainer, eToInsert, eChildBefore) {\n if (eChildBefore) {\n // if previous element exists, just slot in after the previous element\n eChildBefore.insertAdjacentElement('afterend', eToInsert);\n }\n else {\n if (eContainer.firstChild) {\n // insert it at the first location\n eContainer.insertAdjacentElement('afterbegin', eToInsert);\n }\n else {\n // otherwise eContainer is empty, so just append it\n eContainer.appendChild(eToInsert);\n }\n }\n}\n/** @deprecated */\nfunction prependDC(parent, documentFragment) {\n if (exists(parent.firstChild)) {\n parent.insertBefore(documentFragment, parent.firstChild);\n }\n else {\n parent.appendChild(documentFragment);\n }\n}\nfunction addStylesToElement(eElement, styles) {\n if (!styles) {\n return;\n }\n Object.keys(styles).forEach(function (key) {\n var keyCamelCase = hyphenToCamelCase(key);\n if (keyCamelCase) {\n eElement.style[keyCamelCase] = styles[key];\n }\n });\n}\nfunction isHorizontalScrollShowing(element) {\n return element.clientWidth < element.scrollWidth;\n}\nfunction isVerticalScrollShowing(element) {\n return element.clientHeight < element.scrollHeight;\n}\nfunction setElementWidth(element, width) {\n if (width === 'flex') {\n element.style.removeProperty('width');\n element.style.removeProperty('minWidth');\n element.style.removeProperty('maxWidth');\n element.style.flex = '1 1 auto';\n }\n else {\n setFixedWidth(element, width);\n }\n}\nfunction setFixedWidth(element, width) {\n width = formatSize(width);\n element.style.width = width.toString();\n element.style.maxWidth = width.toString();\n element.style.minWidth = width.toString();\n}\nfunction setElementHeight(element, height) {\n if (height === 'flex') {\n element.style.removeProperty('height');\n element.style.removeProperty('minHeight');\n element.style.removeProperty('maxHeight');\n element.style.flex = '1 1 auto';\n }\n else {\n setFixedHeight(element, height);\n }\n}\nfunction setFixedHeight(element, height) {\n height = formatSize(height);\n element.style.height = height.toString();\n element.style.maxHeight = height.toString();\n element.style.minHeight = height.toString();\n}\nfunction formatSize(size) {\n if (typeof size === 'number') {\n return size + \"px\";\n }\n return size;\n}\n/**\n * Returns true if it is a DOM node\n * taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n * @param {any} o\n * @return {boolean}\n */\nfunction isNode(o) {\n return (typeof Node === 'function'\n ? o instanceof Node\n : o && typeof o === 'object' && typeof o.nodeType === 'number' && typeof o.nodeName === 'string');\n}\n//\n/**\n * Returns true if it is a DOM element\n * taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n * @param {any} o\n * @returns {boolean}\n */\nfunction isElement(o) {\n return (typeof HTMLElement === 'function'\n ? o instanceof HTMLElement //DOM2\n : o && isNonNullObject(o) && o.nodeType === 1 && typeof o.nodeName === 'string');\n}\nfunction isNodeOrElement(o) {\n return isNode(o) || isElement(o);\n}\n/**\n * Makes a copy of a node list into a list\n * @param {NodeList} nodeList\n * @returns {Node[]}\n */\nfunction copyNodeList(nodeList) {\n if (nodeList == null) {\n return [];\n }\n var result = [];\n nodeListForEach(nodeList, function (node) { return result.push(node); });\n return result;\n}\nfunction iterateNamedNodeMap(map, callback) {\n if (!map) {\n return;\n }\n for (var i = 0; i < map.length; i++) {\n var attr = map[i];\n callback(attr.name, attr.value);\n }\n}\n/** @deprecated */\nfunction setCheckboxState(eCheckbox, state) {\n if (typeof state === 'boolean') {\n eCheckbox.checked = state;\n eCheckbox.indeterminate = false;\n }\n else {\n // isNodeSelected returns back undefined if it's a group and the children\n // are a mix of selected and unselected\n eCheckbox.indeterminate = true;\n }\n}\nfunction addOrRemoveAttribute(element, name, value) {\n if (value == null) {\n element.removeAttribute(name);\n }\n else {\n element.setAttribute(name, value.toString());\n }\n}\nfunction nodeListForEach(nodeList, action) {\n if (nodeList == null) {\n return;\n }\n for (var i = 0; i < nodeList.length; i++) {\n action(nodeList[i]);\n }\n}\n\nvar DomUtils = /*#__PURE__*/Object.freeze({\n radioCssClass: radioCssClass,\n isFocusableFormField: isFocusableFormField,\n setDisplayed: setDisplayed,\n setVisible: setVisible,\n setDisabled: setDisabled,\n isElementChildOfClass: isElementChildOfClass,\n getElementSize: getElementSize,\n getInnerHeight: getInnerHeight,\n getInnerWidth: getInnerWidth,\n getAbsoluteHeight: getAbsoluteHeight,\n getAbsoluteWidth: getAbsoluteWidth,\n isRtlNegativeScroll: isRtlNegativeScroll,\n getScrollLeft: getScrollLeft,\n setScrollLeft: setScrollLeft,\n clearElement: clearElement,\n removeElement: removeElement,\n removeFromParent: removeFromParent,\n isVisible: isVisible,\n loadTemplate: loadTemplate,\n appendHtml: appendHtml,\n getElementAttribute: getElementAttribute,\n offsetHeight: offsetHeight,\n offsetWidth: offsetWidth,\n ensureDomOrder: ensureDomOrder,\n setDomChildOrder: setDomChildOrder,\n insertWithDomOrder: insertWithDomOrder,\n prependDC: prependDC,\n addStylesToElement: addStylesToElement,\n isHorizontalScrollShowing: isHorizontalScrollShowing,\n isVerticalScrollShowing: isVerticalScrollShowing,\n setElementWidth: setElementWidth,\n setFixedWidth: setFixedWidth,\n setElementHeight: setElementHeight,\n setFixedHeight: setFixedHeight,\n formatSize: formatSize,\n isNode: isNode,\n isElement: isElement,\n isNodeOrElement: isNodeOrElement,\n copyNodeList: copyNodeList,\n iterateNamedNodeMap: iterateNamedNodeMap,\n setCheckboxState: setCheckboxState,\n addOrRemoveAttribute: addOrRemoveAttribute,\n nodeListForEach: nodeListForEach\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n/** @deprecated */\nfunction getNameOfClass(theClass) {\n var funcNameRegex = /function (.{1,})\\(/;\n var funcAsString = theClass.toString();\n var results = funcNameRegex.exec(funcAsString);\n return results && results.length > 1 ? results[1] : \"\";\n}\nfunction findLineByLeastSquares(values) {\n var len = values.length;\n var maxDecimals = 0;\n if (len <= 1) {\n return values;\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n var splitExponent = value.toString().split('e-');\n if (splitExponent.length > 1) {\n maxDecimals = Math.max(maxDecimals, parseInt(splitExponent[1], 10));\n continue;\n }\n if (Math.floor(value) === value) {\n continue;\n }\n maxDecimals = Math.max(maxDecimals, value.toString().split('.')[1].length);\n }\n var sum_x = 0;\n var sum_y = 0;\n var sum_xy = 0;\n var sum_xx = 0;\n var y = 0;\n for (var x = 0; x < len; x++) {\n y = values[x];\n sum_x += x;\n sum_y += y;\n sum_xx += x * x;\n sum_xy += x * y;\n }\n var m = (len * sum_xy - sum_x * sum_y) / (len * sum_xx - sum_x * sum_x);\n var b = (sum_y / len) - (m * sum_x) / len;\n var result = [];\n for (var x = 0; x <= len; x++) {\n result.push(parseFloat((x * m + b).toFixed(maxDecimals)));\n }\n return result;\n}\n/**\n * Converts a CSS object into string\n * @param {Object} stylesToUse an object eg: {color: 'black', top: '25px'}\n * @return {string} A string like \"color: black; top: 25px;\" for html\n */\nfunction cssStyleObjectToMarkup(stylesToUse) {\n if (!stylesToUse) {\n return '';\n }\n var resParts = [];\n iterateObject(stylesToUse, function (styleKey, styleValue) {\n var styleKeyDashed = camelCaseToHyphen(styleKey);\n resParts.push(styleKeyDashed + \": \" + styleValue + \";\");\n });\n return resParts.join(' ');\n}\n/**\n * Displays a message to the browser. this is useful in iPad, where you can't easily see the console.\n * so the javascript code can use this to give feedback. this is NOT intended to be called in production.\n * it is intended the AG Grid developer calls this to troubleshoot, but then takes out the calls before\n * checking in.\n * @param {string} msg\n */\nfunction message(msg) {\n var eMessage = document.createElement('div');\n var eBox = document.querySelector('#__ag__message');\n eMessage.innerHTML = msg;\n if (!eBox) {\n var template = \"
\";\n eBox = loadTemplate(template);\n if (document.body) {\n document.body.appendChild(eBox);\n }\n }\n eBox.insertBefore(eMessage, eBox.children[0]);\n}\n/**\n * cell renderers are used in a few places. they bind to dom slightly differently to other cell renderes as they\n * can return back strings (instead of html elemnt) in the getGui() method. common code placed here to handle that.\n * @param {AgPromise} cellRendererPromise\n * @param {HTMLElement} eTarget\n */\nfunction bindCellRendererToHtmlElement(cellRendererPromise, eTarget) {\n cellRendererPromise.then(function (cellRenderer) {\n var gui = cellRenderer.getGui();\n if (gui != null) {\n if (typeof gui === 'object') {\n eTarget.appendChild(gui);\n }\n else {\n eTarget.innerHTML = gui;\n }\n }\n });\n}\n\nvar GeneralUtils = /*#__PURE__*/Object.freeze({\n getNameOfClass: getNameOfClass,\n findLineByLeastSquares: findLineByLeastSquares,\n cssStyleObjectToMarkup: cssStyleObjectToMarkup,\n message: message,\n bindCellRendererToHtmlElement: bindCellRendererToHtmlElement\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n// ARIA HELPER FUNCTIONS\nfunction setAriaAttribute(element, attribute, value) {\n element.setAttribute(ariaAttributeName(attribute), value.toString());\n}\nfunction removeAriaAttribute(element, attribute) {\n element.removeAttribute(ariaAttributeName(attribute));\n}\nfunction ariaAttributeName(attribute) {\n return \"aria-\" + attribute;\n}\nfunction setAriaRole(element, role) {\n if (role) {\n element.setAttribute('role', role);\n }\n else {\n element.removeAttribute('role');\n }\n}\nfunction getAriaSortState(column) {\n var sort;\n if (column.isSortAscending()) {\n sort = 'ascending';\n }\n else if (column.isSortDescending()) {\n sort = 'descending';\n }\n else {\n sort = 'none';\n }\n return sort;\n}\n// ARIA ATTRIBUTE GETTERS\nfunction getAriaLevel(element) {\n return parseInt(element.getAttribute('aria-level'), 10);\n}\nfunction getAriaPosInSet(element) {\n return parseInt(element.getAttribute('aria-posinset'), 10);\n}\nfunction getAriaDescribedBy(element) {\n return element.getAttribute('aria-describedby') || '';\n}\n// ARIA ATTRIBUTE SETTERS\nfunction setAriaLabel(element, label) {\n var key = 'label';\n if (label) {\n setAriaAttribute(element, key, label);\n }\n else {\n removeAriaAttribute(element, key);\n }\n}\nfunction setAriaLabelledBy(element, labelledBy) {\n var key = 'labelledby';\n if (labelledBy) {\n setAriaAttribute(element, key, labelledBy);\n }\n else {\n removeAriaAttribute(element, key);\n }\n}\nfunction setAriaDescription(element, description) {\n var key = 'description';\n if (description) {\n setAriaAttribute(element, key, description);\n }\n else {\n removeAriaAttribute(element, key);\n }\n}\nfunction setAriaDescribedBy(element, describedby) {\n var key = 'describedby';\n if (describedby) {\n setAriaAttribute(element, key, describedby);\n }\n else {\n removeAriaAttribute(element, key);\n }\n}\nfunction setAriaLevel(element, level) {\n setAriaAttribute(element, 'level', level);\n}\nfunction setAriaDisabled(element, disabled) {\n setAriaAttribute(element, 'disabled', disabled);\n}\nfunction setAriaExpanded(element, expanded) {\n setAriaAttribute(element, 'expanded', expanded);\n}\nfunction removeAriaExpanded(element) {\n removeAriaAttribute(element, 'expanded');\n}\nfunction setAriaSetSize(element, setsize) {\n setAriaAttribute(element, 'setsize', setsize);\n}\nfunction setAriaPosInSet(element, position) {\n setAriaAttribute(element, 'posinset', position);\n}\nfunction setAriaMultiSelectable(element, multiSelectable) {\n setAriaAttribute(element, 'multiselectable', multiSelectable);\n}\nfunction setAriaRowCount(element, rowCount) {\n setAriaAttribute(element, 'rowcount', rowCount);\n}\nfunction setAriaRowIndex(element, rowIndex) {\n setAriaAttribute(element, 'rowindex', rowIndex);\n}\nfunction setAriaColCount(element, colCount) {\n setAriaAttribute(element, 'colcount', colCount);\n}\nfunction setAriaColIndex(element, colIndex) {\n setAriaAttribute(element, 'colindex', colIndex);\n}\nfunction setAriaColSpan(element, colSpan) {\n setAriaAttribute(element, 'colspan', colSpan);\n}\nfunction setAriaSort(element, sort) {\n setAriaAttribute(element, 'sort', sort);\n}\nfunction removeAriaSort(element) {\n removeAriaAttribute(element, 'sort');\n}\nfunction setAriaSelected(element, selected) {\n var attributeName = 'selected';\n if (selected) {\n setAriaAttribute(element, attributeName, selected);\n }\n else {\n removeAriaAttribute(element, attributeName);\n }\n}\nfunction setAriaChecked(element, checked) {\n setAriaAttribute(element, 'checked', checked === undefined ? 'mixed' : checked);\n}\n\nvar AriaUtils = /*#__PURE__*/Object.freeze({\n setAriaRole: setAriaRole,\n getAriaSortState: getAriaSortState,\n getAriaLevel: getAriaLevel,\n getAriaPosInSet: getAriaPosInSet,\n getAriaDescribedBy: getAriaDescribedBy,\n setAriaLabel: setAriaLabel,\n setAriaLabelledBy: setAriaLabelledBy,\n setAriaDescription: setAriaDescription,\n setAriaDescribedBy: setAriaDescribedBy,\n setAriaLevel: setAriaLevel,\n setAriaDisabled: setAriaDisabled,\n setAriaExpanded: setAriaExpanded,\n removeAriaExpanded: removeAriaExpanded,\n setAriaSetSize: setAriaSetSize,\n setAriaPosInSet: setAriaPosInSet,\n setAriaMultiSelectable: setAriaMultiSelectable,\n setAriaRowCount: setAriaRowCount,\n setAriaRowIndex: setAriaRowIndex,\n setAriaColCount: setAriaColCount,\n setAriaColIndex: setAriaColIndex,\n setAriaColSpan: setAriaColSpan,\n setAriaSort: setAriaSort,\n removeAriaSort: removeAriaSort,\n setAriaSelected: setAriaSelected,\n setAriaChecked: setAriaChecked\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction padStartWidthZeros(value, totalStringSize) {\n return value.toString().padStart(totalStringSize, '0');\n}\nfunction createArrayOfNumbers(first, last) {\n var result = [];\n for (var i = first; i <= last; i++) {\n result.push(i);\n }\n return result;\n}\n/**\n * Check if a value is numeric\n * from http://stackoverflow.com/questions/9716468/is-there-any-function-like-isnumeric-in-javascript-to-validate-numbers\n * @param {any} value\n * @return {boolean}\n */\nfunction isNumeric(value) {\n return value !== '' && !isNaN(parseFloat(value)) && isFinite(value);\n}\nfunction cleanNumber(value) {\n if (typeof value === 'string') {\n value = parseInt(value, 10);\n }\n if (typeof value === 'number') {\n return Math.floor(value);\n }\n return null;\n}\nfunction decToHex(number, bytes) {\n var hex = '';\n for (var i = 0; i < bytes; i++) {\n hex += String.fromCharCode(number & 0xff);\n number >>>= 8;\n }\n return hex;\n}\nfunction formatNumberTwoDecimalPlacesAndCommas(value, thousandSeparator, decimalSeparator) {\n if (typeof value !== 'number') {\n return '';\n }\n return formatNumberCommas(Math.round(value * 100) / 100, thousandSeparator, decimalSeparator);\n}\n/**\n * the native method number.toLocaleString(undefined, {minimumFractionDigits: 0})\n * puts in decimal places in IE, so we use this method instead\n * from: http://blog.tompawlak.org/number-currency-formatting-javascript\n * @param {number} value\n * @returns {string}\n */\nfunction formatNumberCommas(value, thousandSeparator, decimalSeparator) {\n if (typeof value !== 'number') {\n return '';\n }\n return value.toString().replace('.', decimalSeparator).replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, \"$1\" + thousandSeparator);\n}\nfunction sum(values) {\n return values == null ? null : values.reduce(function (total, value) { return total + value; }, 0);\n}\n\nvar NumberUtils = /*#__PURE__*/Object.freeze({\n padStartWidthZeros: padStartWidthZeros,\n createArrayOfNumbers: createArrayOfNumbers,\n isNumeric: isNumeric,\n cleanNumber: cleanNumber,\n decToHex: decToHex,\n formatNumberTwoDecimalPlacesAndCommas: formatNumberTwoDecimalPlacesAndCommas,\n formatNumberCommas: formatNumberCommas,\n sum: sum\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __read$5 = (undefined && undefined.__read) || function (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 * Serialises a Date to a string of format `yyyy-MM-dd HH:mm:ss`.\n * An alternative separator can be provided to be used instead of hyphens.\n * @param date The date to serialise\n * @param includeTime Whether to include the time in the serialised string\n * @param separator The separator to use between date parts\n */\nfunction serialiseDate(date, includeTime, separator) {\n if (includeTime === void 0) { includeTime = true; }\n if (separator === void 0) { separator = '-'; }\n if (!date) {\n return null;\n }\n var serialised = [date.getFullYear(), date.getMonth() + 1, date.getDate()].map(function (part) { return padStartWidthZeros(part, 2); }).join(separator);\n if (includeTime) {\n serialised += ' ' + [date.getHours(), date.getMinutes(), date.getSeconds()].map(function (part) { return padStartWidthZeros(part, 2); }).join(':');\n }\n return serialised;\n}\n/**\n * Parses a date and time from a string in the format `yyyy-MM-dd HH:mm:ss`\n */\nfunction parseDateTimeFromString(value) {\n if (!value) {\n return null;\n }\n var _a = __read$5(value.split(' '), 2), dateStr = _a[0], timeStr = _a[1];\n if (!dateStr) {\n return null;\n }\n var fields = dateStr.split('-').map(function (f) { return parseInt(f, 10); });\n if (fields.filter(function (f) { return !isNaN(f); }).length !== 3) {\n return null;\n }\n var _b = __read$5(fields, 3), year = _b[0], month = _b[1], day = _b[2];\n var date = new Date(year, month - 1, day);\n if (date.getFullYear() !== year ||\n date.getMonth() !== month - 1 ||\n date.getDate() !== day) {\n // date was not parsed as expected so must have been invalid\n return null;\n }\n if (!timeStr || timeStr === '00:00:00') {\n return date;\n }\n var _c = __read$5(timeStr.split(':').map(function (part) { return parseInt(part, 10); }), 3), hours = _c[0], minutes = _c[1], seconds = _c[2];\n if (hours >= 0 && hours < 24) {\n date.setHours(hours);\n }\n if (minutes >= 0 && minutes < 60) {\n date.setMinutes(minutes);\n }\n if (seconds >= 0 && seconds < 60) {\n date.setSeconds(seconds);\n }\n return date;\n}\n\nvar DateUtils = /*#__PURE__*/Object.freeze({\n serialiseDate: serialiseDate,\n parseDateTimeFromString: parseDateTimeFromString\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction fuzzyCheckStrings(inputValues, validValues, allSuggestions) {\n var fuzzyMatches = {};\n var invalidInputs = inputValues.filter(function (inputValue) {\n return !validValues.some(function (validValue) { return validValue === inputValue; });\n });\n if (invalidInputs.length > 0) {\n invalidInputs.forEach(function (invalidInput) {\n return fuzzyMatches[invalidInput] = fuzzySuggestions(invalidInput, allSuggestions);\n });\n }\n return fuzzyMatches;\n}\n/**\n *\n * @param {String} inputValue The value to be compared against a list of strings\n * @param allSuggestions The list of strings to be compared against\n * @param hideIrrelevant By default, fuzzy suggestions will just sort the allSuggestions list, set this to true\n * to filter out the irrelevant values\n * @param weighted Set this to true, to make letters matched in the order they were typed have priority in the results.\n */\nfunction fuzzySuggestions(inputValue, allSuggestions, hideIrrelevant, weighted) {\n var search = weighted ? string_weighted_distances : string_distances;\n var thisSuggestions = allSuggestions.map(function (text) { return ({\n value: text,\n relevance: search(inputValue.toLowerCase(), text.toLocaleLowerCase())\n }); });\n thisSuggestions.sort(function (a, b) { return b.relevance - a.relevance; });\n if (hideIrrelevant) {\n thisSuggestions = thisSuggestions.filter(function (suggestion) { return suggestion.relevance !== 0; });\n }\n return thisSuggestions.map(function (suggestion) { return suggestion.value; });\n}\n/**\n * Algorithm to do fuzzy search\n * from https://stackoverflow.com/questions/23305000/javascript-fuzzy-search-that-makes-sense\n * @param {string} from\n * @return {[]}\n */\nfunction get_bigrams(from) {\n var s = from.toLowerCase();\n var v = new Array(s.length - 1);\n var i;\n var j;\n var ref;\n for (i = j = 0, ref = v.length; j <= ref; i = j += 1) {\n v[i] = s.slice(i, i + 2);\n }\n return v;\n}\nfunction string_distances(str1, str2) {\n if (str1.length === 0 && str2.length === 0) {\n return 0;\n }\n var pairs1 = get_bigrams(str1);\n var pairs2 = get_bigrams(str2);\n var union = pairs1.length + pairs2.length;\n var hit_count = 0;\n var j;\n var len;\n for (j = 0, len = pairs1.length; j < len; j++) {\n var x = pairs1[j];\n var k = void 0;\n var len1 = void 0;\n for (k = 0, len1 = pairs2.length; k < len1; k++) {\n var y = pairs2[k];\n if (x === y) {\n hit_count++;\n }\n }\n }\n return hit_count > 0 ? (2 * hit_count) / union : 0;\n}\nfunction string_weighted_distances(str1, str2) {\n var a = str1.replace(/\\s/g, '');\n var b = str2.replace(/\\s/g, '');\n var weight = 0;\n var lastIndex = 0;\n for (var i = 0; i < a.length; i++) {\n var idx = b.indexOf(a[i], lastIndex);\n if (idx === -1) {\n continue;\n }\n lastIndex = idx;\n weight += (100 - (lastIndex * 100 / 10000) * 100);\n }\n return weight;\n}\n\nvar FuzzyMatchUtils = /*#__PURE__*/Object.freeze({\n fuzzyCheckStrings: fuzzyCheckStrings,\n fuzzySuggestions: fuzzySuggestions,\n get_bigrams: get_bigrams,\n string_distances: string_distances,\n string_weighted_distances: string_weighted_distances\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n//\n// IMPORTANT NOTE!\n//\n// If you change the list below, copy/paste the new content into the docs page javascript-grid-icons\n//\nvar iconNameClassMap = {\n // header column group shown when expanded (click to contract)\n columnGroupOpened: 'expanded',\n // header column group shown when contracted (click to expand)\n columnGroupClosed: 'contracted',\n // tool panel column group contracted (click to expand)\n columnSelectClosed: 'tree-closed',\n // tool panel column group expanded (click to contract)\n columnSelectOpen: 'tree-open',\n // column tool panel header expand/collapse all button, shown when some children are expanded and\n // others are collapsed\n columnSelectIndeterminate: 'tree-indeterminate',\n // shown on ghost icon while dragging column to the side of the grid to pin\n columnMovePin: 'pin',\n // shown on ghost icon while dragging over part of the page that is not a drop zone\n columnMoveHide: 'eye-slash',\n // shown on ghost icon while dragging columns to reorder\n columnMoveMove: 'arrows',\n // animating icon shown when dragging a column to the right of the grid causes horizontal scrolling\n columnMoveLeft: 'left',\n // animating icon shown when dragging a column to the left of the grid causes horizontal scrolling\n columnMoveRight: 'right',\n // shown on ghost icon while dragging over Row Groups drop zone\n columnMoveGroup: 'group',\n // shown on ghost icon while dragging over Values drop zone\n columnMoveValue: 'aggregation',\n // shown on ghost icon while dragging over pivot drop zone\n columnMovePivot: 'pivot',\n // shown on ghost icon while dragging over drop zone that doesn't support it, e.g.\n // string column over aggregation drop zone\n dropNotAllowed: 'not-allowed',\n // shown on row group when contracted (click to expand)\n groupContracted: 'tree-closed',\n // shown on row group when expanded (click to contract)\n groupExpanded: 'tree-open',\n // context menu chart item\n chart: 'chart',\n // chart window title bar\n close: 'cross',\n // X (remove) on column 'pill' after adding it to a drop zone list\n cancel: 'cancel',\n // indicates the currently active pin state in the \"Pin column\" sub-menu of the column menu\n check: 'tick',\n // \"go to first\" button in pagination controls\n first: 'first',\n // \"go to previous\" button in pagination controls\n previous: 'previous',\n // \"go to next\" button in pagination controls\n next: 'next',\n // \"go to last\" button in pagination controls\n last: 'last',\n // shown on top right of chart when chart is linked to range data (click to unlink)\n linked: 'linked',\n // shown on top right of chart when chart is not linked to range data (click to link)\n unlinked: 'unlinked',\n // \"Choose colour\" button on chart settings tab\n colorPicker: 'color-picker',\n // rotating spinner shown by the loading cell renderer\n groupLoading: 'loading',\n // button to launch enterprise column menu\n menu: 'menu',\n // filter tool panel tab\n filter: 'filter',\n // column tool panel tab\n columns: 'columns',\n // button in chart regular size window title bar (click to maximise)\n maximize: 'maximize',\n // button in chart maximised window title bar (click to make regular size)\n minimize: 'minimize',\n // \"Pin column\" item in column header menu\n menuPin: 'pin',\n // \"Value aggregation\" column menu item (shown on numeric columns when grouping is active)\"\n menuValue: 'aggregation',\n // \"Group by {column-name}\" item in column header menu\n menuAddRowGroup: 'group',\n // \"Un-Group by {column-name}\" item in column header menu\n menuRemoveRowGroup: 'group',\n // context menu copy item\n clipboardCopy: 'copy',\n // context menu paste item\n clipboardPaste: 'paste',\n // identifies the pivot drop zone\n pivotPanel: 'pivot',\n // \"Row groups\" drop zone in column tool panel\n rowGroupPanel: 'group',\n // columns tool panel Values drop zone\n valuePanel: 'aggregation',\n // drag handle used to pick up draggable columns\n columnDrag: 'grip',\n // drag handle used to pick up draggable rows\n rowDrag: 'grip',\n // context menu export item\n save: 'save',\n // csv export\n csvExport: 'csv',\n // excel export,\n excelExport: 'excel',\n // icon on dropdown editors\n smallDown: 'small-down',\n // version of small-right used in RTL mode\n smallLeft: 'small-left',\n // separater between column 'pills' when you add multiple columns to the header drop zone\n smallRight: 'small-right',\n smallUp: 'small-up',\n // show on column header when column is sorted ascending\n sortAscending: 'asc',\n // show on column header when column is sorted descending\n sortDescending: 'desc',\n // show on column header when column has no sort, only when enabled with gridOptions.unSortIcon=true\n sortUnSort: 'none'\n};\n/**\n * If icon provided, use this (either a string, or a function callback).\n * if not, then use the default icon from the theme\n * @param {string} iconName\n * @param {GridOptionsWrapper} gridOptionsWrapper\n * @param {Column | null} [column]\n * @returns {HTMLElement}\n */\nfunction createIcon(iconName, gridOptionsWrapper, column) {\n var iconContents = createIconNoSpan(iconName, gridOptionsWrapper, column);\n if (iconContents && iconContents.className.indexOf('ag-icon') > -1) {\n return iconContents;\n }\n var eResult = document.createElement('span');\n eResult.appendChild(iconContents);\n return eResult;\n}\nfunction createIconNoSpan(iconName, gridOptionsWrapper, column, forceCreate) {\n var userProvidedIcon = null;\n // check col for icon first\n var icons = column && column.getColDef().icons;\n if (icons) {\n userProvidedIcon = icons[iconName];\n }\n // if not in col, try grid options\n if (gridOptionsWrapper && !userProvidedIcon) {\n var optionsIcons = gridOptionsWrapper.getIcons();\n if (optionsIcons) {\n userProvidedIcon = optionsIcons[iconName];\n }\n }\n // now if user provided, use it\n if (userProvidedIcon) {\n var rendererResult = void 0;\n if (typeof userProvidedIcon === 'function') {\n rendererResult = userProvidedIcon();\n }\n else if (typeof userProvidedIcon === 'string') {\n rendererResult = userProvidedIcon;\n }\n else {\n throw new Error('icon from grid options needs to be a string or a function');\n }\n if (typeof rendererResult === 'string') {\n return loadTemplate(rendererResult);\n }\n if (isNodeOrElement(rendererResult)) {\n return rendererResult;\n }\n console.warn('AG Grid: iconRenderer should return back a string or a dom object');\n }\n else {\n var span = document.createElement('span');\n var cssClass = iconNameClassMap[iconName];\n if (!cssClass) {\n if (!forceCreate) {\n console.warn(\"AG Grid: Did not find icon \" + iconName);\n cssClass = '';\n }\n else {\n cssClass = iconName;\n }\n }\n span.setAttribute('class', \"ag-icon ag-icon-\" + cssClass);\n span.setAttribute('unselectable', 'on');\n setAriaRole(span, 'presentation');\n return span;\n }\n}\n\nvar IconUtils = /*#__PURE__*/Object.freeze({\n iconNameClassMap: iconNameClassMap,\n createIcon: createIcon,\n createIconNoSpan: createIconNoSpan\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar NUMPAD_DEL_NUMLOCK_ON_KEY = 'Del';\nvar NUMPAD_DEL_NUMLOCK_ON_CHARCODE = 46;\nfunction isEventFromPrintableCharacter(event) {\n // no allowed printable chars have alt or ctrl key combinations\n if (event.altKey || event.ctrlKey || event.metaKey) {\n return false;\n }\n // if key is length 1, eg if it is 'a' for the a key, or '2' for the '2' key.\n // non-printable characters have names, eg 'Enter' or 'Backspace'.\n var printableCharacter = event.key.length === 1;\n // IE11 & Edge treat the numpad del key differently - with numlock on we get \"Del\" for key,\n // so this addition checks if its IE11/Edge and handles that specific case the same was as all other browsers\n var numpadDelWithNumlockOnForEdgeOrIe = isNumpadDelWithNumLockOnForEdge(event);\n return printableCharacter || numpadDelWithNumlockOnForEdgeOrIe;\n}\n/**\n * Allows user to tell the grid to skip specific keyboard events\n * @param {GridOptionsWrapper} gridOptionsWrapper\n * @param {KeyboardEvent} keyboardEvent\n * @param {RowNode} rowNode\n * @param {Column} column\n * @param {boolean} editing\n * @returns {boolean}\n */\nfunction isUserSuppressingKeyboardEvent(gridOptionsWrapper, keyboardEvent, rowNode, column, editing) {\n var gridOptionsFunc = gridOptionsWrapper.getSuppressKeyboardEventFunc();\n var colDefFunc = column ? column.getColDef().suppressKeyboardEvent : undefined;\n // if no callbacks provided by user, then do nothing\n if (!gridOptionsFunc && !colDefFunc) {\n return false;\n }\n var params = {\n event: keyboardEvent,\n editing: editing,\n column: column,\n api: gridOptionsWrapper.getApi(),\n node: rowNode,\n data: rowNode.data,\n colDef: column.getColDef(),\n context: gridOptionsWrapper.getContext(),\n columnApi: gridOptionsWrapper.getColumnApi()\n };\n // colDef get first preference on suppressing events\n if (colDefFunc) {\n var colDefFuncResult = colDefFunc(params);\n // if colDef func suppressed, then return now, no need to call gridOption func\n if (colDefFuncResult) {\n return true;\n }\n }\n if (gridOptionsFunc) {\n // if gridOption func, return the result\n return gridOptionsFunc(params);\n }\n // otherwise return false, don't suppress, as colDef didn't suppress and no func on gridOptions\n return false;\n}\nfunction isUserSuppressingHeaderKeyboardEvent(gridOptionsWrapper, keyboardEvent, headerRowIndex, column) {\n var colDef = column.getDefinition();\n var colDefFunc = colDef && colDef.suppressHeaderKeyboardEvent;\n if (!exists(colDefFunc)) {\n return false;\n }\n var params = {\n api: gridOptionsWrapper.getApi(),\n columnApi: gridOptionsWrapper.getColumnApi(),\n context: gridOptionsWrapper.getContext(),\n colDef: colDef,\n column: column,\n headerRowIndex: headerRowIndex,\n event: keyboardEvent\n };\n return !!colDefFunc(params);\n}\nfunction isNumpadDelWithNumLockOnForEdge(event) {\n return (isBrowserEdge()) &&\n event.key === NUMPAD_DEL_NUMLOCK_ON_KEY &&\n event.charCode === NUMPAD_DEL_NUMLOCK_ON_CHARCODE;\n}\n\nvar KeyboardUtils = /*#__PURE__*/Object.freeze({\n isEventFromPrintableCharacter: isEventFromPrintableCharacter,\n isUserSuppressingKeyboardEvent: isUserSuppressingKeyboardEvent,\n isUserSuppressingHeaderKeyboardEvent: isUserSuppressingHeaderKeyboardEvent\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n/**\n * `True` if the event is close to the original event by X pixels either vertically or horizontally.\n * we only start dragging after X pixels so this allows us to know if we should start dragging yet.\n * @param {MouseEvent | TouchEvent} e1\n * @param {MouseEvent | TouchEvent} e2\n * @param {number} pixelCount\n * @returns {boolean}\n */\nfunction areEventsNear(e1, e2, pixelCount) {\n // by default, we wait 4 pixels before starting the drag\n if (pixelCount === 0) {\n return false;\n }\n var diffX = Math.abs(e1.clientX - e2.clientX);\n var diffY = Math.abs(e1.clientY - e2.clientY);\n return Math.max(diffX, diffY) <= pixelCount;\n}\n\nvar MouseUtils = /*#__PURE__*/Object.freeze({\n areEventsNear: areEventsNear\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n/**\n * Gets called by: a) ClientSideNodeManager and b) GroupStage to do sorting.\n * when in ClientSideNodeManager we always have indexes (as this sorts the items the\n * user provided) but when in GroupStage, the nodes can contain filler nodes that\n * don't have order id's\n * @param {RowNode[]} rowNodes\n * @param {Object} rowNodeOrder\n */\nfunction sortRowNodesByOrder(rowNodes, rowNodeOrder) {\n if (!rowNodes) {\n return;\n }\n var comparator = function (nodeA, nodeB) {\n var positionA = rowNodeOrder[nodeA.id];\n var positionB = rowNodeOrder[nodeB.id];\n var aHasIndex = positionA !== undefined;\n var bHasIndex = positionB !== undefined;\n var bothNodesAreUserNodes = aHasIndex && bHasIndex;\n var bothNodesAreFillerNodes = !aHasIndex && !bHasIndex;\n if (bothNodesAreUserNodes) {\n // when comparing two nodes the user has provided, they always\n // have indexes\n return positionA - positionB;\n }\n if (bothNodesAreFillerNodes) {\n // when comparing two filler nodes, we have no index to compare them\n // against, however we want this sorting to be deterministic, so that\n // the rows don't jump around as the user does delta updates. so we\n // want the same sort result. so we use the __objectId - which doesn't make sense\n // from a sorting point of view, but does give consistent behaviour between\n // calls. otherwise groups jump around as delta updates are done.\n // note: previously here we used nodeId, however this gave a strange order\n // as string ordering of numbers is wrong, so using id based on creation order\n // as least gives better looking order.\n return nodeA.__objectId - nodeB.__objectId;\n }\n if (aHasIndex) {\n return 1;\n }\n return -1;\n };\n // check if the list first needs sorting\n var rowNodeA;\n var rowNodeB;\n var atLeastOneOutOfOrder = false;\n for (var i = 0; i < rowNodes.length - 1; i++) {\n rowNodeA = rowNodes[i];\n rowNodeB = rowNodes[i + 1];\n if (comparator(rowNodeA, rowNodeB) > 0) {\n atLeastOneOutOfOrder = true;\n break;\n }\n }\n if (atLeastOneOutOfOrder) {\n rowNodes.sort(comparator);\n }\n}\nfunction traverseNodesWithKey(nodes, callback) {\n var keyParts = [];\n recursiveSearchNodes(nodes);\n function recursiveSearchNodes(currentNodes) {\n if (!currentNodes) {\n return;\n }\n currentNodes.forEach(function (node) {\n // also checking for children for tree data\n if (node.group || node.hasChildren()) {\n keyParts.push(node.key);\n var key = keyParts.join('|');\n callback(node, key);\n recursiveSearchNodes(node.childrenAfterGroup);\n keyParts.pop();\n }\n });\n }\n}\n\nvar RowNodeUtils = /*#__PURE__*/Object.freeze({\n sortRowNodesByOrder: sortRowNodesByOrder,\n traverseNodesWithKey: traverseNodesWithKey\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction convertToSet(list) {\n var set = new Set();\n list.forEach(function (x) { return set.add(x); });\n return set;\n}\n\nvar SetUtils = /*#__PURE__*/Object.freeze({\n convertToSet: convertToSet\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __assign$1 = (undefined && undefined.__assign) || function () {\n __assign$1 = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$1.apply(this, arguments);\n};\nvar utils = __assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1({}, GeneralUtils), AriaUtils), ArrayUtils), BrowserUtils), CsvUtils), DateUtils), DomUtils), EventUtils), FunctionUtils), FuzzyMatchUtils), GenericUtils), IconUtils), KeyboardUtils), MapUtils), MouseUtils), NumberUtils), ObjectUtils), RowNodeUtils), SetUtils), StringUtils);\nvar _ = utils;\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar NumberSequence = /** @class */ (function () {\n function NumberSequence(initValue, step) {\n if (initValue === void 0) { initValue = 0; }\n if (step === void 0) { step = 1; }\n this.nextValue = initValue;\n this.step = step;\n }\n NumberSequence.prototype.next = function () {\n var valToReturn = this.nextValue;\n this.nextValue += this.step;\n return valToReturn;\n };\n NumberSequence.prototype.peek = function () {\n return this.nextValue;\n };\n NumberSequence.prototype.skip = function (count) {\n this.nextValue += count;\n };\n return NumberSequence;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n(function (AgPromiseStatus) {\n AgPromiseStatus[AgPromiseStatus[\"IN_PROGRESS\"] = 0] = \"IN_PROGRESS\";\n AgPromiseStatus[AgPromiseStatus[\"RESOLVED\"] = 1] = \"RESOLVED\";\n})(exports.AgPromiseStatus || (exports.AgPromiseStatus = {}));\nvar AgPromise = /** @class */ (function () {\n function AgPromise(callback) {\n var _this = this;\n this.status = exports.AgPromiseStatus.IN_PROGRESS;\n this.resolution = null;\n this.waiters = [];\n callback(function (value) { return _this.onDone(value); }, function (params) { return _this.onReject(params); });\n }\n AgPromise.all = function (promises) {\n return new AgPromise(function (resolve) {\n var remainingToResolve = promises.length;\n var combinedValues = new Array(remainingToResolve);\n promises.forEach(function (promise, index) {\n promise.then(function (value) {\n combinedValues[index] = value;\n remainingToResolve--;\n if (remainingToResolve === 0) {\n resolve(combinedValues);\n }\n });\n });\n });\n };\n AgPromise.resolve = function (value) {\n if (value === void 0) { value = null; }\n return new AgPromise(function (resolve) { return resolve(value); });\n };\n AgPromise.prototype.then = function (func) {\n var _this = this;\n return new AgPromise(function (resolve) {\n if (_this.status === exports.AgPromiseStatus.RESOLVED) {\n resolve(func(_this.resolution));\n }\n else {\n _this.waiters.push(function (value) { return resolve(func(value)); });\n }\n });\n };\n AgPromise.prototype.resolveNow = function (ifNotResolvedValue, ifResolved) {\n return this.status === exports.AgPromiseStatus.RESOLVED ? ifResolved(this.resolution) : ifNotResolvedValue;\n };\n AgPromise.prototype.onDone = function (value) {\n this.status = exports.AgPromiseStatus.RESOLVED;\n this.resolution = value;\n this.waiters.forEach(function (waiter) { return waiter(value); });\n };\n AgPromise.prototype.onReject = function (params) {\n console.warn('TBI');\n };\n return AgPromise;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n/**\n * A Util Class only used when debugging for printing time to console\n */\nvar Timer = /** @class */ (function () {\n function Timer() {\n this.timestamp = new Date().getTime();\n }\n Timer.prototype.print = function (msg) {\n var duration = (new Date().getTime()) - this.timestamp;\n console.info(msg + \" = \" + duration);\n this.timestamp = new Date().getTime();\n };\n return Timer;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$5 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$2 = (undefined && undefined.__assign) || function () {\n __assign$2 = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$2.apply(this, arguments);\n};\nvar __decorate$9 = (undefined && undefined.__decorate) || function (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};\nvar TooltipStates;\n(function (TooltipStates) {\n TooltipStates[TooltipStates[\"NOTHING\"] = 0] = \"NOTHING\";\n TooltipStates[TooltipStates[\"WAITING_TO_SHOW\"] = 1] = \"WAITING_TO_SHOW\";\n TooltipStates[TooltipStates[\"SHOWING\"] = 2] = \"SHOWING\";\n})(TooltipStates || (TooltipStates = {}));\nvar CustomTooltipFeature = /** @class */ (function (_super) {\n __extends$5(CustomTooltipFeature, _super);\n function CustomTooltipFeature(parentComp) {\n var _this = _super.call(this) || this;\n _this.DEFAULT_SHOW_TOOLTIP_DELAY = 2000;\n _this.DEFAULT_HIDE_TOOLTIP_DELAY = 10000;\n _this.SHOW_QUICK_TOOLTIP_DIFF = 1000;\n _this.FADE_OUT_TOOLTIP_TIMEOUT = 1000;\n _this.state = TooltipStates.NOTHING;\n // when showing the tooltip, we need to make sure it's the most recent instance we request, as due to\n // async we could request two tooltips before the first instance returns, in which case we should\n // disregard the second instance.\n _this.tooltipInstanceCount = 0;\n _this.tooltipMouseTrack = false;\n _this.parentComp = parentComp;\n return _this;\n }\n CustomTooltipFeature.prototype.postConstruct = function () {\n this.tooltipShowDelay = this.gridOptionsWrapper.getTooltipDelay('show') || this.DEFAULT_SHOW_TOOLTIP_DELAY;\n this.tooltipHideDelay = this.gridOptionsWrapper.getTooltipDelay('hide') || this.DEFAULT_HIDE_TOOLTIP_DELAY;\n this.tooltipMouseTrack = this.gridOptionsWrapper.isTooltipMouseTrack();\n var el = this.parentComp.getGui();\n this.addManagedListener(el, 'mouseenter', this.onMouseEnter.bind(this));\n this.addManagedListener(el, 'mouseleave', this.onMouseLeave.bind(this));\n this.addManagedListener(el, 'mousemove', this.onMouseMove.bind(this));\n this.addManagedListener(el, 'mousedown', this.onMouseDown.bind(this));\n this.addManagedListener(el, 'keydown', this.onKeyDown.bind(this));\n };\n CustomTooltipFeature.prototype.destroy = function () {\n // if this component gets destroyed while tooltip is showing, need to make sure\n // we don't end with no mouseLeave event resulting in zombie tooltip\n this.setToDoNothing();\n _super.prototype.destroy.call(this);\n };\n CustomTooltipFeature.prototype.onMouseEnter = function (e) {\n if (isIOSUserAgent()) {\n return;\n }\n // every mouseenter should be following by a mouseleave, however for some unkonwn, it's possible for\n // mouseenter to be called twice in a row, which can happen if editing the cell. this was reported\n // in https://ag-grid.atlassian.net/browse/AG-4422. to get around this, we check the state, and if\n // state is !=nothing, then we know mouseenter was already received.\n if (this.state != TooltipStates.NOTHING) {\n return;\n }\n // if another tooltip was hidden very recently, we only wait 200ms to show, not the normal waiting time\n var delay = this.isLastTooltipHiddenRecently() ? 200 : this.tooltipShowDelay;\n this.showTooltipTimeoutId = window.setTimeout(this.showTooltip.bind(this), delay);\n this.lastMouseEvent = e;\n this.state = TooltipStates.WAITING_TO_SHOW;\n };\n CustomTooltipFeature.prototype.onMouseLeave = function () {\n this.setToDoNothing();\n };\n CustomTooltipFeature.prototype.onKeyDown = function () {\n this.setToDoNothing();\n };\n CustomTooltipFeature.prototype.setToDoNothing = function () {\n if (this.state === TooltipStates.SHOWING) {\n this.hideTooltip();\n }\n this.clearTimeouts();\n this.state = TooltipStates.NOTHING;\n };\n CustomTooltipFeature.prototype.onMouseMove = function (e) {\n // there is a delay from the time we mouseOver a component and the time the\n // tooltip is displayed, so we need to track mousemove to be able to correctly\n // position the tooltip when showTooltip is called.\n this.lastMouseEvent = e;\n if (this.tooltipMouseTrack &&\n this.state === TooltipStates.SHOWING &&\n this.tooltipComp) {\n this.positionTooltipUnderLastMouseEvent();\n }\n };\n CustomTooltipFeature.prototype.onMouseDown = function () {\n this.setToDoNothing();\n };\n CustomTooltipFeature.prototype.hideTooltip = function () {\n // check if comp exists - due to async, although we asked for\n // one, the instance may not be back yet\n if (this.tooltipComp) {\n this.destroyTooltipComp();\n CustomTooltipFeature.lastTooltipHideTime = new Date().getTime();\n }\n this.state = TooltipStates.NOTHING;\n };\n CustomTooltipFeature.prototype.destroyTooltipComp = function () {\n var _this = this;\n // add class to fade out the tooltip\n this.tooltipComp.getGui().classList.add('ag-tooltip-hiding');\n // make local copies of these variables, as we use them in the async function below,\n // and we clear then to 'undefined' later, so need to take a copy before they are undefined.\n var tooltipPopupDestroyFunc = this.tooltipPopupDestroyFunc;\n var tooltipComp = this.tooltipComp;\n window.setTimeout(function () {\n tooltipPopupDestroyFunc();\n _this.getContext().destroyBean(tooltipComp);\n }, this.FADE_OUT_TOOLTIP_TIMEOUT);\n this.tooltipPopupDestroyFunc = undefined;\n this.tooltipComp = undefined;\n };\n CustomTooltipFeature.prototype.isLastTooltipHiddenRecently = function () {\n // return true if <1000ms since last time we hid a tooltip\n var now = new Date().getTime();\n var then = CustomTooltipFeature.lastTooltipHideTime;\n return (now - then) < this.SHOW_QUICK_TOOLTIP_DIFF;\n };\n CustomTooltipFeature.prototype.showTooltip = function () {\n var params = __assign$2({}, this.parentComp.getTooltipParams());\n if (!exists(params.value)) {\n this.setToDoNothing();\n return;\n }\n this.state = TooltipStates.SHOWING;\n this.tooltipInstanceCount++;\n // we pass in tooltipInstanceCount so the callback knows what the count was when\n // we requested the tooltip, so if another tooltip was requested in the mean time\n // we disregard it\n var callback = this.newTooltipComponentCallback.bind(this, this.tooltipInstanceCount);\n var userDetails = this.userComponentFactory.getTooltipCompDetails(params);\n userDetails.newAgStackInstance().then(callback);\n };\n CustomTooltipFeature.prototype.newTooltipComponentCallback = function (tooltipInstanceCopy, tooltipComp) {\n var compNoLongerNeeded = this.state !== TooltipStates.SHOWING || this.tooltipInstanceCount !== tooltipInstanceCopy;\n if (compNoLongerNeeded) {\n this.getContext().destroyBean(tooltipComp);\n return;\n }\n var eGui = tooltipComp.getGui();\n this.tooltipComp = tooltipComp;\n if (!eGui.classList.contains('ag-tooltip')) {\n eGui.classList.add('ag-tooltip-custom');\n }\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var addPopupRes = this.popupService.addPopup({\n eChild: eGui,\n ariaLabel: translate('ariaLabelTooltip', 'Tooltip')\n });\n if (addPopupRes) {\n this.tooltipPopupDestroyFunc = addPopupRes.hideFunc;\n }\n // this.tooltipPopupDestroyFunc = this.popupService.addPopup(false, eGui, false);\n this.positionTooltipUnderLastMouseEvent();\n this.hideTooltipTimeoutId = window.setTimeout(this.hideTooltip.bind(this), this.tooltipHideDelay);\n };\n CustomTooltipFeature.prototype.positionTooltipUnderLastMouseEvent = function () {\n this.popupService.positionPopupUnderMouseEvent({\n type: 'tooltip',\n mouseEvent: this.lastMouseEvent,\n ePopup: this.tooltipComp.getGui(),\n nudgeY: 18\n });\n };\n CustomTooltipFeature.prototype.clearTimeouts = function () {\n if (this.showTooltipTimeoutId) {\n window.clearTimeout(this.showTooltipTimeoutId);\n this.showTooltipTimeoutId = undefined;\n }\n if (this.hideTooltipTimeoutId) {\n window.clearTimeout(this.hideTooltipTimeoutId);\n this.hideTooltipTimeoutId = undefined;\n }\n };\n __decorate$9([\n Autowired('popupService')\n ], CustomTooltipFeature.prototype, \"popupService\", void 0);\n __decorate$9([\n Autowired('userComponentFactory')\n ], CustomTooltipFeature.prototype, \"userComponentFactory\", void 0);\n __decorate$9([\n Autowired('columnApi')\n ], CustomTooltipFeature.prototype, \"columnApi\", void 0);\n __decorate$9([\n Autowired('gridApi')\n ], CustomTooltipFeature.prototype, \"gridApi\", void 0);\n __decorate$9([\n PostConstruct\n ], CustomTooltipFeature.prototype, \"postConstruct\", null);\n return CustomTooltipFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$6 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$a = (undefined && undefined.__decorate) || function (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};\nvar compIdSequence = new NumberSequence();\nvar CssClassManager = /** @class */ (function () {\n function CssClassManager(getGui) {\n // to minimise DOM hits, we only apply CSS classes if they have changed. as adding a CSS class that is already\n // there, or removing one that wasn't present, all takes CPU.\n this.cssClassStates = {};\n this.getGui = getGui;\n }\n CssClassManager.prototype.addCssClass = function (className) {\n var _this = this;\n var list = (className || '').split(' ');\n if (list.length > 1) {\n list.forEach(function (cls) { return _this.addCssClass(cls); });\n return;\n }\n var updateNeeded = this.cssClassStates[className] !== true;\n if (updateNeeded && className.length) {\n this.getGui().classList.add(className);\n this.cssClassStates[className] = true;\n }\n };\n CssClassManager.prototype.removeCssClass = function (className) {\n var _this = this;\n var list = (className || '').split(' ');\n if (list.length > 1) {\n list.forEach(function (cls) { return _this.removeCssClass(cls); });\n return;\n }\n var updateNeeded = this.cssClassStates[className] !== false;\n if (updateNeeded && className.length) {\n this.getGui().classList.remove(className);\n this.cssClassStates[className] = false;\n }\n };\n CssClassManager.prototype.containsCssClass = function (className) {\n return this.getGui().classList.contains(className);\n };\n CssClassManager.prototype.addOrRemoveCssClass = function (className, addOrRemove) {\n var _this = this;\n var list = (className || '').split(' ');\n if (list.length > 1) {\n list.forEach(function (cls) { return _this.addOrRemoveCssClass(cls, addOrRemove); });\n return;\n }\n var updateNeeded = this.cssClassStates[className] !== addOrRemove;\n if (updateNeeded && className.length) {\n this.getGui().classList.toggle(className, addOrRemove);\n this.cssClassStates[className] = addOrRemove;\n }\n };\n return CssClassManager;\n}());\nvar Component = /** @class */ (function (_super) {\n __extends$6(Component, _super);\n function Component(template) {\n var _this = _super.call(this) || this;\n // if false, then CSS class \"ag-hidden\" is applied, which sets \"display: none\"\n _this.displayed = true;\n // if false, then CSS class \"ag-invisible\" is applied, which sets \"visibility: hidden\"\n _this.visible = true;\n // unique id for this row component. this is used for getting a reference to the HTML dom.\n // we cannot use the RowNode id as this is not unique (due to animation, old rows can be lying\n // around as we create a new rowComp instance for the same row node).\n _this.compId = compIdSequence.next();\n _this.cssClassManager = new CssClassManager(function () { return _this.eGui; });\n if (template) {\n _this.setTemplate(template);\n }\n return _this;\n }\n Component.prototype.preConstructOnComponent = function () {\n this.usingBrowserTooltips = this.gridOptionsWrapper.isEnableBrowserTooltips();\n };\n Component.prototype.getCompId = function () {\n return this.compId;\n };\n Component.prototype.getTooltipParams = function () {\n return {\n value: this.tooltipText,\n location: 'UNKNOWN'\n };\n };\n Component.prototype.setTooltip = function (newTooltipText) {\n var _this = this;\n var removeTooltip = function () {\n if (_this.usingBrowserTooltips) {\n _this.getGui().removeAttribute('title');\n }\n else {\n _this.tooltipFeature = _this.destroyBean(_this.tooltipFeature);\n }\n };\n var addTooltip = function () {\n if (_this.usingBrowserTooltips) {\n _this.getGui().setAttribute('title', _this.tooltipText);\n }\n else {\n _this.tooltipFeature = _this.createBean(new CustomTooltipFeature(_this));\n }\n };\n if (this.tooltipText != newTooltipText) {\n if (this.tooltipText) {\n removeTooltip();\n }\n if (newTooltipText != null) {\n this.tooltipText = newTooltipText;\n if (this.tooltipText) {\n addTooltip();\n }\n }\n }\n };\n // for registered components only, eg creates AgCheckbox instance from ag-checkbox HTML tag\n Component.prototype.createChildComponentsFromTags = function (parentNode, paramsMap) {\n var _this = this;\n // we MUST take a copy of the list first, as the 'swapComponentForNode' adds comments into the DOM\n // which messes up the traversal order of the children.\n var childNodeList = copyNodeList(parentNode.childNodes);\n childNodeList.forEach(function (childNode) {\n if (!(childNode instanceof HTMLElement)) {\n return;\n }\n var childComp = _this.createComponentFromElement(childNode, function (childComp) {\n // copy over all attributes, including css classes, so any attributes user put on the tag\n // wll be carried across\n var childGui = childComp.getGui();\n if (childGui) {\n _this.copyAttributesFromNode(childNode, childComp.getGui());\n }\n }, paramsMap);\n if (childComp) {\n if (childComp.addItems && childNode.children.length) {\n _this.createChildComponentsFromTags(childNode, paramsMap);\n // converting from HTMLCollection to Array\n var items = Array.prototype.slice.call(childNode.children);\n childComp.addItems(items);\n }\n // replace the tag (eg ag-checkbox) with the proper HTMLElement (eg 'div') in the dom\n _this.swapComponentForNode(childComp, parentNode, childNode);\n }\n else if (childNode.childNodes) {\n _this.createChildComponentsFromTags(childNode, paramsMap);\n }\n });\n };\n Component.prototype.createComponentFromElement = function (element, afterPreCreateCallback, paramsMap) {\n var key = element.nodeName;\n var componentParams = paramsMap ? paramsMap[element.getAttribute('ref')] : undefined;\n var ComponentClass = this.agStackComponentsRegistry.getComponentClass(key);\n if (ComponentClass) {\n Component.elementGettingCreated = element;\n var newComponent = new ComponentClass(componentParams);\n newComponent.setParentComponent(this);\n this.createBean(newComponent, null, afterPreCreateCallback);\n return newComponent;\n }\n return null;\n };\n Component.prototype.copyAttributesFromNode = function (source, dest) {\n iterateNamedNodeMap(source.attributes, function (name, value) { return dest.setAttribute(name, value); });\n };\n Component.prototype.swapComponentForNode = function (newComponent, parentNode, childNode) {\n var eComponent = newComponent.getGui();\n parentNode.replaceChild(eComponent, childNode);\n parentNode.insertBefore(document.createComment(childNode.nodeName), eComponent);\n this.addDestroyFunc(this.destroyBean.bind(this, newComponent));\n this.swapInComponentForQuerySelectors(newComponent, childNode);\n };\n Component.prototype.swapInComponentForQuerySelectors = function (newComponent, childNode) {\n var thisNoType = this;\n this.iterateOverQuerySelectors(function (querySelector) {\n if (thisNoType[querySelector.attributeName] === childNode) {\n thisNoType[querySelector.attributeName] = newComponent;\n }\n });\n };\n Component.prototype.iterateOverQuerySelectors = function (action) {\n var thisPrototype = Object.getPrototypeOf(this);\n while (thisPrototype != null) {\n var metaData = thisPrototype.__agComponentMetaData;\n var currentProtoName = getFunctionName(thisPrototype.constructor);\n if (metaData && metaData[currentProtoName] && metaData[currentProtoName].querySelectors) {\n metaData[currentProtoName].querySelectors.forEach(function (querySelector) { return action(querySelector); });\n }\n thisPrototype = Object.getPrototypeOf(thisPrototype);\n }\n };\n Component.prototype.setTemplate = function (template, paramsMap) {\n var eGui = loadTemplate(template);\n this.setTemplateFromElement(eGui, paramsMap);\n };\n Component.prototype.setTemplateFromElement = function (element, paramsMap) {\n this.eGui = element;\n this.eGui.__agComponent = this;\n this.wireQuerySelectors();\n // context will not be available when user sets template in constructor\n if (!!this.getContext()) {\n this.createChildComponentsFromTags(this.getGui(), paramsMap);\n }\n };\n Component.prototype.createChildComponentsPreConstruct = function () {\n // ui exists if user sets template in constructor. when this happens, we have to wait for the context\n // to be autoWired first before we can create child components.\n if (!!this.getGui()) {\n this.createChildComponentsFromTags(this.getGui());\n }\n };\n Component.prototype.wireQuerySelectors = function () {\n var _this = this;\n if (!this.eGui) {\n return;\n }\n var thisNoType = this;\n this.iterateOverQuerySelectors(function (querySelector) {\n var setResult = function (result) { return thisNoType[querySelector.attributeName] = result; };\n // if it's a ref selector, and match is on top level component, we return\n // the element. otherwise no way of components putting ref=xxx on the top\n // level element as querySelector only looks at children.\n var topLevelRefMatch = querySelector.refSelector\n && _this.eGui.getAttribute('ref') === querySelector.refSelector;\n if (topLevelRefMatch) {\n setResult(_this.eGui);\n }\n else {\n // otherwise use querySelector, which looks at children\n var resultOfQuery = _this.eGui.querySelector(querySelector.querySelector);\n if (resultOfQuery) {\n setResult(resultOfQuery.__agComponent || resultOfQuery);\n }\n }\n });\n };\n Component.prototype.getGui = function () {\n return this.eGui;\n };\n Component.prototype.getFocusableElement = function () {\n return this.eGui;\n };\n Component.prototype.setParentComponent = function (component) {\n this.parentComponent = component;\n };\n Component.prototype.getParentComponent = function () {\n return this.parentComponent;\n };\n // this method is for older code, that wants to provide the gui element,\n // it is not intended for this to be in ag-Stack\n Component.prototype.setGui = function (eGui) {\n this.eGui = eGui;\n };\n Component.prototype.queryForHtmlElement = function (cssSelector) {\n return this.eGui.querySelector(cssSelector);\n };\n Component.prototype.queryForHtmlInputElement = function (cssSelector) {\n return this.eGui.querySelector(cssSelector);\n };\n Component.prototype.appendChild = function (newChild, container) {\n if (!container) {\n container = this.eGui;\n }\n if (newChild == null) {\n return;\n }\n if (isNodeOrElement(newChild)) {\n container.appendChild(newChild);\n }\n else {\n var childComponent = newChild;\n container.appendChild(childComponent.getGui());\n this.addDestroyFunc(this.destroyBean.bind(this, childComponent));\n }\n };\n Component.prototype.isDisplayed = function () {\n return this.displayed;\n };\n Component.prototype.setVisible = function (visible) {\n if (visible !== this.visible) {\n this.visible = visible;\n setVisible(this.eGui, visible);\n }\n };\n Component.prototype.setDisplayed = function (displayed) {\n if (displayed !== this.displayed) {\n this.displayed = displayed;\n setDisplayed(this.eGui, displayed);\n var event_1 = {\n type: Component.EVENT_DISPLAYED_CHANGED,\n visible: this.displayed\n };\n this.dispatchEvent(event_1);\n }\n };\n Component.prototype.destroy = function () {\n if (this.tooltipFeature) {\n this.tooltipFeature = this.destroyBean(this.tooltipFeature);\n }\n _super.prototype.destroy.call(this);\n };\n Component.prototype.addGuiEventListener = function (event, listener) {\n var _this = this;\n this.eGui.addEventListener(event, listener);\n this.addDestroyFunc(function () { return _this.eGui.removeEventListener(event, listener); });\n };\n Component.prototype.addCssClass = function (className) {\n this.cssClassManager.addCssClass(className);\n };\n Component.prototype.removeCssClass = function (className) {\n this.cssClassManager.removeCssClass(className);\n };\n Component.prototype.containsCssClass = function (className) {\n return this.cssClassManager.containsCssClass(className);\n };\n Component.prototype.addOrRemoveCssClass = function (className, addOrRemove) {\n this.cssClassManager.addOrRemoveCssClass(className, addOrRemove);\n };\n Component.prototype.getAttribute = function (key) {\n var eGui = this.eGui;\n return eGui ? eGui.getAttribute(key) : null;\n };\n Component.prototype.getRefElement = function (refName) {\n return this.queryForHtmlElement(\"[ref=\\\"\" + refName + \"\\\"]\");\n };\n Component.EVENT_DISPLAYED_CHANGED = 'displayedChanged';\n __decorate$a([\n Autowired('agStackComponentsRegistry')\n ], Component.prototype, \"agStackComponentsRegistry\", void 0);\n __decorate$a([\n PreConstruct\n ], Component.prototype, \"preConstructOnComponent\", null);\n __decorate$a([\n PreConstruct\n ], Component.prototype, \"createChildComponentsPreConstruct\", null);\n return Component;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction QuerySelector(selector) {\n return querySelectorFunc.bind(this, selector, undefined);\n}\nfunction RefSelector(ref) {\n return querySelectorFunc.bind(this, \"[ref=\" + ref + \"]\", ref);\n}\nfunction querySelectorFunc(selector, refSelector, classPrototype, methodOrAttributeName, index) {\n if (selector === null) {\n console.error('AG Grid: QuerySelector selector should not be null');\n return;\n }\n if (typeof index === 'number') {\n console.error('AG Grid: QuerySelector should be on an attribute');\n return;\n }\n addToObjectProps(classPrototype, 'querySelectors', {\n attributeName: methodOrAttributeName,\n querySelector: selector,\n refSelector: refSelector\n });\n}\n// // think we should take this out, put property bindings on the\n// export function Method(eventName?: string): Function {\n// return methodFunc.bind(this, eventName);\n// }\n//\n// function methodFunc(alias: string, target: Object, methodName: string) {\n// if (alias === null) {\n// console.error(\"AG Grid: EventListener eventName should not be null\");\n// return;\n// }\n//\n// addToObjectProps(target, 'methods', {\n// methodName: methodName,\n// alias: alias\n// });\n// }\nfunction addToObjectProps(target, key, value) {\n // it's an attribute on the class\n var props = getOrCreateProps$1(target, getFunctionName(target.constructor));\n if (!props[key]) {\n props[key] = [];\n }\n props[key].push(value);\n}\nfunction getOrCreateProps$1(target, instanceName) {\n if (!target.__agComponentMetaData) {\n target.__agComponentMetaData = {};\n }\n if (!target.__agComponentMetaData[instanceName]) {\n target.__agComponentMetaData[instanceName] = {};\n }\n return target.__agComponentMetaData[instanceName];\n}\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$7 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$b = (undefined && undefined.__decorate) || function (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// optional floating filter for user provided filters - instead of providing a floating filter,\n// they can provide a getModelAsString() method on the filter instead. this class just displays\n// the string returned from getModelAsString()\nvar ReadOnlyFloatingFilter = /** @class */ (function (_super) {\n __extends$7(ReadOnlyFloatingFilter, _super);\n function ReadOnlyFloatingFilter() {\n return _super.call(this, /* html */ \"\\n
\\n \\n
\") || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n ReadOnlyFloatingFilter.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n ReadOnlyFloatingFilter.prototype.init = function (params) {\n this.params = params;\n var displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eFloatingFilterText\n .setDisabled(true)\n .setInputAriaLabel(displayName + \" \" + translate('ariaFilterInput', 'Filter Input'));\n };\n ReadOnlyFloatingFilter.prototype.onParentModelChanged = function (parentModel) {\n var _this = this;\n if (!parentModel) {\n this.eFloatingFilterText.setValue('');\n return;\n }\n this.params.parentFilterInstance(function (filterInstance) {\n // it would be nice to check if getModelAsString was present before creating this component,\n // however that is not possible, as React Hooks and VueJS don't attached the methods to the Filter until\n // AFTER the filter is created, not allowing inspection before this (we create floating filters as columns\n // are drawn, but the parent filters are only created when needed).\n if (filterInstance.getModelAsString) {\n var modelAsString = filterInstance.getModelAsString(parentModel);\n _this.eFloatingFilterText.setValue(modelAsString);\n }\n });\n };\n __decorate$b([\n RefSelector('eFloatingFilterText')\n ], ReadOnlyFloatingFilter.prototype, \"eFloatingFilterText\", void 0);\n __decorate$b([\n Autowired('columnModel')\n ], ReadOnlyFloatingFilter.prototype, \"columnModel\", void 0);\n return ReadOnlyFloatingFilter;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n/** Provides sync access to async component. Date component can be lazy created - this class encapsulates\n * this by keeping value locally until DateComp has loaded, then passing DateComp the value. */\nvar DateCompWrapper = /** @class */ (function () {\n function DateCompWrapper(context, userComponentFactory, dateComponentParams, eParent) {\n var _this = this;\n this.alive = true;\n this.context = context;\n this.eParent = eParent;\n var compDetails = userComponentFactory.getDateCompDetails(dateComponentParams);\n var promise = compDetails.newAgStackInstance();\n promise.then(function (dateComp) {\n // because async, check the filter still exists after component comes back\n if (!_this.alive) {\n context.destroyBean(dateComp);\n return;\n }\n _this.dateComp = dateComp;\n if (!dateComp) {\n return;\n }\n eParent.appendChild(dateComp.getGui());\n if (dateComp.afterGuiAttached) {\n dateComp.afterGuiAttached();\n }\n if (_this.tempValue) {\n dateComp.setDate(_this.tempValue);\n }\n if (_this.disabled != null) {\n _this.setDateCompDisabled(_this.disabled);\n }\n });\n }\n DateCompWrapper.prototype.destroy = function () {\n this.alive = false;\n this.dateComp = this.context.destroyBean(this.dateComp);\n };\n DateCompWrapper.prototype.getDate = function () {\n return this.dateComp ? this.dateComp.getDate() : this.tempValue;\n };\n DateCompWrapper.prototype.setDate = function (value) {\n if (this.dateComp) {\n this.dateComp.setDate(value);\n }\n else {\n this.tempValue = value;\n }\n };\n DateCompWrapper.prototype.setDisabled = function (disabled) {\n if (this.dateComp) {\n this.setDateCompDisabled(disabled);\n }\n else {\n this.disabled = disabled;\n }\n };\n DateCompWrapper.prototype.setDisplayed = function (displayed) {\n setDisplayed(this.eParent, displayed);\n };\n DateCompWrapper.prototype.setInputPlaceholder = function (placeholder) {\n if (this.dateComp && this.dateComp.setInputPlaceholder) {\n this.dateComp.setInputPlaceholder(placeholder);\n }\n };\n DateCompWrapper.prototype.setInputAriaLabel = function (label) {\n if (this.dateComp && this.dateComp.setInputAriaLabel) {\n this.dateComp.setInputAriaLabel(label);\n }\n };\n DateCompWrapper.prototype.afterGuiAttached = function (params) {\n if (this.dateComp && typeof this.dateComp.afterGuiAttached === 'function') {\n this.dateComp.afterGuiAttached(params);\n }\n };\n DateCompWrapper.prototype.setDateCompDisabled = function (disabled) {\n if (this.dateComp == null) {\n return;\n }\n if (this.dateComp.setDisabled == null) {\n return;\n }\n this.dateComp.setDisabled(disabled);\n };\n return DateCompWrapper;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __assign$3 = (undefined && undefined.__assign) || function () {\n __assign$3 = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$3.apply(this, arguments);\n};\n/* Common logic for options, used by both filters and floating filters. */\nvar OptionsFactory = /** @class */ (function () {\n function OptionsFactory() {\n this.customFilterOptions = {};\n }\n OptionsFactory.prototype.init = function (params, defaultOptions) {\n this.filterOptions = params.filterOptions || defaultOptions;\n this.mapCustomOptions();\n this.selectDefaultItem(params);\n this.checkForDeprecatedParams();\n };\n OptionsFactory.prototype.checkForDeprecatedParams = function () {\n if (this.filterOptions.some(function (opt) { return typeof opt != 'string' && opt.test != null; })) {\n console.warn(\"AG Grid: [IFilterOptionDef] since v26.2.0, test() has been replaced with predicate().\");\n }\n if (this.filterOptions.some(function (opt) { return typeof opt != 'string' && opt.hideFilterInput != null; })) {\n console.warn(\"AG Grid: [IFilterOptionDef] since v26.2.0, useOfHideFilterInput has been replaced with numberOfInputs.\");\n }\n };\n OptionsFactory.prototype.getFilterOptions = function () {\n return this.filterOptions;\n };\n OptionsFactory.prototype.mapCustomOptions = function () {\n var _this = this;\n if (!this.filterOptions) {\n return;\n }\n this.filterOptions.forEach(function (filterOption) {\n if (typeof filterOption === 'string') {\n return;\n }\n var requiredProperties = [['displayKey'], ['displayName'], ['predicate', 'test']];\n var propertyCheck = function (keys) {\n if (!keys.some(function (key) { return filterOption[key] != null; })) {\n console.warn(\"AG Grid: ignoring FilterOptionDef as it doesn't contain one of '\" + keys + \"'\");\n return false;\n }\n return true;\n };\n if (!requiredProperties.every(propertyCheck)) {\n _this.filterOptions = _this.filterOptions.filter(function (v) { return v === filterOption; }) || [];\n return;\n }\n var test = filterOption.test;\n var mutatedFilterOptions = __assign$3({}, filterOption);\n if (test != null && filterOption.predicate == null) {\n mutatedFilterOptions.predicate = function (v, cv) { return test(v[0], cv); };\n delete mutatedFilterOptions.test;\n }\n if (mutatedFilterOptions.hideFilterInput && mutatedFilterOptions.numberOfInputs == null) {\n mutatedFilterOptions.numberOfInputs = 0;\n delete mutatedFilterOptions.hideFilterInput;\n }\n _this.customFilterOptions[filterOption.displayKey] = mutatedFilterOptions;\n });\n };\n OptionsFactory.prototype.selectDefaultItem = function (params) {\n if (params.defaultOption) {\n this.defaultOption = params.defaultOption;\n }\n else if (this.filterOptions.length >= 1) {\n var firstFilterOption = this.filterOptions[0];\n if (typeof firstFilterOption === 'string') {\n this.defaultOption = firstFilterOption;\n }\n else if (firstFilterOption.displayKey) {\n this.defaultOption = firstFilterOption.displayKey;\n }\n else {\n console.warn(\"AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'\");\n }\n }\n else {\n console.warn('AG Grid: no filter options for filter');\n }\n };\n OptionsFactory.prototype.getDefaultOption = function () {\n return this.defaultOption;\n };\n OptionsFactory.prototype.getCustomOption = function (name) {\n return this.customFilterOptions[name];\n };\n return OptionsFactory;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar DEFAULT_FILTER_LOCALE_TEXT = {\n applyFilter: 'Apply',\n clearFilter: 'Clear',\n resetFilter: 'Reset',\n cancelFilter: 'Cancel',\n textFilter: 'Text Filter',\n numberFilter: 'Number Filter',\n dateFilter: 'Date Filter',\n setFilter: 'Set Filter',\n filterOoo: 'Filter...',\n empty: 'Choose One',\n equals: 'Equals',\n notEqual: 'Not equal',\n lessThan: 'Less than',\n greaterThan: 'Greater than',\n inRange: 'In range',\n inRangeStart: 'From',\n inRangeEnd: 'To',\n lessThanOrEqual: 'Less than or equals',\n greaterThanOrEqual: 'Greater than or equals',\n contains: 'Contains',\n notContains: 'Not contains',\n startsWith: 'Starts with',\n endsWith: 'Ends with',\n blank: 'Blank',\n notBlank: 'Not blank',\n andCondition: 'AND',\n orCondition: 'OR',\n dateFormatOoo: 'yyyy-mm-dd',\n};\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar KeyCode = /** @class */ (function () {\n function KeyCode() {\n }\n KeyCode.BACKSPACE = 'Backspace';\n KeyCode.TAB = 'Tab';\n KeyCode.ENTER = 'Enter';\n KeyCode.ESCAPE = 'Escape';\n KeyCode.SPACE = ' ';\n KeyCode.LEFT = 'ArrowLeft';\n KeyCode.UP = 'ArrowUp';\n KeyCode.RIGHT = 'ArrowRight';\n KeyCode.DOWN = 'ArrowDown';\n KeyCode.DELETE = 'Delete';\n KeyCode.F2 = 'F2';\n KeyCode.PAGE_UP = 'PageUp';\n KeyCode.PAGE_DOWN = 'PageDown';\n KeyCode.PAGE_HOME = 'Home';\n KeyCode.PAGE_END = 'End';\n // these should be used with `event.code` instead of `event.key`\n // as `event.key` changes when non-latin keyboards are used\n KeyCode.A = 'KeyA';\n KeyCode.C = 'KeyC';\n KeyCode.V = 'KeyV';\n KeyCode.D = 'KeyD';\n KeyCode.Z = 'KeyZ';\n KeyCode.Y = 'KeyY';\n return KeyCode;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$8 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$4 = (undefined && undefined.__assign) || function () {\n __assign$4 = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$4.apply(this, arguments);\n};\nvar __decorate$c = (undefined && undefined.__decorate) || function (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};\nvar ManagedFocusFeature = /** @class */ (function (_super) {\n __extends$8(ManagedFocusFeature, _super);\n function ManagedFocusFeature(eFocusableElement, callbacks) {\n if (callbacks === void 0) { callbacks = {}; }\n var _this = _super.call(this) || this;\n _this.eFocusableElement = eFocusableElement;\n _this.callbacks = callbacks;\n _this.callbacks = __assign$4({ shouldStopEventPropagation: function () { return false; }, onTabKeyDown: function (e) {\n if (e.defaultPrevented) {\n return;\n }\n var nextRoot = _this.focusService.findNextFocusableElement(_this.eFocusableElement, false, e.shiftKey);\n if (!nextRoot) {\n return;\n }\n nextRoot.focus();\n e.preventDefault();\n } }, callbacks);\n return _this;\n }\n ManagedFocusFeature.prototype.postConstruct = function () {\n this.eFocusableElement.classList.add(ManagedFocusFeature.FOCUS_MANAGED_CLASS);\n this.addKeyDownListeners(this.eFocusableElement);\n if (this.callbacks.onFocusIn) {\n this.addManagedListener(this.eFocusableElement, 'focusin', this.callbacks.onFocusIn);\n }\n if (this.callbacks.onFocusOut) {\n this.addManagedListener(this.eFocusableElement, 'focusout', this.callbacks.onFocusOut);\n }\n };\n ManagedFocusFeature.prototype.addKeyDownListeners = function (eGui) {\n var _this = this;\n this.addManagedListener(eGui, 'keydown', function (e) {\n if (e.defaultPrevented || isStopPropagationForAgGrid(e)) {\n return;\n }\n if (_this.callbacks.shouldStopEventPropagation(e)) {\n stopPropagationForAgGrid(e);\n return;\n }\n if (e.key === KeyCode.TAB) {\n _this.callbacks.onTabKeyDown(e);\n }\n else if (_this.callbacks.handleKeyDown) {\n _this.callbacks.handleKeyDown(e);\n }\n });\n };\n ManagedFocusFeature.FOCUS_MANAGED_CLASS = 'ag-focus-managed';\n __decorate$c([\n Autowired('focusService')\n ], ManagedFocusFeature.prototype, \"focusService\", void 0);\n __decorate$c([\n PostConstruct\n ], ManagedFocusFeature.prototype, \"postConstruct\", null);\n return ManagedFocusFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$9 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$d = (undefined && undefined.__decorate) || function (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/**\n * Contains common logic to all provided filters (apply button, clear button, etc).\n * All the filters that come with AG Grid extend this class. User filters do not\n * extend this class.\n *\n * @param M type of filter-model managed by the concrete sub-class that extends this type\n * @param V type of value managed by the concrete sub-class that extends this type\n */\nvar ProvidedFilter = /** @class */ (function (_super) {\n __extends$9(ProvidedFilter, _super);\n function ProvidedFilter(filterNameKey) {\n var _this = _super.call(this) || this;\n _this.filterNameKey = filterNameKey;\n _this.applyActive = false;\n _this.hidePopup = null;\n // after the user hits 'apply' the model gets copied to here. this is then the model that we use for\n // all filtering. so if user changes UI but doesn't hit apply, then the UI will be out of sync with this model.\n // this is what we want, as the UI should only become the 'active' filter once it's applied. when apply is\n // inactive, this model will be in sync (following the debounce ms). if the UI is not a valid filter\n // (eg the value is missing so nothing to filter on, or for set filter all checkboxes are checked so filter\n // not active) then this appliedModel will be null/undefined.\n _this.appliedModel = null;\n return _this;\n }\n ProvidedFilter.prototype.postConstruct = function () {\n this.resetTemplate(); // do this first to create the DOM\n this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(), {\n handleKeyDown: this.handleKeyDown.bind(this)\n }));\n };\n // override\n ProvidedFilter.prototype.handleKeyDown = function (e) { };\n ProvidedFilter.prototype.getFilterTitle = function () {\n return this.translate(this.filterNameKey);\n };\n ProvidedFilter.prototype.isFilterActive = function () {\n // filter is active if we have a valid applied model\n return !!this.appliedModel;\n };\n ProvidedFilter.prototype.resetTemplate = function (paramsMap) {\n var templateString = /* html */ \"\\n
\\n
\\n \" + this.createBodyTemplate() + \"\\n
\\n
\";\n this.setTemplate(templateString, paramsMap);\n };\n ProvidedFilter.prototype.isReadOnly = function () {\n return !!this.providedFilterParams.readOnly;\n };\n ProvidedFilter.prototype.init = function (params) {\n var _this = this;\n this.setParams(params);\n this.resetUiToDefaults(true).then(function () {\n _this.updateUiVisibility();\n _this.setupOnBtApplyDebounce();\n });\n };\n ProvidedFilter.prototype.setParams = function (params) {\n this.providedFilterParams = params;\n this.applyActive = ProvidedFilter.isUseApplyButton(params);\n this.createButtonPanel();\n };\n ProvidedFilter.prototype.createButtonPanel = function () {\n var _this = this;\n var buttons = this.providedFilterParams.buttons;\n if (!buttons || buttons.length < 1 || this.isReadOnly()) {\n return;\n }\n var eButtonsPanel = document.createElement('div');\n eButtonsPanel.classList.add('ag-filter-apply-panel');\n var addButton = function (type) {\n var text;\n var clickListener;\n switch (type) {\n case 'apply':\n text = _this.translate('applyFilter');\n clickListener = function (e) { return _this.onBtApply(false, false, e); };\n break;\n case 'clear':\n text = _this.translate('clearFilter');\n clickListener = function () { return _this.onBtClear(); };\n break;\n case 'reset':\n text = _this.translate('resetFilter');\n clickListener = function () { return _this.onBtReset(); };\n break;\n case 'cancel':\n text = _this.translate('cancelFilter');\n clickListener = function (e) { _this.onBtCancel(e); };\n break;\n default:\n console.warn('AG Grid: Unknown button type specified');\n return;\n }\n var button = loadTemplate(\n /* html */\n \"\" + text + \"\\n \");\n eButtonsPanel.appendChild(button);\n _this.addManagedListener(button, 'click', clickListener);\n };\n convertToSet(buttons).forEach(function (type) { return addButton(type); });\n this.getGui().appendChild(eButtonsPanel);\n };\n // subclasses can override this to provide alternative debounce defaults\n ProvidedFilter.prototype.getDefaultDebounceMs = function () {\n return 0;\n };\n ProvidedFilter.prototype.setupOnBtApplyDebounce = function () {\n var debounceMs = ProvidedFilter.getDebounceMs(this.providedFilterParams, this.getDefaultDebounceMs());\n this.onBtApplyDebounce = debounce(this.onBtApply.bind(this), debounceMs);\n };\n ProvidedFilter.prototype.getModel = function () {\n return this.appliedModel ? this.appliedModel : null;\n };\n ProvidedFilter.prototype.setModel = function (model) {\n var _this = this;\n var promise = model != null ? this.setModelIntoUi(model) : this.resetUiToDefaults();\n return promise.then(function () {\n _this.updateUiVisibility();\n // we set the model from the GUI, rather than the provided model,\n // so the model is consistent, e.g. handling of null/undefined will be the same,\n // or if model is case insensitive, then casing is removed.\n _this.applyModel();\n });\n };\n ProvidedFilter.prototype.onBtCancel = function (e) {\n var _this = this;\n var currentModel = this.getModel();\n var afterAppliedFunc = function () {\n _this.onUiChanged(false, 'prevent');\n if (_this.providedFilterParams.closeOnApply) {\n _this.close(e);\n }\n };\n if (currentModel != null) {\n this.setModelIntoUi(currentModel).then(afterAppliedFunc);\n }\n else {\n this.resetUiToDefaults().then(afterAppliedFunc);\n }\n };\n ProvidedFilter.prototype.onBtClear = function () {\n var _this = this;\n this.resetUiToDefaults().then(function () { return _this.onUiChanged(); });\n };\n ProvidedFilter.prototype.onBtReset = function () {\n this.onBtClear();\n this.onBtApply();\n };\n /**\n * Applies changes made in the UI to the filter, and returns true if the model has changed.\n */\n ProvidedFilter.prototype.applyModel = function () {\n var newModel = this.getModelFromUi();\n if (!this.isModelValid(newModel)) {\n return false;\n }\n var previousModel = this.appliedModel;\n this.appliedModel = newModel;\n // models can be same if user pasted same content into text field, or maybe just changed the case\n // and it's a case insensitive filter\n return !this.areModelsEqual(previousModel, newModel);\n };\n ProvidedFilter.prototype.isModelValid = function (model) {\n return true;\n };\n ProvidedFilter.prototype.onBtApply = function (afterFloatingFilter, afterDataChange, e) {\n if (afterFloatingFilter === void 0) { afterFloatingFilter = false; }\n if (afterDataChange === void 0) { afterDataChange = false; }\n if (this.applyModel()) {\n // the floating filter uses 'afterFloatingFilter' info, so it doesn't refresh after filter changed if change\n // came from floating filter\n this.providedFilterParams.filterChangedCallback({ afterFloatingFilter: afterFloatingFilter, afterDataChange: afterDataChange });\n }\n var closeOnApply = this.providedFilterParams.closeOnApply;\n // only close if an apply button is visible, otherwise we'd be closing every time a change was made!\n if (closeOnApply && this.applyActive && !afterFloatingFilter && !afterDataChange) {\n this.close(e);\n }\n };\n ProvidedFilter.prototype.onNewRowsLoaded = function () {\n };\n ProvidedFilter.prototype.close = function (e) {\n if (!this.hidePopup) {\n return;\n }\n var keyboardEvent = e;\n var key = keyboardEvent && keyboardEvent.key;\n var params;\n if (key === 'Enter' || key === 'Space') {\n params = { keyboardEvent: keyboardEvent };\n }\n this.hidePopup(params);\n this.hidePopup = null;\n };\n /**\n * By default, if the change came from a floating filter it will be applied immediately, otherwise if there is no\n * apply button it will be applied after a debounce, otherwise it will not be applied at all. This behaviour can\n * be adjusted by using the apply parameter.\n */\n ProvidedFilter.prototype.onUiChanged = function (fromFloatingFilter, apply) {\n if (fromFloatingFilter === void 0) { fromFloatingFilter = false; }\n this.updateUiVisibility();\n this.providedFilterParams.filterModifiedCallback();\n if (this.applyActive && !this.isReadOnly) {\n var isValid = this.isModelValid(this.getModelFromUi());\n setDisabled(this.getRefElement('applyFilterButton'), !isValid);\n }\n if ((fromFloatingFilter && !apply) || apply === 'immediately') {\n this.onBtApply(fromFloatingFilter);\n }\n else if ((!this.applyActive && !apply) || apply === 'debounce') {\n this.onBtApplyDebounce();\n }\n };\n ProvidedFilter.prototype.afterGuiAttached = function (params) {\n if (params == null) {\n return;\n }\n this.hidePopup = params.hidePopup;\n };\n // static, as used by floating filter also\n ProvidedFilter.getDebounceMs = function (params, debounceDefault) {\n if (ProvidedFilter.isUseApplyButton(params)) {\n if (params.debounceMs != null) {\n console.warn('AG Grid: debounceMs is ignored when apply button is present');\n }\n return 0;\n }\n return params.debounceMs != null ? params.debounceMs : debounceDefault;\n };\n // static, as used by floating filter also\n ProvidedFilter.isUseApplyButton = function (params) {\n return !!params.buttons && params.buttons.indexOf('apply') >= 0;\n };\n ProvidedFilter.prototype.destroy = function () {\n this.hidePopup = null;\n _super.prototype.destroy.call(this);\n };\n ProvidedFilter.prototype.translate = function (key) {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n return translate(key, DEFAULT_FILTER_LOCALE_TEXT[key]);\n };\n ProvidedFilter.prototype.getCellValue = function (rowNode) {\n var _a = this.providedFilterParams, api = _a.api, colDef = _a.colDef, column = _a.column, columnApi = _a.columnApi, context = _a.context;\n return this.providedFilterParams.valueGetter({\n api: api,\n colDef: colDef,\n column: column,\n columnApi: columnApi,\n context: context,\n data: rowNode.data,\n getValue: function (field) { return rowNode.data[field]; },\n node: rowNode,\n });\n };\n __decorate$d([\n Autowired('rowModel')\n ], ProvidedFilter.prototype, \"rowModel\", void 0);\n __decorate$d([\n Autowired('valueService')\n ], ProvidedFilter.prototype, \"valueService\", void 0);\n __decorate$d([\n PostConstruct\n ], ProvidedFilter.prototype, \"postConstruct\", null);\n return ProvidedFilter;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$a = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$e = (undefined && undefined.__decorate) || function (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};\nvar AgAbstractLabel = /** @class */ (function (_super) {\n __extends$a(AgAbstractLabel, _super);\n function AgAbstractLabel(config, template) {\n var _this = _super.call(this, template) || this;\n _this.labelSeparator = '';\n _this.labelAlignment = 'left';\n _this.label = '';\n _this.config = config || {};\n return _this;\n }\n AgAbstractLabel.prototype.postConstruct = function () {\n this.addCssClass('ag-labeled');\n this.eLabel.classList.add('ag-label');\n var _a = this.config, labelSeparator = _a.labelSeparator, label = _a.label, labelWidth = _a.labelWidth, labelAlignment = _a.labelAlignment;\n if (labelSeparator != null) {\n this.setLabelSeparator(labelSeparator);\n }\n if (label != null) {\n this.setLabel(label);\n }\n if (labelWidth != null) {\n this.setLabelWidth(labelWidth);\n }\n this.setLabelAlignment(labelAlignment || this.labelAlignment);\n this.refreshLabel();\n };\n AgAbstractLabel.prototype.refreshLabel = function () {\n clearElement(this.eLabel);\n if (typeof this.label === 'string') {\n this.eLabel.innerText = this.label + this.labelSeparator;\n }\n else if (this.label) {\n this.eLabel.appendChild(this.label);\n }\n if (this.label === '') {\n this.eLabel.classList.add('ag-hidden');\n setAriaRole(this.eLabel, 'presentation');\n }\n else {\n this.eLabel.classList.remove('ag-hidden');\n setAriaRole(this.eLabel, null);\n }\n };\n AgAbstractLabel.prototype.setLabelSeparator = function (labelSeparator) {\n if (this.labelSeparator === labelSeparator) {\n return this;\n }\n this.labelSeparator = labelSeparator;\n if (this.label != null) {\n this.refreshLabel();\n }\n return this;\n };\n AgAbstractLabel.prototype.getLabelId = function () {\n this.eLabel.id = this.eLabel.id || \"ag-\" + this.getCompId() + \"-label\";\n return this.eLabel.id;\n };\n AgAbstractLabel.prototype.getLabel = function () {\n return this.label;\n };\n AgAbstractLabel.prototype.setLabel = function (label) {\n if (this.label === label) {\n return this;\n }\n this.label = label;\n this.refreshLabel();\n return this;\n };\n AgAbstractLabel.prototype.setLabelAlignment = function (alignment) {\n var eGui = this.getGui();\n var eGuiClassList = eGui.classList;\n eGuiClassList.toggle('ag-label-align-left', alignment === 'left');\n eGuiClassList.toggle('ag-label-align-right', alignment === 'right');\n eGuiClassList.toggle('ag-label-align-top', alignment === 'top');\n return this;\n };\n AgAbstractLabel.prototype.setLabelWidth = function (width) {\n if (this.label == null) {\n return this;\n }\n setElementWidth(this.eLabel, width);\n return this;\n };\n __decorate$e([\n PostConstruct\n ], AgAbstractLabel.prototype, \"postConstruct\", null);\n return AgAbstractLabel;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$b = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgAbstractField = /** @class */ (function (_super) {\n __extends$b(AgAbstractField, _super);\n function AgAbstractField(config, template, className) {\n var _this = _super.call(this, config, template) || this;\n _this.className = className;\n _this.disabled = false;\n return _this;\n }\n AgAbstractField.prototype.postConstruct = function () {\n _super.prototype.postConstruct.call(this);\n if (this.className) {\n this.addCssClass(this.className);\n }\n };\n AgAbstractField.prototype.onValueChange = function (callbackFn) {\n var _this = this;\n this.addManagedListener(this, AgAbstractField.EVENT_CHANGED, function () { return callbackFn(_this.getValue()); });\n return this;\n };\n AgAbstractField.prototype.getWidth = function () {\n return this.getGui().clientWidth;\n };\n AgAbstractField.prototype.setWidth = function (width) {\n setFixedWidth(this.getGui(), width);\n return this;\n };\n AgAbstractField.prototype.getPreviousValue = function () {\n return this.previousValue;\n };\n AgAbstractField.prototype.getValue = function () {\n return this.value;\n };\n AgAbstractField.prototype.setValue = function (value, silent) {\n if (this.value === value) {\n return this;\n }\n this.previousValue = this.value;\n this.value = value;\n if (!silent) {\n this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });\n }\n return this;\n };\n AgAbstractField.prototype.setDisabled = function (disabled) {\n disabled = !!disabled;\n var element = this.getGui();\n setDisabled(element, disabled);\n element.classList.toggle('ag-disabled', disabled);\n this.disabled = disabled;\n return this;\n };\n AgAbstractField.prototype.isDisabled = function () {\n return !!this.disabled;\n };\n AgAbstractField.EVENT_CHANGED = 'valueChange';\n return AgAbstractField;\n}(AgAbstractLabel));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$c = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$f = (undefined && undefined.__decorate) || function (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};\nvar AgPickerField = /** @class */ (function (_super) {\n __extends$c(AgPickerField, _super);\n function AgPickerField(config, className, pickerIcon, ariaRole) {\n var _this = _super.call(this, config, \n /* html */ \"
\\n
\\n
\\n
\\n
\\n
\\n
\", className) || this;\n _this.pickerIcon = pickerIcon;\n _this.isPickerDisplayed = false;\n _this.isDestroyingPicker = false;\n _this.skipClick = false;\n return _this;\n }\n AgPickerField.prototype.postConstruct = function () {\n var _this = this;\n _super.prototype.postConstruct.call(this);\n var displayId = this.getCompId() + \"-display\";\n this.eDisplayField.setAttribute('id', displayId);\n setAriaDescribedBy(this.eWrapper, displayId);\n var clickHandler = function () {\n if (_this.skipClick) {\n _this.skipClick = false;\n return;\n }\n if (_this.isDisabled()) {\n return;\n }\n _this.pickerComponent = _this.showPicker();\n };\n var eGui = this.getGui();\n this.addManagedListener(eGui, 'mousedown', function (e) {\n if (!_this.skipClick &&\n _this.pickerComponent &&\n _this.pickerComponent.isAlive() &&\n isVisible(_this.pickerComponent.getGui()) &&\n eGui.contains(e.target)) {\n _this.skipClick = true;\n }\n });\n this.addManagedListener(eGui, 'keydown', function (e) {\n switch (e.key) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n case KeyCode.ENTER:\n case KeyCode.SPACE:\n clickHandler();\n case KeyCode.ESCAPE:\n if (_this.isPickerDisplayed) {\n e.preventDefault();\n }\n break;\n }\n });\n this.addManagedListener(this.eWrapper, 'click', clickHandler);\n this.addManagedListener(this.eLabel, 'click', clickHandler);\n if (this.pickerIcon) {\n var icon = createIconNoSpan(this.pickerIcon, this.gridOptionsWrapper);\n if (icon) {\n this.eIcon.appendChild(icon);\n }\n }\n };\n AgPickerField.prototype.refreshLabel = function () {\n if (exists(this.getLabel())) {\n setAriaLabelledBy(this.eWrapper, this.getLabelId());\n }\n else {\n this.eWrapper.removeAttribute('aria-labelledby');\n }\n _super.prototype.refreshLabel.call(this);\n };\n AgPickerField.prototype.setAriaLabel = function (label) {\n setAriaLabel(this.eWrapper, label);\n return this;\n };\n AgPickerField.prototype.setInputWidth = function (width) {\n setElementWidth(this.eWrapper, width);\n return this;\n };\n AgPickerField.prototype.getFocusableElement = function () {\n return this.eWrapper;\n };\n __decorate$f([\n RefSelector('eLabel')\n ], AgPickerField.prototype, \"eLabel\", void 0);\n __decorate$f([\n RefSelector('eWrapper')\n ], AgPickerField.prototype, \"eWrapper\", void 0);\n __decorate$f([\n RefSelector('eDisplayField')\n ], AgPickerField.prototype, \"eDisplayField\", void 0);\n __decorate$f([\n RefSelector('eIcon')\n ], AgPickerField.prototype, \"eIcon\", void 0);\n return AgPickerField;\n}(AgAbstractField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$d = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$g = (undefined && undefined.__decorate) || function (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};\nvar AgList = /** @class */ (function (_super) {\n __extends$d(AgList, _super);\n function AgList(cssIdentifier) {\n if (cssIdentifier === void 0) { cssIdentifier = 'default'; }\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.cssIdentifier = cssIdentifier;\n _this.options = [];\n _this.itemEls = [];\n return _this;\n }\n AgList.prototype.init = function () {\n this.addManagedListener(this.getGui(), 'keydown', this.handleKeyDown.bind(this));\n };\n AgList.prototype.handleKeyDown = function (e) {\n var key = e.key;\n switch (key) {\n case KeyCode.ENTER:\n if (!this.highlightedEl) {\n this.setValue(this.getValue());\n }\n else {\n var pos = this.itemEls.indexOf(this.highlightedEl);\n this.setValueByIndex(pos);\n }\n break;\n case KeyCode.DOWN:\n case KeyCode.UP:\n var isDown = key === KeyCode.DOWN;\n var itemToHighlight = void 0;\n e.preventDefault();\n if (!this.highlightedEl) {\n itemToHighlight = this.itemEls[isDown ? 0 : this.itemEls.length - 1];\n }\n else {\n var currentIdx = this.itemEls.indexOf(this.highlightedEl);\n var nextPos = currentIdx + (isDown ? 1 : -1);\n nextPos = Math.min(Math.max(nextPos, 0), this.itemEls.length - 1);\n itemToHighlight = this.itemEls[nextPos];\n }\n this.highlightItem(itemToHighlight);\n break;\n }\n };\n AgList.prototype.addOptions = function (listOptions) {\n var _this = this;\n listOptions.forEach(function (listOption) { return _this.addOption(listOption); });\n return this;\n };\n AgList.prototype.addOption = function (listOption) {\n var value = listOption.value, text = listOption.text;\n var sanitisedText = escapeString(text || value);\n this.options.push({ value: value, text: sanitisedText });\n this.renderOption(value, sanitisedText);\n this.updateIndices();\n return this;\n };\n AgList.prototype.updateIndices = function () {\n var options = this.getGui().querySelectorAll('.ag-list-item');\n options.forEach(function (option, idx) {\n setAriaPosInSet(option, idx + 1);\n setAriaSetSize(option, options.length);\n });\n };\n AgList.prototype.renderOption = function (value, text) {\n var _this = this;\n var itemEl = document.createElement('div');\n setAriaRole(itemEl, 'option');\n itemEl.classList.add('ag-list-item', \"ag-\" + this.cssIdentifier + \"-list-item\");\n itemEl.innerHTML = \"\" + text + \"\";\n itemEl.tabIndex = -1;\n this.itemEls.push(itemEl);\n this.addManagedListener(itemEl, 'mouseover', function () { return _this.highlightItem(itemEl); });\n this.addManagedListener(itemEl, 'mouseleave', function () { return _this.clearHighlighted(); });\n this.addManagedListener(itemEl, 'click', function () { return _this.setValue(value); });\n this.getGui().appendChild(itemEl);\n };\n AgList.prototype.setValue = function (value, silent) {\n if (this.value === value) {\n this.fireItemSelected();\n return this;\n }\n if (value == null) {\n this.reset();\n return this;\n }\n var idx = this.options.findIndex(function (option) { return option.value === value; });\n if (idx !== -1) {\n var option = this.options[idx];\n this.value = option.value;\n this.displayValue = option.text != null ? option.text : option.value;\n this.highlightItem(this.itemEls[idx]);\n if (!silent) {\n this.fireChangeEvent();\n }\n }\n return this;\n };\n AgList.prototype.setValueByIndex = function (idx) {\n return this.setValue(this.options[idx].value);\n };\n AgList.prototype.getValue = function () {\n return this.value;\n };\n AgList.prototype.getDisplayValue = function () {\n return this.displayValue;\n };\n AgList.prototype.refreshHighlighted = function () {\n var _this = this;\n this.clearHighlighted();\n var idx = this.options.findIndex(function (option) { return option.value === _this.value; });\n if (idx !== -1) {\n this.highlightItem(this.itemEls[idx]);\n }\n };\n AgList.prototype.reset = function () {\n this.value = null;\n this.displayValue = null;\n this.clearHighlighted();\n this.fireChangeEvent();\n };\n AgList.prototype.highlightItem = function (el) {\n if (!el.offsetParent) {\n return;\n }\n this.clearHighlighted();\n this.highlightedEl = el;\n this.highlightedEl.classList.add(AgList.ACTIVE_CLASS);\n setAriaSelected(this.highlightedEl, true);\n this.highlightedEl.focus();\n };\n AgList.prototype.clearHighlighted = function () {\n if (!this.highlightedEl || !this.highlightedEl.offsetParent) {\n return;\n }\n this.highlightedEl.classList.remove(AgList.ACTIVE_CLASS);\n setAriaSelected(this.highlightedEl, false);\n this.highlightedEl = null;\n };\n AgList.prototype.fireChangeEvent = function () {\n this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });\n this.fireItemSelected();\n };\n AgList.prototype.fireItemSelected = function () {\n this.dispatchEvent({ type: AgList.EVENT_ITEM_SELECTED });\n };\n AgList.EVENT_ITEM_SELECTED = 'selectedItem';\n AgList.ACTIVE_CLASS = 'ag-active-item';\n __decorate$g([\n PostConstruct\n ], AgList.prototype, \"init\", null);\n return AgList;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$e = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$h = (undefined && undefined.__decorate) || function (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};\nvar AgSelect = /** @class */ (function (_super) {\n __extends$e(AgSelect, _super);\n function AgSelect(config) {\n return _super.call(this, config, 'ag-select', 'smallDown', 'listbox') || this;\n }\n AgSelect.prototype.init = function () {\n var _this = this;\n this.listComponent = this.createBean(new AgList('select'));\n this.listComponent.setParentComponent(this);\n this.eWrapper.tabIndex = 0;\n this.listComponent.addManagedListener(this.listComponent, AgList.EVENT_ITEM_SELECTED, function () { if (_this.hideList) {\n _this.hideList();\n } });\n this.listComponent.addManagedListener(this.listComponent, AgAbstractField.EVENT_CHANGED, function () {\n _this.setValue(_this.listComponent.getValue(), false, true);\n if (_this.hideList) {\n _this.hideList();\n }\n });\n };\n AgSelect.prototype.showPicker = function () {\n var _this = this;\n var listGui = this.listComponent.getGui();\n var eDocument = this.gridOptionsWrapper.getDocument();\n var destroyMouseWheelFunc = this.addManagedListener(eDocument.body, 'wheel', function (e) {\n if (!listGui.contains(e.target) && _this.hideList) {\n _this.hideList();\n }\n });\n var destroyFocusOutFunc = this.addManagedListener(listGui, 'focusout', function (e) {\n if (!listGui.contains(e.relatedTarget) && _this.hideList) {\n _this.hideList();\n }\n });\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: listGui,\n closeOnEsc: true,\n closedCallback: function () {\n _this.hideList = null;\n _this.isPickerDisplayed = false;\n destroyFocusOutFunc();\n destroyMouseWheelFunc();\n if (_this.isAlive()) {\n setAriaExpanded(_this.eWrapper, false);\n _this.getFocusableElement().focus();\n }\n },\n ariaLabel: translate('ariaLabelSelectField', 'Select Field')\n });\n if (addPopupRes) {\n this.hideList = addPopupRes.hideFunc;\n }\n this.isPickerDisplayed = true;\n setElementWidth(listGui, getAbsoluteWidth(this.eWrapper));\n setAriaExpanded(this.eWrapper, true);\n listGui.style.maxHeight = getInnerHeight(this.popupService.getPopupParent()) + 'px';\n listGui.style.position = 'absolute';\n this.popupService.positionPopupUnderComponent({\n type: 'ag-list',\n eventSource: this.eWrapper,\n ePopup: listGui,\n keepWithinBounds: true\n });\n this.listComponent.refreshHighlighted();\n return this.listComponent;\n };\n AgSelect.prototype.addOptions = function (options) {\n var _this = this;\n options.forEach(function (option) { return _this.addOption(option); });\n return this;\n };\n AgSelect.prototype.addOption = function (option) {\n this.listComponent.addOption(option);\n return this;\n };\n AgSelect.prototype.setValue = function (value, silent, fromPicker) {\n if (this.value === value) {\n return this;\n }\n if (!fromPicker) {\n this.listComponent.setValue(value, true);\n }\n var newValue = this.listComponent.getValue();\n if (newValue === this.getValue()) {\n return this;\n }\n this.eDisplayField.innerHTML = this.listComponent.getDisplayValue();\n return _super.prototype.setValue.call(this, value, silent);\n };\n AgSelect.prototype.destroy = function () {\n if (this.hideList) {\n this.hideList();\n }\n this.destroyBean(this.listComponent);\n _super.prototype.destroy.call(this);\n };\n __decorate$h([\n Autowired('popupService')\n ], AgSelect.prototype, \"popupService\", void 0);\n __decorate$h([\n PostConstruct\n ], AgSelect.prototype, \"init\", null);\n return AgSelect;\n}(AgPickerField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$f = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$i = (undefined && undefined.__decorate) || function (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};\nvar AgAbstractInputField = /** @class */ (function (_super) {\n __extends$f(AgAbstractInputField, _super);\n function AgAbstractInputField(config, className, inputType, displayFieldTag) {\n if (inputType === void 0) { inputType = 'text'; }\n if (displayFieldTag === void 0) { displayFieldTag = 'input'; }\n var _this = _super.call(this, config, /* html */ \"\\n
\\n
\\n
\\n <\" + displayFieldTag + \" ref=\\\"eInput\\\" class=\\\"ag-input-field-input\\\">\\n
\\n
\", className) || this;\n _this.inputType = inputType;\n _this.displayFieldTag = displayFieldTag;\n return _this;\n }\n AgAbstractInputField.prototype.postConstruct = function () {\n _super.prototype.postConstruct.call(this);\n this.setInputType();\n this.eLabel.classList.add(this.className + \"-label\");\n this.eWrapper.classList.add(this.className + \"-input-wrapper\");\n this.eInput.classList.add(this.className + \"-input\");\n this.addCssClass('ag-input-field');\n this.eInput.id = this.eInput.id || \"ag-\" + this.getCompId() + \"-input\";\n var _a = this.config, width = _a.width, value = _a.value;\n if (width != null) {\n this.setWidth(width);\n }\n if (value != null) {\n this.setValue(value);\n }\n this.addInputListeners();\n };\n AgAbstractInputField.prototype.refreshLabel = function () {\n if (exists(this.getLabel())) {\n setAriaLabelledBy(this.eInput, this.getLabelId());\n }\n else {\n this.eInput.removeAttribute('aria-labelledby');\n }\n _super.prototype.refreshLabel.call(this);\n };\n AgAbstractInputField.prototype.addInputListeners = function () {\n var _this = this;\n this.addManagedListener(this.eInput, 'input', function (e) { return _this.setValue(e.target.value); });\n };\n AgAbstractInputField.prototype.setInputType = function () {\n if (this.displayFieldTag === 'input') {\n this.eInput.setAttribute('type', this.inputType);\n }\n };\n AgAbstractInputField.prototype.getInputElement = function () {\n return this.eInput;\n };\n AgAbstractInputField.prototype.setInputWidth = function (width) {\n setElementWidth(this.eWrapper, width);\n return this;\n };\n AgAbstractInputField.prototype.setInputName = function (name) {\n this.getInputElement().setAttribute('name', name);\n return this;\n };\n AgAbstractInputField.prototype.getFocusableElement = function () {\n return this.eInput;\n };\n AgAbstractInputField.prototype.setMaxLength = function (length) {\n var eInput = this.eInput;\n eInput.maxLength = length;\n return this;\n };\n AgAbstractInputField.prototype.setInputPlaceholder = function (placeholder) {\n addOrRemoveAttribute(this.eInput, 'placeholder', placeholder);\n return this;\n };\n AgAbstractInputField.prototype.setInputAriaLabel = function (label) {\n setAriaLabel(this.eInput, label);\n return this;\n };\n AgAbstractInputField.prototype.setDisabled = function (disabled) {\n setDisabled(this.eInput, disabled);\n return _super.prototype.setDisabled.call(this, disabled);\n };\n __decorate$i([\n RefSelector('eLabel')\n ], AgAbstractInputField.prototype, \"eLabel\", void 0);\n __decorate$i([\n RefSelector('eWrapper')\n ], AgAbstractInputField.prototype, \"eWrapper\", void 0);\n __decorate$i([\n RefSelector('eInput')\n ], AgAbstractInputField.prototype, \"eInput\", void 0);\n return AgAbstractInputField;\n}(AgAbstractField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$g = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$j = (undefined && undefined.__decorate) || function (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};\nvar ConditionPosition;\n(function (ConditionPosition) {\n ConditionPosition[ConditionPosition[\"One\"] = 0] = \"One\";\n ConditionPosition[ConditionPosition[\"Two\"] = 1] = \"Two\";\n})(ConditionPosition || (ConditionPosition = {}));\n/**\n * Every filter with a dropdown where the user can specify a comparing type against the filter values.\n *\n * @param M type of filter-model managed by the concrete sub-class that extends this type\n * @param V type of value managed by the concrete sub-class that extends this type\n * @param E type of UI element used for collecting user-input\n */\nvar SimpleFilter = /** @class */ (function (_super) {\n __extends$g(SimpleFilter, _super);\n function SimpleFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SimpleFilter.prototype.getNumberOfInputs = function (type) {\n var customOpts = this.optionsFactory.getCustomOption(type);\n if (customOpts) {\n var numberOfInputs = customOpts.numberOfInputs;\n return numberOfInputs != null ? numberOfInputs : 1;\n }\n var zeroInputTypes = [\n SimpleFilter.EMPTY, SimpleFilter.NOT_BLANK, SimpleFilter.BLANK,\n ];\n if (type && zeroInputTypes.indexOf(type) >= 0) {\n return 0;\n }\n else if (type === SimpleFilter.IN_RANGE) {\n return 2;\n }\n return 1;\n };\n // floating filter calls this when user applies filter from floating filter\n SimpleFilter.prototype.onFloatingFilterChanged = function (type, value) {\n this.setTypeFromFloatingFilter(type);\n this.setValueFromFloatingFilter(value);\n this.onUiChanged(true);\n };\n SimpleFilter.prototype.setTypeFromFloatingFilter = function (type) {\n this.eType1.setValue(type);\n this.eType2.setValue(this.optionsFactory.getDefaultOption());\n (this.isDefaultOperator('AND') ? this.eJoinOperatorAnd : this.eJoinOperatorOr).setValue(true);\n };\n SimpleFilter.prototype.getModelFromUi = function () {\n if (!this.isConditionUiComplete(ConditionPosition.One)) {\n return null;\n }\n if (this.isAllowTwoConditions() && this.isConditionUiComplete(ConditionPosition.Two)) {\n return {\n filterType: this.getFilterType(),\n operator: this.getJoinOperator(),\n condition1: this.createCondition(ConditionPosition.One),\n condition2: this.createCondition(ConditionPosition.Two)\n };\n }\n return this.createCondition(ConditionPosition.One);\n };\n SimpleFilter.prototype.getConditionTypes = function () {\n return [\n this.eType1.getValue(),\n this.eType2.getValue(),\n ];\n };\n SimpleFilter.prototype.getJoinOperator = function () {\n return this.eJoinOperatorOr.getValue() === true ? 'OR' : 'AND';\n };\n SimpleFilter.prototype.areModelsEqual = function (a, b) {\n // both are missing\n if (!a && !b) {\n return true;\n }\n // one is missing, other present\n if ((!a && b) || (a && !b)) {\n return false;\n }\n // one is combined, the other is not\n var aIsSimple = !a.operator;\n var bIsSimple = !b.operator;\n var oneSimpleOneCombined = (!aIsSimple && bIsSimple) || (aIsSimple && !bIsSimple);\n if (oneSimpleOneCombined) {\n return false;\n }\n var res;\n // otherwise both present, so compare\n if (aIsSimple) {\n var aSimple = a;\n var bSimple = b;\n res = this.areSimpleModelsEqual(aSimple, bSimple);\n }\n else {\n var aCombined = a;\n var bCombined = b;\n res = aCombined.operator === bCombined.operator\n && this.areSimpleModelsEqual(aCombined.condition1, bCombined.condition1)\n && this.areSimpleModelsEqual(aCombined.condition2, bCombined.condition2);\n }\n return res;\n };\n SimpleFilter.prototype.setModelIntoUi = function (model) {\n var isCombined = model.operator;\n if (isCombined) {\n var combinedModel = model;\n var orChecked = combinedModel.operator === 'OR';\n this.eJoinOperatorAnd.setValue(!orChecked);\n this.eJoinOperatorOr.setValue(orChecked);\n this.eType1.setValue(combinedModel.condition1.type);\n this.eType2.setValue(combinedModel.condition2.type);\n this.setConditionIntoUi(combinedModel.condition1, ConditionPosition.One);\n this.setConditionIntoUi(combinedModel.condition2, ConditionPosition.Two);\n }\n else {\n var simpleModel = model;\n this.eJoinOperatorAnd.setValue(this.isDefaultOperator('AND'));\n this.eJoinOperatorOr.setValue(this.isDefaultOperator('OR'));\n this.eType1.setValue(simpleModel.type);\n this.eType2.setValue(this.optionsFactory.getDefaultOption());\n this.setConditionIntoUi(simpleModel, ConditionPosition.One);\n this.setConditionIntoUi(null, ConditionPosition.Two);\n }\n return AgPromise.resolve();\n };\n SimpleFilter.prototype.doesFilterPass = function (params) {\n var _this = this;\n var model = this.getModel();\n if (model == null) {\n return true;\n }\n var operator = model.operator;\n var models = [];\n if (operator) {\n var combinedModel = model;\n models.push(combinedModel.condition1, combinedModel.condition2);\n }\n else {\n models.push(model);\n }\n var combineFunction = operator && operator === 'OR' ? 'some' : 'every';\n return models[combineFunction](function (m) { return _this.individualConditionPasses(params, m); });\n };\n SimpleFilter.prototype.setParams = function (params) {\n _super.prototype.setParams.call(this, params);\n this.optionsFactory = new OptionsFactory();\n this.optionsFactory.init(params, this.getDefaultFilterOptions());\n this.allowTwoConditions = !params.suppressAndOrCondition;\n this.alwaysShowBothConditions = !!params.alwaysShowBothConditions;\n this.defaultJoinOperator = this.getDefaultJoinOperator(params.defaultJoinOperator);\n this.putOptionsIntoDropdown();\n this.addChangedListeners();\n };\n SimpleFilter.prototype.getDefaultJoinOperator = function (defaultJoinOperator) {\n return includes(['AND', 'OR'], defaultJoinOperator) ? defaultJoinOperator : 'AND';\n };\n SimpleFilter.prototype.putOptionsIntoDropdown = function () {\n var _this = this;\n var filterOptions = this.optionsFactory.getFilterOptions();\n var eTypes = [this.eType1, this.eType2];\n // Add specified options to all condition drop-downs.\n filterOptions.forEach(function (option) {\n var listOption = typeof option === 'string' ?\n _this.createBoilerplateListOption(option) :\n _this.createCustomListOption(option);\n eTypes.forEach(function (eType) { return eType.addOption(listOption); });\n });\n // Make drop-downs read-only if there is only one option.\n eTypes.forEach(function (eType) { return eType.setDisabled(filterOptions.length <= 1); });\n };\n SimpleFilter.prototype.createBoilerplateListOption = function (option) {\n return { value: option, text: this.translate(option) };\n };\n SimpleFilter.prototype.createCustomListOption = function (option) {\n var displayKey = option.displayKey;\n var customOption = this.optionsFactory.getCustomOption(option.displayKey);\n return {\n value: displayKey,\n text: customOption ?\n this.gridOptionsWrapper.getLocaleTextFunc()(customOption.displayKey, customOption.displayName) :\n this.translate(displayKey),\n };\n };\n SimpleFilter.prototype.isAllowTwoConditions = function () {\n return this.allowTwoConditions;\n };\n SimpleFilter.prototype.createBodyTemplate = function () {\n return /* html */ \"\\n \\n \" + this.createValueTemplate(ConditionPosition.One) + \"\\n
\\n \\n \\n
\\n \\n \" + this.createValueTemplate(ConditionPosition.Two);\n };\n SimpleFilter.prototype.getCssIdentifier = function () {\n return 'simple-filter';\n };\n SimpleFilter.prototype.updateUiVisibility = function () {\n var _this = this;\n var elementConditionGroups = [\n [this.eType1],\n [this.eType2, this.eJoinOperatorPanel, this.eJoinOperatorAnd, this.eJoinOperatorOr],\n ];\n var elementBodies = [this.eCondition1Body, this.eCondition2Body];\n elementConditionGroups.forEach(function (group, position) {\n var visible = _this.isConditionVisible(position);\n var disabled = _this.isConditionDisabled(position);\n group.forEach(function (element) {\n if (element instanceof AgAbstractInputField || element instanceof AgSelect) {\n element.setDisabled(disabled);\n element.setDisplayed(visible);\n }\n else {\n setDisabled(element, disabled);\n setDisplayed(element, visible);\n }\n });\n });\n elementBodies.forEach(function (element, index) {\n setDisplayed(element, _this.isConditionBodyVisible(index));\n });\n this.forEachInput(function (element, index, position, numberOfInputs) {\n _this.setElementDisplayed(element, index < numberOfInputs);\n _this.setElementDisabled(element, _this.isConditionDisabled(position));\n });\n this.resetPlaceholder();\n };\n SimpleFilter.prototype.afterGuiAttached = function (params) {\n _super.prototype.afterGuiAttached.call(this, params);\n this.resetPlaceholder();\n if (!params || (!params.suppressFocus && !this.isReadOnly())) {\n var firstInput = this.getInputs()[0][0];\n if (!firstInput) {\n return;\n }\n if (firstInput instanceof AgAbstractInputField) {\n firstInput.getInputElement().focus();\n }\n }\n };\n // allow sub-classes to reset HTML placeholders after UI update.\n SimpleFilter.prototype.resetPlaceholder = function () {\n var _this = this;\n var globalTranslate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.forEachInput(function (element, index, _, numberOfInputs) {\n if (!(element instanceof AgAbstractInputField)) {\n return;\n }\n var placeholder = index === 0 && numberOfInputs > 1 ? 'inRangeStart' :\n index === 0 ? 'filterOoo' :\n 'inRangeEnd';\n var ariaLabel = index === 0 && numberOfInputs > 1 ? globalTranslate('ariaFilterFromValue', 'Filter from value') :\n index === 0 ? globalTranslate('ariaFilterValue', 'Filter Value') :\n globalTranslate('ariaFilterToValue', 'Filter to Value');\n element.setInputPlaceholder(_this.translate(placeholder));\n element.setInputAriaLabel(ariaLabel);\n });\n };\n SimpleFilter.prototype.setElementValue = function (element, value, silent) {\n if (element instanceof AgAbstractInputField) {\n element.setValue(value != null ? String(value) : null, silent);\n }\n };\n SimpleFilter.prototype.setElementDisplayed = function (element, displayed) {\n if (element instanceof Component) {\n setDisplayed(element.getGui(), displayed);\n }\n };\n SimpleFilter.prototype.setElementDisabled = function (element, disabled) {\n if (element instanceof Component) {\n setDisabled(element.getGui(), disabled);\n }\n };\n SimpleFilter.prototype.attachElementOnChange = function (element, listener) {\n if (element instanceof AgAbstractInputField) {\n element.onValueChange(listener);\n }\n };\n SimpleFilter.prototype.forEachInput = function (cb) {\n var _this = this;\n var inputs = this.getInputs();\n this.getConditionTypes().forEach(function (type, position) {\n var numberOfInputs = _this.getNumberOfInputs(type);\n for (var index = 0; index < inputs[position].length; index++) {\n var input = inputs[position][index];\n if (input != null) {\n cb(input, index, position, numberOfInputs);\n }\n }\n });\n };\n SimpleFilter.prototype.isConditionVisible = function (position) {\n if (position === 0) {\n return true;\n } // Position 0 should always be visible.\n if (!this.allowTwoConditions) {\n return false;\n } // Short-circuit if no tail conditions.\n if (this.isReadOnly()) {\n // Only display a condition when read-only if the condition is complete.\n return this.isConditionUiComplete(position);\n }\n if (this.alwaysShowBothConditions) {\n return true;\n }\n // Only display a 2nd or later condition when the previous condition is complete.\n return this.isConditionUiComplete(position - 1);\n };\n SimpleFilter.prototype.isConditionDisabled = function (position) {\n if (this.isReadOnly()) {\n return true;\n } // Read-only mode trumps everything.\n if (!this.isConditionVisible(position)) {\n return true;\n } // Invisible implies disabled.\n if (position === 0) {\n return false;\n } // Position 0 should typically be editable.\n // Only allow editing of a 2nd or later condition if the previous condition is complete.\n return !this.isConditionUiComplete(position - 1);\n };\n SimpleFilter.prototype.isConditionBodyVisible = function (position) {\n if (!this.isConditionVisible(position)) {\n return false;\n }\n // Check that the condition needs inputs.\n var type = this.getConditionTypes()[position];\n var numberOfInputs = this.getNumberOfInputs(type);\n return numberOfInputs > 0;\n };\n // returns true if the UI represents a working filter, eg all parts are filled out.\n // eg if text filter and textfield blank then returns false.\n SimpleFilter.prototype.isConditionUiComplete = function (position) {\n var type = this.getConditionTypes()[position];\n if (type === SimpleFilter.EMPTY) {\n return false;\n }\n if (this.getValues(position).some(function (v) { return v == null; })) {\n return false;\n }\n return true;\n };\n SimpleFilter.prototype.resetUiToDefaults = function (silent) {\n var _this = this;\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var filteringLabel = translate('ariaFilteringOperator', 'Filtering operator');\n var uniqueGroupId = 'ag-simple-filter-and-or-' + this.getCompId();\n var defaultOption = this.optionsFactory.getDefaultOption();\n this.eType1\n .setValue(defaultOption, silent)\n .setAriaLabel(filteringLabel)\n .setDisabled(this.isReadOnly());\n this.eType2\n .setValue(this.optionsFactory.getDefaultOption(), silent)\n .setAriaLabel(filteringLabel)\n .setDisabled(this.isReadOnly());\n this.eJoinOperatorAnd\n .setValue(this.isDefaultOperator('AND'), silent)\n .setName(uniqueGroupId)\n .setLabel(this.translate('andCondition'))\n .setDisabled(this.isReadOnly());\n this.eJoinOperatorOr\n .setValue(this.isDefaultOperator('OR'), silent)\n .setName(uniqueGroupId)\n .setLabel(this.translate('orCondition'))\n .setDisabled(this.isReadOnly());\n this.forEachInput(function (element) {\n _this.setElementValue(element, null, silent);\n _this.setElementDisabled(element, _this.isReadOnly());\n });\n this.resetPlaceholder();\n return AgPromise.resolve();\n };\n // puts model values into the UI\n SimpleFilter.prototype.setConditionIntoUi = function (model, position) {\n var _this = this;\n var values = this.mapValuesFromModel(model);\n this.forEachInput(function (element, index, elPosition, _) {\n if (elPosition !== position) {\n return;\n }\n _this.setElementValue(element, values[index] != null ? values[index] : null);\n });\n };\n // after floating filter changes, this sets the 'value' section. this is implemented by the base class\n // (as that's where value is controlled), the 'type' part from the floating filter is dealt with in this class.\n SimpleFilter.prototype.setValueFromFloatingFilter = function (value) {\n var _this = this;\n this.forEachInput(function (element, index, position, _) {\n _this.setElementValue(element, index === 0 && position === 0 ? value : null);\n });\n };\n SimpleFilter.prototype.isDefaultOperator = function (operator) {\n return operator === this.defaultJoinOperator;\n };\n SimpleFilter.prototype.addChangedListeners = function () {\n var _this = this;\n if (this.isReadOnly()) {\n return;\n }\n var listener = function () { return _this.onUiChanged(); };\n this.eType1.onValueChange(listener);\n this.eType2.onValueChange(listener);\n this.eJoinOperatorOr.onValueChange(listener);\n this.eJoinOperatorAnd.onValueChange(listener);\n this.forEachInput(function (element) {\n _this.attachElementOnChange(element, listener);\n });\n };\n /** returns true if the row passes the said condition */\n SimpleFilter.prototype.individualConditionPasses = function (params, filterModel) {\n var cellValue = this.getCellValue(params.node);\n var values = this.mapValuesFromModel(filterModel);\n var customFilterOption = this.optionsFactory.getCustomOption(filterModel.type);\n var customFilterResult = this.evaluateCustomFilter(customFilterOption, values, cellValue);\n if (customFilterResult != null) {\n return customFilterResult;\n }\n if (cellValue == null) {\n return this.evaluateNullValue(filterModel.type);\n }\n return this.evaluateNonNullValue(values, cellValue, filterModel, params);\n };\n SimpleFilter.prototype.evaluateCustomFilter = function (customFilterOption, values, cellValue) {\n if (customFilterOption == null) {\n return;\n }\n var predicate = customFilterOption.predicate;\n // only execute the custom filter if a value exists or a value isn't required, i.e. input is hidden\n if (predicate != null && !values.some(function (v) { return v == null; })) {\n return predicate(values, cellValue);\n }\n // No custom filter invocation, indicate that to the caller.\n return;\n };\n SimpleFilter.prototype.isBlank = function (cellValue) {\n return cellValue == null ||\n (typeof cellValue === 'string' && cellValue.trim().length === 0);\n };\n SimpleFilter.EMPTY = 'empty';\n SimpleFilter.BLANK = 'blank';\n SimpleFilter.NOT_BLANK = 'notBlank';\n SimpleFilter.EQUALS = 'equals';\n SimpleFilter.NOT_EQUAL = 'notEqual';\n SimpleFilter.LESS_THAN = 'lessThan';\n SimpleFilter.LESS_THAN_OR_EQUAL = 'lessThanOrEqual';\n SimpleFilter.GREATER_THAN = 'greaterThan';\n SimpleFilter.GREATER_THAN_OR_EQUAL = 'greaterThanOrEqual';\n SimpleFilter.IN_RANGE = 'inRange';\n SimpleFilter.CONTAINS = 'contains';\n SimpleFilter.NOT_CONTAINS = 'notContains';\n SimpleFilter.STARTS_WITH = 'startsWith';\n SimpleFilter.ENDS_WITH = 'endsWith';\n __decorate$j([\n RefSelector('eOptions1')\n ], SimpleFilter.prototype, \"eType1\", void 0);\n __decorate$j([\n RefSelector('eOptions2')\n ], SimpleFilter.prototype, \"eType2\", void 0);\n __decorate$j([\n RefSelector('eJoinOperatorPanel')\n ], SimpleFilter.prototype, \"eJoinOperatorPanel\", void 0);\n __decorate$j([\n RefSelector('eJoinOperatorAnd')\n ], SimpleFilter.prototype, \"eJoinOperatorAnd\", void 0);\n __decorate$j([\n RefSelector('eJoinOperatorOr')\n ], SimpleFilter.prototype, \"eJoinOperatorOr\", void 0);\n __decorate$j([\n RefSelector('eCondition1Body')\n ], SimpleFilter.prototype, \"eCondition1Body\", void 0);\n __decorate$j([\n RefSelector('eCondition2Body')\n ], SimpleFilter.prototype, \"eCondition2Body\", void 0);\n return SimpleFilter;\n}(ProvidedFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$h = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar ScalarFilter = /** @class */ (function (_super) {\n __extends$h(ScalarFilter, _super);\n function ScalarFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ScalarFilter.prototype.setParams = function (params) {\n _super.prototype.setParams.call(this, params);\n this.scalarFilterParams = params;\n };\n ScalarFilter.prototype.evaluateNullValue = function (filterType) {\n switch (filterType) {\n case ScalarFilter.EQUALS:\n case ScalarFilter.NOT_EQUAL:\n if (this.scalarFilterParams.includeBlanksInEquals) {\n return true;\n }\n break;\n case ScalarFilter.GREATER_THAN:\n case ScalarFilter.GREATER_THAN_OR_EQUAL:\n if (this.scalarFilterParams.includeBlanksInGreaterThan) {\n return true;\n }\n break;\n case ScalarFilter.LESS_THAN:\n case ScalarFilter.LESS_THAN_OR_EQUAL:\n if (this.scalarFilterParams.includeBlanksInLessThan) {\n return true;\n }\n break;\n case ScalarFilter.IN_RANGE:\n if (this.scalarFilterParams.includeBlanksInRange) {\n return true;\n }\n break;\n case ScalarFilter.BLANK:\n return true;\n case ScalarFilter.NOT_BLANK:\n return false;\n }\n return false;\n };\n ScalarFilter.prototype.evaluateNonNullValue = function (values, cellValue, filterModel) {\n var comparator = this.comparator();\n var compareResult = values[0] != null ? comparator(values[0], cellValue) : 0;\n switch (filterModel.type) {\n case ScalarFilter.EQUALS:\n return compareResult === 0;\n case ScalarFilter.NOT_EQUAL:\n return compareResult !== 0;\n case ScalarFilter.GREATER_THAN:\n return compareResult > 0;\n case ScalarFilter.GREATER_THAN_OR_EQUAL:\n return compareResult >= 0;\n case ScalarFilter.LESS_THAN:\n return compareResult < 0;\n case ScalarFilter.LESS_THAN_OR_EQUAL:\n return compareResult <= 0;\n case ScalarFilter.IN_RANGE: {\n var compareToResult = comparator(values[1], cellValue);\n return this.scalarFilterParams.inRangeInclusive ?\n compareResult >= 0 && compareToResult <= 0 :\n compareResult > 0 && compareToResult < 0;\n }\n case ScalarFilter.BLANK:\n return this.isBlank(cellValue);\n case ScalarFilter.NOT_BLANK:\n return !this.isBlank(cellValue);\n default:\n console.warn('AG Grid: Unexpected type of filter \"' + filterModel.type + '\", it looks like the filter was configured with incorrect Filter Options');\n return true;\n }\n };\n return ScalarFilter;\n}(SimpleFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$i = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$5 = (undefined && undefined.__assign) || function () {\n __assign$5 = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$5.apply(this, arguments);\n};\nvar __decorate$k = (undefined && undefined.__decorate) || function (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};\nvar DEFAULT_MIN_YEAR = 1000;\nvar DEFAULT_MAX_YEAR = Infinity;\nvar DateFilter = /** @class */ (function (_super) {\n __extends$i(DateFilter, _super);\n function DateFilter() {\n var _this = _super.call(this, 'dateFilter') || this;\n _this.minValidYear = DEFAULT_MIN_YEAR;\n _this.maxValidYear = DEFAULT_MAX_YEAR;\n return _this;\n }\n DateFilter.prototype.afterGuiAttached = function (params) {\n _super.prototype.afterGuiAttached.call(this, params);\n this.dateCondition1FromComp.afterGuiAttached(params);\n };\n DateFilter.prototype.mapValuesFromModel = function (filterModel) {\n // unlike the other filters, we do two things here:\n // 1) allow for different attribute names (same as done for other filters) (eg the 'from' and 'to'\n // are in different locations in Date and Number filter models)\n // 2) convert the type (because Date filter uses Dates, however model is 'string')\n //\n // NOTE: The conversion of string to date also removes the timezone - i.e. when user picks\n // a date from the UI, it will have timezone info in it. This is lost when creating\n // the model. When we recreate the date again here, it's without a timezone.\n var _a = filterModel || {}, dateFrom = _a.dateFrom, dateTo = _a.dateTo, type = _a.type;\n return [\n dateFrom && parseDateTimeFromString(dateFrom) || null,\n dateTo && parseDateTimeFromString(dateTo) || null,\n ].slice(0, this.getNumberOfInputs(type));\n };\n DateFilter.prototype.comparator = function () {\n return this.dateFilterParams.comparator ? this.dateFilterParams.comparator : this.defaultComparator.bind(this);\n };\n DateFilter.prototype.defaultComparator = function (filterDate, cellValue) {\n // The default comparator assumes that the cellValue is a date\n var cellAsDate = cellValue;\n if (cellValue == null || cellAsDate < filterDate) {\n return -1;\n }\n if (cellAsDate > filterDate) {\n return 1;\n }\n return 0;\n };\n DateFilter.prototype.setParams = function (params) {\n _super.prototype.setParams.call(this, params);\n this.dateFilterParams = params;\n var yearParser = function (param, fallback) {\n if (params[param] != null) {\n if (!isNaN(params[param])) {\n return params[param] == null ? fallback : Number(params[param]);\n }\n else {\n console.warn(\"AG Grid: DateFilter \" + param + \" is not a number\");\n }\n }\n return fallback;\n };\n this.minValidYear = yearParser('minValidYear', DEFAULT_MIN_YEAR);\n this.maxValidYear = yearParser('maxValidYear', DEFAULT_MAX_YEAR);\n if (this.minValidYear > this.maxValidYear) {\n console.warn(\"AG Grid: DateFilter minValidYear should be <= maxValidYear\");\n }\n this.createDateComponents();\n };\n DateFilter.prototype.createDateComponents = function () {\n var _this = this;\n var createDateCompWrapper = function (element) {\n return new DateCompWrapper(_this.getContext(), _this.userComponentFactory, {\n onDateChanged: function () { return _this.onUiChanged(); },\n filterParams: _this.dateFilterParams\n }, element);\n };\n this.dateCondition1FromComp = createDateCompWrapper(this.eCondition1PanelFrom);\n this.dateCondition1ToComp = createDateCompWrapper(this.eCondition1PanelTo);\n this.dateCondition2FromComp = createDateCompWrapper(this.eCondition2PanelFrom);\n this.dateCondition2ToComp = createDateCompWrapper(this.eCondition2PanelTo);\n this.addDestroyFunc(function () {\n _this.forEachInput(function (element) { return element.destroy(); });\n });\n };\n DateFilter.prototype.setElementValue = function (element, value, silent) {\n element.setDate(value);\n };\n DateFilter.prototype.setElementDisplayed = function (element, displayed) {\n element.setDisplayed(displayed);\n };\n DateFilter.prototype.setElementDisabled = function (element, disabled) {\n element.setDisabled(disabled);\n };\n DateFilter.prototype.getDefaultFilterOptions = function () {\n return DateFilter.DEFAULT_FILTER_OPTIONS;\n };\n DateFilter.prototype.createValueTemplate = function (position) {\n var pos = position === ConditionPosition.One ? '1' : '2';\n return /* html */ \"\\n
\\n
\\n
\\n
\";\n };\n DateFilter.prototype.isConditionUiComplete = function (position) {\n var _this = this;\n if (!_super.prototype.isConditionUiComplete.call(this, position)) {\n return false;\n }\n var isValidDate = function (value) { return value != null\n && value.getUTCFullYear() >= _this.minValidYear\n && value.getUTCFullYear() <= _this.maxValidYear; };\n var valid = true;\n this.forEachInput(function (element, index, elPosition, numberOfInputs) {\n if (elPosition !== position || !valid || index >= numberOfInputs) {\n return;\n }\n valid = valid && isValidDate(element.getDate());\n });\n return valid;\n };\n DateFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {\n return aSimple.dateFrom === bSimple.dateFrom\n && aSimple.dateTo === bSimple.dateTo\n && aSimple.type === bSimple.type;\n };\n DateFilter.prototype.getFilterType = function () {\n return 'date';\n };\n DateFilter.prototype.createCondition = function (position) {\n var type = this.getConditionTypes()[position];\n var model = {};\n var values = this.getValues(position);\n if (values.length > 0) {\n model.dateFrom = serialiseDate(values[0]);\n }\n if (values.length > 1) {\n model.dateTo = serialiseDate(values[1]);\n }\n return __assign$5({ dateFrom: null, dateTo: null, filterType: this.getFilterType(), type: type }, model);\n };\n DateFilter.prototype.resetPlaceholder = function () {\n var globalTranslate = this.gridOptionsWrapper.getLocaleTextFunc();\n var placeholder = this.translate('dateFormatOoo');\n var ariaLabel = globalTranslate('ariaFilterValue', 'Filter Value');\n this.forEachInput(function (element) {\n element.setInputPlaceholder(placeholder);\n element.setInputAriaLabel(ariaLabel);\n });\n };\n DateFilter.prototype.getInputs = function () {\n return [\n [this.dateCondition1FromComp, this.dateCondition1ToComp],\n [this.dateCondition2FromComp, this.dateCondition2ToComp],\n ];\n };\n DateFilter.prototype.getValues = function (position) {\n var result = [];\n this.forEachInput(function (element, index, elPosition, numberOfInputs) {\n if (position === elPosition && index < numberOfInputs) {\n result.push(element.getDate());\n }\n });\n return result;\n };\n DateFilter.DEFAULT_FILTER_OPTIONS = [\n ScalarFilter.EQUALS,\n ScalarFilter.GREATER_THAN,\n ScalarFilter.LESS_THAN,\n ScalarFilter.NOT_EQUAL,\n ScalarFilter.IN_RANGE,\n ScalarFilter.BLANK,\n ScalarFilter.NOT_BLANK,\n ];\n __decorate$k([\n RefSelector('eCondition1PanelFrom')\n ], DateFilter.prototype, \"eCondition1PanelFrom\", void 0);\n __decorate$k([\n RefSelector('eCondition1PanelTo')\n ], DateFilter.prototype, \"eCondition1PanelTo\", void 0);\n __decorate$k([\n RefSelector('eCondition2PanelFrom')\n ], DateFilter.prototype, \"eCondition2PanelFrom\", void 0);\n __decorate$k([\n RefSelector('eCondition2PanelTo')\n ], DateFilter.prototype, \"eCondition2PanelTo\", void 0);\n __decorate$k([\n Autowired('userComponentFactory')\n ], DateFilter.prototype, \"userComponentFactory\", void 0);\n return DateFilter;\n}(ScalarFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$j = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar SimpleFloatingFilter = /** @class */ (function (_super) {\n __extends$j(SimpleFloatingFilter, _super);\n function SimpleFloatingFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SimpleFloatingFilter.prototype.getDefaultDebounceMs = function () {\n return 0;\n };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n SimpleFloatingFilter.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n // used by:\n // 1) NumberFloatingFilter & TextFloatingFilter: Always, for both when editable and read only.\n // 2) DateFloatingFilter: Only when read only (as we show text rather than a date picker when read only)\n SimpleFloatingFilter.prototype.getTextFromModel = function (model) {\n if (!model) {\n return null;\n }\n var isCombined = model.operator != null;\n if (isCombined) {\n var combinedModel = model;\n var _a = combinedModel || {}, condition1 = _a.condition1, condition2 = _a.condition2;\n var customOption1 = this.optionsFactory.getCustomOption(condition1.type);\n var customOption2 = this.optionsFactory.getCustomOption(condition2.type);\n return [\n this.conditionToString(condition1, customOption1),\n combinedModel.operator,\n this.conditionToString(condition2, customOption2),\n ].join(' ');\n }\n else {\n var condition = model;\n var customOption = this.optionsFactory.getCustomOption(condition.type);\n // For custom filter options we display the Name of the filter instead\n // of displaying the `from` value, as it wouldn't be relevant\n var _b = customOption || {}, displayKey = _b.displayKey, displayName = _b.displayName, numberOfInputs = _b.numberOfInputs;\n if (displayKey && displayName && numberOfInputs === 0) {\n this.gridOptionsWrapper.getLocaleTextFunc()(displayKey, displayName);\n return displayName;\n }\n return this.conditionToString(condition, customOption);\n }\n };\n SimpleFloatingFilter.prototype.isEventFromFloatingFilter = function (event) {\n return event && event.afterFloatingFilter;\n };\n SimpleFloatingFilter.prototype.getLastType = function () {\n return this.lastType;\n };\n SimpleFloatingFilter.prototype.isReadOnly = function () {\n return this.readOnly;\n };\n SimpleFloatingFilter.prototype.setLastTypeFromModel = function (model) {\n // if no model provided by the parent filter use default\n if (!model) {\n this.lastType = this.optionsFactory.getDefaultOption();\n return;\n }\n var isCombined = model.operator;\n var condition;\n if (isCombined) {\n var combinedModel = model;\n condition = combinedModel.condition1;\n }\n else {\n condition = model;\n }\n this.lastType = condition.type;\n };\n SimpleFloatingFilter.prototype.canWeEditAfterModelFromParentFilter = function (model) {\n if (!model) {\n // if no model, then we can edit as long as the lastType is something we can edit, as this\n // is the type we will provide to the parent filter if the user decides to use the floating filter.\n return this.isTypeEditable(this.lastType);\n }\n // never allow editing if the filter is combined (ie has two parts)\n var isCombined = model.operator;\n if (isCombined) {\n return false;\n }\n var simpleModel = model;\n return this.isTypeEditable(simpleModel.type);\n };\n SimpleFloatingFilter.prototype.init = function (params) {\n this.optionsFactory = new OptionsFactory();\n this.optionsFactory.init(params.filterParams, this.getDefaultFilterOptions());\n this.lastType = this.optionsFactory.getDefaultOption();\n // readOnly is a property of IProvidedFilterParams - we need to find a better (type-safe)\n // way to support reading this in the future.\n this.readOnly = !!params.filterParams.readOnly;\n // we are editable if:\n // 1) there is a type (user has configured filter wrong if not type)\n // AND\n // 2) the default type is not 'in range'\n var editable = this.isTypeEditable(this.lastType);\n this.setEditable(editable);\n };\n SimpleFloatingFilter.prototype.doesFilterHaveSingleInput = function (filterType) {\n var customFilterOption = this.optionsFactory.getCustomOption(filterType);\n var numberOfInputs = (customFilterOption || {}).numberOfInputs;\n return numberOfInputs == null || numberOfInputs == 1;\n };\n SimpleFloatingFilter.prototype.isTypeEditable = function (type) {\n var uneditableTypes = [\n SimpleFilter.IN_RANGE, SimpleFilter.EMPTY, SimpleFilter.BLANK, SimpleFilter.NOT_BLANK,\n ];\n return !!type &&\n !this.isReadOnly() &&\n this.doesFilterHaveSingleInput(type) &&\n uneditableTypes.indexOf(type) < 0;\n };\n return SimpleFloatingFilter;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$k = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$l = (undefined && undefined.__decorate) || function (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};\nvar DateFloatingFilter = /** @class */ (function (_super) {\n __extends$k(DateFloatingFilter, _super);\n function DateFloatingFilter() {\n return _super.call(this, /* html */ \"\\n
\\n \\n
\\n
\") || this;\n }\n DateFloatingFilter.prototype.getDefaultFilterOptions = function () {\n return DateFilter.DEFAULT_FILTER_OPTIONS;\n };\n DateFloatingFilter.prototype.conditionToString = function (condition, options) {\n var type = condition.type;\n var numberOfInputs = (options || {}).numberOfInputs;\n var isRange = type == SimpleFilter.IN_RANGE || numberOfInputs === 2;\n var dateFrom = parseDateTimeFromString(condition.dateFrom);\n var dateTo = parseDateTimeFromString(condition.dateTo);\n if (isRange) {\n return serialiseDate(dateFrom, false) + \"-\" + serialiseDate(dateTo, false);\n }\n if (dateFrom != null) {\n return \"\" + serialiseDate(dateFrom, false);\n }\n // cater for when the type doesn't need a value\n return \"\" + type;\n };\n DateFloatingFilter.prototype.init = function (params) {\n _super.prototype.init.call(this, params);\n this.params = params;\n this.createDateComponent();\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eReadOnlyText\n .setDisabled(true)\n .setInputAriaLabel(translate('ariaDateFilterInput', 'Date Filter Input'));\n };\n DateFloatingFilter.prototype.setEditable = function (editable) {\n setDisplayed(this.eDateWrapper, editable);\n setDisplayed(this.eReadOnlyText.getGui(), !editable);\n };\n DateFloatingFilter.prototype.onParentModelChanged = function (model, event) {\n // We don't want to update the floating filter if the floating filter caused the change,\n // because the UI is already in sync. if we didn't do this, the UI would behave strangely\n // as it would be updating as the user is typing\n if (this.isEventFromFloatingFilter(event)) {\n return;\n }\n _super.prototype.setLastTypeFromModel.call(this, model);\n var allowEditing = !this.isReadOnly() &&\n this.canWeEditAfterModelFromParentFilter(model);\n this.setEditable(allowEditing);\n if (allowEditing) {\n if (model) {\n var dateModel = model;\n this.dateComp.setDate(parseDateTimeFromString(dateModel.dateFrom));\n }\n else {\n this.dateComp.setDate(null);\n }\n this.eReadOnlyText.setValue('');\n }\n else {\n this.eReadOnlyText.setValue(this.getTextFromModel(model));\n this.dateComp.setDate(null);\n }\n };\n DateFloatingFilter.prototype.onDateChanged = function () {\n var _this = this;\n var filterValueDate = this.dateComp.getDate();\n var filterValueText = serialiseDate(filterValueDate);\n this.params.parentFilterInstance(function (filterInstance) {\n if (filterInstance) {\n var date = parseDateTimeFromString(filterValueText);\n filterInstance.onFloatingFilterChanged(_this.getLastType() || null, date);\n }\n });\n };\n DateFloatingFilter.prototype.createDateComponent = function () {\n var _this = this;\n var debounceMs = ProvidedFilter.getDebounceMs(this.params.filterParams, this.getDefaultDebounceMs());\n var dateComponentParams = {\n onDateChanged: debounce(this.onDateChanged.bind(this), debounceMs),\n filterParams: this.params.column.getColDef().filterParams\n };\n this.dateComp = new DateCompWrapper(this.getContext(), this.userComponentFactory, dateComponentParams, this.eDateWrapper);\n this.addDestroyFunc(function () { return _this.dateComp.destroy(); });\n };\n __decorate$l([\n Autowired('userComponentFactory')\n ], DateFloatingFilter.prototype, \"userComponentFactory\", void 0);\n __decorate$l([\n RefSelector('eReadOnlyText')\n ], DateFloatingFilter.prototype, \"eReadOnlyText\", void 0);\n __decorate$l([\n RefSelector('eDateWrapper')\n ], DateFloatingFilter.prototype, \"eDateWrapper\", void 0);\n return DateFloatingFilter;\n}(SimpleFloatingFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$l = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$m = (undefined && undefined.__decorate) || function (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};\nvar DefaultDateComponent = /** @class */ (function (_super) {\n __extends$l(DefaultDateComponent, _super);\n function DefaultDateComponent() {\n return _super.call(this, /* html */ \"\\n
\\n \\n
\") || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n DefaultDateComponent.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n DefaultDateComponent.prototype.init = function (params) {\n var _this = this;\n var eDocument = this.gridOptionsWrapper.getDocument();\n var inputElement = this.eDateInput.getInputElement();\n if (this.shouldUseBrowserDatePicker(params)) {\n inputElement.type = 'date';\n }\n // ensures that the input element is focussed when a clear button is clicked\n this.addManagedListener(inputElement, 'mousedown', function () {\n if (_this.eDateInput.isDisabled()) {\n return;\n }\n inputElement.focus();\n });\n this.addManagedListener(inputElement, 'input', function (e) {\n if (e.target !== eDocument.activeElement) {\n return;\n }\n if (_this.eDateInput.isDisabled()) {\n return;\n }\n params.onDateChanged();\n });\n var _a = params.filterParams || {}, minValidYear = _a.minValidYear, maxValidYear = _a.maxValidYear;\n if (minValidYear) {\n inputElement.min = minValidYear + \"-01-01\";\n }\n if (maxValidYear) {\n inputElement.max = maxValidYear + \"-12-31\";\n }\n };\n DefaultDateComponent.prototype.getDate = function () {\n return parseDateTimeFromString(this.eDateInput.getValue());\n };\n DefaultDateComponent.prototype.setDate = function (date) {\n this.eDateInput.setValue(serialiseDate(date, false));\n };\n DefaultDateComponent.prototype.setInputPlaceholder = function (placeholder) {\n this.eDateInput.setInputPlaceholder(placeholder);\n };\n DefaultDateComponent.prototype.setDisabled = function (disabled) {\n this.eDateInput.setDisabled(disabled);\n };\n DefaultDateComponent.prototype.afterGuiAttached = function (params) {\n if (!params || !params.suppressFocus) {\n this.eDateInput.getInputElement().focus();\n }\n };\n DefaultDateComponent.prototype.shouldUseBrowserDatePicker = function (params) {\n if (params.filterParams && params.filterParams.browserDatePicker != null) {\n return params.filterParams.browserDatePicker;\n }\n return isBrowserChrome() || isBrowserFirefox();\n };\n __decorate$m([\n RefSelector('eDateInput')\n ], DefaultDateComponent.prototype, \"eDateInput\", void 0);\n return DefaultDateComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$m = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$n = (undefined && undefined.__decorate) || function (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};\nvar NumberFilter = /** @class */ (function (_super) {\n __extends$m(NumberFilter, _super);\n function NumberFilter() {\n return _super.call(this, 'numberFilter') || this;\n }\n NumberFilter.prototype.mapValuesFromModel = function (filterModel) {\n var _a = filterModel || {}, filter = _a.filter, filterTo = _a.filterTo, type = _a.type;\n return [\n filter == null ? null : filter,\n filterTo == null ? null : filterTo,\n ].slice(0, this.getNumberOfInputs(type));\n };\n NumberFilter.prototype.getDefaultDebounceMs = function () {\n return 500;\n };\n NumberFilter.prototype.comparator = function () {\n return function (left, right) {\n if (left === right) {\n return 0;\n }\n return left < right ? 1 : -1;\n };\n };\n NumberFilter.prototype.setParams = function (params) {\n this.numberFilterParams = params;\n var allowedCharPattern = this.getAllowedCharPattern();\n if (allowedCharPattern) {\n var config = { allowedCharPattern: allowedCharPattern };\n this.resetTemplate({\n 'eValue-index0-1': config,\n 'eValue-index1-1': config,\n 'eValue-index0-2': config,\n 'eValue-index1-2': config,\n });\n }\n _super.prototype.setParams.call(this, params);\n };\n NumberFilter.prototype.getDefaultFilterOptions = function () {\n return NumberFilter.DEFAULT_FILTER_OPTIONS;\n };\n NumberFilter.prototype.createValueTemplate = function (position) {\n var pos = position === ConditionPosition.One ? '1' : '2';\n var allowedCharPattern = this.getAllowedCharPattern();\n var agElementTag = allowedCharPattern ? 'ag-input-text-field' : 'ag-input-number-field';\n return /* html */ \"\\n
\\n <\" + agElementTag + \" class=\\\"ag-filter-from ag-filter-filter\\\" ref=\\\"eValue-index0-\" + pos + \"\\\">\\n <\" + agElementTag + \" class=\\\"ag-filter-to ag-filter-filter\\\" ref=\\\"eValue-index1-\" + pos + \"\\\">\\n
\";\n };\n NumberFilter.prototype.getValues = function (position) {\n var _this = this;\n var result = [];\n this.forEachInput(function (element, index, elPosition, numberOfInputs) {\n if (position === elPosition && index < numberOfInputs) {\n result.push(_this.stringToFloat(element.getValue()));\n }\n });\n return result;\n };\n NumberFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {\n return aSimple.filter === bSimple.filter\n && aSimple.filterTo === bSimple.filterTo\n && aSimple.type === bSimple.type;\n };\n NumberFilter.prototype.getFilterType = function () {\n return 'number';\n };\n NumberFilter.prototype.stringToFloat = function (value) {\n if (typeof value === 'number') {\n return value;\n }\n var filterText = makeNull(value);\n if (filterText != null && filterText.trim() === '') {\n filterText = null;\n }\n if (this.numberFilterParams.numberParser) {\n return this.numberFilterParams.numberParser(filterText);\n }\n return filterText == null || filterText.trim() === '-' ? null : parseFloat(filterText);\n };\n NumberFilter.prototype.createCondition = function (position) {\n var type = this.getConditionTypes()[position];\n var model = {\n filterType: this.getFilterType(),\n type: type\n };\n var values = this.getValues(position);\n if (values.length > 0) {\n model.filter = values[0];\n }\n if (values.length > 1) {\n model.filterTo = values[1];\n }\n return model;\n };\n NumberFilter.prototype.getInputs = function () {\n return [\n [this.eValueFrom1, this.eValueTo1],\n [this.eValueFrom2, this.eValueTo2],\n ];\n };\n NumberFilter.prototype.getAllowedCharPattern = function () {\n var allowedCharPattern = (this.numberFilterParams || {}).allowedCharPattern;\n if (allowedCharPattern) {\n return allowedCharPattern;\n }\n if (!isBrowserChrome() && !isBrowserEdge()) {\n // only Chrome and Edge support the HTML5 number field, so for other browsers we provide an equivalent\n // constraint instead\n return '\\\\d\\\\-\\\\.';\n }\n return null;\n };\n NumberFilter.DEFAULT_FILTER_OPTIONS = [\n ScalarFilter.EQUALS,\n ScalarFilter.NOT_EQUAL,\n ScalarFilter.LESS_THAN,\n ScalarFilter.LESS_THAN_OR_EQUAL,\n ScalarFilter.GREATER_THAN,\n ScalarFilter.GREATER_THAN_OR_EQUAL,\n ScalarFilter.IN_RANGE,\n ScalarFilter.BLANK,\n ScalarFilter.NOT_BLANK,\n ];\n __decorate$n([\n RefSelector('eValue-index0-1')\n ], NumberFilter.prototype, \"eValueFrom1\", void 0);\n __decorate$n([\n RefSelector('eValue-index1-1')\n ], NumberFilter.prototype, \"eValueTo1\", void 0);\n __decorate$n([\n RefSelector('eValue-index0-2')\n ], NumberFilter.prototype, \"eValueFrom2\", void 0);\n __decorate$n([\n RefSelector('eValue-index1-2')\n ], NumberFilter.prototype, \"eValueTo2\", void 0);\n return NumberFilter;\n}(ScalarFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$n = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$6 = (undefined && undefined.__assign) || function () {\n __assign$6 = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$6.apply(this, arguments);\n};\nvar __decorate$o = (undefined && undefined.__decorate) || function (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};\nvar TextFilter = /** @class */ (function (_super) {\n __extends$n(TextFilter, _super);\n function TextFilter() {\n return _super.call(this, 'textFilter') || this;\n }\n TextFilter.trimInput = function (value) {\n var trimmedInput = value && value.trim();\n // trim the input, unless it is all whitespace (this is consistent with Excel behaviour)\n return trimmedInput === '' ? value : trimmedInput;\n };\n TextFilter.prototype.getDefaultDebounceMs = function () {\n return 500;\n };\n TextFilter.prototype.setParams = function (params) {\n _super.prototype.setParams.call(this, params);\n this.textFilterParams = params;\n this.matcher = this.getTextMatcher();\n this.formatter = this.textFilterParams.textFormatter ||\n (this.textFilterParams.caseSensitive ? TextFilter.DEFAULT_FORMATTER : TextFilter.DEFAULT_LOWERCASE_FORMATTER);\n };\n TextFilter.prototype.getTextMatcher = function () {\n var legacyComparator = this.textFilterParams.textCustomComparator;\n if (legacyComparator) {\n _.doOnce(function () { return console.warn('AG Grid - textCustomComparator is deprecated, use textMatcher instead.'); }, 'textCustomComparator.deprecated');\n return function (_a) {\n var filterOption = _a.filterOption, value = _a.value, filterText = _a.filterText;\n return legacyComparator(filterOption, value, filterText);\n };\n }\n return this.textFilterParams.textMatcher || TextFilter.DEFAULT_MATCHER;\n };\n TextFilter.prototype.createCondition = function (position) {\n var type = this.getConditionTypes()[position];\n var model = {\n filterType: this.getFilterType(),\n type: type,\n };\n var values = this.getValues(position);\n if (values.length > 0) {\n model.filter = values[0];\n }\n if (values.length > 1) {\n model.filterTo = values[1];\n }\n return model;\n };\n TextFilter.prototype.getFilterType = function () {\n return 'text';\n };\n TextFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {\n return aSimple.filter === bSimple.filter &&\n aSimple.filterTo === bSimple.filterTo &&\n aSimple.type === bSimple.type;\n };\n TextFilter.prototype.getInputs = function () {\n return [\n [this.eValueFrom1, this.eValueTo1],\n [this.eValueFrom2, this.eValueTo2],\n ];\n };\n TextFilter.prototype.getValues = function (position) {\n var _this = this;\n var result = [];\n this.forEachInput(function (element, index, elPosition, numberOfInputs) {\n if (position === elPosition && index < numberOfInputs) {\n var value = makeNull(element.getValue());\n var cleanValue = (_this.textFilterParams.trimInput ? TextFilter.trimInput(value) : value) || null;\n result.push(cleanValue);\n element.setValue(cleanValue, true); // ensure clean value is visible\n }\n });\n return result;\n };\n TextFilter.prototype.getDefaultFilterOptions = function () {\n return TextFilter.DEFAULT_FILTER_OPTIONS;\n };\n TextFilter.prototype.createValueTemplate = function (position) {\n var pos = position === ConditionPosition.One ? '1' : '2';\n return /* html */ \"\\n
\\n \\n \\n
\";\n };\n TextFilter.prototype.mapValuesFromModel = function (filterModel) {\n var _a = filterModel || {}, filter = _a.filter, filterTo = _a.filterTo, type = _a.type;\n return [\n filter || null,\n filterTo || null,\n ].slice(0, this.getNumberOfInputs(type));\n };\n TextFilter.prototype.evaluateNullValue = function (filterType) {\n var filterTypesAllowNulls = [\n SimpleFilter.NOT_EQUAL, SimpleFilter.NOT_CONTAINS, SimpleFilter.BLANK,\n ];\n return filterType ? filterTypesAllowNulls.indexOf(filterType) >= 0 : false;\n };\n TextFilter.prototype.evaluateNonNullValue = function (values, cellValue, filterModel, params) {\n var _this = this;\n var formattedValues = values.map(function (v) { return _this.formatter(v); }) || [];\n var cellValueFormatted = this.formatter(cellValue);\n var _a = this.textFilterParams, api = _a.api, colDef = _a.colDef, column = _a.column, columnApi = _a.columnApi, context = _a.context, textFormatter = _a.textFormatter;\n if (filterModel.type === SimpleFilter.BLANK) {\n return this.isBlank(cellValue);\n }\n else if (filterModel.type === SimpleFilter.NOT_BLANK) {\n return !this.isBlank(cellValue);\n }\n var matcherParams = {\n api: api,\n colDef: colDef,\n column: column,\n columnApi: columnApi,\n context: context,\n node: params.node,\n data: params.data,\n filterOption: filterModel.type,\n value: cellValueFormatted,\n textFormatter: textFormatter,\n };\n return formattedValues.some(function (v) { return _this.matcher(__assign$6(__assign$6({}, matcherParams), { filterText: v })); });\n };\n TextFilter.DEFAULT_FILTER_OPTIONS = [\n SimpleFilter.CONTAINS,\n SimpleFilter.NOT_CONTAINS,\n SimpleFilter.EQUALS,\n SimpleFilter.NOT_EQUAL,\n SimpleFilter.STARTS_WITH,\n SimpleFilter.ENDS_WITH,\n SimpleFilter.BLANK,\n SimpleFilter.NOT_BLANK,\n ];\n TextFilter.DEFAULT_FORMATTER = function (from) { return from; };\n TextFilter.DEFAULT_LOWERCASE_FORMATTER = function (from) { return from == null ? null : from.toString().toLowerCase(); };\n TextFilter.DEFAULT_MATCHER = function (_a) {\n var filterOption = _a.filterOption, value = _a.value, filterText = _a.filterText;\n if (filterText == null) {\n return false;\n }\n switch (filterOption) {\n case TextFilter.CONTAINS:\n return value.indexOf(filterText) >= 0;\n case TextFilter.NOT_CONTAINS:\n return value.indexOf(filterText) < 0;\n case TextFilter.EQUALS:\n return value === filterText;\n case TextFilter.NOT_EQUAL:\n return value != filterText;\n case TextFilter.STARTS_WITH:\n return value.indexOf(filterText) === 0;\n case TextFilter.ENDS_WITH:\n var index = value.lastIndexOf(filterText);\n return index >= 0 && index === (value.length - filterText.length);\n default:\n return false;\n }\n };\n __decorate$o([\n RefSelector('eValue-index0-1')\n ], TextFilter.prototype, \"eValueFrom1\", void 0);\n __decorate$o([\n RefSelector('eValue-index1-1')\n ], TextFilter.prototype, \"eValueTo1\", void 0);\n __decorate$o([\n RefSelector('eValue-index0-2')\n ], TextFilter.prototype, \"eValueFrom2\", void 0);\n __decorate$o([\n RefSelector('eValue-index1-2')\n ], TextFilter.prototype, \"eValueTo2\", void 0);\n return TextFilter;\n}(SimpleFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$o = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$p = (undefined && undefined.__decorate) || function (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};\nvar TextInputFloatingFilter = /** @class */ (function (_super) {\n __extends$o(TextInputFloatingFilter, _super);\n function TextInputFloatingFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TextInputFloatingFilter.prototype.postConstruct = function () {\n this.resetTemplate();\n };\n TextInputFloatingFilter.prototype.resetTemplate = function (paramsMap) {\n this.setTemplate(/* html */ \"\\n
\\n \\n
\\n \", paramsMap);\n };\n TextInputFloatingFilter.prototype.getDefaultDebounceMs = function () {\n return 500;\n };\n TextInputFloatingFilter.prototype.onParentModelChanged = function (model, event) {\n if (this.isEventFromFloatingFilter(event)) {\n // if the floating filter triggered the change, it is already in sync\n return;\n }\n this.setLastTypeFromModel(model);\n this.eFloatingFilterInput.setValue(this.getTextFromModel(model));\n this.setEditable(this.canWeEditAfterModelFromParentFilter(model));\n };\n TextInputFloatingFilter.prototype.init = function (params) {\n _super.prototype.init.call(this, params);\n this.params = params;\n this.applyActive = ProvidedFilter.isUseApplyButton(this.params.filterParams);\n var allowedCharPattern = this.params.filterParams.allowedCharPattern;\n if (allowedCharPattern != null) {\n this.resetTemplate({ eFloatingFilterInput: { allowedCharPattern: allowedCharPattern } });\n }\n if (!this.isReadOnly()) {\n var debounceMs = ProvidedFilter.getDebounceMs(this.params.filterParams, this.getDefaultDebounceMs());\n var toDebounce = debounce(this.syncUpWithParentFilter.bind(this), debounceMs);\n var filterGui = this.eFloatingFilterInput.getGui();\n this.addManagedListener(filterGui, 'input', toDebounce);\n this.addManagedListener(filterGui, 'keypress', toDebounce);\n this.addManagedListener(filterGui, 'keydown', toDebounce);\n }\n var columnDef = params.column.getDefinition();\n if (this.isReadOnly() || (columnDef.filterParams &&\n columnDef.filterParams.filterOptions &&\n columnDef.filterParams.filterOptions.length === 1 &&\n columnDef.filterParams.filterOptions[0] === 'inRange')) {\n this.eFloatingFilterInput.setDisabled(true);\n }\n var displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eFloatingFilterInput.setInputAriaLabel(displayName + \" \" + translate('ariaFilterInput', 'Filter Input'));\n };\n TextInputFloatingFilter.prototype.syncUpWithParentFilter = function (e) {\n var _this = this;\n var enterKeyPressed = e.key === KeyCode.ENTER;\n if (this.applyActive && !enterKeyPressed) {\n return;\n }\n var value = this.eFloatingFilterInput.getValue();\n if (this.params.filterParams.trimInput) {\n value = TextFilter.trimInput(value);\n this.eFloatingFilterInput.setValue(value, true); // ensure visible value is trimmed\n }\n this.params.parentFilterInstance(function (filterInstance) {\n if (filterInstance) {\n filterInstance.onFloatingFilterChanged(_this.getLastType() || null, value || null);\n }\n });\n };\n TextInputFloatingFilter.prototype.conditionToString = function (condition, options) {\n var numberOfInputs = (options || {}).numberOfInputs;\n var isRange = condition.type == SimpleFilter.IN_RANGE || numberOfInputs === 2;\n if (isRange) {\n return condition.filter + \"-\" + condition.filterTo;\n }\n // cater for when the type doesn't need a value\n if (condition.filter != null) {\n return \"\" + condition.filter;\n }\n return \"\" + condition.type;\n };\n TextInputFloatingFilter.prototype.setEditable = function (editable) {\n this.eFloatingFilterInput.setDisabled(!editable);\n };\n __decorate$p([\n Autowired('columnModel')\n ], TextInputFloatingFilter.prototype, \"columnModel\", void 0);\n __decorate$p([\n RefSelector('eFloatingFilterInput')\n ], TextInputFloatingFilter.prototype, \"eFloatingFilterInput\", void 0);\n __decorate$p([\n PostConstruct\n ], TextInputFloatingFilter.prototype, \"postConstruct\", null);\n return TextInputFloatingFilter;\n}(SimpleFloatingFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$p = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar NumberFloatingFilter = /** @class */ (function (_super) {\n __extends$p(NumberFloatingFilter, _super);\n function NumberFloatingFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NumberFloatingFilter.prototype.getDefaultFilterOptions = function () {\n return NumberFilter.DEFAULT_FILTER_OPTIONS;\n };\n return NumberFloatingFilter;\n}(TextInputFloatingFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$q = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar TextFloatingFilter = /** @class */ (function (_super) {\n __extends$q(TextFloatingFilter, _super);\n function TextFloatingFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TextFloatingFilter.prototype.getDefaultFilterOptions = function () {\n return TextFilter.DEFAULT_FILTER_OPTIONS;\n };\n return TextFloatingFilter;\n}(TextInputFloatingFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar TouchListener = /** @class */ (function () {\n function TouchListener(eElement, preventMouseClick) {\n var _this = this;\n if (preventMouseClick === void 0) { preventMouseClick = false; }\n this.destroyFuncs = [];\n this.touching = false;\n this.eventService = new EventService();\n this.eElement = eElement;\n this.preventMouseClick = preventMouseClick;\n var startListener = this.onTouchStart.bind(this);\n var moveListener = this.onTouchMove.bind(this);\n var endListener = this.onTouchEnd.bind(this);\n this.eElement.addEventListener(\"touchstart\", startListener, { passive: true });\n this.eElement.addEventListener(\"touchmove\", moveListener, { passive: true });\n // we set passive=false, as we want to prevent default on this event\n this.eElement.addEventListener(\"touchend\", endListener, { passive: false });\n this.destroyFuncs.push(function () {\n _this.eElement.removeEventListener(\"touchstart\", startListener, { passive: true });\n _this.eElement.removeEventListener(\"touchmove\", moveListener, { passive: true });\n _this.eElement.removeEventListener(\"touchend\", endListener, { passive: false });\n });\n }\n TouchListener.prototype.getActiveTouch = function (touchList) {\n for (var i = 0; i < touchList.length; i++) {\n var matches = touchList[i].identifier === this.touchStart.identifier;\n if (matches) {\n return touchList[i];\n }\n }\n return null;\n };\n TouchListener.prototype.addEventListener = function (eventType, listener) {\n this.eventService.addEventListener(eventType, listener);\n };\n TouchListener.prototype.removeEventListener = function (eventType, listener) {\n this.eventService.removeEventListener(eventType, listener);\n };\n TouchListener.prototype.onTouchStart = function (touchEvent) {\n var _this = this;\n // only looking at one touch point at any time\n if (this.touching) {\n return;\n }\n this.touchStart = touchEvent.touches[0];\n this.touching = true;\n this.moved = false;\n var touchStartCopy = this.touchStart;\n window.setTimeout(function () {\n var touchesMatch = _this.touchStart === touchStartCopy;\n if (_this.touching && touchesMatch && !_this.moved) {\n _this.moved = true;\n var event_1 = {\n type: TouchListener.EVENT_LONG_TAP,\n touchStart: _this.touchStart,\n touchEvent: touchEvent\n };\n _this.eventService.dispatchEvent(event_1);\n }\n }, 500);\n };\n TouchListener.prototype.onTouchMove = function (touchEvent) {\n if (!this.touching) {\n return;\n }\n var touch = this.getActiveTouch(touchEvent.touches);\n if (!touch) {\n return;\n }\n var eventIsFarAway = !areEventsNear(touch, this.touchStart, 4);\n if (eventIsFarAway) {\n this.moved = true;\n }\n };\n TouchListener.prototype.onTouchEnd = function (touchEvent) {\n if (!this.touching) {\n return;\n }\n if (!this.moved) {\n var event_2 = {\n type: TouchListener.EVENT_TAP,\n touchStart: this.touchStart\n };\n this.eventService.dispatchEvent(event_2);\n this.checkForDoubleTap();\n }\n // stops the tap from also been processed as a mouse click\n if (this.preventMouseClick) {\n touchEvent.preventDefault();\n }\n this.touching = false;\n };\n TouchListener.prototype.checkForDoubleTap = function () {\n var now = new Date().getTime();\n if (this.lastTapTime && this.lastTapTime > 0) {\n // if previous tap, see if duration is short enough to be considered double tap\n var interval = now - this.lastTapTime;\n if (interval > TouchListener.DOUBLE_TAP_MILLIS) {\n // dispatch double tap event\n var event_3 = {\n type: TouchListener.EVENT_DOUBLE_TAP,\n touchStart: this.touchStart\n };\n this.eventService.dispatchEvent(event_3);\n // this stops a tripple tap ending up as two double taps\n this.lastTapTime = null;\n }\n else {\n this.lastTapTime = now;\n }\n }\n else {\n this.lastTapTime = now;\n }\n };\n TouchListener.prototype.destroy = function () {\n this.destroyFuncs.forEach(function (func) { return func(); });\n };\n TouchListener.EVENT_TAP = \"tap\";\n TouchListener.EVENT_DOUBLE_TAP = \"doubleTap\";\n TouchListener.EVENT_LONG_TAP = \"longTap\";\n TouchListener.DOUBLE_TAP_MILLIS = 500;\n return TouchListener;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$r = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$q = (undefined && undefined.__decorate) || function (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};\nvar HeaderComp = /** @class */ (function (_super) {\n __extends$r(HeaderComp, _super);\n function HeaderComp() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.lastMovingChanged = 0;\n return _this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n HeaderComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n HeaderComp.prototype.refresh = function (params) {\n this.params = params;\n // if template changed, then recreate the whole comp, the code required to manage\n // a changing template is to difficult for what it's worth.\n if (this.workOutTemplate() != this.currentTemplate) {\n return false;\n }\n if (this.workOutShowMenu() != this.currentShowMenu) {\n return false;\n }\n if (this.workOutSort() != this.currentSort) {\n return false;\n }\n this.setDisplayName(params);\n return true;\n };\n HeaderComp.prototype.workOutTemplate = function () {\n var template = firstExistingValue(this.params.template, HeaderComp.TEMPLATE);\n // take account of any newlines & whitespace before/after the actual template\n template = template && template.trim ? template.trim() : template;\n return template;\n };\n HeaderComp.prototype.init = function (params) {\n this.params = params;\n this.currentTemplate = this.workOutTemplate();\n this.setTemplate(this.currentTemplate);\n this.setupTap();\n this.setupIcons(params.column);\n this.setMenu();\n this.setupSort();\n this.setupFilterIcon();\n this.setDisplayName(params);\n };\n HeaderComp.prototype.setDisplayName = function (params) {\n if (this.currentDisplayName != params.displayName) {\n this.currentDisplayName = params.displayName;\n var displayNameSanitised = escapeString(this.currentDisplayName);\n if (this.eText) {\n this.eText.innerHTML = displayNameSanitised;\n }\n }\n };\n HeaderComp.prototype.setupIcons = function (column) {\n this.addInIcon('sortAscending', this.eSortAsc, column);\n this.addInIcon('sortDescending', this.eSortDesc, column);\n this.addInIcon('sortUnSort', this.eSortNone, column);\n this.addInIcon('menu', this.eMenu, column);\n this.addInIcon('filter', this.eFilter, column);\n };\n HeaderComp.prototype.addInIcon = function (iconName, eParent, column) {\n if (eParent == null) {\n return;\n }\n var eIcon = createIconNoSpan(iconName, this.gridOptionsWrapper, column);\n if (eIcon) {\n eParent.appendChild(eIcon);\n }\n };\n HeaderComp.prototype.setupTap = function () {\n var _this = this;\n var options = this.gridOptionsWrapper;\n if (options.isSuppressTouch()) {\n return;\n }\n var touchListener = new TouchListener(this.getGui(), true);\n var suppressMenuHide = options.isSuppressMenuHide();\n var tapMenuButton = suppressMenuHide && exists(this.eMenu);\n var menuTouchListener = tapMenuButton ? new TouchListener(this.eMenu, true) : touchListener;\n if (this.params.enableMenu) {\n var eventType = tapMenuButton ? 'EVENT_TAP' : 'EVENT_LONG_TAP';\n var showMenuFn = function (event) {\n options.getApi().showColumnMenuAfterMouseClick(_this.params.column, event.touchStart);\n };\n this.addManagedListener(menuTouchListener, TouchListener[eventType], showMenuFn);\n }\n if (this.params.enableSorting) {\n var tapListener = function (event) {\n var target = event.touchStart.target;\n // When suppressMenuHide is true, a tap on the menu icon will bubble up\n // to the header container, in that case we should not sort\n if (suppressMenuHide && _this.eMenu.contains(target)) {\n return;\n }\n _this.sortController.progressSort(_this.params.column, false, \"uiColumnSorted\");\n };\n this.addManagedListener(touchListener, TouchListener.EVENT_TAP, tapListener);\n }\n // if tapMenuButton is true `touchListener` and `menuTouchListener` are different\n // so we need to make sure to destroy both listeners here\n this.addDestroyFunc(function () { return touchListener.destroy(); });\n if (tapMenuButton) {\n this.addDestroyFunc(function () { return menuTouchListener.destroy(); });\n }\n };\n HeaderComp.prototype.workOutShowMenu = function () {\n // we don't show the menu if on an iPad/iPhone, as the user cannot have a pointer device/\n // However if suppressMenuHide is set to true the menu will be displayed alwasys, so it's ok\n // to show it on iPad in this case (as hover isn't needed). If suppressMenuHide\n // is false (default) user will need to use longpress to display the menu.\n var menuHides = !this.gridOptionsWrapper.isSuppressMenuHide();\n var onIpadAndMenuHides = isIOSUserAgent() && menuHides;\n var showMenu = this.params.enableMenu && !onIpadAndMenuHides;\n return showMenu;\n };\n HeaderComp.prototype.setMenu = function () {\n var _this = this;\n // if no menu provided in template, do nothing\n if (!this.eMenu) {\n return;\n }\n this.currentShowMenu = this.workOutShowMenu();\n if (!this.currentShowMenu) {\n removeFromParent(this.eMenu);\n return;\n }\n var suppressMenuHide = this.gridOptionsWrapper.isSuppressMenuHide();\n this.addManagedListener(this.eMenu, 'click', function () { return _this.showMenu(_this.eMenu); });\n this.eMenu.classList.toggle('ag-header-menu-always-show', suppressMenuHide);\n };\n HeaderComp.prototype.showMenu = function (eventSource) {\n if (!eventSource) {\n eventSource = this.eMenu;\n }\n this.menuFactory.showMenuAfterButtonClick(this.params.column, eventSource, 'columnMenu');\n };\n HeaderComp.prototype.removeSortIcons = function () {\n removeFromParent(this.eSortAsc);\n removeFromParent(this.eSortDesc);\n removeFromParent(this.eSortNone);\n removeFromParent(this.eSortOrder);\n };\n HeaderComp.prototype.workOutSort = function () {\n return this.params.enableSorting;\n };\n HeaderComp.prototype.setupSort = function () {\n var _this = this;\n this.currentSort = this.params.enableSorting;\n if (!this.currentSort) {\n this.removeSortIcons();\n return;\n }\n var sortUsingCtrl = this.gridOptionsWrapper.isMultiSortKeyCtrl();\n // keep track of last time the moving changed flag was set\n this.addManagedListener(this.params.column, Column.EVENT_MOVING_CHANGED, function () {\n _this.lastMovingChanged = new Date().getTime();\n });\n // add the event on the header, so when clicked, we do sorting\n if (this.eLabel) {\n this.addManagedListener(this.eLabel, 'click', function (event) {\n // sometimes when moving a column via dragging, this was also firing a clicked event.\n // here is issue raised by user: https://ag-grid.zendesk.com/agent/tickets/1076\n // this check stops sort if a) column is moving or b) column moved less than 200ms ago (so caters for race condition)\n var moving = _this.params.column.isMoving();\n var nowTime = new Date().getTime();\n // typically there is <2ms if moving flag was set recently, as it would be done in same VM turn\n var movedRecently = (nowTime - _this.lastMovingChanged) < 50;\n var columnMoving = moving || movedRecently;\n if (!columnMoving) {\n var multiSort = sortUsingCtrl ? (event.ctrlKey || event.metaKey) : event.shiftKey;\n _this.params.progressSort(multiSort);\n }\n });\n }\n this.addManagedListener(this.params.column, Column.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n this.onSortChanged();\n this.addManagedListener(this.eventService, Events.EVENT_SORT_CHANGED, this.setMultiSortOrder.bind(this));\n this.setMultiSortOrder();\n };\n HeaderComp.prototype.onSortChanged = function () {\n this.addOrRemoveCssClass('ag-header-cell-sorted-asc', this.params.column.isSortAscending());\n this.addOrRemoveCssClass('ag-header-cell-sorted-desc', this.params.column.isSortDescending());\n this.addOrRemoveCssClass('ag-header-cell-sorted-none', this.params.column.isSortNone());\n if (this.eSortAsc) {\n this.eSortAsc.classList.toggle('ag-hidden', !this.params.column.isSortAscending());\n }\n if (this.eSortDesc) {\n this.eSortDesc.classList.toggle('ag-hidden', !this.params.column.isSortDescending());\n }\n if (this.eSortNone) {\n var alwaysHideNoSort = !this.params.column.getColDef().unSortIcon && !this.gridOptionsWrapper.isUnSortIcon();\n this.eSortNone.classList.toggle('ag-hidden', alwaysHideNoSort || !this.params.column.isSortNone());\n }\n };\n // we listen here for global sort events, NOT column sort events, as we want to do this\n // when sorting has been set on all column (if we listened just for our col (where we\n // set the asc / desc icons) then it's possible other cols are yet to get their sorting state.\n HeaderComp.prototype.setMultiSortOrder = function () {\n if (!this.eSortOrder) {\n return;\n }\n var col = this.params.column;\n var allColumnsWithSorting = this.sortController.getColumnsWithSortingOrdered();\n var indexThisCol = allColumnsWithSorting.indexOf(col);\n var moreThanOneColSorting = allColumnsWithSorting.length > 1;\n var showIndex = col.isSorting() && moreThanOneColSorting;\n setDisplayed(this.eSortOrder, showIndex);\n if (indexThisCol >= 0) {\n this.eSortOrder.innerHTML = (indexThisCol + 1).toString();\n }\n else {\n clearElement(this.eSortOrder);\n }\n };\n HeaderComp.prototype.setupFilterIcon = function () {\n if (!this.eFilter) {\n return;\n }\n this.addManagedListener(this.params.column, Column.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n this.onFilterChanged();\n };\n HeaderComp.prototype.onFilterChanged = function () {\n var filterPresent = this.params.column.isFilterActive();\n this.eFilter.classList.toggle('ag-hidden', !filterPresent);\n };\n HeaderComp.TEMPLATE = \"
\\n \\n
\\n \\n \\n \\n \\n \\n \\n
\\n
\";\n __decorate$q([\n Autowired('sortController')\n ], HeaderComp.prototype, \"sortController\", void 0);\n __decorate$q([\n Autowired('menuFactory')\n ], HeaderComp.prototype, \"menuFactory\", void 0);\n __decorate$q([\n RefSelector('eFilter')\n ], HeaderComp.prototype, \"eFilter\", void 0);\n __decorate$q([\n RefSelector('eSortAsc')\n ], HeaderComp.prototype, \"eSortAsc\", void 0);\n __decorate$q([\n RefSelector('eSortDesc')\n ], HeaderComp.prototype, \"eSortDesc\", void 0);\n __decorate$q([\n RefSelector('eSortNone')\n ], HeaderComp.prototype, \"eSortNone\", void 0);\n __decorate$q([\n RefSelector('eSortOrder')\n ], HeaderComp.prototype, \"eSortOrder\", void 0);\n __decorate$q([\n RefSelector('eMenu')\n ], HeaderComp.prototype, \"eMenu\", void 0);\n __decorate$q([\n RefSelector('eLabel')\n ], HeaderComp.prototype, \"eLabel\", void 0);\n __decorate$q([\n RefSelector('eText')\n ], HeaderComp.prototype, \"eText\", void 0);\n return HeaderComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$s = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$r = (undefined && undefined.__decorate) || function (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};\nvar HeaderGroupComp = /** @class */ (function (_super) {\n __extends$s(HeaderGroupComp, _super);\n function HeaderGroupComp() {\n return _super.call(this, HeaderGroupComp.TEMPLATE) || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n HeaderGroupComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n HeaderGroupComp.prototype.init = function (params) {\n this.params = params;\n this.checkWarnings();\n this.setupLabel();\n this.addGroupExpandIcon();\n this.setupExpandIcons();\n };\n HeaderGroupComp.prototype.checkWarnings = function () {\n var paramsAny = this.params;\n if (paramsAny.template) {\n var message_1 = \"AG Grid: A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)\";\n doOnce(function () { return console.warn(message_1); }, 'HeaderGroupComp.templateNotSupported');\n }\n };\n HeaderGroupComp.prototype.setupExpandIcons = function () {\n var _this = this;\n this.addInIcon(\"columnGroupOpened\", \"agOpened\");\n this.addInIcon(\"columnGroupClosed\", \"agClosed\");\n var expandAction = function (event) {\n if (isStopPropagationForAgGrid(event)) {\n return;\n }\n var newExpandedValue = !_this.params.columnGroup.isExpanded();\n _this.columnModel.setColumnGroupOpened(_this.params.columnGroup.getProvidedColumnGroup(), newExpandedValue, \"uiColumnExpanded\");\n };\n this.addTouchAndClickListeners(this.eCloseIcon, expandAction);\n this.addTouchAndClickListeners(this.eOpenIcon, expandAction);\n var stopPropagationAction = function (event) {\n stopPropagationForAgGrid(event);\n };\n // adding stopPropagation to the double click for the icons prevents double click action happening\n // when the icons are clicked. if the icons are double clicked, then the groups should open and\n // then close again straight away. if we also listened to double click, then the group would open,\n // close, then open, which is not what we want. double click should only action if the user double\n // clicks outside of the icons.\n this.addManagedListener(this.eCloseIcon, \"dblclick\", stopPropagationAction);\n this.addManagedListener(this.eOpenIcon, \"dblclick\", stopPropagationAction);\n this.addManagedListener(this.getGui(), \"dblclick\", expandAction);\n this.updateIconVisibility();\n var providedColumnGroup = this.params.columnGroup.getProvidedColumnGroup();\n this.addManagedListener(providedColumnGroup, ProvidedColumnGroup.EVENT_EXPANDED_CHANGED, this.updateIconVisibility.bind(this));\n this.addManagedListener(providedColumnGroup, ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED, this.updateIconVisibility.bind(this));\n };\n HeaderGroupComp.prototype.addTouchAndClickListeners = function (eElement, action) {\n var touchListener = new TouchListener(eElement, true);\n this.addManagedListener(touchListener, TouchListener.EVENT_TAP, action);\n this.addDestroyFunc(function () { return touchListener.destroy(); });\n this.addManagedListener(eElement, \"click\", action);\n };\n HeaderGroupComp.prototype.updateIconVisibility = function () {\n var columnGroup = this.params.columnGroup;\n if (columnGroup.isExpandable()) {\n var expanded = this.params.columnGroup.isExpanded();\n setDisplayed(this.eOpenIcon, expanded);\n setDisplayed(this.eCloseIcon, !expanded);\n }\n else {\n setDisplayed(this.eOpenIcon, false);\n setDisplayed(this.eCloseIcon, false);\n }\n };\n HeaderGroupComp.prototype.addInIcon = function (iconName, refName) {\n var eIcon = createIconNoSpan(iconName, this.gridOptionsWrapper, null);\n if (eIcon) {\n this.getRefElement(refName).appendChild(eIcon);\n }\n };\n HeaderGroupComp.prototype.addGroupExpandIcon = function () {\n if (!this.params.columnGroup.isExpandable()) {\n setDisplayed(this.eOpenIcon, false);\n setDisplayed(this.eCloseIcon, false);\n return;\n }\n };\n HeaderGroupComp.prototype.setupLabel = function () {\n // no renderer, default text render\n var displayName = this.params.displayName;\n if (exists(displayName)) {\n var displayNameSanitised = escapeString(displayName);\n this.getRefElement('agLabel').innerHTML = displayNameSanitised;\n }\n };\n HeaderGroupComp.TEMPLATE = \"
\\n \\n \\n \\n
\";\n __decorate$r([\n Autowired(\"columnModel\")\n ], HeaderGroupComp.prototype, \"columnModel\", void 0);\n __decorate$r([\n RefSelector(\"agOpened\")\n ], HeaderGroupComp.prototype, \"eOpenIcon\", void 0);\n __decorate$r([\n RefSelector(\"agClosed\")\n ], HeaderGroupComp.prototype, \"eCloseIcon\", void 0);\n return HeaderGroupComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$t = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar PopupComponent = /** @class */ (function (_super) {\n __extends$t(PopupComponent, _super);\n function PopupComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PopupComponent.prototype.isPopup = function () {\n return true;\n };\n PopupComponent.prototype.setParentComponent = function (container) {\n container.addCssClass('ag-has-popup');\n _super.prototype.setParentComponent.call(this, container);\n };\n PopupComponent.prototype.destroy = function () {\n var parentComp = this.parentComponent;\n var hasParent = parentComp && parentComp.isAlive();\n if (hasParent) {\n parentComp.getGui().classList.remove('ag-has-popup');\n }\n _super.prototype.destroy.call(this);\n };\n return PopupComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$u = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$s = (undefined && undefined.__decorate) || function (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};\nvar LargeTextCellEditor = /** @class */ (function (_super) {\n __extends$u(LargeTextCellEditor, _super);\n function LargeTextCellEditor() {\n return _super.call(this, LargeTextCellEditor.TEMPLATE) || this;\n }\n LargeTextCellEditor.prototype.init = function (params) {\n this.params = params;\n this.focusAfterAttached = params.cellStartedEdit;\n this.eTextArea\n .setMaxLength(params.maxLength || 200)\n .setCols(params.cols || 60)\n .setRows(params.rows || 10);\n if (exists(params.value)) {\n this.eTextArea.setValue(params.value.toString(), true);\n }\n this.addGuiEventListener('keydown', this.onKeyDown.bind(this));\n };\n LargeTextCellEditor.prototype.onKeyDown = function (event) {\n var key = event.key;\n if (key === KeyCode.LEFT ||\n key === KeyCode.UP ||\n key === KeyCode.RIGHT ||\n key === KeyCode.DOWN ||\n (event.shiftKey && key === KeyCode.ENTER)) { // shift+enter allows for newlines\n event.stopPropagation();\n }\n };\n LargeTextCellEditor.prototype.afterGuiAttached = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eTextArea.setInputAriaLabel(translate('ariaInputEditor', 'Input Editor'));\n if (this.focusAfterAttached) {\n this.eTextArea.getFocusableElement().focus();\n }\n };\n LargeTextCellEditor.prototype.getValue = function () {\n return this.params.parseValue(this.eTextArea.getValue());\n };\n LargeTextCellEditor.TEMPLATE = \"
\\n \\n
\";\n __decorate$s([\n RefSelector(\"eTextArea\")\n ], LargeTextCellEditor.prototype, \"eTextArea\", void 0);\n return LargeTextCellEditor;\n}(PopupComponent));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$v = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$t = (undefined && undefined.__decorate) || function (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};\nvar SelectCellEditor = /** @class */ (function (_super) {\n __extends$v(SelectCellEditor, _super);\n function SelectCellEditor() {\n var _this = _super.call(this, '
') || this;\n _this.startedByEnter = false;\n return _this;\n }\n SelectCellEditor.prototype.init = function (params) {\n var _this = this;\n this.focusAfterAttached = params.cellStartedEdit;\n if (missing(params.values)) {\n console.warn('AG Grid: no values found for select cellEditor');\n return;\n }\n this.startedByEnter = params.eventKey != null ? params.eventKey === KeyCode.ENTER : false;\n var hasValue = false;\n params.values.forEach(function (value) {\n var option = { value: value };\n var valueFormatted = _this.valueFormatterService.formatValue(params.column, null, null, value);\n var valueFormattedExits = valueFormatted !== null && valueFormatted !== undefined;\n option.text = valueFormattedExits ? valueFormatted : value;\n _this.eSelect.addOption(option);\n hasValue = hasValue || params.value === value;\n });\n if (hasValue) {\n this.eSelect.setValue(params.value, true);\n }\n else if (params.values.length) {\n this.eSelect.setValue(params.values[0], true);\n }\n // we don't want to add this if full row editing, otherwise selecting will stop the\n // full row editing.\n if (!this.gridOptionsWrapper.isFullRowEdit()) {\n this.eSelect.onValueChange(function () { return params.stopEditing(); });\n }\n };\n SelectCellEditor.prototype.afterGuiAttached = function () {\n if (this.focusAfterAttached) {\n this.eSelect.getFocusableElement().focus();\n }\n if (this.startedByEnter) {\n this.eSelect.showPicker();\n }\n };\n SelectCellEditor.prototype.focusIn = function () {\n this.eSelect.getFocusableElement().focus();\n };\n SelectCellEditor.prototype.getValue = function () {\n return this.eSelect.getValue();\n };\n SelectCellEditor.prototype.isPopup = function () {\n return false;\n };\n __decorate$t([\n Autowired('valueFormatterService')\n ], SelectCellEditor.prototype, \"valueFormatterService\", void 0);\n __decorate$t([\n RefSelector('eSelect')\n ], SelectCellEditor.prototype, \"eSelect\", void 0);\n return SelectCellEditor;\n}(PopupComponent));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$w = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar PopupSelectCellEditor = /** @class */ (function (_super) {\n __extends$w(PopupSelectCellEditor, _super);\n function PopupSelectCellEditor() {\n var _this = _super.call(this) || this;\n doOnce(function () { return console.warn('AG Grid: The PopupSelectCellEditor (agPopupSelectCellEditor) is deprecated. Instead use {cellEditor: \"agSelectCellEditor\", cellEditorPopup: true} '); }, 'PopupSelectCellEditor.deprecated');\n return _this;\n }\n PopupSelectCellEditor.prototype.isPopup = function () {\n return true;\n };\n return PopupSelectCellEditor;\n}(SelectCellEditor));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$x = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$u = (undefined && undefined.__decorate) || function (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};\nvar TextCellEditor = /** @class */ (function (_super) {\n __extends$x(TextCellEditor, _super);\n function TextCellEditor() {\n return _super.call(this, TextCellEditor.TEMPLATE) || this;\n }\n TextCellEditor.prototype.init = function (params) {\n this.params = params;\n var eInput = this.eInput;\n var startValue;\n // cellStartedEdit is only false if we are doing fullRow editing\n if (params.cellStartedEdit) {\n this.focusAfterAttached = true;\n if (params.eventKey === KeyCode.BACKSPACE || params.eventKey === KeyCode.DELETE) {\n startValue = '';\n }\n else if (params.charPress) {\n startValue = params.charPress;\n }\n else {\n startValue = this.getStartValue(params);\n if (params.eventKey !== KeyCode.F2) {\n this.highlightAllOnFocus = true;\n }\n }\n }\n else {\n this.focusAfterAttached = false;\n startValue = this.getStartValue(params);\n }\n if (startValue != null) {\n eInput.setValue(startValue, true);\n }\n this.addManagedListener(eInput.getGui(), 'keydown', function (event) {\n var key = event.key;\n if (key === KeyCode.PAGE_UP || key === KeyCode.PAGE_DOWN) {\n event.preventDefault();\n }\n });\n };\n TextCellEditor.prototype.afterGuiAttached = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var eInput = this.eInput;\n eInput.setInputAriaLabel(translate('ariaInputEditor', 'Input Editor'));\n if (!this.focusAfterAttached) {\n return;\n }\n // Added for AG-3238. We can't remove this explicit focus() because Chrome requires an input\n // to be focused before setSelectionRange will work. But it triggers a bug in Safari where\n // explicitly focusing then blurring an empty field will cause the parent container to scroll.\n if (!isBrowserSafari()) {\n eInput.getFocusableElement().focus();\n }\n var inputEl = eInput.getInputElement();\n if (this.highlightAllOnFocus) {\n inputEl.select();\n }\n else {\n // when we started editing, we want the caret at the end, not the start.\n // this comes into play in two scenarios:\n // a) when user hits F2\n // b) when user hits a printable character\n var value = eInput.getValue();\n var len = (exists(value) && value.length) || 0;\n if (len) {\n inputEl.setSelectionRange(len, len);\n }\n }\n };\n // gets called when tabbing trough cells and in full row edit mode\n TextCellEditor.prototype.focusIn = function () {\n var eInput = this.eInput;\n var focusEl = eInput.getFocusableElement();\n var inputEl = eInput.getInputElement();\n focusEl.focus();\n inputEl.select();\n };\n TextCellEditor.prototype.getValue = function () {\n var eInput = this.eInput;\n return this.params.parseValue(eInput.getValue());\n };\n TextCellEditor.prototype.getStartValue = function (params) {\n var formatValue = params.useFormatter || params.column.getColDef().refData;\n return formatValue ? params.formatValue(params.value) : params.value;\n };\n TextCellEditor.prototype.isPopup = function () {\n return false;\n };\n TextCellEditor.TEMPLATE = '
';\n __decorate$u([\n RefSelector('eInput')\n ], TextCellEditor.prototype, \"eInput\", void 0);\n return TextCellEditor;\n}(PopupComponent));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$y = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar PopupTextCellEditor = /** @class */ (function (_super) {\n __extends$y(PopupTextCellEditor, _super);\n function PopupTextCellEditor() {\n var _this = _super.call(this) || this;\n doOnce(function () { return console.warn('AG Grid: The PopupTextCellEditor (agPopupTextCellEditor) is deprecated. Instead use {cellEditor: \"agTextCellEditor\", cellEditorPopup: true} '); }, 'PopupTextCellEditor.deprecated');\n return _this;\n }\n PopupTextCellEditor.prototype.isPopup = function () {\n return true;\n };\n return PopupTextCellEditor;\n}(TextCellEditor));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$z = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$v = (undefined && undefined.__decorate) || function (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};\nvar ARROW_UP = '\\u2191';\nvar ARROW_DOWN = '\\u2193';\nvar AnimateShowChangeCellRenderer = /** @class */ (function (_super) {\n __extends$z(AnimateShowChangeCellRenderer, _super);\n function AnimateShowChangeCellRenderer() {\n var _this = _super.call(this, AnimateShowChangeCellRenderer.TEMPLATE) || this;\n _this.refreshCount = 0;\n return _this;\n }\n AnimateShowChangeCellRenderer.prototype.init = function (params) {\n // this.params = params;\n this.eValue = this.queryForHtmlElement('.ag-value-change-value');\n this.eDelta = this.queryForHtmlElement('.ag-value-change-delta');\n this.refresh(params);\n };\n AnimateShowChangeCellRenderer.prototype.showDelta = function (params, delta) {\n var absDelta = Math.abs(delta);\n var valueFormatted = params.formatValue(absDelta);\n var valueToUse = exists(valueFormatted) ? valueFormatted : absDelta;\n var deltaUp = (delta >= 0);\n if (deltaUp) {\n this.eDelta.innerHTML = ARROW_UP + valueToUse;\n }\n else {\n // because negative, use ABS to remove sign\n this.eDelta.innerHTML = ARROW_DOWN + valueToUse;\n }\n this.eDelta.classList.toggle('ag-value-change-delta-up', deltaUp);\n this.eDelta.classList.toggle('ag-value-change-delta-down', !deltaUp);\n };\n AnimateShowChangeCellRenderer.prototype.setTimerToRemoveDelta = function () {\n var _this = this;\n // the refreshCount makes sure that if the value updates again while\n // the below timer is waiting, then the below timer will realise it\n // is not the most recent and will not try to remove the delta value.\n this.refreshCount++;\n var refreshCountCopy = this.refreshCount;\n window.setTimeout(function () {\n if (refreshCountCopy === _this.refreshCount) {\n _this.hideDeltaValue();\n }\n }, 2000);\n };\n AnimateShowChangeCellRenderer.prototype.hideDeltaValue = function () {\n this.eValue.classList.remove('ag-value-change-value-highlight');\n clearElement(this.eDelta);\n };\n AnimateShowChangeCellRenderer.prototype.refresh = function (params) {\n var value = params.value;\n if (value === this.lastValue) {\n return false;\n }\n if (exists(params.valueFormatted)) {\n this.eValue.innerHTML = params.valueFormatted;\n }\n else if (exists(params.value)) {\n this.eValue.innerHTML = value;\n }\n else {\n clearElement(this.eValue);\n }\n // we don't show the delta if we are in the middle of a filter. see comment on FilterManager\n // with regards processingFilterChange\n if (this.filterManager.isSuppressFlashingCellsBecauseFiltering()) {\n return false;\n }\n if (typeof value === 'number' && typeof this.lastValue === 'number') {\n var delta = value - this.lastValue;\n this.showDelta(params, delta);\n }\n // highlight the current value, but only if it's not new, otherwise it\n // would get highlighted first time the value is shown\n if (this.lastValue) {\n this.eValue.classList.add('ag-value-change-value-highlight');\n }\n this.setTimerToRemoveDelta();\n this.lastValue = value;\n return true;\n };\n AnimateShowChangeCellRenderer.TEMPLATE = '' +\n '' +\n '' +\n '';\n __decorate$v([\n Autowired('filterManager')\n ], AnimateShowChangeCellRenderer.prototype, \"filterManager\", void 0);\n return AnimateShowChangeCellRenderer;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$A = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$w = (undefined && undefined.__decorate) || function (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};\nvar AnimateSlideCellRenderer = /** @class */ (function (_super) {\n __extends$A(AnimateSlideCellRenderer, _super);\n function AnimateSlideCellRenderer() {\n var _this = _super.call(this, AnimateSlideCellRenderer.TEMPLATE) || this;\n _this.refreshCount = 0;\n _this.eCurrent = _this.queryForHtmlElement('.ag-value-slide-current');\n return _this;\n }\n AnimateSlideCellRenderer.prototype.init = function (params) {\n this.refresh(params);\n };\n AnimateSlideCellRenderer.prototype.addSlideAnimation = function () {\n var _this = this;\n this.refreshCount++;\n // below we keep checking this, and stop working on the animation\n // if it no longer matches - this means another animation has started\n // and this one is stale.\n var refreshCountCopy = this.refreshCount;\n // if old animation, remove it\n if (this.ePrevious) {\n this.getGui().removeChild(this.ePrevious);\n }\n this.ePrevious = loadTemplate('');\n this.ePrevious.innerHTML = this.eCurrent.innerHTML;\n this.getGui().insertBefore(this.ePrevious, this.eCurrent);\n // having timeout of 0 allows use to skip to the next css turn,\n // so we know the previous css classes have been applied. so the\n // complex set of setTimeout below creates the animation\n window.setTimeout(function () {\n if (refreshCountCopy !== _this.refreshCount) {\n return;\n }\n _this.ePrevious.classList.add('ag-value-slide-out-end');\n }, 50);\n window.setTimeout(function () {\n if (refreshCountCopy !== _this.refreshCount) {\n return;\n }\n _this.getGui().removeChild(_this.ePrevious);\n _this.ePrevious = null;\n }, 3000);\n };\n AnimateSlideCellRenderer.prototype.refresh = function (params) {\n var value = params.value;\n if (missing(value)) {\n value = '';\n }\n if (value === this.lastValue) {\n return false;\n }\n // we don't show the delta if we are in the middle of a filter. see comment on FilterManager\n // with regards processingFilterChange\n if (this.filterManager.isSuppressFlashingCellsBecauseFiltering()) {\n return false;\n }\n this.addSlideAnimation();\n this.lastValue = value;\n if (exists(params.valueFormatted)) {\n this.eCurrent.innerHTML = params.valueFormatted;\n }\n else if (exists(params.value)) {\n this.eCurrent.innerHTML = value;\n }\n else {\n clearElement(this.eCurrent);\n }\n return true;\n };\n AnimateSlideCellRenderer.TEMPLATE = \"\\n \\n \";\n __decorate$w([\n Autowired('filterManager')\n ], AnimateSlideCellRenderer.prototype, \"filterManager\", void 0);\n return AnimateSlideCellRenderer;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n(function (RowHighlightPosition) {\n RowHighlightPosition[RowHighlightPosition[\"Above\"] = 0] = \"Above\";\n RowHighlightPosition[RowHighlightPosition[\"Below\"] = 1] = \"Below\";\n})(exports.RowHighlightPosition || (exports.RowHighlightPosition = {}));\nvar RowNode = /** @class */ (function () {\n function RowNode(beans) {\n /** The current row index. If the row is filtered out or in a collapsed group, this value will be `null`. */\n this.rowIndex = null;\n /** The key for the group eg Ireland, UK, USA */\n this.key = null;\n /** Children mapped by the pivot columns. */\n this.childrenMapped = {};\n /**\n * This will be `true` if it has a rowIndex assigned, otherwise `false`.\n */\n this.displayed = false;\n /** The row top position in pixels. */\n this.rowTop = null;\n /** The top pixel for this row last time, makes sense if data set was ordered or filtered,\n * it is used so new rows can animate in from their old position. */\n this.oldRowTop = null;\n /** `true` by default - can be overridden via gridOptions.isRowSelectable(rowNode) */\n this.selectable = true;\n /** Used by sorting service - to give deterministic sort to groups. Previously we\n * just id for this, however id is a string and had slower sorting compared to numbers. */\n this.__objectId = RowNode.OBJECT_ID_SEQUENCE++;\n /** When one or more Columns are using autoHeight, this keeps track of height of each autoHeight Cell,\n * indexed by the Column ID. */\n this.__autoHeights = {};\n /** `true` when nodes with the same id are being removed and added as part of the same batch transaction */\n this.alreadyRendered = false;\n this.highlighted = null;\n this.selected = false;\n this.onRowHeightChangedDebounced = debounce(this.onRowHeightChanged.bind(this), 100);\n this.beans = beans;\n }\n /** Replaces the data on the `rowNode`. When complete, the grid will refresh the the entire rendered row if it is showing. */\n RowNode.prototype.setData = function (data) {\n this.setDataCommon(data, false);\n };\n // similar to setRowData, however it is expected that the data is the same data item. this\n // is intended to be used with Redux type stores, where the whole data can be changed. we are\n // guaranteed that the data is the same entity (so grid doesn't need to worry about the id of the\n // underlying data changing, hence doesn't need to worry about selection). the grid, upon receiving\n // dataChanged event, will refresh the cells rather than rip them all out (so user can show transitions).\n RowNode.prototype.updateData = function (data) {\n this.setDataCommon(data, true);\n };\n RowNode.prototype.setDataCommon = function (data, update) {\n var oldData = this.data;\n this.data = data;\n this.beans.valueCache.onDataChanged();\n this.updateDataOnDetailNode();\n this.checkRowSelectable();\n var event = this.createDataChangedEvent(data, oldData, update);\n this.dispatchLocalEvent(event);\n };\n // when we are doing master / detail, the detail node is lazy created, but then kept around.\n // so if we show / hide the detail, the same detail rowNode is used. so we need to keep the data\n // in sync, otherwise expand/collapse of the detail would still show the old values.\n RowNode.prototype.updateDataOnDetailNode = function () {\n if (this.detailNode) {\n this.detailNode.data = this.data;\n }\n };\n RowNode.prototype.createDataChangedEvent = function (newData, oldData, update) {\n return {\n type: RowNode.EVENT_DATA_CHANGED,\n node: this,\n oldData: oldData,\n newData: newData,\n update: update\n };\n };\n RowNode.prototype.createLocalRowEvent = function (type) {\n return {\n type: type,\n node: this\n };\n };\n RowNode.prototype.getRowIndexString = function () {\n if (this.rowPinned === Constants.PINNED_TOP) {\n return 't-' + this.rowIndex;\n }\n if (this.rowPinned === Constants.PINNED_BOTTOM) {\n return 'b-' + this.rowIndex;\n }\n return this.rowIndex.toString();\n };\n RowNode.prototype.createDaemonNode = function () {\n var oldNode = new RowNode(this.beans);\n // just copy the id and data, this is enough for the node to be used\n // in the selection controller (the selection controller is the only\n // place where daemon nodes can live).\n oldNode.id = this.id;\n oldNode.data = this.data;\n oldNode.daemon = true;\n oldNode.selected = this.selected;\n oldNode.level = this.level;\n return oldNode;\n };\n RowNode.prototype.setDataAndId = function (data, id) {\n var oldNode = exists(this.id) ? this.createDaemonNode() : null;\n var oldData = this.data;\n this.data = data;\n this.updateDataOnDetailNode();\n this.setId(id);\n this.beans.selectionService.syncInRowNode(this, oldNode);\n this.checkRowSelectable();\n var event = this.createDataChangedEvent(data, oldData, false);\n this.dispatchLocalEvent(event);\n };\n RowNode.prototype.checkRowSelectable = function () {\n var isRowSelectableFunc = this.beans.gridOptionsWrapper.getIsRowSelectableFunc();\n this.setRowSelectable(isRowSelectableFunc ? isRowSelectableFunc(this) : true);\n };\n RowNode.prototype.setRowSelectable = function (newVal) {\n if (this.selectable !== newVal) {\n this.selectable = newVal;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_SELECTABLE_CHANGED));\n }\n }\n };\n RowNode.prototype.setId = function (id) {\n // see if user is providing the id's\n var getRowIdFunc = this.beans.gridOptionsWrapper.getRowIdFunc();\n if (getRowIdFunc) {\n // if user is providing the id's, then we set the id only after the data has been set.\n // this is important for virtual pagination and viewport, where empty rows exist.\n if (this.data) {\n // we pass 'true' as we skip this level when generating keys,\n // as we don't always have the key for this level (eg when updating\n // data via transaction on SSRM, we are getting key to look up the\n // RowNode, don't have the RowNode yet, thus no way to get the current key)\n var parentKeys = this.getGroupKeys(true);\n this.id = getRowIdFunc({\n data: this.data,\n parentKeys: parentKeys.length > 0 ? parentKeys : undefined,\n level: this.level\n });\n // make sure id provided doesn't start with 'row-group-' as this is reserved. also check that\n // it has 'startsWith' in case the user provided a number.\n if (this.id !== null && typeof this.id === 'string' && this.id.startsWith(RowNode.ID_PREFIX_ROW_GROUP)) {\n console.error(\"AG Grid: Row IDs cannot start with \" + RowNode.ID_PREFIX_ROW_GROUP + \", this is a reserved prefix for AG Grid's row grouping feature.\");\n }\n // force id to be a string\n if (this.id !== null && typeof this.id !== 'string') {\n this.id = '' + this.id;\n }\n }\n else {\n // this can happen if user has set blank into the rowNode after the row previously\n // having data. this happens in virtual page row model, when data is delete and\n // the page is refreshed.\n this.id = undefined;\n }\n }\n else {\n this.id = id;\n }\n };\n RowNode.prototype.getGroupKeys = function (excludeSelf) {\n if (excludeSelf === void 0) { excludeSelf = false; }\n var keys = [];\n var pointer = this;\n if (excludeSelf) {\n pointer = pointer.parent;\n }\n while (pointer && pointer.level >= 0) {\n keys.push(pointer.key);\n pointer = pointer.parent;\n }\n keys.reverse();\n return keys;\n };\n RowNode.prototype.isPixelInRange = function (pixel) {\n if (!exists(this.rowTop) || !exists(this.rowHeight)) {\n return false;\n }\n return pixel >= this.rowTop && pixel < (this.rowTop + this.rowHeight);\n };\n RowNode.prototype.setFirstChild = function (firstChild) {\n if (this.firstChild === firstChild) {\n return;\n }\n this.firstChild = firstChild;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_FIRST_CHILD_CHANGED));\n }\n };\n RowNode.prototype.setLastChild = function (lastChild) {\n if (this.lastChild === lastChild) {\n return;\n }\n this.lastChild = lastChild;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_LAST_CHILD_CHANGED));\n }\n };\n RowNode.prototype.setChildIndex = function (childIndex) {\n if (this.childIndex === childIndex) {\n return;\n }\n this.childIndex = childIndex;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_CHILD_INDEX_CHANGED));\n }\n };\n RowNode.prototype.setRowTop = function (rowTop) {\n this.oldRowTop = this.rowTop;\n if (this.rowTop === rowTop) {\n return;\n }\n this.rowTop = rowTop;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_TOP_CHANGED));\n }\n this.setDisplayed(rowTop !== null);\n };\n RowNode.prototype.clearRowTopAndRowIndex = function () {\n this.oldRowTop = null;\n this.setRowTop(null);\n this.setRowIndex(null);\n };\n RowNode.prototype.setDisplayed = function (displayed) {\n if (this.displayed === displayed) {\n return;\n }\n this.displayed = displayed;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_DISPLAYED_CHANGED));\n }\n };\n RowNode.prototype.setDragging = function (dragging) {\n if (this.dragging === dragging) {\n return;\n }\n this.dragging = dragging;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_DRAGGING_CHANGED));\n }\n };\n RowNode.prototype.setHighlighted = function (highlighted) {\n if (highlighted === this.highlighted) {\n return;\n }\n this.highlighted = highlighted;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HIGHLIGHT_CHANGED));\n }\n };\n RowNode.prototype.setAllChildrenCount = function (allChildrenCount) {\n if (this.allChildrenCount === allChildrenCount) {\n return;\n }\n this.allChildrenCount = allChildrenCount;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED));\n }\n };\n RowNode.prototype.setMaster = function (master) {\n if (this.master === master) {\n return;\n }\n // if changing AWAY from master, then unexpand, otherwise\n // next time it's shown it is expanded again\n if (this.master && !master) {\n this.expanded = false;\n }\n this.master = master;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_MASTER_CHANGED));\n }\n };\n RowNode.prototype.setGroup = function (group) {\n if (this.group === group) {\n return;\n }\n // if we used to be a group, and no longer, then close the node\n if (this.group && !group) {\n this.expanded = false;\n }\n this.group = group;\n this.updateHasChildren();\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_GROUP_CHANGED));\n }\n };\n /**\n * Sets the row height.\n * Call if you want to change the height initially assigned to the row.\n * After calling, you must call `api.onRowHeightChanged()` so the grid knows it needs to work out the placement of the rows. */\n RowNode.prototype.setRowHeight = function (rowHeight, estimated) {\n if (estimated === void 0) { estimated = false; }\n this.rowHeight = rowHeight;\n this.rowHeightEstimated = estimated;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HEIGHT_CHANGED));\n }\n };\n RowNode.prototype.setRowAutoHeight = function (cellHeight, column) {\n if (!this.__autoHeights) {\n this.__autoHeights = {};\n }\n var autoHeights = this.__autoHeights;\n autoHeights[column.getId()] = cellHeight;\n if (cellHeight != null) {\n if (this.checkAutoHeightsDebounced == null) {\n this.checkAutoHeightsDebounced = debounce(this.checkAutoHeights.bind(this), 1);\n }\n this.checkAutoHeightsDebounced();\n }\n };\n RowNode.prototype.checkAutoHeights = function () {\n var notAllPresent = false;\n var nonePresent = true;\n var newRowHeight = 0;\n var autoHeights = this.__autoHeights;\n if (autoHeights == null) {\n return;\n }\n var displayedAutoHeightCols = this.beans.columnModel.getAllDisplayedAutoHeightCols();\n displayedAutoHeightCols.forEach(function (col) {\n var cellHeight = autoHeights[col.getId()];\n if (cellHeight == null) {\n notAllPresent = true;\n return;\n }\n nonePresent = false;\n if (cellHeight > newRowHeight) {\n newRowHeight = cellHeight;\n }\n });\n if (notAllPresent) {\n return;\n }\n // we take min of 10, so we don't adjust for empty rows. if <10, we put to default.\n // this prevents the row starting very small when waiting for async components,\n // which would then mean the grid squashes in far to many rows (as small heights\n // means more rows fit in) which looks crap. so best ignore small values and assume\n // we are still waiting for values to render.\n if (nonePresent || newRowHeight < 10) {\n newRowHeight = this.beans.gridOptionsWrapper.getRowHeightForNode(this).height;\n }\n if (newRowHeight == this.rowHeight) {\n return;\n }\n this.setRowHeight(newRowHeight);\n this.onRowHeightChangedDebounced();\n };\n /** This method is debounced. It is used for row auto-height. If we don't debounce,\n * then the Row Models will end up recalculating each row position\n * for each row height change and result in the Row Renderer laying out rows.\n * This is particularly bad if using print layout, and showing eg 1,000 rows,\n * each row will change it's height, causing Row Model to update 1,000 times.\n */\n RowNode.prototype.onRowHeightChanged = function () {\n var rowModel = this.beans.rowModel;\n if (rowModel.onRowHeightChanged) {\n rowModel.onRowHeightChanged();\n }\n };\n RowNode.prototype.setRowIndex = function (rowIndex) {\n if (this.rowIndex === rowIndex) {\n return;\n }\n this.rowIndex = rowIndex;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_ROW_INDEX_CHANGED));\n }\n };\n RowNode.prototype.setUiLevel = function (uiLevel) {\n if (this.uiLevel === uiLevel) {\n return;\n }\n this.uiLevel = uiLevel;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_UI_LEVEL_CHANGED));\n }\n };\n RowNode.prototype.setExpanded = function (expanded, e) {\n if (this.expanded === expanded) {\n return;\n }\n this.expanded = expanded;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_EXPANDED_CHANGED));\n }\n var event = Object.assign({}, this.createGlobalRowEvent(Events.EVENT_ROW_GROUP_OPENED), {\n expanded: expanded,\n event: e || null\n });\n this.beans.rowNodeEventThrottle.dispatchExpanded(event);\n // when using footers we need to refresh the group row, as the aggregation\n // values jump between group and footer\n if (this.beans.gridOptionsWrapper.isGroupIncludeFooter()) {\n this.beans.rowRenderer.refreshCells({ rowNodes: [this] });\n }\n };\n RowNode.prototype.createGlobalRowEvent = function (type) {\n return {\n type: type,\n node: this,\n data: this.data,\n rowIndex: this.rowIndex,\n rowPinned: this.rowPinned,\n context: this.beans.gridOptionsWrapper.getContext(),\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()\n };\n };\n RowNode.prototype.dispatchLocalEvent = function (event) {\n if (this.eventService) {\n this.eventService.dispatchEvent(event);\n }\n };\n /**\n * Replaces the value on the `rowNode` for the specified column. When complete,\n * the grid will refresh the rendered cell on the required row only.\n *\n * @param colKey The column where the value should be updated\n * @param newValue The new value\n * @param eventSource The source of the event\n * @returns `True` if the value was changed, otherwise `False`.\n */\n RowNode.prototype.setDataValue = function (colKey, newValue, eventSource) {\n // When it is done via the editors, no 'cell changed' event gets fired, as it's assumed that\n // the cell knows about the change given it's in charge of the editing.\n // this method is for the client to call, so the cell listens for the change\n // event, and also flashes the cell when the change occurs.\n var column = this.beans.columnModel.getPrimaryColumn(colKey);\n var oldValue = this.beans.valueService.getValue(column, this);\n var valueChanged = this.beans.valueService.setValue(this, column, newValue, eventSource);\n this.dispatchCellChangedEvent(column, newValue, oldValue);\n return valueChanged;\n };\n RowNode.prototype.setGroupValue = function (colKey, newValue) {\n var column = this.beans.columnModel.getGridColumn(colKey);\n if (missing(this.groupData)) {\n this.groupData = {};\n }\n var columnId = column.getColId();\n var oldValue = this.groupData[columnId];\n if (oldValue === newValue) {\n return;\n }\n this.groupData[columnId] = newValue;\n this.dispatchCellChangedEvent(column, newValue, oldValue);\n };\n // sets the data for an aggregation\n RowNode.prototype.setAggData = function (newAggData) {\n var _this = this;\n // find out all keys that could potentially change\n var colIds = getAllKeysInObjects([this.aggData, newAggData]);\n var oldAggData = this.aggData;\n this.aggData = newAggData;\n // if no event service, nobody has registered for events, so no need fire event\n if (this.eventService) {\n colIds.forEach(function (colId) {\n var column = _this.beans.columnModel.getGridColumn(colId);\n var value = _this.aggData ? _this.aggData[colId] : undefined;\n var oldValue = oldAggData ? oldAggData[colId] : undefined;\n _this.dispatchCellChangedEvent(column, value, oldValue);\n });\n }\n };\n RowNode.prototype.updateHasChildren = function () {\n // we need to return true when this.group=true, as this is used by server side row model\n // (as children are lazy loaded and stored in a cache anyway). otherwise we return true\n // if children exist.\n var newValue = (this.group && !this.footer) || (this.childrenAfterGroup && this.childrenAfterGroup.length > 0);\n if (newValue !== this.__hasChildren) {\n this.__hasChildren = !!newValue;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HAS_CHILDREN_CHANGED));\n }\n }\n };\n RowNode.prototype.hasChildren = function () {\n if (this.__hasChildren == null) {\n this.updateHasChildren();\n }\n return this.__hasChildren;\n };\n RowNode.prototype.isEmptyRowGroupNode = function () {\n return this.group && missingOrEmpty(this.childrenAfterGroup);\n };\n RowNode.prototype.dispatchCellChangedEvent = function (column, newValue, oldValue) {\n var cellChangedEvent = {\n type: RowNode.EVENT_CELL_CHANGED,\n node: this,\n column: column,\n newValue: newValue,\n oldValue: oldValue\n };\n this.dispatchLocalEvent(cellChangedEvent);\n };\n /**\n * The first time `quickFilter` runs, the grid creates a one-off string representation of the row.\n * This string is then used for the quick filter instead of hitting each column separately.\n * When you edit, using grid editing, this string gets cleared down.\n * However if you edit without using grid editing, you will need to clear this string down for the row to be updated with the new values.\n * Otherwise new values will not work with the `quickFilter`. */\n RowNode.prototype.resetQuickFilterAggregateText = function () {\n this.quickFilterAggregateText = null;\n };\n RowNode.prototype.isExpandable = function () {\n return (this.hasChildren() && !this.footer) || this.master ? true : false;\n };\n /** Returns:\n * - `true` if node is selected,\n * - `false` if the node isn't selected\n * - `undefined` if it's partially selected (group where not all children are selected). */\n RowNode.prototype.isSelected = function () {\n // for footers, we just return what our sibling selected state is, as cannot select a footer\n if (this.footer) {\n return this.sibling.isSelected();\n }\n return this.selected;\n };\n /** Perform a depth-first search of this node and its children. */\n RowNode.prototype.depthFirstSearch = function (callback) {\n if (this.childrenAfterGroup) {\n this.childrenAfterGroup.forEach(function (child) { return child.depthFirstSearch(callback); });\n }\n callback(this);\n };\n // + rowController.updateGroupsInSelection()\n // + selectionController.calculatedSelectedForAllGroupNodes()\n RowNode.prototype.calculateSelectedFromChildren = function () {\n var _a;\n var atLeastOneSelected = false;\n var atLeastOneDeSelected = false;\n var atLeastOneMixed = false;\n var newSelectedValue;\n if (!((_a = this.childrenAfterGroup) === null || _a === void 0 ? void 0 : _a.length)) {\n return;\n }\n for (var i = 0; i < this.childrenAfterGroup.length; i++) {\n var child = this.childrenAfterGroup[i];\n // skip non-selectable nodes to prevent inconsistent selection values\n if (!child.selectable) {\n continue;\n }\n var childState = child.isSelected();\n switch (childState) {\n case true:\n atLeastOneSelected = true;\n break;\n case false:\n atLeastOneDeSelected = true;\n break;\n default:\n atLeastOneMixed = true;\n break;\n }\n }\n if (atLeastOneMixed) {\n newSelectedValue = undefined;\n }\n else if (atLeastOneSelected && !atLeastOneDeSelected) {\n newSelectedValue = true;\n }\n else if (!atLeastOneSelected && atLeastOneDeSelected) {\n newSelectedValue = false;\n }\n else {\n newSelectedValue = undefined;\n }\n this.selectThisNode(newSelectedValue);\n };\n RowNode.prototype.setSelectedInitialValue = function (selected) {\n this.selected = selected;\n };\n /**\n * Select (or deselect) the node.\n * @param newValue -`true` for selection, `false` for deselection.\n * @param clearSelection - If selecting, then passing `true` will select the node exclusively (i.e. NOT do multi select). If doing deselection, `clearSelection` has no impact.\n * @param suppressFinishActions - Pass `true` to prevent the `selectionChanged` from being fired. Note that the `rowSelected` event will still be fired.\n */\n RowNode.prototype.setSelected = function (newValue, clearSelection, suppressFinishActions) {\n if (clearSelection === void 0) { clearSelection = false; }\n if (suppressFinishActions === void 0) { suppressFinishActions = false; }\n this.setSelectedParams({\n newValue: newValue,\n clearSelection: clearSelection,\n suppressFinishActions: suppressFinishActions,\n rangeSelect: false\n });\n };\n RowNode.prototype.isRowPinned = function () {\n return this.rowPinned === Constants.PINNED_TOP || this.rowPinned === Constants.PINNED_BOTTOM;\n };\n // to make calling code more readable, this is the same method as setSelected except it takes names parameters\n RowNode.prototype.setSelectedParams = function (params) {\n var _a;\n var groupSelectsChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();\n var newValue = params.newValue === true;\n var clearSelection = params.clearSelection === true;\n var suppressFinishActions = params.suppressFinishActions === true;\n var rangeSelect = params.rangeSelect === true;\n // groupSelectsFiltered only makes sense when group selects children\n var groupSelectsFiltered = groupSelectsChildren && (params.groupSelectsFiltered === true);\n if (this.id === undefined) {\n console.warn('AG Grid: cannot select node until id for node is known');\n return 0;\n }\n if (this.rowPinned) {\n console.warn('AG Grid: cannot select pinned rows');\n return 0;\n }\n // if we are a footer, we don't do selection, just pass the info\n // to the sibling (the parent of the group)\n if (this.footer) {\n return this.sibling.setSelectedParams(params);\n }\n if (rangeSelect && this.beans.selectionService.getLastSelectedNode()) {\n var newRowClicked = this.beans.selectionService.getLastSelectedNode() !== this;\n var allowMultiSelect = this.beans.gridOptionsWrapper.isRowSelectionMulti();\n if (newRowClicked && allowMultiSelect) {\n var nodesChanged = this.doRowRangeSelection(params.newValue);\n this.beans.selectionService.setLastSelectedNode(this);\n return nodesChanged;\n }\n }\n var updatedCount = 0;\n // when groupSelectsFiltered, then this node may end up intermediate despite\n // trying to set it to true / false. this group will be calculated further on\n // down when we call calculatedSelectedForAllGroupNodes(). we need to skip it\n // here, otherwise the updatedCount would include it.\n var skipThisNode = groupSelectsFiltered && this.group;\n if (!skipThisNode) {\n var thisNodeWasSelected = this.selectThisNode(newValue);\n if (thisNodeWasSelected) {\n updatedCount++;\n }\n }\n if (groupSelectsChildren && ((_a = this.childrenAfterGroup) === null || _a === void 0 ? void 0 : _a.length)) {\n updatedCount += this.selectChildNodes(newValue, groupSelectsFiltered);\n }\n // clear other nodes if not doing multi select\n if (!suppressFinishActions) {\n var clearOtherNodes = newValue && (clearSelection || !this.beans.gridOptionsWrapper.isRowSelectionMulti());\n if (clearOtherNodes) {\n updatedCount += this.beans.selectionService.clearOtherNodes(this);\n }\n // only if we selected something, then update groups and fire events\n if (updatedCount > 0) {\n this.beans.selectionService.updateGroupsFromChildrenSelections();\n // this is the very end of the 'action node', so we are finished all the updates,\n // include any parent / child changes that this method caused\n var event_1 = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi\n };\n this.beans.eventService.dispatchEvent(event_1);\n }\n // so if user next does shift-select, we know where to start the selection from\n if (newValue) {\n this.beans.selectionService.setLastSelectedNode(this);\n }\n }\n return updatedCount;\n };\n // selects all rows between this node and the last selected node (or the top if this is the first selection).\n // not to be mixed up with 'cell range selection' where you drag the mouse, this is row range selection, by\n // holding down 'shift'.\n RowNode.prototype.doRowRangeSelection = function (value) {\n var _this = this;\n if (value === void 0) { value = true; }\n var groupsSelectChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();\n var lastSelectedNode = this.beans.selectionService.getLastSelectedNode();\n var nodesToSelect = this.beans.rowModel.getNodesInRangeForSelection(this, lastSelectedNode);\n var updatedCount = 0;\n nodesToSelect.forEach(function (rowNode) {\n if (rowNode.group && groupsSelectChildren || (value === false && _this === rowNode)) {\n return;\n }\n var nodeWasSelected = rowNode.selectThisNode(value);\n if (nodeWasSelected) {\n updatedCount++;\n }\n });\n this.beans.selectionService.updateGroupsFromChildrenSelections();\n var event = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi\n };\n this.beans.eventService.dispatchEvent(event);\n return updatedCount;\n };\n RowNode.prototype.isParentOfNode = function (potentialParent) {\n var parentNode = this.parent;\n while (parentNode) {\n if (parentNode === potentialParent) {\n return true;\n }\n parentNode = parentNode.parent;\n }\n return false;\n };\n RowNode.prototype.selectThisNode = function (newValue) {\n // we only check selectable when newValue=true (ie selecting) to allow unselecting values,\n // as selectable is dynamic, need a way to unselect rows when selectable becomes false.\n var selectionNotAllowed = !this.selectable && newValue;\n var selectionNotChanged = this.selected === newValue;\n if (selectionNotAllowed || selectionNotChanged) {\n return false;\n }\n this.selected = newValue;\n if (this.eventService) {\n this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_ROW_SELECTED));\n }\n var event = this.createGlobalRowEvent(Events.EVENT_ROW_SELECTED);\n this.beans.eventService.dispatchEvent(event);\n return true;\n };\n RowNode.prototype.selectChildNodes = function (newValue, groupSelectsFiltered) {\n var children = groupSelectsFiltered ? this.childrenAfterAggFilter : this.childrenAfterGroup;\n if (missing(children)) {\n return 0;\n }\n var updatedCount = 0;\n for (var i = 0; i < children.length; i++) {\n updatedCount += children[i].setSelectedParams({\n newValue: newValue,\n clearSelection: false,\n suppressFinishActions: true,\n groupSelectsFiltered: groupSelectsFiltered\n });\n }\n return updatedCount;\n };\n /** Add an event listener. */\n RowNode.prototype.addEventListener = function (eventType, listener) {\n if (!this.eventService) {\n this.eventService = new EventService();\n }\n this.eventService.addEventListener(eventType, listener);\n };\n /** Remove event listener. */\n RowNode.prototype.removeEventListener = function (eventType, listener) {\n if (!this.eventService) {\n return;\n }\n this.eventService.removeEventListener(eventType, listener);\n if (this.eventService.noRegisteredListenersExist()) {\n this.eventService = null;\n }\n };\n RowNode.prototype.onMouseEnter = function () {\n this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_MOUSE_ENTER));\n };\n RowNode.prototype.onMouseLeave = function () {\n this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_MOUSE_LEAVE));\n };\n RowNode.prototype.getFirstChildOfFirstChild = function (rowGroupColumn) {\n var currentRowNode = this;\n var isCandidate = true;\n var foundFirstChildPath = false;\n var nodeToSwapIn = null;\n // if we are hiding groups, then if we are the first child, of the first child,\n // all the way up to the column we are interested in, then we show the group cell.\n while (isCandidate && !foundFirstChildPath) {\n var parentRowNode = currentRowNode.parent;\n var firstChild = exists(parentRowNode) && currentRowNode.firstChild;\n if (firstChild) {\n if (parentRowNode.rowGroupColumn === rowGroupColumn) {\n foundFirstChildPath = true;\n nodeToSwapIn = parentRowNode;\n }\n }\n else {\n isCandidate = false;\n }\n currentRowNode = parentRowNode;\n }\n return foundFirstChildPath ? nodeToSwapIn : null;\n };\n RowNode.prototype.isFullWidthCell = function () {\n var isFullWidthCellFunc = this.beans.gridOptionsWrapper.getIsFullWidthCellFunc();\n return isFullWidthCellFunc ? isFullWidthCellFunc({ rowNode: this }) : false;\n };\n /**\n * Returns the route of the row node. If the Row Node is a group, it returns the route to that Row Node.\n * If the Row Node is not a group, it returns `undefined`.\n */\n RowNode.prototype.getRoute = function () {\n if (this.key == null) {\n return;\n }\n var res = [];\n var pointer = this;\n while (pointer.key != null) {\n res.push(pointer.key);\n pointer = pointer.parent;\n }\n return res.reverse();\n };\n RowNode.ID_PREFIX_ROW_GROUP = 'row-group-';\n RowNode.ID_PREFIX_TOP_PINNED = 't-';\n RowNode.ID_PREFIX_BOTTOM_PINNED = 'b-';\n RowNode.OBJECT_ID_SEQUENCE = 0;\n RowNode.EVENT_ROW_SELECTED = 'rowSelected';\n RowNode.EVENT_DATA_CHANGED = 'dataChanged';\n RowNode.EVENT_CELL_CHANGED = 'cellChanged';\n RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED = 'allChildrenCountChanged';\n RowNode.EVENT_MASTER_CHANGED = 'masterChanged';\n RowNode.EVENT_GROUP_CHANGED = 'groupChanged';\n RowNode.EVENT_MOUSE_ENTER = 'mouseEnter';\n RowNode.EVENT_MOUSE_LEAVE = 'mouseLeave';\n RowNode.EVENT_HEIGHT_CHANGED = 'heightChanged';\n RowNode.EVENT_TOP_CHANGED = 'topChanged';\n RowNode.EVENT_DISPLAYED_CHANGED = 'displayedChanged';\n RowNode.EVENT_FIRST_CHILD_CHANGED = 'firstChildChanged';\n RowNode.EVENT_LAST_CHILD_CHANGED = 'lastChildChanged';\n RowNode.EVENT_CHILD_INDEX_CHANGED = 'childIndexChanged';\n RowNode.EVENT_ROW_INDEX_CHANGED = 'rowIndexChanged';\n RowNode.EVENT_EXPANDED_CHANGED = 'expandedChanged';\n RowNode.EVENT_HAS_CHILDREN_CHANGED = 'hasChildrenChanged';\n RowNode.EVENT_SELECTABLE_CHANGED = 'selectableChanged';\n RowNode.EVENT_UI_LEVEL_CHANGED = 'uiLevelChanged';\n RowNode.EVENT_HIGHLIGHT_CHANGED = 'rowHighlightChanged';\n RowNode.EVENT_DRAGGING_CHANGED = 'draggingChanged';\n return RowNode;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$B = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$x = (undefined && undefined.__decorate) || function (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};\nvar CheckboxSelectionComponent = /** @class */ (function (_super) {\n __extends$B(CheckboxSelectionComponent, _super);\n function CheckboxSelectionComponent() {\n return _super.call(this, /* html*/ \"\\n
\\n \\n
\") || this;\n }\n CheckboxSelectionComponent.prototype.postConstruct = function () {\n this.eCheckbox.setPassive(true);\n };\n CheckboxSelectionComponent.prototype.getCheckboxId = function () {\n return this.eCheckbox.getInputElement().id;\n };\n CheckboxSelectionComponent.prototype.onDataChanged = function () {\n // when rows are loaded for the second time, this can impact the selection, as a row\n // could be loaded as already selected (if user scrolls down, and then up again).\n this.onSelectionChanged();\n };\n CheckboxSelectionComponent.prototype.onSelectableChanged = function () {\n this.showOrHideSelect();\n };\n CheckboxSelectionComponent.prototype.onSelectionChanged = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var state = this.rowNode.isSelected();\n var stateName = state === undefined\n ? translate('ariaIndeterminate', 'indeterminate')\n : (state === true\n ? translate('ariaChecked', 'checked')\n : translate('ariaUnchecked', 'unchecked'));\n var ariaLabel = translate('ariaRowToggleSelection', 'Press Space to toggle row selection');\n this.eCheckbox.setValue(state, true);\n this.eCheckbox.setInputAriaLabel(ariaLabel + \" (\" + stateName + \")\");\n };\n CheckboxSelectionComponent.prototype.onCheckedClicked = function (event) {\n var groupSelectsFiltered = this.gridOptionsWrapper.isGroupSelectsFiltered();\n var updatedCount = this.rowNode.setSelectedParams({ newValue: false, rangeSelect: event.shiftKey, groupSelectsFiltered: groupSelectsFiltered });\n return updatedCount;\n };\n CheckboxSelectionComponent.prototype.onUncheckedClicked = function (event) {\n var groupSelectsFiltered = this.gridOptionsWrapper.isGroupSelectsFiltered();\n var updatedCount = this.rowNode.setSelectedParams({ newValue: true, rangeSelect: event.shiftKey, groupSelectsFiltered: groupSelectsFiltered });\n return updatedCount;\n };\n CheckboxSelectionComponent.prototype.init = function (params) {\n var _this = this;\n this.rowNode = params.rowNode;\n this.column = params.column;\n this.onSelectionChanged();\n // we don't want the row clicked event to fire when selecting the checkbox, otherwise the row\n // would possibly get selected twice\n this.addGuiEventListener('click', function (event) { return stopPropagationForAgGrid(event); });\n // likewise we don't want double click on this icon to open a group\n this.addGuiEventListener('dblclick', function (event) { return stopPropagationForAgGrid(event); });\n this.addManagedListener(this.eCheckbox.getInputElement(), 'click', function (event) {\n var isSelected = _this.eCheckbox.getValue();\n var previousValue = _this.eCheckbox.getPreviousValue();\n if (previousValue === undefined || isSelected === undefined) {\n // Indeterminate state - try toggling children to determine action.\n var result = _this.onUncheckedClicked(event || {});\n if (result === 0) {\n _this.onCheckedClicked(event);\n }\n }\n else if (isSelected) {\n _this.onCheckedClicked(event);\n }\n else {\n _this.onUncheckedClicked(event || {});\n }\n });\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_SELECTED, this.onSelectionChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.onDataChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_SELECTABLE_CHANGED, this.onSelectableChanged.bind(this));\n var isRowSelectableFunc = this.gridOptionsWrapper.getIsRowSelectableFunc();\n var checkboxVisibleIsDynamic = isRowSelectableFunc || this.checkboxCallbackExists();\n if (checkboxVisibleIsDynamic) {\n var showOrHideSelectListener = this.showOrHideSelect.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, showOrHideSelectListener);\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, showOrHideSelectListener);\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, showOrHideSelectListener);\n this.showOrHideSelect();\n }\n this.eCheckbox.getInputElement().setAttribute('tabindex', '-1');\n };\n CheckboxSelectionComponent.prototype.showOrHideSelect = function () {\n // if the isRowSelectable() is not provided the row node is selectable by default\n var selectable = this.rowNode.selectable;\n // checkboxSelection callback is deemed a legacy solution however we will still consider it's result.\n // If selectable, then also check the colDef callback. if not selectable, this it short circuits - no need\n // to call the colDef callback.\n if (selectable && this.checkboxCallbackExists()) {\n selectable = this.column.isCellCheckboxSelection(this.rowNode);\n }\n // show checkbox if both conditions are true\n this.setVisible(selectable);\n };\n CheckboxSelectionComponent.prototype.checkboxCallbackExists = function () {\n // column will be missing if groupUseEntireRow=true\n var colDef = this.column ? this.column.getColDef() : null;\n return !!colDef && typeof colDef.checkboxSelection === 'function';\n };\n __decorate$x([\n RefSelector('eCheckbox')\n ], CheckboxSelectionComponent.prototype, \"eCheckbox\", void 0);\n __decorate$x([\n PostConstruct\n ], CheckboxSelectionComponent.prototype, \"postConstruct\", null);\n return CheckboxSelectionComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$C = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$y = (undefined && undefined.__decorate) || function (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};\nvar __values$2 = (undefined && undefined.__values) || function(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(function (DragSourceType) {\n DragSourceType[DragSourceType[\"ToolPanel\"] = 0] = \"ToolPanel\";\n DragSourceType[DragSourceType[\"HeaderCell\"] = 1] = \"HeaderCell\";\n DragSourceType[DragSourceType[\"RowDrag\"] = 2] = \"RowDrag\";\n DragSourceType[DragSourceType[\"ChartPanel\"] = 3] = \"ChartPanel\";\n})(exports.DragSourceType || (exports.DragSourceType = {}));\n(function (VerticalDirection) {\n VerticalDirection[VerticalDirection[\"Up\"] = 0] = \"Up\";\n VerticalDirection[VerticalDirection[\"Down\"] = 1] = \"Down\";\n})(exports.VerticalDirection || (exports.VerticalDirection = {}));\n(function (HorizontalDirection) {\n HorizontalDirection[HorizontalDirection[\"Left\"] = 0] = \"Left\";\n HorizontalDirection[HorizontalDirection[\"Right\"] = 1] = \"Right\";\n})(exports.HorizontalDirection || (exports.HorizontalDirection = {}));\nvar DragAndDropService = /** @class */ (function (_super) {\n __extends$C(DragAndDropService, _super);\n function DragAndDropService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.dragSourceAndParamsList = [];\n _this.dropTargets = [];\n return _this;\n }\n DragAndDropService_1 = DragAndDropService;\n DragAndDropService.prototype.init = function () {\n this.ePinnedIcon = createIcon('columnMovePin', this.gridOptionsWrapper, null);\n this.eHideIcon = createIcon('columnMoveHide', this.gridOptionsWrapper, null);\n this.eMoveIcon = createIcon('columnMoveMove', this.gridOptionsWrapper, null);\n this.eLeftIcon = createIcon('columnMoveLeft', this.gridOptionsWrapper, null);\n this.eRightIcon = createIcon('columnMoveRight', this.gridOptionsWrapper, null);\n this.eGroupIcon = createIcon('columnMoveGroup', this.gridOptionsWrapper, null);\n this.eAggregateIcon = createIcon('columnMoveValue', this.gridOptionsWrapper, null);\n this.ePivotIcon = createIcon('columnMovePivot', this.gridOptionsWrapper, null);\n this.eDropNotAllowedIcon = createIcon('dropNotAllowed', this.gridOptionsWrapper, null);\n };\n DragAndDropService.prototype.addDragSource = function (dragSource, allowTouch) {\n if (allowTouch === void 0) { allowTouch = false; }\n var params = {\n eElement: dragSource.eElement,\n dragStartPixels: dragSource.dragStartPixels,\n onDragStart: this.onDragStart.bind(this, dragSource),\n onDragStop: this.onDragStop.bind(this),\n onDragging: this.onDragging.bind(this)\n };\n this.dragSourceAndParamsList.push({ params: params, dragSource: dragSource });\n this.dragService.addDragSource(params, allowTouch);\n };\n DragAndDropService.prototype.removeDragSource = function (dragSource) {\n var sourceAndParams = this.dragSourceAndParamsList.find(function (item) { return item.dragSource === dragSource; });\n if (sourceAndParams) {\n this.dragService.removeDragSource(sourceAndParams.params);\n removeFromArray(this.dragSourceAndParamsList, sourceAndParams);\n }\n };\n DragAndDropService.prototype.clearDragSourceParamsList = function () {\n var _this = this;\n this.dragSourceAndParamsList.forEach(function (sourceAndParams) { return _this.dragService.removeDragSource(sourceAndParams.params); });\n this.dragSourceAndParamsList.length = 0;\n };\n DragAndDropService.prototype.nudge = function () {\n if (this.dragging) {\n this.onDragging(this.eventLastTime, true);\n }\n };\n DragAndDropService.prototype.onDragStart = function (dragSource, mouseEvent) {\n this.dragging = true;\n this.dragSource = dragSource;\n this.eventLastTime = mouseEvent;\n this.dragItem = this.dragSource.getDragItem();\n this.lastDropTarget = this.dragSource.dragSourceDropTarget;\n if (this.dragSource.onDragStarted) {\n this.dragSource.onDragStarted();\n }\n this.createGhost();\n };\n DragAndDropService.prototype.onDragStop = function (mouseEvent) {\n this.eventLastTime = null;\n this.dragging = false;\n if (this.dragSource.onDragStopped) {\n this.dragSource.onDragStopped();\n }\n if (this.lastDropTarget && this.lastDropTarget.onDragStop) {\n var draggingEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, null, null, false);\n this.lastDropTarget.onDragStop(draggingEvent);\n }\n this.lastDropTarget = null;\n this.dragItem = null;\n this.removeGhost();\n };\n DragAndDropService.prototype.onDragging = function (mouseEvent, fromNudge) {\n var _this = this;\n var hDirection = this.getHorizontalDirection(mouseEvent);\n var vDirection = this.getVerticalDirection(mouseEvent);\n this.eventLastTime = mouseEvent;\n this.positionGhost(mouseEvent);\n // check if mouseEvent intersects with any of the drop targets\n var validDropTargets = this.dropTargets.filter(function (target) { return _this.isMouseOnDropTarget(mouseEvent, target); });\n var len = validDropTargets.length;\n var dropTarget = null;\n if (len > 0) {\n dropTarget = len === 1\n ? validDropTargets[0]\n // the current mouse position could intersect with more than 1 element\n // if they are nested. In that case we need to get the most specific\n // container, which is the one that does not contain any other targets.\n : validDropTargets.reduce(function (prevTarget, currTarget) {\n if (!prevTarget) {\n return currTarget;\n }\n var prevContainer = prevTarget.getContainer();\n var currContainer = currTarget.getContainer();\n if (prevContainer.contains(currContainer)) {\n return currTarget;\n }\n return prevTarget;\n });\n }\n if (dropTarget !== this.lastDropTarget) {\n this.leaveLastTargetIfExists(mouseEvent, hDirection, vDirection, fromNudge);\n this.enterDragTargetIfExists(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n this.lastDropTarget = dropTarget;\n }\n else if (dropTarget && dropTarget.onDragging) {\n var draggingEvent = this.createDropTargetEvent(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n dropTarget.onDragging(draggingEvent);\n }\n };\n DragAndDropService.prototype.enterDragTargetIfExists = function (dropTarget, mouseEvent, hDirection, vDirection, fromNudge) {\n if (!dropTarget) {\n return;\n }\n if (dropTarget.onDragEnter) {\n var dragEnterEvent = this.createDropTargetEvent(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n dropTarget.onDragEnter(dragEnterEvent);\n }\n this.setGhostIcon(dropTarget.getIconName ? dropTarget.getIconName() : null);\n };\n DragAndDropService.prototype.leaveLastTargetIfExists = function (mouseEvent, hDirection, vDirection, fromNudge) {\n if (!this.lastDropTarget) {\n return;\n }\n if (this.lastDropTarget.onDragLeave) {\n var dragLeaveEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n this.lastDropTarget.onDragLeave(dragLeaveEvent);\n }\n this.setGhostIcon(null);\n };\n DragAndDropService.prototype.getAllContainersFromDropTarget = function (dropTarget) {\n var secondaryContainers = dropTarget.getSecondaryContainers ? dropTarget.getSecondaryContainers() : null;\n var containers = [[dropTarget.getContainer()]];\n return secondaryContainers ? containers.concat(secondaryContainers) : containers;\n };\n DragAndDropService.prototype.allContainersIntersect = function (mouseEvent, containers) {\n var e_1, _a;\n try {\n for (var containers_1 = __values$2(containers), containers_1_1 = containers_1.next(); !containers_1_1.done; containers_1_1 = containers_1.next()) {\n var container = containers_1_1.value;\n var rect = container.getBoundingClientRect();\n // if element is not visible, then width and height are zero\n if (rect.width === 0 || rect.height === 0) {\n return false;\n }\n var horizontalFit = mouseEvent.clientX >= rect.left && mouseEvent.clientX < rect.right;\n var verticalFit = mouseEvent.clientY >= rect.top && mouseEvent.clientY < rect.bottom;\n if (!horizontalFit || !verticalFit) {\n return false;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (containers_1_1 && !containers_1_1.done && (_a = containers_1.return)) _a.call(containers_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return true;\n };\n // checks if the mouse is on the drop target. it checks eContainer and eSecondaryContainers\n DragAndDropService.prototype.isMouseOnDropTarget = function (mouseEvent, dropTarget) {\n var e_2, _a;\n var allContainersFromDropTarget = this.getAllContainersFromDropTarget(dropTarget);\n var mouseOverTarget = false;\n try {\n for (var allContainersFromDropTarget_1 = __values$2(allContainersFromDropTarget), allContainersFromDropTarget_1_1 = allContainersFromDropTarget_1.next(); !allContainersFromDropTarget_1_1.done; allContainersFromDropTarget_1_1 = allContainersFromDropTarget_1.next()) {\n var currentContainers = allContainersFromDropTarget_1_1.value;\n if (this.allContainersIntersect(mouseEvent, currentContainers)) {\n mouseOverTarget = true;\n break;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (allContainersFromDropTarget_1_1 && !allContainersFromDropTarget_1_1.done && (_a = allContainersFromDropTarget_1.return)) _a.call(allContainersFromDropTarget_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n if (dropTarget.targetContainsSource && !dropTarget.getContainer().contains(this.dragSource.eElement)) {\n return false;\n }\n return mouseOverTarget && dropTarget.isInterestedIn(this.dragSource.type, this.dragSource.eElement);\n };\n DragAndDropService.prototype.addDropTarget = function (dropTarget) {\n this.dropTargets.push(dropTarget);\n };\n DragAndDropService.prototype.removeDropTarget = function (dropTarget) {\n this.dropTargets = this.dropTargets.filter(function (target) { return target.getContainer() !== dropTarget.getContainer(); });\n };\n DragAndDropService.prototype.hasExternalDropZones = function () {\n return this.dropTargets.some(function (zones) { return zones.external; });\n };\n DragAndDropService.prototype.findExternalZone = function (params) {\n var externalTargets = this.dropTargets.filter(function (target) { return target.external; });\n return externalTargets.find(function (zone) { return zone.getContainer() === params.getContainer(); }) || null;\n };\n DragAndDropService.prototype.getHorizontalDirection = function (event) {\n var clientX = this.eventLastTime && this.eventLastTime.clientX;\n var eClientX = event.clientX;\n if (clientX === eClientX) {\n return null;\n }\n return clientX > eClientX ? exports.HorizontalDirection.Left : exports.HorizontalDirection.Right;\n };\n DragAndDropService.prototype.getVerticalDirection = function (event) {\n var clientY = this.eventLastTime && this.eventLastTime.clientY;\n var eClientY = event.clientY;\n if (clientY === eClientY) {\n return null;\n }\n return clientY > eClientY ? exports.VerticalDirection.Up : exports.VerticalDirection.Down;\n };\n DragAndDropService.prototype.createDropTargetEvent = function (dropTarget, event, hDirection, vDirection, fromNudge) {\n // localise x and y to the target\n var dropZoneTarget = dropTarget.getContainer();\n var rect = dropZoneTarget.getBoundingClientRect();\n var _a = this, api = _a.gridApi, columnApi = _a.columnApi, dragItem = _a.dragItem, dragSource = _a.dragSource;\n var x = event.clientX - rect.left;\n var y = event.clientY - rect.top;\n return { event: event, x: x, y: y, vDirection: vDirection, hDirection: hDirection, dragSource: dragSource, fromNudge: fromNudge, dragItem: dragItem, api: api, columnApi: columnApi, dropZoneTarget: dropZoneTarget };\n };\n DragAndDropService.prototype.positionGhost = function (event) {\n var ghost = this.eGhost;\n if (!ghost) {\n return;\n }\n var ghostRect = ghost.getBoundingClientRect();\n var ghostHeight = ghostRect.height;\n // for some reason, without the '-2', it still overlapped by 1 or 2 pixels, which\n // then brought in scrollbars to the browser. no idea why, but putting in -2 here\n // works around it which is good enough for me.\n var browserWidth = getBodyWidth() - 2;\n var browserHeight = getBodyHeight() - 2;\n var top = event.pageY - (ghostHeight / 2);\n var left = event.pageX - 10;\n var eDocument = this.gridOptionsWrapper.getDocument();\n var win = (eDocument.defaultView || window);\n var windowScrollY = win.pageYOffset || eDocument.documentElement.scrollTop;\n var windowScrollX = win.pageXOffset || eDocument.documentElement.scrollLeft;\n // check ghost is not positioned outside of the browser\n if (browserWidth > 0 && ((left + ghost.clientWidth) > (browserWidth + windowScrollX))) {\n left = browserWidth + windowScrollX - ghost.clientWidth;\n }\n if (left < 0) {\n left = 0;\n }\n if (browserHeight > 0 && ((top + ghost.clientHeight) > (browserHeight + windowScrollY))) {\n top = browserHeight + windowScrollY - ghost.clientHeight;\n }\n if (top < 0) {\n top = 0;\n }\n ghost.style.left = left + \"px\";\n ghost.style.top = top + \"px\";\n };\n DragAndDropService.prototype.removeGhost = function () {\n if (this.eGhost && this.eGhostParent) {\n this.eGhostParent.removeChild(this.eGhost);\n }\n this.eGhost = null;\n };\n DragAndDropService.prototype.createGhost = function () {\n this.eGhost = loadTemplate(DragAndDropService_1.GHOST_TEMPLATE);\n var theme = this.environment.getTheme().theme;\n if (theme) {\n this.eGhost.classList.add(theme);\n }\n this.eGhostIcon = this.eGhost.querySelector('.ag-dnd-ghost-icon');\n this.setGhostIcon(null);\n var eText = this.eGhost.querySelector('.ag-dnd-ghost-label');\n var dragItemName = this.dragSource.dragItemName;\n if (isFunction(dragItemName)) {\n dragItemName = dragItemName();\n }\n eText.innerHTML = escapeString(dragItemName) || '';\n this.eGhost.style.height = '25px';\n this.eGhost.style.top = '20px';\n this.eGhost.style.left = '20px';\n var eDocument = this.gridOptionsWrapper.getDocument();\n var targetEl = null;\n try {\n targetEl = eDocument.fullscreenElement;\n }\n catch (e) {\n // some environments like SalesForce will throw errors\n // simply by trying to read the fullscreenElement property\n }\n finally {\n if (!targetEl) {\n targetEl = eDocument.querySelector('body');\n }\n }\n this.eGhostParent = targetEl;\n if (!this.eGhostParent) {\n console.warn('AG Grid: could not find document body, it is needed for dragging columns');\n }\n else {\n this.eGhostParent.appendChild(this.eGhost);\n }\n };\n DragAndDropService.prototype.setGhostIcon = function (iconName, shake) {\n if (shake === void 0) { shake = false; }\n clearElement(this.eGhostIcon);\n var eIcon = null;\n if (!iconName) {\n iconName = this.dragSource.defaultIconName || DragAndDropService_1.ICON_NOT_ALLOWED;\n }\n switch (iconName) {\n case DragAndDropService_1.ICON_PINNED:\n eIcon = this.ePinnedIcon;\n break;\n case DragAndDropService_1.ICON_MOVE:\n eIcon = this.eMoveIcon;\n break;\n case DragAndDropService_1.ICON_LEFT:\n eIcon = this.eLeftIcon;\n break;\n case DragAndDropService_1.ICON_RIGHT:\n eIcon = this.eRightIcon;\n break;\n case DragAndDropService_1.ICON_GROUP:\n eIcon = this.eGroupIcon;\n break;\n case DragAndDropService_1.ICON_AGGREGATE:\n eIcon = this.eAggregateIcon;\n break;\n case DragAndDropService_1.ICON_PIVOT:\n eIcon = this.ePivotIcon;\n break;\n case DragAndDropService_1.ICON_NOT_ALLOWED:\n eIcon = this.eDropNotAllowedIcon;\n break;\n case DragAndDropService_1.ICON_HIDE:\n eIcon = this.eHideIcon;\n break;\n }\n this.eGhostIcon.classList.toggle('ag-shake-left-to-right', shake);\n if (eIcon === this.eHideIcon && this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns()) {\n return;\n }\n if (eIcon) {\n this.eGhostIcon.appendChild(eIcon);\n }\n };\n var DragAndDropService_1;\n DragAndDropService.ICON_PINNED = 'pinned';\n DragAndDropService.ICON_MOVE = 'move';\n DragAndDropService.ICON_LEFT = 'left';\n DragAndDropService.ICON_RIGHT = 'right';\n DragAndDropService.ICON_GROUP = 'group';\n DragAndDropService.ICON_AGGREGATE = 'aggregate';\n DragAndDropService.ICON_PIVOT = 'pivot';\n DragAndDropService.ICON_NOT_ALLOWED = 'notAllowed';\n DragAndDropService.ICON_HIDE = 'hide';\n DragAndDropService.GHOST_TEMPLATE = \"
\\n \\n
\\n
\";\n __decorate$y([\n Autowired('dragService')\n ], DragAndDropService.prototype, \"dragService\", void 0);\n __decorate$y([\n Autowired('environment')\n ], DragAndDropService.prototype, \"environment\", void 0);\n __decorate$y([\n Autowired('columnApi')\n ], DragAndDropService.prototype, \"columnApi\", void 0);\n __decorate$y([\n Autowired('gridApi')\n ], DragAndDropService.prototype, \"gridApi\", void 0);\n __decorate$y([\n PostConstruct\n ], DragAndDropService.prototype, \"init\", null);\n __decorate$y([\n PreDestroy\n ], DragAndDropService.prototype, \"clearDragSourceParamsList\", null);\n DragAndDropService = DragAndDropService_1 = __decorate$y([\n Bean('dragAndDropService')\n ], DragAndDropService);\n return DragAndDropService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$D = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$z = (undefined && undefined.__decorate) || function (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};\nvar RowDragComp = /** @class */ (function (_super) {\n __extends$D(RowDragComp, _super);\n function RowDragComp(cellValueFn, rowNode, column, customGui, dragStartPixels, suppressVisibilityChange) {\n var _this = _super.call(this) || this;\n _this.cellValueFn = cellValueFn;\n _this.rowNode = rowNode;\n _this.column = column;\n _this.customGui = customGui;\n _this.dragStartPixels = dragStartPixels;\n _this.suppressVisibilityChange = suppressVisibilityChange;\n _this.dragSource = null;\n return _this;\n }\n RowDragComp.prototype.isCustomGui = function () {\n return this.customGui != null;\n };\n RowDragComp.prototype.postConstruct = function () {\n if (!this.customGui) {\n this.setTemplate(/* html */ \"
\");\n this.getGui().appendChild(createIconNoSpan('rowDrag', this.beans.gridOptionsWrapper, null));\n this.addDragSource();\n }\n else {\n this.setDragElement(this.customGui, this.dragStartPixels);\n }\n this.checkCompatibility();\n if (!this.suppressVisibilityChange) {\n var strategy = this.beans.gridOptionsWrapper.isRowDragManaged() ?\n new ManagedVisibilityStrategy(this, this.beans, this.rowNode, this.column) :\n new NonManagedVisibilityStrategy(this, this.beans, this.rowNode, this.column);\n this.createManagedBean(strategy, this.beans.context);\n }\n };\n RowDragComp.prototype.setDragElement = function (dragElement, dragStartPixels) {\n this.setTemplateFromElement(dragElement);\n this.addDragSource(dragStartPixels);\n };\n RowDragComp.prototype.getSelectedCount = function () {\n var isRowDragMultiRow = this.beans.gridOptionsWrapper.isRowDragMultiRow();\n if (!isRowDragMultiRow) {\n return 1;\n }\n var selection = this.beans.selectionService.getSelectedNodes();\n return selection.indexOf(this.rowNode) !== -1 ? selection.length : 1;\n };\n // returns true if all compatibility items work out\n RowDragComp.prototype.checkCompatibility = function () {\n var managed = this.beans.gridOptionsWrapper.isRowDragManaged();\n var treeData = this.beans.gridOptionsWrapper.isTreeData();\n if (treeData && managed) {\n doOnce(function () {\n return console.warn('AG Grid: If using row drag with tree data, you cannot have rowDragManaged=true');\n }, 'RowDragComp.managedAndTreeData');\n }\n };\n RowDragComp.prototype.addDragSource = function (dragStartPixels) {\n var _this = this;\n if (dragStartPixels === void 0) { dragStartPixels = 4; }\n // if this is changing the drag element, delete the previous dragSource\n if (this.dragSource) {\n this.removeDragSource();\n }\n var dragItem = {\n rowNode: this.rowNode,\n columns: this.column ? [this.column] : undefined,\n defaultTextValue: this.cellValueFn(),\n };\n var rowDragText = this.column && this.column.getColDef().rowDragText;\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.dragSource = {\n type: exports.DragSourceType.RowDrag,\n eElement: this.getGui(),\n dragItemName: function () {\n var dragItemCount = _this.getSelectedCount();\n if (rowDragText) {\n return rowDragText(dragItem, dragItemCount);\n }\n return dragItemCount === 1 ? _this.cellValueFn() : dragItemCount + \" \" + translate('rowDragRows', 'rows');\n },\n getDragItem: function () { return dragItem; },\n dragStartPixels: dragStartPixels,\n dragSourceDomDataKey: this.beans.gridOptionsWrapper.getDomDataKey()\n };\n this.beans.dragAndDropService.addDragSource(this.dragSource, true);\n };\n RowDragComp.prototype.removeDragSource = function () {\n if (this.dragSource) {\n this.beans.dragAndDropService.removeDragSource(this.dragSource);\n }\n this.dragSource = null;\n };\n __decorate$z([\n Autowired('beans')\n ], RowDragComp.prototype, \"beans\", void 0);\n __decorate$z([\n PostConstruct\n ], RowDragComp.prototype, \"postConstruct\", null);\n __decorate$z([\n PreDestroy\n ], RowDragComp.prototype, \"removeDragSource\", null);\n return RowDragComp;\n}(Component));\nvar VisibilityStrategy = /** @class */ (function (_super) {\n __extends$D(VisibilityStrategy, _super);\n function VisibilityStrategy(parent, rowNode, column) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n _this.rowNode = rowNode;\n _this.column = column;\n return _this;\n }\n VisibilityStrategy.prototype.setDisplayedOrVisible = function (neverDisplayed) {\n if (neverDisplayed) {\n this.parent.setDisplayed(false);\n }\n else {\n var shown = true;\n var isShownSometimes = false;\n if (this.column) {\n shown = this.column.isRowDrag(this.rowNode) || this.parent.isCustomGui();\n isShownSometimes = isFunction(this.column.getColDef().rowDrag);\n }\n // if shown sometimes, them some rows can have drag handle while other don't,\n // so we use setVisible to keep the handles horizontally aligned (as setVisible\n // keeps the empty space, whereas setDisplayed looses the space)\n if (isShownSometimes) {\n this.parent.setDisplayed(true);\n this.parent.setVisible(shown);\n }\n else {\n this.parent.setDisplayed(shown);\n this.parent.setVisible(true);\n }\n }\n };\n return VisibilityStrategy;\n}(BeanStub));\n// when non managed, the visibility depends on suppressRowDrag property only\nvar NonManagedVisibilityStrategy = /** @class */ (function (_super) {\n __extends$D(NonManagedVisibilityStrategy, _super);\n function NonManagedVisibilityStrategy(parent, beans, rowNode, column) {\n var _this = _super.call(this, parent, rowNode, column) || this;\n _this.beans = beans;\n return _this;\n }\n NonManagedVisibilityStrategy.prototype.postConstruct = function () {\n this.addManagedListener(this.beans.gridOptionsWrapper, 'suppressRowDrag', this.onSuppressRowDrag.bind(this));\n // in case data changes, then we need to update visibility of drag item\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.workOutVisibility.bind(this));\n this.workOutVisibility();\n };\n NonManagedVisibilityStrategy.prototype.onSuppressRowDrag = function () {\n this.workOutVisibility();\n };\n NonManagedVisibilityStrategy.prototype.workOutVisibility = function () {\n // only show the drag if both sort and filter are not present\n var neverDisplayed = this.beans.gridOptionsWrapper.isSuppressRowDrag();\n this.setDisplayedOrVisible(neverDisplayed);\n };\n __decorate$z([\n PostConstruct\n ], NonManagedVisibilityStrategy.prototype, \"postConstruct\", null);\n return NonManagedVisibilityStrategy;\n}(VisibilityStrategy));\n// when managed, the visibility depends on sort, filter and row group, as well as suppressRowDrag property\nvar ManagedVisibilityStrategy = /** @class */ (function (_super) {\n __extends$D(ManagedVisibilityStrategy, _super);\n function ManagedVisibilityStrategy(parent, beans, rowNode, column) {\n var _this = _super.call(this, parent, rowNode, column) || this;\n _this.beans = beans;\n return _this;\n }\n ManagedVisibilityStrategy.prototype.postConstruct = function () {\n // we do not show the component if sort, filter or grouping is active\n this.addManagedListener(this.beans.eventService, Events.EVENT_SORT_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_FILTER_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.workOutVisibility.bind(this));\n // in case data changes, then we need to update visibility of drag item\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.gridOptionsWrapper, 'suppressRowDrag', this.onSuppressRowDrag.bind(this));\n this.workOutVisibility();\n };\n ManagedVisibilityStrategy.prototype.onSuppressRowDrag = function () {\n this.workOutVisibility();\n };\n ManagedVisibilityStrategy.prototype.workOutVisibility = function () {\n // only show the drag if both sort and filter are not present\n var gridBodyCon = this.beans.ctrlsService.getGridBodyCtrl();\n var rowDragFeature = gridBodyCon.getRowDragFeature();\n var shouldPreventRowMove = rowDragFeature && rowDragFeature.shouldPreventRowMove();\n var suppressRowDrag = this.beans.gridOptionsWrapper.isSuppressRowDrag();\n var hasExternalDropZones = this.beans.dragAndDropService.hasExternalDropZones();\n var neverDisplayed = (shouldPreventRowMove && !hasExternalDropZones) || suppressRowDrag;\n this.setDisplayedOrVisible(neverDisplayed);\n };\n __decorate$z([\n PostConstruct\n ], ManagedVisibilityStrategy.prototype, \"postConstruct\", null);\n return ManagedVisibilityStrategy;\n}(VisibilityStrategy));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$E = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$7 = (undefined && undefined.__assign) || function () {\n __assign$7 = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$7.apply(this, arguments);\n};\nvar __decorate$A = (undefined && undefined.__decorate) || function (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};\nvar GroupCellRendererCtrl = /** @class */ (function (_super) {\n __extends$E(GroupCellRendererCtrl, _super);\n function GroupCellRendererCtrl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GroupCellRendererCtrl.prototype.init = function (comp, eGui, eCheckbox, eExpanded, eContracted, compClass, params) {\n this.params = params;\n this.eGui = eGui;\n this.eCheckbox = eCheckbox;\n this.eExpanded = eExpanded;\n this.eContracted = eContracted;\n this.comp = comp;\n this.compClass = compClass;\n var topLevelFooter = this.isTopLevelFooter();\n var embeddedRowMismatch = this.isEmbeddedRowMismatch();\n // This allows for empty strings to appear as groups since\n // it will only return for null or undefined.\n var nullValue = params.value == null;\n var skipCell = false;\n // if the groupCellRenderer is inside of a footer and groupHideOpenParents is true\n // we should only display the groupCellRenderer if the current column is the rowGroupedColumn\n if (this.gridOptionsWrapper.isGroupIncludeFooter() && this.gridOptionsWrapper.isGroupHideOpenParents()) {\n var node = params.node;\n if (node.footer) {\n var showRowGroup = params.colDef && params.colDef.showRowGroup;\n var rowGroupColumnId = node.rowGroupColumn && node.rowGroupColumn.getColId();\n skipCell = showRowGroup !== rowGroupColumnId;\n }\n }\n this.cellIsBlank = topLevelFooter ? false : (embeddedRowMismatch || nullValue || skipCell);\n if (this.cellIsBlank) {\n return;\n }\n this.setupShowingValueForOpenedParent();\n this.findDisplayedGroupNode();\n this.addFullWidthRowDraggerIfNeeded();\n this.addExpandAndContract();\n this.addCheckboxIfNeeded();\n this.addValueElement();\n this.setupIndent();\n this.refreshAriaExpanded();\n };\n GroupCellRendererCtrl.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n // property cleanup to avoid memory leaks\n this.expandListener = null;\n };\n GroupCellRendererCtrl.prototype.refreshAriaExpanded = function () {\n var _a = this.params, node = _a.node, eParentOfValue = _a.eParentOfValue;\n if (this.expandListener) {\n this.expandListener = this.expandListener();\n }\n if (!this.isExpandable()) {\n removeAriaExpanded(eParentOfValue);\n return;\n }\n var listener = function () {\n // for react, we don't use JSX, as setting attributes via jsx is slower\n setAriaExpanded(eParentOfValue, !!node.expanded);\n };\n this.expandListener = this.addManagedListener(node, RowNode.EVENT_EXPANDED_CHANGED, listener) || null;\n listener();\n };\n GroupCellRendererCtrl.prototype.isTopLevelFooter = function () {\n if (!this.gridOptionsWrapper.isGroupIncludeTotalFooter()) {\n return false;\n }\n if (this.params.value != null || this.params.node.level != -1) {\n return false;\n }\n // at this point, we know it's the root node and there is no value present, so it's a footer cell.\n // the only thing to work out is if we are displaying groups across multiple\n // columns (groupMultiAutoColumn=true), we only want 'total' to appear in the first column.\n var colDef = this.params.colDef;\n var doingFullWidth = colDef == null;\n if (doingFullWidth) {\n return true;\n }\n if (colDef.showRowGroup === true) {\n return true;\n }\n var rowGroupCols = this.columnModel.getRowGroupColumns();\n // this is a sanity check, rowGroupCols should always be present\n if (!rowGroupCols || rowGroupCols.length === 0) {\n return true;\n }\n var firstRowGroupCol = rowGroupCols[0];\n return firstRowGroupCol.getId() === colDef.showRowGroup;\n };\n // if we are doing embedded full width rows, we only show the renderer when\n // in the body, or if pinning in the pinned section, or if pinning and RTL,\n // in the right section. otherwise we would have the cell repeated in each section.\n GroupCellRendererCtrl.prototype.isEmbeddedRowMismatch = function () {\n if (!this.params.fullWidth || !this.gridOptionsWrapper.isEmbedFullWidthRows()) {\n return false;\n }\n var pinnedLeftCell = this.params.pinned === Constants.PINNED_LEFT;\n var pinnedRightCell = this.params.pinned === Constants.PINNED_RIGHT;\n var bodyCell = !pinnedLeftCell && !pinnedRightCell;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n if (this.columnModel.isPinningLeft()) {\n return !pinnedRightCell;\n }\n return !bodyCell;\n }\n if (this.columnModel.isPinningLeft()) {\n return !pinnedLeftCell;\n }\n return !bodyCell;\n };\n GroupCellRendererCtrl.prototype.findDisplayedGroupNode = function () {\n var column = this.params.column;\n var rowNode = this.params.node;\n if (this.showingValueForOpenedParent) {\n var pointer = rowNode.parent;\n while (pointer != null) {\n if (pointer.rowGroupColumn && column.isRowGroupDisplayed(pointer.rowGroupColumn.getId())) {\n this.displayedGroupNode = pointer;\n break;\n }\n pointer = pointer.parent;\n }\n }\n // if we didn't find a displayed group, set it to the row node\n if (missing(this.displayedGroupNode)) {\n this.displayedGroupNode = rowNode;\n }\n };\n GroupCellRendererCtrl.prototype.setupShowingValueForOpenedParent = function () {\n // note - this code depends on sortService.updateGroupDataForHiddenOpenParents, where group data\n // is updated to reflect the dragged down parents\n var rowNode = this.params.node;\n var column = this.params.column;\n if (!this.gridOptionsWrapper.isGroupHideOpenParents()) {\n this.showingValueForOpenedParent = false;\n return;\n }\n // hideOpenParents means rowNode.groupData can have data for the group this column is displaying, even though\n // this rowNode isn't grouping by the column we are displaying\n // if no groupData at all, we are not showing a parent value\n if (!rowNode.groupData) {\n this.showingValueForOpenedParent = false;\n return;\n }\n // this is the normal case, in that we are showing a group for which this column is configured. note that\n // this means the Row Group is closed (if it was open, we would not be displaying it)\n var showingGroupNode = rowNode.rowGroupColumn != null;\n if (showingGroupNode) {\n var keyOfGroupingColumn = rowNode.rowGroupColumn.getId();\n var configuredToShowThisGroupLevel = column.isRowGroupDisplayed(keyOfGroupingColumn);\n // if showing group as normal, we didn't take group info from parent\n if (configuredToShowThisGroupLevel) {\n this.showingValueForOpenedParent = false;\n return;\n }\n }\n // see if we are showing a Group Value for the Displayed Group. if we are showing a group value, and this Row Node\n // is not grouping by this Displayed Group, we must of gotten the value from a parent node\n var valPresent = rowNode.groupData[column.getId()] != null;\n this.showingValueForOpenedParent = valPresent;\n };\n GroupCellRendererCtrl.prototype.addValueElement = function () {\n if (this.displayedGroupNode.footer) {\n this.addFooterValue();\n }\n else {\n this.addGroupValue();\n this.addChildCount();\n }\n };\n GroupCellRendererCtrl.prototype.addGroupValue = function () {\n // we try and use the cellRenderer of the column used for the grouping if we can\n var paramsAdjusted = this.adjustParamsWithDetailsFromRelatedColumn();\n var innerCompDetails = this.getInnerCompDetails(paramsAdjusted);\n var valueFormatted = paramsAdjusted.valueFormatted, value = paramsAdjusted.value;\n var valueWhenNoRenderer = valueFormatted != null ? valueFormatted : value;\n this.comp.setInnerRenderer(innerCompDetails, valueWhenNoRenderer);\n };\n GroupCellRendererCtrl.prototype.adjustParamsWithDetailsFromRelatedColumn = function () {\n var relatedColumn = this.displayedGroupNode.rowGroupColumn;\n var column = this.params.column;\n if (!relatedColumn) {\n return this.params;\n }\n var notFullWidth = column != null;\n if (notFullWidth) {\n var showingThisRowGroup = column.isRowGroupDisplayed(relatedColumn.getId());\n if (!showingThisRowGroup) {\n return this.params;\n }\n }\n var params = this.params;\n var _a = this.params, value = _a.value, node = _a.node;\n var valueFormatted = this.valueFormatterService.formatValue(relatedColumn, node, value);\n // we don't update the original params, as they could of come through React,\n // as react has RowGroupCellRenderer, which means the params could be props which\n // would be read only\n var paramsAdjusted = __assign$7(__assign$7({}, params), { valueFormatted: valueFormatted });\n return paramsAdjusted;\n };\n GroupCellRendererCtrl.prototype.addFooterValue = function () {\n var footerValueGetter = this.params.footerValueGetter;\n var footerValue = '';\n if (footerValueGetter) {\n // params is same as we were given, except we set the value as the item to display\n var paramsClone = cloneObject(this.params);\n paramsClone.value = this.params.value;\n if (typeof footerValueGetter === 'function') {\n footerValue = footerValueGetter(paramsClone);\n }\n else if (typeof footerValueGetter === 'string') {\n footerValue = this.expressionService.evaluate(footerValueGetter, paramsClone);\n }\n else {\n console.warn('AG Grid: footerValueGetter should be either a function or a string (expression)');\n }\n }\n else {\n footerValue = 'Total ' + (this.params.value != null ? this.params.value : '');\n }\n var innerCompDetails = this.getInnerCompDetails(this.params);\n this.comp.setInnerRenderer(innerCompDetails, footerValue);\n };\n GroupCellRendererCtrl.prototype.getInnerCompDetails = function (params) {\n var _this = this;\n // for full width rows, we don't do any of the below\n if (params.fullWidth) {\n return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptions.groupRowRendererParams, params);\n }\n // when grouping, the normal case is we use the cell renderer of the grouped column. eg if grouping by country\n // and then rating, we will use the country cell renderer for each country group row and likewise the rating\n // cell renderer for each rating group row.\n //\n // however if the user has innerCellRenderer defined, this gets preference and we don't use cell renderers\n // of the grouped columns.\n //\n // so we check and use in the following order:\n //\n // 1) thisColDef.cellRendererParams.innerRenderer of the column showing the groups (eg auto group column)\n // 2) groupedColDef.cellRenderer of the grouped column\n // 3) groupedColDef.cellRendererParams.innerRenderer\n // we check if cell renderer provided for the group cell renderer, eg colDef.cellRendererParams.innerRenderer\n var innerCompDetails = this.userComponentFactory\n .getInnerRendererDetails(params, params);\n // avoid using GroupCellRenderer again, otherwise stack overflow, as we insert same renderer again and again.\n // this covers off chance user is grouping by a column that is also configured with GroupCellRenderer\n var isGroupRowRenderer = function (details) { return details && details.componentClass == _this.compClass; };\n if (innerCompDetails && !isGroupRowRenderer(innerCompDetails)) {\n // use the renderer defined in cellRendererParams.innerRenderer\n return innerCompDetails;\n }\n var relatedColumn = this.displayedGroupNode.rowGroupColumn;\n var relatedColDef = relatedColumn ? relatedColumn.getColDef() : undefined;\n if (!relatedColDef) {\n return;\n }\n // otherwise see if we can use the cellRenderer of the column we are grouping by\n var relatedCompDetails = this.userComponentFactory\n .getCellRendererDetails(relatedColDef, params);\n if (relatedCompDetails && !isGroupRowRenderer(relatedCompDetails)) {\n // Only if the original column is using a specific renderer, it it is a using a DEFAULT one ignore it\n return relatedCompDetails;\n }\n if (isGroupRowRenderer(relatedCompDetails) &&\n relatedColDef.cellRendererParams &&\n relatedColDef.cellRendererParams.innerRenderer) {\n // edge case - this comes from a column which has been grouped dynamically, that has a renderer 'group'\n // and has an inner cell renderer\n var res = this.userComponentFactory.getInnerRendererDetails(relatedColDef.cellRendererParams, params);\n return res;\n }\n };\n GroupCellRendererCtrl.prototype.addChildCount = function () {\n // only include the child count if it's included, eg if user doing custom aggregation,\n // then this could be left out, or set to -1, ie no child count\n if (this.params.suppressCount) {\n return;\n }\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED, this.updateChildCount.bind(this));\n // filtering changes the child count, so need to cater for it\n this.updateChildCount();\n };\n GroupCellRendererCtrl.prototype.updateChildCount = function () {\n var allChildrenCount = this.displayedGroupNode.allChildrenCount;\n var showingGroupForThisNode = this.isShowRowGroupForThisRow();\n var showCount = showingGroupForThisNode && allChildrenCount != null && allChildrenCount >= 0;\n var countString = showCount ? \"(\" + allChildrenCount + \")\" : \"\";\n this.comp.setChildCount(countString);\n };\n GroupCellRendererCtrl.prototype.isShowRowGroupForThisRow = function () {\n if (this.gridOptionsWrapper.isTreeData()) {\n return true;\n }\n var rowGroupColumn = this.displayedGroupNode.rowGroupColumn;\n if (!rowGroupColumn) {\n return false;\n }\n // column is null for fullWidthRows\n var column = this.params.column;\n var thisColumnIsInterested = column == null || column.isRowGroupDisplayed(rowGroupColumn.getId());\n return thisColumnIsInterested;\n };\n GroupCellRendererCtrl.prototype.addExpandAndContract = function () {\n var params = this.params;\n var eExpandedIcon = createIconNoSpan('groupExpanded', this.gridOptionsWrapper, null);\n var eContractedIcon = createIconNoSpan('groupContracted', this.gridOptionsWrapper, null);\n if (eExpandedIcon) {\n this.eExpanded.appendChild(eExpandedIcon);\n }\n if (eContractedIcon) {\n this.eContracted.appendChild(eContractedIcon);\n }\n var eGroupCell = params.eGridCell;\n // if editing groups, then double click is to start editing\n if (!this.gridOptionsWrapper.isEnableGroupEdit() && this.isExpandable() && !params.suppressDoubleClickExpand) {\n this.addManagedListener(eGroupCell, 'dblclick', this.onCellDblClicked.bind(this));\n }\n this.addManagedListener(this.eExpanded, 'click', this.onExpandClicked.bind(this));\n this.addManagedListener(this.eContracted, 'click', this.onExpandClicked.bind(this));\n // expand / contract as the user hits enter\n this.addManagedListener(eGroupCell, 'keydown', this.onKeyDown.bind(this));\n this.addManagedListener(params.node, RowNode.EVENT_EXPANDED_CHANGED, this.showExpandAndContractIcons.bind(this));\n this.showExpandAndContractIcons();\n // because we don't show the expand / contract when there are no children, we need to check every time\n // the number of children change.\n var expandableChangedListener = this.onRowNodeIsExpandableChanged.bind(this);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED, expandableChangedListener);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_MASTER_CHANGED, expandableChangedListener);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_GROUP_CHANGED, expandableChangedListener);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_HAS_CHILDREN_CHANGED, expandableChangedListener);\n };\n GroupCellRendererCtrl.prototype.onExpandClicked = function (mouseEvent) {\n if (isStopPropagationForAgGrid(mouseEvent)) {\n return;\n }\n // so if we expand a node, it does not also get selected.\n stopPropagationForAgGrid(mouseEvent);\n this.onExpandOrContract(mouseEvent);\n };\n GroupCellRendererCtrl.prototype.onExpandOrContract = function (e) {\n // must use the displayedGroup, so if data was dragged down, we expand the parent, not this row\n var rowNode = this.displayedGroupNode;\n var nextExpandState = !rowNode.expanded;\n rowNode.setExpanded(nextExpandState, e);\n };\n GroupCellRendererCtrl.prototype.isExpandable = function () {\n if (this.showingValueForOpenedParent) {\n return true;\n }\n var rowNode = this.displayedGroupNode;\n var reducedLeafNode = this.columnModel.isPivotMode() && rowNode.leafGroup;\n var expandableGroup = rowNode.isExpandable() && !rowNode.footer && !reducedLeafNode;\n if (!expandableGroup) {\n return false;\n }\n // column is null for fullWidthRows\n var column = this.params.column;\n var displayingForOneColumnOnly = column != null && typeof column.getColDef().showRowGroup === 'string';\n if (displayingForOneColumnOnly) {\n var showing = this.isShowRowGroupForThisRow();\n return showing;\n }\n return true;\n };\n GroupCellRendererCtrl.prototype.showExpandAndContractIcons = function () {\n var _a = this, params = _a.params, displayedGroup = _a.displayedGroupNode, columnModel = _a.columnModel;\n var node = params.node;\n var isExpandable = this.isExpandable();\n if (isExpandable) {\n // if expandable, show one based on expand state.\n // if we were dragged down, means our parent is always expanded\n var expanded = this.showingValueForOpenedParent ? true : node.expanded;\n this.comp.setExpandedDisplayed(expanded);\n this.comp.setContractedDisplayed(!expanded);\n }\n else {\n // it not expandable, show neither\n this.comp.setExpandedDisplayed(false);\n this.comp.setContractedDisplayed(false);\n }\n // compensation padding for leaf nodes, so there is blank space instead of the expand icon\n var pivotMode = columnModel.isPivotMode();\n var pivotModeAndLeafGroup = pivotMode && displayedGroup.leafGroup;\n var addExpandableCss = isExpandable && !pivotModeAndLeafGroup;\n var isTotalFooterNode = node.footer && node.level === -1;\n this.comp.addOrRemoveCssClass('ag-cell-expandable', addExpandableCss);\n this.comp.addOrRemoveCssClass('ag-row-group', addExpandableCss);\n if (pivotMode) {\n this.comp.addOrRemoveCssClass('ag-pivot-leaf-group', pivotModeAndLeafGroup);\n }\n else if (!isTotalFooterNode) {\n this.comp.addOrRemoveCssClass('ag-row-group-leaf-indent', !addExpandableCss);\n }\n };\n GroupCellRendererCtrl.prototype.onRowNodeIsExpandableChanged = function () {\n // maybe if no children now, we should hide the expand / contract icons\n this.showExpandAndContractIcons();\n // if we have no children, this impacts the indent\n this.setIndent();\n this.refreshAriaExpanded();\n };\n GroupCellRendererCtrl.prototype.setupIndent = function () {\n // only do this if an indent - as this overwrites the padding that\n // the theme set, which will make things look 'not aligned' for the\n // first group level.\n var node = this.params.node;\n var suppressPadding = this.params.suppressPadding;\n if (!suppressPadding) {\n this.addManagedListener(node, RowNode.EVENT_UI_LEVEL_CHANGED, this.setIndent.bind(this));\n this.setIndent();\n }\n };\n GroupCellRendererCtrl.prototype.setIndent = function () {\n if (this.gridOptionsWrapper.isGroupHideOpenParents()) {\n return;\n }\n var params = this.params;\n var rowNode = params.node;\n // if we are only showing one group column, we don't want to be indenting based on level\n var fullWithRow = !!params.colDef;\n var treeData = this.gridOptionsWrapper.isTreeData();\n var manyDimensionThisColumn = !fullWithRow || treeData || params.colDef.showRowGroup === true;\n var paddingCount = manyDimensionThisColumn ? rowNode.uiLevel : 0;\n var userProvidedPaddingPixelsTheDeprecatedWay = params.padding >= 0;\n if (userProvidedPaddingPixelsTheDeprecatedWay) {\n doOnce(function () { return console.warn('AG Grid: cellRendererParams.padding no longer works, it was deprecated in since v14.2 and removed in v26, configuring padding for groupCellRenderer should be done with Sass variables and themes. Please see the AG Grid documentation page for Themes, in particular the property $row-group-indent-size.'); }, 'groupCellRenderer->doDeprecatedWay');\n }\n if (this.indentClass) {\n this.comp.addOrRemoveCssClass(this.indentClass, false);\n }\n this.indentClass = 'ag-row-group-indent-' + paddingCount;\n this.comp.addOrRemoveCssClass(this.indentClass, true);\n };\n GroupCellRendererCtrl.prototype.addFullWidthRowDraggerIfNeeded = function () {\n var _this = this;\n if (!this.params.fullWidth || !this.params.rowDrag) {\n return;\n }\n var rowDragComp = new RowDragComp(function () { return _this.params.value; }, this.params.node);\n this.createManagedBean(rowDragComp, this.context);\n this.eGui.insertAdjacentElement('afterbegin', rowDragComp.getGui());\n };\n GroupCellRendererCtrl.prototype.isUserWantsSelected = function () {\n var paramsCheckbox = this.params.checkbox;\n if (typeof paramsCheckbox === 'function') {\n return paramsCheckbox(this.params);\n }\n return paramsCheckbox === true;\n };\n GroupCellRendererCtrl.prototype.addCheckboxIfNeeded = function () {\n var _this = this;\n var rowNode = this.displayedGroupNode;\n var checkboxNeeded = this.isUserWantsSelected() &&\n // footers cannot be selected\n !rowNode.footer &&\n // pinned rows cannot be selected\n !rowNode.rowPinned &&\n // details cannot be selected\n !rowNode.detail;\n if (checkboxNeeded) {\n var cbSelectionComponent_1 = new CheckboxSelectionComponent();\n this.getContext().createBean(cbSelectionComponent_1);\n cbSelectionComponent_1.init({ rowNode: rowNode, column: this.params.column });\n this.eCheckbox.appendChild(cbSelectionComponent_1.getGui());\n this.addDestroyFunc(function () { return _this.getContext().destroyBean(cbSelectionComponent_1); });\n }\n this.comp.setCheckboxVisible(checkboxNeeded);\n };\n GroupCellRendererCtrl.prototype.onKeyDown = function (event) {\n var enterKeyPressed = event.key === KeyCode.ENTER;\n if (!enterKeyPressed || this.params.suppressEnterExpand) {\n return;\n }\n var cellEditable = this.params.column && this.params.column.isCellEditable(this.params.node);\n if (cellEditable) {\n return;\n }\n this.onExpandOrContract(event);\n };\n GroupCellRendererCtrl.prototype.onCellDblClicked = function (mouseEvent) {\n if (isStopPropagationForAgGrid(mouseEvent)) {\n return;\n }\n // we want to avoid acting on double click events on the expand / contract icon,\n // as that icons already has expand / collapse functionality on it. otherwise if\n // the icon was double clicked, we would get 'click', 'click', 'dblclick' which\n // is open->close->open, however double click should be open->close only.\n var targetIsExpandIcon = isElementInEventPath(this.eExpanded, mouseEvent)\n || isElementInEventPath(this.eContracted, mouseEvent);\n if (!targetIsExpandIcon) {\n this.onExpandOrContract(mouseEvent);\n }\n };\n __decorate$A([\n Autowired('expressionService')\n ], GroupCellRendererCtrl.prototype, \"expressionService\", void 0);\n __decorate$A([\n Autowired('valueFormatterService')\n ], GroupCellRendererCtrl.prototype, \"valueFormatterService\", void 0);\n __decorate$A([\n Autowired('columnModel')\n ], GroupCellRendererCtrl.prototype, \"columnModel\", void 0);\n __decorate$A([\n Autowired('userComponentFactory')\n ], GroupCellRendererCtrl.prototype, \"userComponentFactory\", void 0);\n __decorate$A([\n Autowired('gridOptions')\n ], GroupCellRendererCtrl.prototype, \"gridOptions\", void 0);\n return GroupCellRendererCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$F = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$B = (undefined && undefined.__decorate) || function (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};\nvar GroupCellRenderer = /** @class */ (function (_super) {\n __extends$F(GroupCellRenderer, _super);\n function GroupCellRenderer() {\n return _super.call(this, GroupCellRenderer.TEMPLATE) || this;\n }\n GroupCellRenderer.prototype.init = function (params) {\n var _this = this;\n var compProxy = {\n setInnerRenderer: function (compDetails, valueToDisplay) { return _this.setRenderDetails(compDetails, valueToDisplay); },\n setChildCount: function (count) { return _this.eChildCount.innerHTML = count; },\n addOrRemoveCssClass: function (cssClass, value) { return _this.addOrRemoveCssClass(cssClass, value); },\n setContractedDisplayed: function (expanded) { return setDisplayed(_this.eContracted, expanded); },\n setExpandedDisplayed: function (expanded) { return setDisplayed(_this.eExpanded, expanded); },\n setCheckboxVisible: function (visible) { return _this.eCheckbox.classList.toggle('ag-invisible', !visible); }\n };\n var ctrl = this.createManagedBean(new GroupCellRendererCtrl());\n var fullWidth = !params.colDef;\n var eGui = this.getGui();\n ctrl.init(compProxy, eGui, this.eCheckbox, this.eExpanded, this.eContracted, this.constructor, params);\n if (fullWidth) {\n setAriaRole(eGui, 'gridcell');\n }\n };\n GroupCellRenderer.prototype.setRenderDetails = function (compDetails, valueToDisplay) {\n var _this = this;\n if (compDetails) {\n var componentPromise = compDetails.newAgStackInstance();\n if (!componentPromise) {\n return;\n }\n componentPromise.then(function (comp) {\n if (!comp) {\n return;\n }\n var destroyComp = function () { return _this.context.destroyBean(comp); };\n if (_this.isAlive()) {\n _this.eValue.appendChild(comp.getGui());\n _this.addDestroyFunc(destroyComp);\n }\n else {\n destroyComp();\n }\n });\n }\n else {\n this.eValue.innerText = valueToDisplay;\n }\n };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to have public here instead of private or protected\n GroupCellRenderer.prototype.destroy = function () {\n this.getContext().destroyBean(this.innerCellRenderer);\n _super.prototype.destroy.call(this);\n };\n GroupCellRenderer.prototype.refresh = function () {\n return false;\n };\n GroupCellRenderer.TEMPLATE = \"\\n \\n \\n \\n \\n \\n \";\n __decorate$B([\n RefSelector('eExpanded')\n ], GroupCellRenderer.prototype, \"eExpanded\", void 0);\n __decorate$B([\n RefSelector('eContracted')\n ], GroupCellRenderer.prototype, \"eContracted\", void 0);\n __decorate$B([\n RefSelector('eCheckbox')\n ], GroupCellRenderer.prototype, \"eCheckbox\", void 0);\n __decorate$B([\n RefSelector('eValue')\n ], GroupCellRenderer.prototype, \"eValue\", void 0);\n __decorate$B([\n RefSelector('eChildCount')\n ], GroupCellRenderer.prototype, \"eChildCount\", void 0);\n return GroupCellRenderer;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$G = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$C = (undefined && undefined.__decorate) || function (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};\nvar LoadingCellRenderer = /** @class */ (function (_super) {\n __extends$G(LoadingCellRenderer, _super);\n function LoadingCellRenderer() {\n return _super.call(this, LoadingCellRenderer.TEMPLATE) || this;\n }\n LoadingCellRenderer.prototype.init = function (params) {\n params.node.failedLoad ? this.setupFailed() : this.setupLoading();\n };\n LoadingCellRenderer.prototype.setupFailed = function () {\n this.eLoadingText.innerText = 'ERR';\n };\n LoadingCellRenderer.prototype.setupLoading = function () {\n var eLoadingIcon = createIconNoSpan('groupLoading', this.gridOptionsWrapper, null);\n if (eLoadingIcon) {\n this.eLoadingIcon.appendChild(eLoadingIcon);\n }\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eLoadingText.innerText = localeTextFunc('loadingOoo', 'Loading');\n };\n LoadingCellRenderer.prototype.refresh = function (params) {\n return false;\n };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n LoadingCellRenderer.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n LoadingCellRenderer.TEMPLATE = \"
\\n \\n \\n
\";\n __decorate$C([\n RefSelector('eLoadingIcon')\n ], LoadingCellRenderer.prototype, \"eLoadingIcon\", void 0);\n __decorate$C([\n RefSelector('eLoadingText')\n ], LoadingCellRenderer.prototype, \"eLoadingText\", void 0);\n return LoadingCellRenderer;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$H = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar LoadingOverlayComponent = /** @class */ (function (_super) {\n __extends$H(LoadingOverlayComponent, _super);\n function LoadingOverlayComponent() {\n return _super.call(this) || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n LoadingOverlayComponent.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n LoadingOverlayComponent.prototype.init = function (params) {\n var template = this.gridOptionsWrapper.getOverlayLoadingTemplate() ?\n this.gridOptionsWrapper.getOverlayLoadingTemplate() : LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE;\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var localisedTemplate = template.replace('[LOADING...]', localeTextFunc('loadingOoo', 'Loading...'));\n this.setTemplate(localisedTemplate);\n };\n LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE = '[LOADING...]';\n return LoadingOverlayComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$I = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar NoRowsOverlayComponent = /** @class */ (function (_super) {\n __extends$I(NoRowsOverlayComponent, _super);\n function NoRowsOverlayComponent() {\n return _super.call(this) || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n NoRowsOverlayComponent.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n NoRowsOverlayComponent.prototype.init = function (params) {\n var template = this.gridOptionsWrapper.getOverlayNoRowsTemplate() ?\n this.gridOptionsWrapper.getOverlayNoRowsTemplate() : NoRowsOverlayComponent.DEFAULT_NO_ROWS_TEMPLATE;\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var localisedTemplate = template.replace('[NO_ROWS_TO_SHOW]', localeTextFunc('noRowsToShow', 'No Rows To Show'));\n this.setTemplate(localisedTemplate);\n };\n NoRowsOverlayComponent.DEFAULT_NO_ROWS_TEMPLATE = '[NO_ROWS_TO_SHOW]';\n return NoRowsOverlayComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$J = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar TooltipComponent = /** @class */ (function (_super) {\n __extends$J(TooltipComponent, _super);\n function TooltipComponent() {\n return _super.call(this, /* html */ \"
\") || this;\n }\n // will need to type params\n TooltipComponent.prototype.init = function (params) {\n var value = params.value;\n this.getGui().innerHTML = escapeString(value);\n };\n return TooltipComponent;\n}(PopupComponent));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$K = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$D = (undefined && undefined.__decorate) || function (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};\nvar UserComponentRegistry = /** @class */ (function (_super) {\n __extends$K(UserComponentRegistry, _super);\n function UserComponentRegistry() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.agGridDefaults = {\n //date\n agDateInput: DefaultDateComponent,\n //header\n agColumnHeader: HeaderComp,\n agColumnGroupHeader: HeaderGroupComp,\n //floating filters\n agTextColumnFloatingFilter: TextFloatingFilter,\n agNumberColumnFloatingFilter: NumberFloatingFilter,\n agDateColumnFloatingFilter: DateFloatingFilter,\n agReadOnlyFloatingFilter: ReadOnlyFloatingFilter,\n // renderers\n agAnimateShowChangeCellRenderer: AnimateShowChangeCellRenderer,\n agAnimateSlideCellRenderer: AnimateSlideCellRenderer,\n agGroupCellRenderer: GroupCellRenderer,\n agGroupRowRenderer: GroupCellRenderer,\n agLoadingCellRenderer: LoadingCellRenderer,\n //editors\n agCellEditor: TextCellEditor,\n agTextCellEditor: TextCellEditor,\n agSelectCellEditor: SelectCellEditor,\n agPopupTextCellEditor: PopupTextCellEditor,\n agPopupSelectCellEditor: PopupSelectCellEditor,\n agLargeTextCellEditor: LargeTextCellEditor,\n //filter\n agTextColumnFilter: TextFilter,\n agNumberColumnFilter: NumberFilter,\n agDateColumnFilter: DateFilter,\n //overlays\n agLoadingOverlay: LoadingOverlayComponent,\n agNoRowsOverlay: NoRowsOverlayComponent,\n // tooltips\n agTooltipComponent: TooltipComponent\n };\n _this.agDeprecatedNames = {\n set: {\n newComponentName: 'agSetColumnFilter',\n propertyHolder: 'filter'\n },\n text: {\n newComponentName: 'agTextColumnFilter',\n propertyHolder: 'filter'\n },\n number: {\n newComponentName: 'agNumberColumnFilter',\n propertyHolder: 'filter'\n },\n date: {\n newComponentName: 'agDateColumnFilter',\n propertyHolder: 'filter'\n },\n group: {\n newComponentName: 'agGroupCellRenderer',\n propertyHolder: 'cellRenderer'\n },\n animateShowChange: {\n newComponentName: 'agAnimateShowChangeCellRenderer',\n propertyHolder: 'cellRenderer'\n },\n animateSlide: {\n newComponentName: 'agAnimateSlideCellRenderer',\n propertyHolder: 'cellRenderer'\n },\n select: {\n newComponentName: 'agSelectCellEditor',\n propertyHolder: 'cellEditor'\n },\n largeText: {\n newComponentName: 'agLargeTextCellEditor',\n propertyHolder: 'cellEditor'\n },\n popupSelect: {\n newComponentName: 'agPopupSelectCellEditor',\n propertyHolder: 'cellEditor'\n },\n popupText: {\n newComponentName: 'agPopupTextCellEditor',\n propertyHolder: 'cellEditor'\n },\n richSelect: {\n newComponentName: 'agRichSelectCellEditor',\n propertyHolder: 'cellEditor'\n },\n headerComponent: {\n newComponentName: 'agColumnHeader',\n propertyHolder: 'headerComponent'\n }\n };\n _this.jsComps = {};\n _this.fwComps = {};\n return _this;\n }\n UserComponentRegistry.prototype.init = function () {\n var _this = this;\n if (this.gridOptions.components != null) {\n iterateObject(this.gridOptions.components, function (key, component) { return _this.registerJsComponent(key, component); });\n }\n if (this.gridOptions.frameworkComponents != null) {\n iterateObject(this.gridOptions.frameworkComponents, function (key, component) { return _this.registerFwComponent(key, component); });\n }\n };\n UserComponentRegistry.prototype.registerDefaultComponent = function (rawName, component) {\n var name = this.translateIfDeprecated(rawName);\n if (this.agGridDefaults[name]) {\n console.error(\"Trying to overwrite a default component. You should call registerComponent\");\n return;\n }\n this.agGridDefaults[name] = component;\n };\n UserComponentRegistry.prototype.registerJsComponent = function (rawName, component) {\n var name = this.translateIfDeprecated(rawName);\n if (this.fwComps[name]) {\n console.error(\"Trying to register a component that you have already registered for frameworks: \" + name);\n return;\n }\n this.jsComps[name] = component;\n };\n /**\n * B the business interface (ie IHeader)\n * A the agGridComponent interface (ie IHeaderComp). The final object acceptable by ag-grid\n */\n UserComponentRegistry.prototype.registerFwComponent = function (rawName, component) {\n var warningMessage = \"AG Grid: As of v27, registering components via grid property frameworkComponents is deprecated. Instead register both JavaScript AND Framework Components via the components property.\";\n doOnce(function () { return console.warn(warningMessage); }, \"UserComponentRegistry.frameworkComponentsDeprecated\");\n var name = this.translateIfDeprecated(rawName);\n this.fwComps[name] = component;\n };\n UserComponentRegistry.prototype.retrieve = function (rawName) {\n var name = this.translateIfDeprecated(rawName);\n var createResult = function (component, componentFromFramework) { return ({ componentFromFramework: componentFromFramework, component: component }); };\n // FrameworkOverrides.frameworkComponent() is used in two locations:\n // 1) for Vue, user provided components get registered via a framework specific way.\n // 2) for React, it's how the React UI provides alternative default components (eg GroupCellRenderer and DetailCellRenderer)\n var registeredViaFrameworkComp = this.getFrameworkOverrides().frameworkComponent(name);\n if (registeredViaFrameworkComp != null) {\n return createResult(registeredViaFrameworkComp, true);\n }\n var frameworkComponent = this.fwComps[name];\n if (frameworkComponent) {\n return createResult(frameworkComponent, true);\n }\n var jsComponent = this.jsComps[name];\n if (jsComponent) {\n var isFwkComp = this.getFrameworkOverrides().isFrameworkComponent(jsComponent);\n return createResult(jsComponent, isFwkComp);\n }\n var defaultComponent = this.agGridDefaults[name];\n if (defaultComponent) {\n return createResult(defaultComponent, false);\n }\n if (Object.keys(this.agGridDefaults).indexOf(name) < 0) {\n console.warn(\"AG Grid: Looking for component [\" + name + \"] but it wasn't found.\");\n }\n return null;\n };\n UserComponentRegistry.prototype.translateIfDeprecated = function (raw) {\n var deprecatedInfo = this.agDeprecatedNames[raw];\n if (deprecatedInfo != null) {\n doOnce(function () {\n console.warn(\"ag-grid. Since v15.0 component names have been renamed to be namespaced. You should rename \" + deprecatedInfo.propertyHolder + \":\" + raw + \" to \" + deprecatedInfo.propertyHolder + \":\" + deprecatedInfo.newComponentName);\n }, 'DEPRECATE_COMPONENT_' + raw);\n return deprecatedInfo.newComponentName;\n }\n return raw;\n };\n __decorate$D([\n Autowired('gridOptions')\n ], UserComponentRegistry.prototype, \"gridOptions\", void 0);\n __decorate$D([\n Autowired('agComponentUtils')\n ], UserComponentRegistry.prototype, \"agComponentUtils\", void 0);\n __decorate$D([\n PostConstruct\n ], UserComponentRegistry.prototype, \"init\", null);\n UserComponentRegistry = __decorate$D([\n Bean('userComponentRegistry')\n ], UserComponentRegistry);\n return UserComponentRegistry;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar DateComponent = {\n propertyName: 'dateComponent',\n cellRenderer: false\n};\nvar HeaderComponent = {\n propertyName: 'headerComponent',\n cellRenderer: false\n};\nvar HeaderGroupComponent = {\n propertyName: 'headerGroupComponent',\n cellRenderer: false\n};\nvar CellRendererComponent = {\n propertyName: 'cellRenderer',\n cellRenderer: true\n};\nvar CellEditorComponent = {\n propertyName: 'cellEditor',\n cellRenderer: false\n};\nvar InnerRendererComponent = {\n propertyName: 'innerRenderer',\n cellRenderer: true\n};\nvar LoadingOverlayComponent$1 = {\n propertyName: 'loadingOverlayComponent',\n cellRenderer: false\n};\nvar NoRowsOverlayComponent$1 = {\n propertyName: 'noRowsOverlayComponent',\n cellRenderer: false\n};\nvar TooltipComponent$1 = {\n propertyName: 'tooltipComponent',\n cellRenderer: false\n};\nvar FilterComponent = {\n propertyName: 'filter',\n cellRenderer: false\n};\nvar FloatingFilterComponent = {\n propertyName: 'floatingFilterComponent',\n cellRenderer: false\n};\nvar ToolPanelComponent = {\n propertyName: 'toolPanel',\n cellRenderer: false\n};\nvar StatusPanelComponent = {\n propertyName: 'statusPanel',\n cellRenderer: false\n};\nvar FullWidth = {\n propertyName: 'fullWidthCellRenderer',\n cellRenderer: true\n};\nvar FullWidthLoading = {\n propertyName: 'loadingCellRenderer',\n cellRenderer: true\n};\nvar FullWidthGroup = {\n propertyName: 'groupRowRenderer',\n cellRenderer: true\n};\nvar FullWidthDetail = {\n propertyName: 'detailCellRenderer',\n cellRenderer: true\n};\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar FloatingFilterMapper = /** @class */ (function () {\n function FloatingFilterMapper() {\n }\n FloatingFilterMapper.getFloatingFilterType = function (filterType) {\n return this.filterToFloatingFilterMapping[filterType];\n };\n FloatingFilterMapper.filterToFloatingFilterMapping = {\n set: 'agSetColumnFloatingFilter',\n agSetColumnFilter: 'agSetColumnFloatingFilter',\n multi: 'agMultiColumnFloatingFilter',\n agMultiColumnFilter: 'agMultiColumnFloatingFilter',\n number: 'agNumberColumnFloatingFilter',\n agNumberColumnFilter: 'agNumberColumnFloatingFilter',\n date: 'agDateColumnFloatingFilter',\n agDateColumnFilter: 'agDateColumnFloatingFilter',\n text: 'agTextColumnFloatingFilter',\n agTextColumnFilter: 'agTextColumnFloatingFilter'\n };\n return FloatingFilterMapper;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$L = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$E = (undefined && undefined.__decorate) || function (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};\nvar UserComponentFactory = /** @class */ (function (_super) {\n __extends$L(UserComponentFactory, _super);\n function UserComponentFactory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n UserComponentFactory.prototype.getHeaderCompDetails = function (colDef, params) {\n return this.getCompDetails(colDef, HeaderComponent, 'agColumnHeader', params);\n };\n UserComponentFactory.prototype.getHeaderGroupCompDetails = function (params) {\n var colGroupDef = params.columnGroup.getColGroupDef();\n return this.getCompDetails(colGroupDef, HeaderGroupComponent, 'agColumnGroupHeader', params);\n };\n // this one is unusual, as it can be LoadingCellRenderer, DetailCellRenderer, FullWidthCellRenderer or GroupRowRenderer.\n // so we have to pass the type in.\n UserComponentFactory.prototype.getFullWidthCellRendererDetails = function (params) {\n return this.getCompDetails(this.gridOptions, FullWidth, null, params, true);\n };\n UserComponentFactory.prototype.getFullWidthLoadingCellRendererDetails = function (params) {\n return this.getCompDetails(this.gridOptions, FullWidthLoading, 'agLoadingCellRenderer', params, true);\n };\n UserComponentFactory.prototype.getFullWidthGroupCellRendererDetails = function (params) {\n return this.getCompDetails(this.gridOptions, FullWidthGroup, 'agGroupRowRenderer', params, true);\n };\n UserComponentFactory.prototype.getFullWidthDetailCellRendererDetails = function (params) {\n return this.getCompDetails(this.gridOptions, FullWidthDetail, 'agDetailCellRenderer', params, true);\n };\n // CELL RENDERER\n UserComponentFactory.prototype.getInnerRendererDetails = function (def, params) {\n return this.getCompDetails(def, InnerRendererComponent, null, params);\n };\n UserComponentFactory.prototype.getFullWidthGroupRowInnerCellRenderer = function (def, params) {\n return this.getCompDetails(def, InnerRendererComponent, null, params);\n };\n UserComponentFactory.prototype.getCellRendererDetails = function (def, params) {\n return this.getCompDetails(def, CellRendererComponent, null, params);\n };\n // CELL EDITOR\n UserComponentFactory.prototype.getCellEditorDetails = function (def, params) {\n return this.getCompDetails(def, CellEditorComponent, 'agCellEditor', params, true);\n };\n // FILTER\n UserComponentFactory.prototype.getFilterDetails = function (def, params, defaultFilter) {\n return this.getCompDetails(def, FilterComponent, defaultFilter, params, true);\n };\n UserComponentFactory.prototype.getDateCompDetails = function (params) {\n return this.getCompDetails(this.gridOptions, DateComponent, 'agDateInput', params, true);\n };\n UserComponentFactory.prototype.getLoadingOverlayCompDetails = function (params) {\n return this.getCompDetails(this.gridOptions, LoadingOverlayComponent$1, 'agLoadingOverlay', params, true);\n };\n UserComponentFactory.prototype.getNoRowsOverlayCompDetails = function (params) {\n return this.getCompDetails(this.gridOptions, NoRowsOverlayComponent$1, 'agNoRowsOverlay', params, true);\n };\n UserComponentFactory.prototype.getTooltipCompDetails = function (params) {\n return this.getCompDetails(params.colDef, TooltipComponent$1, 'agTooltipComponent', params, true);\n };\n UserComponentFactory.prototype.getSetFilterCellRendererDetails = function (def, params) {\n return this.getCompDetails(def, CellRendererComponent, null, params);\n };\n UserComponentFactory.prototype.getFloatingFilterCompDetails = function (def, params, defaultFloatingFilter) {\n return this.getCompDetails(def, FloatingFilterComponent, defaultFloatingFilter, params);\n };\n UserComponentFactory.prototype.getToolPanelCompDetails = function (toolPanelDef, params) {\n return this.getCompDetails(toolPanelDef, ToolPanelComponent, null, params, true);\n };\n UserComponentFactory.prototype.getStatusPanelCompDetails = function (def, params) {\n return this.getCompDetails(def, StatusPanelComponent, null, params, true);\n };\n UserComponentFactory.prototype.getCompDetails = function (defObject, type, defaultName, params, mandatory) {\n var _this = this;\n if (mandatory === void 0) { mandatory = false; }\n var propertyName = type.propertyName, cellRenderer = type.cellRenderer;\n var _a = this.getCompKeys(defObject, type, params), compName = _a.compName, jsComp = _a.jsComp, fwComp = _a.fwComp, paramsFromSelector = _a.paramsFromSelector, popupFromSelector = _a.popupFromSelector, popupPositionFromSelector = _a.popupPositionFromSelector;\n var lookupFromRegistry = function (key) {\n var item = _this.userComponentRegistry.retrieve(key);\n if (item) {\n jsComp = !item.componentFromFramework ? item.component : undefined;\n fwComp = item.componentFromFramework ? item.component : undefined;\n }\n };\n // if compOption is a string, means we need to look the item up\n if (compName != null) {\n lookupFromRegistry(compName);\n }\n // if lookup brought nothing back, and we have a default, lookup the default\n if (jsComp == null && fwComp == null && defaultName != null) {\n lookupFromRegistry(defaultName);\n }\n // if we have a comp option, and it's a function, replace it with an object equivalent adaptor\n if (jsComp && cellRenderer && !this.agComponentUtils.doesImplementIComponent(jsComp)) {\n jsComp = this.agComponentUtils.adaptFunction(propertyName, jsComp);\n }\n if (!jsComp && !fwComp) {\n if (mandatory) {\n console.error(\"Could not find component \" + compName + \", did you forget to configure this component?\");\n }\n return;\n }\n var paramsMerged = this.mergeParamsWithApplicationProvidedParams(defObject, type, params, paramsFromSelector);\n var componentFromFramework = jsComp == null;\n var componentClass = jsComp ? jsComp : fwComp;\n return {\n componentFromFramework: componentFromFramework,\n componentClass: componentClass,\n params: paramsMerged,\n type: type,\n popupFromSelector: popupFromSelector,\n popupPositionFromSelector: popupPositionFromSelector,\n newAgStackInstance: function () { return _this.newAgStackInstance(componentClass, componentFromFramework, paramsMerged, type); }\n };\n };\n UserComponentFactory.prototype.getCompKeys = function (defObject, type, params) {\n var _this = this;\n var propertyName = type.propertyName;\n var compName;\n var jsComp;\n var fwComp;\n var paramsFromSelector;\n var popupFromSelector;\n var popupPositionFromSelector;\n // there are two types of js comps, class based and func based. we can only check for\n // class based, by checking if getGui() exists. no way to differentiate js func based vs eg react func based\n // const isJsClassComp = (comp: any) => this.agComponentUtils.doesImplementIComponent(comp);\n // const fwActive = this.frameworkComponentWrapper != null;\n // pull from defObject if available\n if (defObject) {\n var defObjectAny = defObject;\n // if selector, use this\n var selectorFunc = defObjectAny[propertyName + 'Selector'];\n var selectorRes = selectorFunc ? selectorFunc(params) : null;\n var assignComp = function (providedJsComp, providedFwComp) {\n var xxxFrameworkDeprecatedWarn = function () {\n var warningMessage = \"AG Grid: As of v27, the property \" + propertyName + \"Framework is deprecated. The property \" + propertyName + \" can now be used for JavaScript AND Framework Components.\";\n doOnce(function () { return console.warn(warningMessage); }, \"UserComponentFactory.\" + propertyName + \"FrameworkDeprecated\");\n };\n if (typeof providedJsComp === 'string') {\n compName = providedJsComp;\n }\n else if (typeof providedFwComp === 'string') {\n xxxFrameworkDeprecatedWarn();\n compName = providedFwComp;\n // comp===true for filters, which means use the default comp\n }\n else if (providedJsComp != null && providedJsComp !== true) {\n var isFwkComp = _this.getFrameworkOverrides().isFrameworkComponent(providedJsComp);\n if (isFwkComp) {\n fwComp = providedJsComp;\n }\n else {\n jsComp = providedJsComp;\n }\n }\n else if (providedFwComp != null) {\n xxxFrameworkDeprecatedWarn();\n fwComp = providedFwComp;\n }\n };\n if (selectorRes) {\n if (selectorRes.frameworkComponent != null) {\n var warningMessage_1 = \"AG Grid: As of v27, the return for \" + propertyName + \"Selector has attributes [component, params] only. The attribute frameworkComponent is deprecated. You should now return back Framework Components using the 'component' attribute and the grid works out if it's a framework component or not.\";\n doOnce(function () { return console.warn(warningMessage_1); }, \"UserComponentFactory.\" + propertyName + \"FrameworkSelectorDeprecated\");\n assignComp(selectorRes.frameworkComponent, undefined);\n }\n else {\n assignComp(selectorRes.component, undefined);\n }\n paramsFromSelector = selectorRes.params;\n popupFromSelector = selectorRes.popup;\n popupPositionFromSelector = selectorRes.popupPosition;\n }\n else {\n // if no selector, or result of selector is empty, take from defObject\n assignComp(defObjectAny[propertyName], defObjectAny[propertyName + 'Framework']);\n }\n }\n return { compName: compName, jsComp: jsComp, fwComp: fwComp, paramsFromSelector: paramsFromSelector, popupFromSelector: popupFromSelector, popupPositionFromSelector: popupPositionFromSelector };\n };\n UserComponentFactory.prototype.newAgStackInstance = function (ComponentClass, componentFromFramework, params, type) {\n var propertyName = type.propertyName;\n var jsComponent = !componentFromFramework;\n // using javascript component\n var instance;\n if (jsComponent) {\n instance = new ComponentClass();\n }\n else {\n // Using framework component\n var thisComponentConfig = this.componentMetadataProvider.retrieve(propertyName);\n instance = this.frameworkComponentWrapper.wrap(ComponentClass, thisComponentConfig.mandatoryMethodList, thisComponentConfig.optionalMethodList, type);\n }\n var deferredInit = this.initComponent(instance, params);\n if (deferredInit == null) {\n return AgPromise.resolve(instance);\n }\n return deferredInit.then(function () { return instance; });\n };\n // used by Floating Filter\n UserComponentFactory.prototype.mergeParamsWithApplicationProvidedParams = function (defObject, type, paramsFromGrid, paramsFromSelector) {\n if (paramsFromSelector === void 0) { paramsFromSelector = null; }\n var params = {\n context: this.gridOptionsWrapper.getContext(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n api: this.gridOptionsWrapper.getApi()\n };\n mergeDeep(params, paramsFromGrid);\n // pull user params from either the old prop name and new prop name\n // eg either cellRendererParams and cellCompParams\n var defObjectAny = defObject;\n var userParams = defObjectAny && defObjectAny[type.propertyName + 'Params'];\n if (typeof userParams === 'function') {\n var userParamsFromFunc = userParams(paramsFromGrid);\n mergeDeep(params, userParamsFromFunc);\n }\n else if (typeof userParams === 'object') {\n mergeDeep(params, userParams);\n }\n mergeDeep(params, paramsFromSelector);\n return params;\n };\n UserComponentFactory.prototype.initComponent = function (component, params) {\n this.context.createBean(component);\n if (component.init == null) {\n return;\n }\n return component.init(params);\n };\n UserComponentFactory.prototype.getDefaultFloatingFilterType = function (def) {\n if (def == null) {\n return null;\n }\n var defaultFloatingFilterType = null;\n var _a = this.getCompKeys(def, FilterComponent), compName = _a.compName, jsComp = _a.jsComp, fwComp = _a.fwComp;\n if (compName) {\n // will be undefined if not in the map\n defaultFloatingFilterType = FloatingFilterMapper.getFloatingFilterType(compName);\n }\n else {\n var usingDefaultFilter = (jsComp == null && fwComp == null) && (def.filter === true);\n if (usingDefaultFilter) {\n var setFilterModuleLoaded = ModuleRegistry.isRegistered(exports.ModuleNames.SetFilterModule);\n defaultFloatingFilterType = setFilterModuleLoaded ? 'agSetColumnFloatingFilter' : 'agTextColumnFloatingFilter';\n }\n }\n return defaultFloatingFilterType;\n };\n __decorate$E([\n Autowired('gridOptions')\n ], UserComponentFactory.prototype, \"gridOptions\", void 0);\n __decorate$E([\n Autowired('agComponentUtils')\n ], UserComponentFactory.prototype, \"agComponentUtils\", void 0);\n __decorate$E([\n Autowired('componentMetadataProvider')\n ], UserComponentFactory.prototype, \"componentMetadataProvider\", void 0);\n __decorate$E([\n Autowired('userComponentRegistry')\n ], UserComponentFactory.prototype, \"userComponentRegistry\", void 0);\n __decorate$E([\n Optional('frameworkComponentWrapper')\n ], UserComponentFactory.prototype, \"frameworkComponentWrapper\", void 0);\n UserComponentFactory = __decorate$E([\n Bean('userComponentFactory')\n ], UserComponentFactory);\n return UserComponentFactory;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n(function (ExcelFactoryMode) {\n ExcelFactoryMode[ExcelFactoryMode[\"SINGLE_SHEET\"] = 0] = \"SINGLE_SHEET\";\n ExcelFactoryMode[ExcelFactoryMode[\"MULTI_SHEET\"] = 1] = \"MULTI_SHEET\";\n})(exports.ExcelFactoryMode || (exports.ExcelFactoryMode = {}));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$M = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$F = (undefined && undefined.__decorate) || function (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/** Adds drag listening onto an element. In AG Grid this is used twice, first is resizing columns,\n * second is moving the columns and column groups around (ie the 'drag' part of Drag and Drop. */\nvar DragService = /** @class */ (function (_super) {\n __extends$M(DragService, _super);\n function DragService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.dragEndFunctions = [];\n _this.dragSources = [];\n return _this;\n }\n DragService.prototype.init = function () {\n this.logger = this.loggerFactory.create('DragService');\n };\n DragService.prototype.removeAllListeners = function () {\n this.dragSources.forEach(this.removeListener.bind(this));\n this.dragSources.length = 0;\n };\n DragService.prototype.removeListener = function (dragSourceAndListener) {\n var element = dragSourceAndListener.dragSource.eElement;\n var mouseDownListener = dragSourceAndListener.mouseDownListener;\n element.removeEventListener('mousedown', mouseDownListener);\n // remove touch listener only if it exists\n if (dragSourceAndListener.touchEnabled) {\n var touchStartListener = dragSourceAndListener.touchStartListener;\n element.removeEventListener('touchstart', touchStartListener, { passive: true });\n }\n };\n DragService.prototype.removeDragSource = function (params) {\n var dragSourceAndListener = this.dragSources.find(function (item) { return item.dragSource === params; });\n if (!dragSourceAndListener) {\n return;\n }\n this.removeListener(dragSourceAndListener);\n removeFromArray(this.dragSources, dragSourceAndListener);\n };\n DragService.prototype.isDragging = function () {\n return this.dragging;\n };\n DragService.prototype.addDragSource = function (params, includeTouch) {\n var _this = this;\n if (includeTouch === void 0) { includeTouch = false; }\n var mouseListener = this.onMouseDown.bind(this, params);\n params.eElement.addEventListener('mousedown', mouseListener);\n var touchListener = null;\n var suppressTouch = this.gridOptionsWrapper.isSuppressTouch();\n if (includeTouch && !suppressTouch) {\n touchListener = function (touchEvent) {\n if (touchEvent.cancelable) {\n touchEvent.preventDefault();\n }\n _this.onTouchStart(params, touchEvent);\n };\n params.eElement.addEventListener('touchstart', touchListener, { passive: true });\n }\n this.dragSources.push({\n dragSource: params,\n mouseDownListener: mouseListener,\n touchStartListener: touchListener,\n touchEnabled: includeTouch\n });\n };\n // gets called whenever mouse down on any drag source\n DragService.prototype.onTouchStart = function (params, touchEvent) {\n var _this = this;\n this.currentDragParams = params;\n this.dragging = false;\n var touch = touchEvent.touches[0];\n this.touchLastTime = touch;\n this.touchStart = touch;\n var touchMoveEvent = function (e) { return _this.onTouchMove(e, params.eElement); };\n var touchEndEvent = function (e) { return _this.onTouchUp(e, params.eElement); };\n var documentTouchMove = function (e) { if (e.cancelable) {\n e.preventDefault();\n } };\n var target = params.eElement;\n var events = [\n // Prevents the page document from moving while we are dragging items around.\n // preventDefault needs to be called in the touchmove listener and never inside the\n // touchstart, because using touchstart causes the click event to be cancelled on touch devices.\n { target: document, type: 'touchmove', listener: documentTouchMove, options: { passive: false } },\n { target: target, type: 'touchmove', listener: touchMoveEvent, options: { passive: true } },\n { target: target, type: 'touchend', listener: touchEndEvent, options: { passive: true } },\n { target: target, type: 'touchcancel', listener: touchEndEvent, options: { passive: true } }\n ];\n // temporally add these listeners, for the duration of the drag\n this.addTemporaryEvents(events);\n // see if we want to start dragging straight away\n if (params.dragStartPixels === 0) {\n this.onCommonMove(touch, this.touchStart, params.eElement);\n }\n };\n // gets called whenever mouse down on any drag source\n DragService.prototype.onMouseDown = function (params, mouseEvent) {\n var _this = this;\n var e = mouseEvent;\n if (params.skipMouseEvent && params.skipMouseEvent(mouseEvent)) {\n return;\n }\n // if there are two elements with parent / child relationship, and both are draggable,\n // when we drag the child, we should NOT drag the parent. an example of this is row moving\n // and range selection - row moving should get preference when use drags the rowDrag component.\n if (e._alreadyProcessedByDragService) {\n return;\n }\n e._alreadyProcessedByDragService = true;\n // only interested in left button clicks\n if (mouseEvent.button !== 0) {\n return;\n }\n this.currentDragParams = params;\n this.dragging = false;\n this.mouseStartEvent = mouseEvent;\n var eDocument = this.gridOptionsWrapper.getDocument();\n var mouseMoveEvent = function (event) { return _this.onMouseMove(event, params.eElement); };\n var mouseUpEvent = function (event) { return _this.onMouseUp(event, params.eElement); };\n var contextEvent = function (event) { return event.preventDefault(); };\n var target = eDocument;\n var events = [\n { target: target, type: 'mousemove', listener: mouseMoveEvent },\n { target: target, type: 'mouseup', listener: mouseUpEvent },\n { target: target, type: 'contextmenu', listener: contextEvent }\n ];\n // temporally add these listeners, for the duration of the drag\n this.addTemporaryEvents(events);\n //see if we want to start dragging straight away\n if (params.dragStartPixels === 0) {\n this.onMouseMove(mouseEvent, params.eElement);\n }\n };\n DragService.prototype.addTemporaryEvents = function (events) {\n events.forEach(function (currentEvent) {\n var target = currentEvent.target, type = currentEvent.type, listener = currentEvent.listener, options = currentEvent.options;\n target.addEventListener(type, listener, options);\n });\n this.dragEndFunctions.push(function () {\n events.forEach(function (currentEvent) {\n var target = currentEvent.target, type = currentEvent.type, listener = currentEvent.listener, options = currentEvent.options;\n target.removeEventListener(type, listener, options);\n });\n });\n };\n // returns true if the event is close to the original event by X pixels either vertically or horizontally.\n // we only start dragging after X pixels so this allows us to know if we should start dragging yet.\n DragService.prototype.isEventNearStartEvent = function (currentEvent, startEvent) {\n // by default, we wait 4 pixels before starting the drag\n var dragStartPixels = this.currentDragParams.dragStartPixels;\n var requiredPixelDiff = exists(dragStartPixels) ? dragStartPixels : 4;\n return areEventsNear(currentEvent, startEvent, requiredPixelDiff);\n };\n DragService.prototype.getFirstActiveTouch = function (touchList) {\n for (var i = 0; i < touchList.length; i++) {\n if (touchList[i].identifier === this.touchStart.identifier) {\n return touchList[i];\n }\n }\n return null;\n };\n DragService.prototype.onCommonMove = function (currentEvent, startEvent, el) {\n if (!this.dragging) {\n // if mouse hasn't travelled from the start position enough, do nothing\n if (!this.dragging && this.isEventNearStartEvent(currentEvent, startEvent)) {\n return;\n }\n this.dragging = true;\n var event_1 = {\n type: Events.EVENT_DRAG_STARTED,\n api: this.gridApi,\n columnApi: this.columnApi,\n target: el\n };\n this.eventService.dispatchEvent(event_1);\n this.currentDragParams.onDragStart(startEvent);\n // we need ONE drag action at the startEvent, so that we are guaranteed the drop target\n // at the start gets notified. this is because the drag can start outside of the element\n // that started it, as the mouse is allowed drag away from the mouse down before it's\n // considered a drag (the isEventNearStartEvent() above). if we didn't do this, then\n // it would be possible to click a column by the edge, then drag outside of the drop zone\n // in less than 4 pixels and the drag officially starts outside of the header but the header\n // wouldn't be notified of the dragging.\n this.currentDragParams.onDragging(startEvent);\n }\n this.currentDragParams.onDragging(currentEvent);\n };\n DragService.prototype.onTouchMove = function (touchEvent, el) {\n var touch = this.getFirstActiveTouch(touchEvent.touches);\n if (!touch) {\n return;\n }\n // this.___statusPanel.setInfoText(Math.random() + ' onTouchMove preventDefault stopPropagation');\n this.onCommonMove(touch, this.touchStart, el);\n };\n // only gets called after a mouse down - as this is only added after mouseDown\n // and is removed when mouseUp happens\n DragService.prototype.onMouseMove = function (mouseEvent, el) {\n // The event type can be `mousedown` when `dragStartPixels=0`\n // we should only preventDefault on `mousemove`.\n if (isBrowserSafari() &&\n mouseEvent.type === 'mousemove' &&\n mouseEvent.cancelable &&\n this.mouseEventService.isEventFromThisGrid(mouseEvent) &&\n !this.isOverFormFieldElement(mouseEvent)) {\n mouseEvent.preventDefault();\n }\n this.onCommonMove(mouseEvent, this.mouseStartEvent, el);\n };\n DragService.prototype.isOverFormFieldElement = function (mouseEvent) {\n var _a, _b;\n var el = mouseEvent.target;\n var tagName = (_a = el) === null || _a === void 0 ? void 0 : _a.tagName.toLocaleLowerCase();\n return !!((_b = tagName) === null || _b === void 0 ? void 0 : _b.match('^a$|textarea|input|select|button'));\n };\n DragService.prototype.onTouchUp = function (touchEvent, el) {\n var touch = this.getFirstActiveTouch(touchEvent.changedTouches);\n // i haven't worked this out yet, but there is no matching touch\n // when we get the touch up event. to get around this, we swap in\n // the last touch. this is a hack to 'get it working' while we\n // figure out what's going on, why we are not getting a touch in\n // current event.\n if (!touch) {\n touch = this.touchLastTime;\n }\n // if mouse was left up before we started to move, then this is a tap.\n // we check this before onUpCommon as onUpCommon resets the dragging\n // let tap = !this.dragging;\n // let tapTarget = this.currentDragParams.eElement;\n this.onUpCommon(touch, el);\n // if tap, tell user\n // console.log(`${Math.random()} tap = ${tap}`);\n // if (tap) {\n // tapTarget.click();\n // }\n };\n DragService.prototype.onMouseUp = function (mouseEvent, el) {\n this.onUpCommon(mouseEvent, el);\n };\n DragService.prototype.onUpCommon = function (eventOrTouch, el) {\n if (this.dragging) {\n this.dragging = false;\n this.currentDragParams.onDragStop(eventOrTouch);\n var event_2 = {\n type: Events.EVENT_DRAG_STOPPED,\n api: this.gridApi,\n columnApi: this.columnApi,\n target: el\n };\n this.eventService.dispatchEvent(event_2);\n }\n this.mouseStartEvent = null;\n this.touchStart = null;\n this.touchLastTime = null;\n this.currentDragParams = null;\n this.dragEndFunctions.forEach(function (func) { return func(); });\n this.dragEndFunctions.length = 0;\n };\n __decorate$F([\n Autowired('loggerFactory')\n ], DragService.prototype, \"loggerFactory\", void 0);\n __decorate$F([\n Autowired('columnApi')\n ], DragService.prototype, \"columnApi\", void 0);\n __decorate$F([\n Autowired('gridApi')\n ], DragService.prototype, \"gridApi\", void 0);\n __decorate$F([\n Autowired('mouseEventService')\n ], DragService.prototype, \"mouseEventService\", void 0);\n __decorate$F([\n PostConstruct\n ], DragService.prototype, \"init\", null);\n __decorate$F([\n PreDestroy\n ], DragService.prototype, \"removeAllListeners\", null);\n DragService = __decorate$F([\n Bean('dragService')\n ], DragService);\n return DragService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$N = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$8 = (undefined && undefined.__assign) || function () {\n __assign$8 = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$8.apply(this, arguments);\n};\nvar __decorate$G = (undefined && undefined.__decorate) || function (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};\nvar FilterManager = /** @class */ (function (_super) {\n __extends$N(FilterManager, _super);\n function FilterManager() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.allColumnFilters = new Map();\n _this.activeAggregateFilters = [];\n _this.activeColumnFilters = [];\n _this.quickFilter = null;\n _this.quickFilterParts = null;\n // this is true when the grid is processing the filter change. this is used by the cell comps, so that they\n // don't flash when data changes due to filter changes. there is no need to flash when filter changes as the\n // user is in control, so doesn't make sense to show flashing changes. for example, go to main demo where\n // this feature is turned off (hack code to always return false for isSuppressFlashingCellsBecauseFiltering(), put in)\n // 100,000 rows and group by country. then do some filtering. all the cells flash, which is silly.\n _this.processingFilterChange = false;\n return _this;\n }\n FilterManager_1 = FilterManager;\n FilterManager.prototype.init = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, function () { return _this.onColumnsChanged(); });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VALUE_CHANGED, function () { return _this.refreshFiltersForAggregations(); });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, function () { return _this.refreshFiltersForAggregations(); });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, function () { return _this.refreshFiltersForAggregations(); });\n this.quickFilter = this.parseQuickFilter(this.gridOptionsWrapper.getQuickFilterText());\n this.setQuickFilterParts();\n this.allowShowChangeAfterFilter = this.gridOptionsWrapper.isAllowShowChangeAfterFilter();\n };\n FilterManager.prototype.setQuickFilterParts = function () {\n this.quickFilterParts = this.quickFilter ? this.quickFilter.split(' ') : null;\n };\n FilterManager.prototype.setFilterModel = function (model) {\n var _this = this;\n var allPromises = [];\n var previousModel = this.getFilterModel();\n if (model) {\n // mark the filters as we set them, so any active filters left over we stop\n var modelKeys_1 = convertToSet(Object.keys(model));\n this.allColumnFilters.forEach(function (filterWrapper, colId) {\n var newModel = model[colId];\n allPromises.push(_this.setModelOnFilterWrapper(filterWrapper.filterPromise, newModel));\n modelKeys_1.delete(colId);\n });\n // at this point, processedFields contains data for which we don't have a filter working yet\n modelKeys_1.forEach(function (colId) {\n var column = _this.columnModel.getPrimaryColumn(colId) || _this.columnModel.getGridColumn(colId);\n if (!column) {\n console.warn('AG Grid: setFilterModel() - no column found for colId: ' + colId);\n return;\n }\n if (!column.isFilterAllowed()) {\n console.warn('AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: ' + colId);\n return;\n }\n var filterWrapper = _this.getOrCreateFilterWrapper(column, 'NO_UI');\n if (!filterWrapper) {\n console.warn('AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: ' + colId);\n return;\n }\n allPromises.push(_this.setModelOnFilterWrapper(filterWrapper.filterPromise, model[colId]));\n });\n }\n else {\n this.allColumnFilters.forEach(function (filterWrapper) {\n allPromises.push(_this.setModelOnFilterWrapper(filterWrapper.filterPromise, null));\n });\n }\n AgPromise.all(allPromises).then(function () {\n var currentModel = _this.getFilterModel();\n var columns = [];\n _this.allColumnFilters.forEach(function (filterWrapper, colId) {\n var before = previousModel ? previousModel[colId] : null;\n var after = currentModel ? currentModel[colId] : null;\n if (!_.jsonEquals(before, after)) {\n columns.push(filterWrapper.column);\n }\n });\n if (columns.length > 0) {\n _this.onFilterChanged({ columns: columns });\n }\n });\n };\n FilterManager.prototype.setModelOnFilterWrapper = function (filterPromise, newModel) {\n return new AgPromise(function (resolve) {\n filterPromise.then(function (filter) {\n if (typeof filter.setModel !== 'function') {\n console.warn('AG Grid: filter missing setModel method, which is needed for setFilterModel');\n resolve();\n }\n (filter.setModel(newModel) || AgPromise.resolve()).then(function () { return resolve(); });\n });\n });\n };\n FilterManager.prototype.getFilterModel = function () {\n var result = {};\n this.allColumnFilters.forEach(function (filterWrapper, key) {\n // because user can provide filters, we provide useful error checking and messages\n var filterPromise = filterWrapper.filterPromise;\n var filter = filterPromise.resolveNow(null, function (promiseFilter) { return promiseFilter; });\n if (filter == null) {\n return null;\n }\n if (typeof filter.getModel !== 'function') {\n console.warn('AG Grid: filter API missing getModel method, which is needed for getFilterModel');\n return;\n }\n var model = filter.getModel();\n if (exists(model)) {\n result[key] = model;\n }\n });\n return result;\n };\n FilterManager.prototype.isColumnFilterPresent = function () {\n return this.activeColumnFilters.length > 0;\n };\n FilterManager.prototype.isAggregateFilterPresent = function () {\n return !!this.activeAggregateFilters.length;\n };\n FilterManager.prototype.doAggregateFiltersPass = function (node, filterToSkip) {\n return this.doColumnFiltersPass(node, filterToSkip, true);\n };\n // called by:\n // 1) onFilterChanged()\n // 2) onNewRowsLoaded()\n FilterManager.prototype.updateActiveFilters = function () {\n var _this = this;\n this.activeColumnFilters.length = 0;\n this.activeAggregateFilters.length = 0;\n var isFilterActive = function (filter) {\n if (!filter) {\n return false;\n } // this never happens, including to avoid compile error\n if (!filter.isFilterActive) {\n console.warn('AG Grid: Filter is missing isFilterActive() method');\n return false;\n }\n return filter.isFilterActive();\n };\n var groupFilterEnabled = !!this.gridOptionsWrapper.getGroupAggFiltering();\n var isAggFilter = function (column) {\n var isSecondary = !column.isPrimary();\n // the only filters that can appear on secondary columns are groupAgg filters\n if (isSecondary) {\n return true;\n }\n var isShowingPrimaryColumns = !_this.columnModel.isPivotActive();\n var isValueActive = column.isValueActive();\n // primary columns are only ever groupAgg filters if a) value is active and b) showing primary columns\n if (!isValueActive || !isShowingPrimaryColumns) {\n return false;\n }\n // from here on we know: isPrimary=true, isValueActive=true, isShowingPrimaryColumns=true\n if (_this.columnModel.isPivotMode()) {\n // primary column is pretending to be a pivot column, ie pivotMode=true, but we are\n // still showing primary columns\n return true;\n }\n else {\n // we are not pivoting, so we groupFilter when it's an agg column\n return groupFilterEnabled;\n }\n };\n this.allColumnFilters.forEach(function (filterWrapper) {\n if (filterWrapper.filterPromise.resolveNow(false, isFilterActive)) {\n var filterComp = filterWrapper.filterPromise.resolveNow(null, function (filter) { return filter; });\n if (isAggFilter(filterWrapper.column)) {\n _this.activeAggregateFilters.push(filterComp);\n }\n else {\n _this.activeColumnFilters.push(filterComp);\n }\n }\n });\n };\n FilterManager.prototype.updateFilterFlagInColumns = function (source, additionalEventAttributes) {\n this.allColumnFilters.forEach(function (filterWrapper) {\n var isFilterActive = filterWrapper.filterPromise.resolveNow(false, function (filter) { return filter.isFilterActive(); });\n filterWrapper.column.setFilterActive(isFilterActive, source, additionalEventAttributes);\n });\n };\n FilterManager.prototype.isAnyFilterPresent = function () {\n return this.isQuickFilterPresent() || this.isColumnFilterPresent() || this.isAggregateFilterPresent() || this.gridOptionsWrapper.isExternalFilterPresent();\n };\n FilterManager.prototype.doColumnFiltersPass = function (node, filterToSkip, targetAggregates) {\n var data = node.data, aggData = node.aggData;\n var targetedFilters = targetAggregates ? this.activeAggregateFilters : this.activeColumnFilters;\n var targetedData = targetAggregates ? aggData : data;\n for (var i = 0; i < targetedFilters.length; i++) {\n var filter = targetedFilters[i];\n if (filter == null || filter === filterToSkip) {\n continue;\n }\n if (typeof filter.doesFilterPass !== 'function') {\n // because users can do custom filters, give nice error message\n throw new Error('Filter is missing method doesFilterPass');\n }\n if (!filter.doesFilterPass({ node: node, data: targetedData })) {\n return false;\n }\n }\n return true;\n };\n FilterManager.prototype.parseQuickFilter = function (newFilter) {\n if (!exists(newFilter)) {\n return null;\n }\n if (!this.gridOptionsWrapper.isRowModelDefault()) {\n console.warn('AG Grid - Quick filtering only works with the Client-Side Row Model');\n return null;\n }\n return newFilter.toUpperCase();\n };\n FilterManager.prototype.setQuickFilter = function (newFilter) {\n if (newFilter != null && typeof newFilter !== 'string') {\n console.warn(\"AG Grid - setQuickFilter() only supports string inputs, received: \" + typeof newFilter);\n return;\n }\n var parsedFilter = this.parseQuickFilter(newFilter);\n if (this.quickFilter !== parsedFilter) {\n this.quickFilter = parsedFilter;\n this.setQuickFilterParts();\n this.onFilterChanged();\n }\n };\n FilterManager.prototype.refreshFiltersForAggregations = function () {\n var isAggFiltering = this.gridOptionsWrapper.getGroupAggFiltering();\n if (isAggFiltering) {\n this.onFilterChanged();\n }\n };\n // sometimes (especially in React) the filter can call onFilterChanged when we are in the middle\n // of a render cycle. this would be bad, so we wait for render cycle to complete when this happens.\n // this happens in react when we change React State in the grid (eg setting RowCtrl's in RowContainer)\n // which results in React State getting applied in the main application, triggering a useEffect() to\n // be kicked off adn then the application calling the grid's API. in AG-6554, the custom filter was\n // getting it's useEffect() triggered in this way.\n FilterManager.prototype.callOnFilterChangedOutsideRenderCycle = function (params) {\n var _this = this;\n if (params === void 0) { params = {}; }\n var action = function () { return _this.onFilterChanged(params); };\n if (this.rowRenderer.isRefreshInProgress()) {\n setTimeout(action, 0);\n }\n else {\n action();\n }\n };\n FilterManager.prototype.onFilterChanged = function (params) {\n if (params === void 0) { params = {}; }\n var filterInstance = params.filterInstance, additionalEventAttributes = params.additionalEventAttributes, columns = params.columns;\n this.updateActiveFilters();\n this.updateFilterFlagInColumns('filterChanged', additionalEventAttributes);\n this.allColumnFilters.forEach(function (filterWrapper) {\n if (!filterWrapper.filterPromise) {\n return;\n }\n filterWrapper.filterPromise.then(function (filter) {\n if (filter && filter !== filterInstance && filter.onAnyFilterChanged) {\n filter.onAnyFilterChanged();\n }\n });\n });\n var filterChangedEvent = {\n type: Events.EVENT_FILTER_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi,\n columns: columns || [],\n };\n if (additionalEventAttributes) {\n mergeDeep(filterChangedEvent, additionalEventAttributes);\n }\n // because internal events are not async in ag-grid, when the dispatchEvent\n // method comes back, we know all listeners have finished executing.\n this.processingFilterChange = true;\n this.eventService.dispatchEvent(filterChangedEvent);\n this.processingFilterChange = false;\n };\n FilterManager.prototype.isSuppressFlashingCellsBecauseFiltering = function () {\n // if user has elected to always flash cell changes, then always return false, otherwise we suppress flashing\n // changes when filtering\n return !this.allowShowChangeAfterFilter && this.processingFilterChange;\n };\n FilterManager.prototype.isQuickFilterPresent = function () {\n return this.quickFilter !== null;\n };\n FilterManager.prototype.doesRowPassOtherFilters = function (filterToSkip, node) {\n return this.doesRowPassFilter({ rowNode: node, filterInstanceToSkip: filterToSkip });\n };\n FilterManager.prototype.doesRowPassQuickFilterNoCache = function (node, filterPart) {\n var _this = this;\n var columns = this.columnModel.getAllColumnsForQuickFilter();\n return columns.some(function (column) {\n var part = _this.getQuickFilterTextForColumn(column, node);\n return exists(part) && part.indexOf(filterPart) >= 0;\n });\n };\n FilterManager.prototype.doesRowPassQuickFilterCache = function (node, filterPart) {\n if (!node.quickFilterAggregateText) {\n this.aggregateRowForQuickFilter(node);\n }\n return node.quickFilterAggregateText.indexOf(filterPart) >= 0;\n };\n FilterManager.prototype.doesRowPassQuickFilter = function (node) {\n var _this = this;\n var usingCache = this.gridOptionsWrapper.isCacheQuickFilter();\n // each part must pass, if any fails, then the whole filter fails\n return this.quickFilterParts.every(function (part) {\n return usingCache ? _this.doesRowPassQuickFilterCache(node, part) : _this.doesRowPassQuickFilterNoCache(node, part);\n });\n };\n FilterManager.prototype.doesRowPassAggregateFilters = function (params) {\n if (this.isAggregateFilterPresent() && !this.doAggregateFiltersPass(params.rowNode, params.filterInstanceToSkip)) {\n return false;\n }\n // got this far, all filters pass\n return true;\n };\n FilterManager.prototype.doesRowPassFilter = function (params) {\n // the row must pass ALL of the filters, so if any of them fail,\n // we return true. that means if a row passes the quick filter,\n // but fails the column filter, it fails overall\n // first up, check quick filter\n if (this.isQuickFilterPresent() && !this.doesRowPassQuickFilter(params.rowNode)) {\n return false;\n }\n // secondly, give the client a chance to reject this row\n if (this.gridOptionsWrapper.isExternalFilterPresent() && !this.gridOptionsWrapper.doesExternalFilterPass(params.rowNode)) {\n return false;\n }\n // lastly, check column filter\n if (this.isColumnFilterPresent() && !this.doColumnFiltersPass(params.rowNode, params.filterInstanceToSkip)) {\n return false;\n }\n // got this far, all filters pass\n return true;\n };\n FilterManager.prototype.getQuickFilterTextForColumn = function (column, node) {\n var value = this.valueService.getValue(column, node, true);\n var colDef = column.getColDef();\n if (colDef.getQuickFilterText) {\n var params = {\n value: value,\n node: node,\n data: node.data,\n column: column,\n colDef: colDef,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n value = colDef.getQuickFilterText(params);\n }\n return exists(value) ? value.toString().toUpperCase() : null;\n };\n FilterManager.prototype.aggregateRowForQuickFilter = function (node) {\n var _this = this;\n var stringParts = [];\n var columns = this.columnModel.getAllColumnsForQuickFilter();\n columns.forEach(function (column) {\n var part = _this.getQuickFilterTextForColumn(column, node);\n if (exists(part)) {\n stringParts.push(part);\n }\n });\n node.quickFilterAggregateText = stringParts.join(FilterManager_1.QUICK_FILTER_SEPARATOR);\n };\n FilterManager.prototype.onNewRowsLoaded = function (source) {\n this.allColumnFilters.forEach(function (filterWrapper) {\n filterWrapper.filterPromise.then(function (filter) {\n if (filter.onNewRowsLoaded) {\n filter.onNewRowsLoaded();\n }\n });\n });\n this.updateFilterFlagInColumns(source);\n this.updateActiveFilters();\n };\n FilterManager.prototype.createValueGetter = function (column) {\n var _this = this;\n return function (_a) {\n var node = _a.node;\n return _this.valueService.getValue(column, node, true);\n };\n };\n FilterManager.prototype.getFilterComponent = function (column, source, createIfDoesNotExist) {\n if (createIfDoesNotExist === void 0) { createIfDoesNotExist = true; }\n var _a;\n if (createIfDoesNotExist) {\n return ((_a = this.getOrCreateFilterWrapper(column, source)) === null || _a === void 0 ? void 0 : _a.filterPromise) || null;\n }\n var filterWrapper = this.cachedFilter(column);\n return filterWrapper ? filterWrapper.filterPromise : null;\n };\n FilterManager.prototype.isFilterActive = function (column) {\n var filterWrapper = this.cachedFilter(column);\n return !!filterWrapper && filterWrapper.filterPromise.resolveNow(false, function (filter) { return filter.isFilterActive(); });\n };\n FilterManager.prototype.getOrCreateFilterWrapper = function (column, source) {\n if (!column.isFilterAllowed()) {\n return null;\n }\n var filterWrapper = this.cachedFilter(column);\n if (!filterWrapper) {\n filterWrapper = this.createFilterWrapper(column, source);\n this.allColumnFilters.set(column.getColId(), filterWrapper);\n }\n else if (source !== 'NO_UI') {\n this.putIntoGui(filterWrapper, source);\n }\n return filterWrapper;\n };\n FilterManager.prototype.cachedFilter = function (column) {\n return this.allColumnFilters.get(column.getColId());\n };\n FilterManager.prototype.createFilterInstance = function (column) {\n var _this = this;\n var defaultFilter = ModuleRegistry.isRegistered(exports.ModuleNames.SetFilterModule) ? 'agSetColumnFilter' : 'agTextColumnFilter';\n var colDef = column.getColDef();\n var filterInstance;\n var params = __assign$8(__assign$8({}, this.createFilterParams(column, colDef)), { filterModifiedCallback: function () {\n var event = {\n type: Events.EVENT_FILTER_MODIFIED,\n api: _this.gridApi,\n columnApi: _this.columnApi,\n column: column,\n filterInstance: filterInstance\n };\n _this.eventService.dispatchEvent(event);\n }, filterChangedCallback: function (additionalEventAttributes) {\n var params = { filterInstance: filterInstance, additionalEventAttributes: additionalEventAttributes, columns: [column] };\n _this.callOnFilterChangedOutsideRenderCycle(params);\n }, doesRowPassOtherFilter: function (node) { return _this.doesRowPassOtherFilters(filterInstance, node); } });\n var compDetails = this.userComponentFactory.getFilterDetails(colDef, params, defaultFilter);\n if (!compDetails) {\n return null;\n }\n var componentPromise = compDetails.newAgStackInstance();\n if (componentPromise) {\n componentPromise.then(function (r) { return filterInstance = r; });\n }\n return componentPromise;\n };\n FilterManager.prototype.createFilterParams = function (column, colDef) {\n var params = {\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n column: column,\n colDef: cloneObject(colDef),\n rowModel: this.rowModel,\n filterChangedCallback: function () { },\n filterModifiedCallback: function () { },\n valueGetter: this.createValueGetter(column),\n context: this.gridOptionsWrapper.getContext(),\n doesRowPassOtherFilter: function () { return true; },\n };\n return params;\n };\n FilterManager.prototype.createFilterWrapper = function (column, source) {\n var filterWrapper = {\n column: column,\n filterPromise: null,\n compiledElement: null,\n guiPromise: AgPromise.resolve(null)\n };\n filterWrapper.filterPromise = this.createFilterInstance(column);\n if (filterWrapper.filterPromise) {\n this.putIntoGui(filterWrapper, source);\n }\n return filterWrapper;\n };\n FilterManager.prototype.putIntoGui = function (filterWrapper, source) {\n var _this = this;\n var eFilterGui = document.createElement('div');\n eFilterGui.className = 'ag-filter';\n filterWrapper.guiPromise = new AgPromise(function (resolve) {\n filterWrapper.filterPromise.then(function (filter) {\n var guiFromFilter = filter.getGui();\n if (!exists(guiFromFilter)) {\n console.warn(\"AG Grid: getGui method from filter returned \" + guiFromFilter + \", it should be a DOM element or an HTML template string.\");\n }\n // for backwards compatibility with Angular 1 - we\n // used to allow providing back HTML from getGui().\n // once we move away from supporting Angular 1\n // directly, we can change this.\n if (typeof guiFromFilter === 'string') {\n guiFromFilter = loadTemplate(guiFromFilter);\n }\n eFilterGui.appendChild(guiFromFilter);\n resolve(eFilterGui);\n _this.eventService.dispatchEvent({\n type: Events.EVENT_FILTER_OPENED,\n column: filterWrapper.column,\n source: source,\n eGui: eFilterGui,\n api: _this.gridApi,\n columnApi: _this.columnApi\n });\n });\n });\n };\n FilterManager.prototype.onColumnsChanged = function () {\n var _this = this;\n var columns = [];\n this.allColumnFilters.forEach(function (wrapper, colId) {\n var currentColumn;\n if (wrapper.column.isPrimary()) {\n currentColumn = _this.columnModel.getPrimaryColumn(colId);\n }\n else {\n currentColumn = _this.columnModel.getGridColumn(colId);\n }\n if (currentColumn) {\n return;\n }\n columns.push(wrapper.column);\n _this.disposeFilterWrapper(wrapper, 'filterDestroyed');\n });\n if (columns.length > 0) {\n this.onFilterChanged({ columns: columns });\n }\n };\n // destroys the filter, so it not longer takes part\n FilterManager.prototype.destroyFilter = function (column, source) {\n if (source === void 0) { source = 'api'; }\n var filterWrapper = this.allColumnFilters.get(column.getColId());\n if (filterWrapper) {\n this.disposeFilterWrapper(filterWrapper, source);\n this.onFilterChanged({ columns: [column] });\n }\n };\n FilterManager.prototype.disposeFilterWrapper = function (filterWrapper, source) {\n var _this = this;\n filterWrapper.filterPromise.then(function (filter) {\n (filter.setModel(null) || AgPromise.resolve()).then(function () {\n _this.getContext().destroyBean(filter);\n filterWrapper.column.setFilterActive(false, source);\n _this.allColumnFilters.delete(filterWrapper.column.getColId());\n });\n });\n };\n FilterManager.prototype.destroy = function () {\n var _this = this;\n _super.prototype.destroy.call(this);\n this.allColumnFilters.forEach(function (filterWrapper) { return _this.disposeFilterWrapper(filterWrapper, 'filterDestroyed'); });\n };\n var FilterManager_1;\n FilterManager.QUICK_FILTER_SEPARATOR = '\\n';\n __decorate$G([\n Autowired('valueService')\n ], FilterManager.prototype, \"valueService\", void 0);\n __decorate$G([\n Autowired('columnModel')\n ], FilterManager.prototype, \"columnModel\", void 0);\n __decorate$G([\n Autowired('rowModel')\n ], FilterManager.prototype, \"rowModel\", void 0);\n __decorate$G([\n Autowired('columnApi')\n ], FilterManager.prototype, \"columnApi\", void 0);\n __decorate$G([\n Autowired('gridApi')\n ], FilterManager.prototype, \"gridApi\", void 0);\n __decorate$G([\n Autowired('userComponentFactory')\n ], FilterManager.prototype, \"userComponentFactory\", void 0);\n __decorate$G([\n Autowired('rowRenderer')\n ], FilterManager.prototype, \"rowRenderer\", void 0);\n __decorate$G([\n PostConstruct\n ], FilterManager.prototype, \"init\", null);\n __decorate$G([\n PreDestroy\n ], FilterManager.prototype, \"destroy\", null);\n FilterManager = FilterManager_1 = __decorate$G([\n Bean('filterManager')\n ], FilterManager);\n return FilterManager;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$O = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AbstractHeaderCellComp = /** @class */ (function (_super) {\n __extends$O(AbstractHeaderCellComp, _super);\n function AbstractHeaderCellComp(template, ctrl) {\n var _this = _super.call(this, template) || this;\n _this.ctrl = ctrl;\n return _this;\n }\n AbstractHeaderCellComp.prototype.getCtrl = function () {\n return this.ctrl;\n };\n return AbstractHeaderCellComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$P = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$H = (undefined && undefined.__decorate) || function (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};\nvar HeaderFilterCellComp = /** @class */ (function (_super) {\n __extends$P(HeaderFilterCellComp, _super);\n function HeaderFilterCellComp(ctrl) {\n return _super.call(this, HeaderFilterCellComp.TEMPLATE, ctrl) || this;\n }\n HeaderFilterCellComp.prototype.postConstruct = function () {\n var _this = this;\n var eGui = this.getGui();\n var compProxy = {\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n addOrRemoveBodyCssClass: function (cssClassName, on) { return _this.eFloatingFilterBody.classList.toggle(cssClassName, on); },\n addOrRemoveButtonWrapperCssClass: function (cssClassName, on) { return _this.eButtonWrapper.classList.toggle(cssClassName, on); },\n setCompDetails: function (compDetails) { return _this.setCompDetails(compDetails); },\n getFloatingFilterComp: function () { return _this.compPromise; },\n setWidth: function (width) { return eGui.style.width = width; },\n setMenuIcon: function (eIcon) { return _this.eButtonShowMainFilter.appendChild(eIcon); }\n };\n this.ctrl.setComp(compProxy, eGui, this.eButtonShowMainFilter, this.eFloatingFilterBody);\n };\n HeaderFilterCellComp.prototype.setCompDetails = function (compDetails) {\n var _this = this;\n // because we are providing defaultFloatingFilterType, we know it will never be undefined;\n this.compPromise = compDetails.newAgStackInstance();\n this.compPromise.then(function (comp) { return _this.afterCompCreated(comp); });\n };\n HeaderFilterCellComp.prototype.afterCompCreated = function (comp) {\n var _this = this;\n if (!comp) {\n return;\n }\n this.addDestroyFunc(function () { return _this.context.destroyBean(comp); });\n if (!this.isAlive()) {\n return;\n }\n this.eFloatingFilterBody.appendChild(comp.getGui());\n if (comp.afterGuiAttached) {\n comp.afterGuiAttached();\n }\n };\n HeaderFilterCellComp.TEMPLATE = \"
\\n
\\n
\\n \\n
\\n
\";\n __decorate$H([\n RefSelector('eFloatingFilterBody')\n ], HeaderFilterCellComp.prototype, \"eFloatingFilterBody\", void 0);\n __decorate$H([\n RefSelector('eButtonWrapper')\n ], HeaderFilterCellComp.prototype, \"eButtonWrapper\", void 0);\n __decorate$H([\n RefSelector('eButtonShowMainFilter')\n ], HeaderFilterCellComp.prototype, \"eButtonShowMainFilter\", void 0);\n __decorate$H([\n PostConstruct\n ], HeaderFilterCellComp.prototype, \"postConstruct\", null);\n return HeaderFilterCellComp;\n}(AbstractHeaderCellComp));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar SideBarDefParser = /** @class */ (function () {\n function SideBarDefParser() {\n }\n SideBarDefParser.parse = function (toParse) {\n if (!toParse) {\n return null;\n }\n if (toParse === true) {\n return {\n toolPanels: [\n SideBarDefParser.DEFAULT_COLUMN_COMP,\n SideBarDefParser.DEFAULT_FILTER_COMP,\n ],\n defaultToolPanel: 'columns'\n };\n }\n if (typeof toParse === 'string') {\n return SideBarDefParser.parse([toParse]);\n }\n if (Array.isArray(toParse)) {\n var comps_1 = [];\n toParse.forEach(function (key) {\n var lookupResult = SideBarDefParser.DEFAULT_BY_KEY[key];\n if (!lookupResult) {\n console.warn(\"AG Grid: the key \" + key + \" is not a valid key for specifying a tool panel, valid keys are: \" + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));\n return;\n }\n comps_1.push(lookupResult);\n });\n if (comps_1.length === 0) {\n return null;\n }\n return {\n toolPanels: comps_1,\n defaultToolPanel: comps_1[0].id\n };\n }\n var result = {\n toolPanels: SideBarDefParser.parseComponents(toParse.toolPanels),\n defaultToolPanel: toParse.defaultToolPanel,\n hiddenByDefault: toParse.hiddenByDefault,\n position: toParse.position\n };\n return result;\n };\n SideBarDefParser.parseComponents = function (from) {\n var result = [];\n if (!from) {\n return result;\n }\n from.forEach(function (it) {\n var toAdd = null;\n if (typeof it === 'string') {\n var lookupResult = SideBarDefParser.DEFAULT_BY_KEY[it];\n if (!lookupResult) {\n console.warn(\"AG Grid: the key \" + it + \" is not a valid key for specifying a tool panel, valid keys are: \" + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));\n return;\n }\n toAdd = lookupResult;\n }\n else {\n toAdd = it;\n }\n result.push(toAdd);\n });\n return result;\n };\n SideBarDefParser.DEFAULT_COLUMN_COMP = {\n id: 'columns',\n labelDefault: 'Columns',\n labelKey: 'columns',\n iconKey: 'columns',\n toolPanel: 'agColumnsToolPanel',\n };\n SideBarDefParser.DEFAULT_FILTER_COMP = {\n id: 'filters',\n labelDefault: 'Filters',\n labelKey: 'filters',\n iconKey: 'filter',\n toolPanel: 'agFiltersToolPanel',\n };\n SideBarDefParser.DEFAULT_BY_KEY = {\n columns: SideBarDefParser.DEFAULT_COLUMN_COMP,\n filters: SideBarDefParser.DEFAULT_FILTER_COMP\n };\n return SideBarDefParser;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __assign$9 = (undefined && undefined.__assign) || function () {\n __assign$9 = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$9.apply(this, arguments);\n};\nvar __decorate$I = (undefined && undefined.__decorate) || function (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};\nvar __param$3 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar __read$6 = (undefined && undefined.__read) || function (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};\nvar __spread$4 = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$6(arguments[i]));\n return ar;\n};\nvar DEFAULT_ROW_HEIGHT = 25;\nvar DEFAULT_DETAIL_ROW_HEIGHT = 300;\nvar DEFAULT_VIEWPORT_ROW_MODEL_PAGE_SIZE = 5;\nvar DEFAULT_VIEWPORT_ROW_MODEL_BUFFER_SIZE = 5;\nvar DEFAULT_KEEP_DETAIL_ROW_COUNT = 10;\nfunction isTrue(value) {\n return value === true || value === 'true';\n}\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (typeof value == 'string') {\n return parseInt(value, 10);\n }\n}\nfunction zeroOrGreater(value, defaultValue) {\n if (value >= 0) {\n return value;\n }\n // zero gets returned if number is missing or the wrong type\n return defaultValue;\n}\nfunction oneOrGreater(value, defaultValue) {\n var valueNumber = parseInt(value, 10);\n if (isNumeric(valueNumber) && valueNumber > 0) {\n return valueNumber;\n }\n return defaultValue;\n}\nvar GridOptionsWrapper = /** @class */ (function () {\n function GridOptionsWrapper() {\n this.propertyEventService = new EventService();\n this.domDataKey = '__AG_' + Math.random().toString();\n this.destroyed = false;\n }\n GridOptionsWrapper_1 = GridOptionsWrapper;\n GridOptionsWrapper.prototype.agWire = function (gridApi, columnApi) {\n this.gridOptions.api = gridApi;\n this.gridOptions.columnApi = columnApi;\n this.checkForDeprecated();\n this.checkForViolations();\n };\n GridOptionsWrapper.prototype.destroy = function () {\n // need to remove these, as we don't own the lifecycle of the gridOptions, we need to\n // remove the references in case the user keeps the grid options, we want the rest\n // of the grid to be picked up by the garbage collector\n this.gridOptions.api = null;\n this.gridOptions.columnApi = null;\n this.destroyed = true;\n };\n GridOptionsWrapper.prototype.init = function () {\n var _this = this;\n if (this.gridOptions.suppressPropertyNamesCheck !== true) {\n this.checkGridOptionsProperties();\n this.checkColumnDefProperties();\n }\n // parse side bar options into correct format\n if (this.gridOptions.sideBar != null) {\n this.gridOptions.sideBar = SideBarDefParser.parse(this.gridOptions.sideBar);\n }\n var async = this.useAsyncEvents();\n this.eventService.addGlobalListener(this.globalEventHandler.bind(this), async);\n if (this.isGroupSelectsChildren() && this.isSuppressParentsInRowNodes()) {\n console.warn(\"AG Grid: 'groupSelectsChildren' does not work with 'suppressParentsInRowNodes', this selection method needs the part in rowNode to work\");\n }\n if (this.isGroupSelectsChildren()) {\n if (!this.isRowSelectionMulti()) {\n console.warn(\"AG Grid: rowSelection must be 'multiple' for groupSelectsChildren to make sense\");\n }\n if (this.isRowModelServerSide()) {\n console.warn('AG Grid: group selects children is NOT support for Server Side Row Model. ' +\n 'This is because the rows are lazy loaded, so selecting a group is not possible as' +\n 'the grid has no way of knowing what the children are.');\n }\n }\n if (this.isGroupRemoveSingleChildren() && this.isGroupHideOpenParents()) {\n console.warn(\"AG Grid: groupRemoveSingleChildren and groupHideOpenParents do not work with each other, you need to pick one. And don't ask us how to us these together on our support forum either you will get the same answer!\");\n }\n if (this.isRowModelServerSide()) {\n var msg = function (prop) { return \"AG Grid: '\" + prop + \"' is not supported on the Server-Side Row Model\"; };\n if (exists(this.gridOptions.groupDefaultExpanded)) {\n console.warn(msg('groupDefaultExpanded'));\n }\n if (exists(this.gridOptions.groupDefaultExpanded)) {\n console.warn(msg('groupIncludeFooter'));\n }\n if (exists(this.gridOptions.groupDefaultExpanded)) {\n console.warn(msg('groupIncludeTotalFooter'));\n }\n }\n if (this.isEnableRangeSelection()) {\n ModuleRegistry.assertRegistered(exports.ModuleNames.RangeSelectionModule, 'enableRangeSelection');\n }\n if (!this.isEnableRangeSelection() && (this.isEnableRangeHandle() || this.isEnableFillHandle())) {\n console.warn(\"AG Grid: 'enableRangeHandle' and 'enableFillHandle' will not work unless 'enableRangeSelection' is set to true\");\n }\n var warnOfDeprecaredIcon = function (name) {\n if (_this.gridOptions.icons && _this.gridOptions.icons[name]) {\n console.warn(\"gridOptions.icons.\" + name + \" is no longer supported. For information on how to style checkboxes and radio buttons, see https://www.ag-grid.com/javascript-grid-icons/\");\n }\n };\n warnOfDeprecaredIcon('radioButtonOff');\n warnOfDeprecaredIcon('radioButtonOn');\n warnOfDeprecaredIcon('checkboxChecked');\n warnOfDeprecaredIcon('checkboxUnchecked');\n warnOfDeprecaredIcon('checkboxIndeterminate');\n // sets an initial calculation for the scrollbar width\n this.getScrollbarWidth();\n };\n GridOptionsWrapper.prototype.checkColumnDefProperties = function () {\n var _this = this;\n if (this.gridOptions.columnDefs == null) {\n return;\n }\n this.gridOptions.columnDefs.forEach(function (colDef) {\n var userProperties = Object.getOwnPropertyNames(colDef);\n var validProperties = __spread$4(ColDefUtil.ALL_PROPERTIES, ColDefUtil.FRAMEWORK_PROPERTIES);\n _this.checkProperties(userProperties, validProperties, validProperties, 'colDef', 'https://www.ag-grid.com/javascript-grid-column-properties/');\n });\n };\n GridOptionsWrapper.prototype.checkGridOptionsProperties = function () {\n var userProperties = Object.getOwnPropertyNames(this.gridOptions);\n var validProperties = __spread$4(PropertyKeys.ALL_PROPERTIES, PropertyKeys.FRAMEWORK_PROPERTIES, values(Events).map(function (event) { return ComponentUtil.getCallbackForEvent(event); }));\n var validPropertiesAndExceptions = __spread$4(validProperties, ['api', 'columnApi']);\n this.checkProperties(userProperties, validPropertiesAndExceptions, validProperties, 'gridOptions', 'https://www.ag-grid.com/javascript-data-grid/grid-options/');\n };\n GridOptionsWrapper.prototype.checkProperties = function (userProperties, validPropertiesAndExceptions, validProperties, containerName, docsUrl) {\n var invalidProperties = fuzzyCheckStrings(userProperties, validPropertiesAndExceptions, validProperties);\n iterateObject(invalidProperties, function (key, value) {\n console.warn(\"ag-grid: invalid \" + containerName + \" property '\" + key + \"' did you mean any of these: \" + value.slice(0, 8).join(\", \"));\n });\n if (Object.keys(invalidProperties).length > 0) {\n console.warn(\"ag-grid: to see all the valid \" + containerName + \" properties please check: \" + docsUrl);\n }\n };\n /**\n * Wrap the user callback and attach the api, columnApi and context to the params object on the way through.\n * @param callback User provided callback\n * @returns Wrapped callback where the params object not require api, columnApi and context\n */\n GridOptionsWrapper.prototype.mergeGridCommonParams = function (callback) {\n var _this = this;\n if (callback) {\n var wrapped = function (callbackParams) {\n var mergedParams = __assign$9(__assign$9({}, callbackParams), { api: _this.getApi(), columnApi: _this.getColumnApi(), context: _this.getContext() });\n return callback(mergedParams);\n };\n return wrapped;\n }\n return callback;\n };\n GridOptionsWrapper.prototype.getDomDataKey = function () {\n return this.domDataKey;\n };\n // returns the dom data, or undefined if not found\n GridOptionsWrapper.prototype.getDomData = function (element, key) {\n var domData = element[this.getDomDataKey()];\n return domData ? domData[key] : undefined;\n };\n GridOptionsWrapper.prototype.setDomData = function (element, key, value) {\n var domDataKey = this.getDomDataKey();\n var domData = element[domDataKey];\n if (missing(domData)) {\n domData = {};\n element[domDataKey] = domData;\n }\n domData[key] = value;\n };\n GridOptionsWrapper.prototype.isRowSelection = function () {\n return this.gridOptions.rowSelection === 'single' || this.gridOptions.rowSelection === 'multiple';\n };\n GridOptionsWrapper.prototype.isSuppressRowDeselection = function () {\n return isTrue(this.gridOptions.suppressRowDeselection);\n };\n GridOptionsWrapper.prototype.isRowSelectionMulti = function () {\n return this.gridOptions.rowSelection === 'multiple';\n };\n GridOptionsWrapper.prototype.isRowMultiSelectWithClick = function () {\n return isTrue(this.gridOptions.rowMultiSelectWithClick);\n };\n GridOptionsWrapper.prototype.getContext = function () {\n return this.gridOptions.context;\n };\n GridOptionsWrapper.prototype.isPivotMode = function () {\n return isTrue(this.gridOptions.pivotMode);\n };\n GridOptionsWrapper.prototype.isSuppressExpandablePivotGroups = function () {\n return isTrue(this.gridOptions.suppressExpandablePivotGroups);\n };\n GridOptionsWrapper.prototype.getPivotColumnGroupTotals = function () {\n return this.gridOptions.pivotColumnGroupTotals;\n };\n GridOptionsWrapper.prototype.getPivotRowTotals = function () {\n return this.gridOptions.pivotRowTotals;\n };\n GridOptionsWrapper.prototype.isRowModelInfinite = function () {\n return this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_INFINITE;\n };\n GridOptionsWrapper.prototype.isRowModelViewport = function () {\n return this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_VIEWPORT;\n };\n GridOptionsWrapper.prototype.isRowModelServerSide = function () {\n return this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE;\n };\n GridOptionsWrapper.prototype.isRowModelDefault = function () {\n return (missing(this.gridOptions.rowModelType) ||\n this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE);\n };\n GridOptionsWrapper.prototype.isFullRowEdit = function () {\n return this.gridOptions.editType === 'fullRow';\n };\n GridOptionsWrapper.prototype.isSuppressFocusAfterRefresh = function () {\n return isTrue(this.gridOptions.suppressFocusAfterRefresh);\n };\n GridOptionsWrapper.prototype.isSuppressBrowserResizeObserver = function () {\n return isTrue(this.gridOptions.suppressBrowserResizeObserver);\n };\n GridOptionsWrapper.prototype.isSuppressMaintainUnsortedOrder = function () {\n return isTrue(this.gridOptions.suppressMaintainUnsortedOrder);\n };\n GridOptionsWrapper.prototype.isSuppressClearOnFillReduction = function () {\n return isTrue(this.gridOptions.suppressClearOnFillReduction);\n };\n GridOptionsWrapper.prototype.isShowToolPanel = function () {\n return isTrue(this.gridOptions.sideBar && Array.isArray(this.getSideBar().toolPanels));\n };\n GridOptionsWrapper.prototype.getSideBar = function () {\n return this.gridOptions.sideBar;\n };\n GridOptionsWrapper.prototype.isSuppressTouch = function () {\n return isTrue(this.gridOptions.suppressTouch);\n };\n GridOptionsWrapper.prototype.isMaintainColumnOrder = function () {\n return isTrue(this.gridOptions.maintainColumnOrder);\n };\n GridOptionsWrapper.prototype.isSuppressRowTransform = function () {\n return isTrue(this.gridOptions.suppressRowTransform);\n };\n GridOptionsWrapper.prototype.isSuppressColumnStateEvents = function () {\n return isTrue(this.gridOptions.suppressColumnStateEvents);\n };\n GridOptionsWrapper.prototype.isAllowDragFromColumnsToolPanel = function () {\n return isTrue(this.gridOptions.allowDragFromColumnsToolPanel);\n };\n GridOptionsWrapper.prototype.useAsyncEvents = function () {\n return !isTrue(this.gridOptions.suppressAsyncEvents);\n };\n GridOptionsWrapper.prototype.isEnableCellChangeFlash = function () {\n return isTrue(this.gridOptions.enableCellChangeFlash);\n };\n GridOptionsWrapper.prototype.getCellFlashDelay = function () {\n return this.gridOptions.cellFlashDelay || 500;\n };\n GridOptionsWrapper.prototype.getCellFadeDelay = function () {\n return this.gridOptions.cellFadeDelay || 1000;\n };\n GridOptionsWrapper.prototype.isGroupSelectsChildren = function () {\n return isTrue(this.gridOptions.groupSelectsChildren);\n };\n GridOptionsWrapper.prototype.isSuppressRowHoverHighlight = function () {\n return isTrue(this.gridOptions.suppressRowHoverHighlight);\n };\n GridOptionsWrapper.prototype.isColumnHoverHighlight = function () {\n return isTrue(this.gridOptions.columnHoverHighlight);\n };\n GridOptionsWrapper.prototype.isGroupSelectsFiltered = function () {\n return isTrue(this.gridOptions.groupSelectsFiltered);\n };\n GridOptionsWrapper.prototype.isGroupHideOpenParents = function () {\n return isTrue(this.gridOptions.groupHideOpenParents);\n };\n GridOptionsWrapper.prototype.isGroupMaintainOrder = function () {\n return isTrue(this.gridOptions.groupMaintainOrder);\n };\n GridOptionsWrapper.prototype.getAutoGroupColumnDef = function () {\n return this.gridOptions.autoGroupColumnDef;\n };\n GridOptionsWrapper.prototype.isGroupMultiAutoColumn = function () {\n if (this.gridOptions.groupDisplayType) {\n return this.matchesGroupDisplayType('multipleColumns', this.gridOptions.groupDisplayType);\n }\n // if we are doing hideOpenParents we also show multiple columns, otherwise hideOpenParents would not work\n return isTrue(this.gridOptions.groupHideOpenParents);\n };\n GridOptionsWrapper.prototype.isGroupUseEntireRow = function (pivotMode) {\n // we never allow groupUseEntireRow if in pivot mode, otherwise we won't see the pivot values.\n if (pivotMode) {\n return false;\n }\n return this.gridOptions.groupDisplayType ?\n this.matchesGroupDisplayType('groupRows', this.gridOptions.groupDisplayType) : false;\n };\n GridOptionsWrapper.prototype.isGroupSuppressAutoColumn = function () {\n var isCustomRowGroups = this.gridOptions.groupDisplayType ?\n this.matchesGroupDisplayType('custom', this.gridOptions.groupDisplayType) : false;\n if (isCustomRowGroups) {\n return true;\n }\n return this.gridOptions.treeDataDisplayType ?\n this.matchesTreeDataDisplayType('custom', this.gridOptions.treeDataDisplayType) : false;\n };\n GridOptionsWrapper.prototype.isGroupRemoveSingleChildren = function () {\n return isTrue(this.gridOptions.groupRemoveSingleChildren);\n };\n GridOptionsWrapper.prototype.isGroupRemoveLowestSingleChildren = function () {\n return isTrue(this.gridOptions.groupRemoveLowestSingleChildren);\n };\n GridOptionsWrapper.prototype.isGroupIncludeFooter = function () {\n return isTrue(this.gridOptions.groupIncludeFooter);\n };\n GridOptionsWrapper.prototype.isGroupIncludeTotalFooter = function () {\n return isTrue(this.gridOptions.groupIncludeTotalFooter);\n };\n GridOptionsWrapper.prototype.isGroupSuppressBlankHeader = function () {\n return isTrue(this.gridOptions.groupSuppressBlankHeader);\n };\n GridOptionsWrapper.prototype.isSuppressRowClickSelection = function () {\n return isTrue(this.gridOptions.suppressRowClickSelection);\n };\n GridOptionsWrapper.prototype.isSuppressCellFocus = function () {\n return isTrue(this.gridOptions.suppressCellFocus);\n };\n GridOptionsWrapper.prototype.isSuppressMultiSort = function () {\n return isTrue(this.gridOptions.suppressMultiSort);\n };\n GridOptionsWrapper.prototype.isAlwaysMultiSort = function () {\n return isTrue(this.gridOptions.alwaysMultiSort);\n };\n GridOptionsWrapper.prototype.isMultiSortKeyCtrl = function () {\n return this.gridOptions.multiSortKey === 'ctrl';\n };\n GridOptionsWrapper.prototype.isPivotSuppressAutoColumn = function () {\n return isTrue(this.gridOptions.pivotSuppressAutoColumn);\n };\n GridOptionsWrapper.prototype.isSuppressDragLeaveHidesColumns = function () {\n return isTrue(this.gridOptions.suppressDragLeaveHidesColumns);\n };\n GridOptionsWrapper.prototype.isSuppressScrollOnNewData = function () {\n return isTrue(this.gridOptions.suppressScrollOnNewData);\n };\n GridOptionsWrapper.prototype.isSuppressScrollWhenPopupsAreOpen = function () {\n return isTrue(this.gridOptions.suppressScrollWhenPopupsAreOpen);\n };\n GridOptionsWrapper.prototype.isRowDragEntireRow = function () {\n return isTrue(this.gridOptions.rowDragEntireRow);\n };\n GridOptionsWrapper.prototype.isSuppressRowDrag = function () {\n return isTrue(this.gridOptions.suppressRowDrag);\n };\n GridOptionsWrapper.prototype.isRowDragManaged = function () {\n return isTrue(this.gridOptions.rowDragManaged);\n };\n GridOptionsWrapper.prototype.isSuppressMoveWhenRowDragging = function () {\n return isTrue(this.gridOptions.suppressMoveWhenRowDragging);\n };\n GridOptionsWrapper.prototype.isRowDragMultiRow = function () {\n return isTrue(this.gridOptions.rowDragMultiRow);\n };\n // returns either 'print', 'autoHeight' or 'normal' (normal is the default)\n GridOptionsWrapper.prototype.getDomLayout = function () {\n var domLayout = this.gridOptions.domLayout || Constants.DOM_LAYOUT_NORMAL;\n var validLayouts = [\n Constants.DOM_LAYOUT_PRINT,\n Constants.DOM_LAYOUT_AUTO_HEIGHT,\n Constants.DOM_LAYOUT_NORMAL\n ];\n if (validLayouts.indexOf(domLayout) === -1) {\n doOnce(function () {\n return console.warn(\"AG Grid: \" + domLayout + \" is not valid for DOM Layout, valid values are \" + Constants.DOM_LAYOUT_NORMAL + \", \" + Constants.DOM_LAYOUT_AUTO_HEIGHT + \" and \" + Constants.DOM_LAYOUT_PRINT);\n }, 'warn about dom layout values');\n return Constants.DOM_LAYOUT_NORMAL;\n }\n return domLayout;\n };\n GridOptionsWrapper.prototype.isSuppressHorizontalScroll = function () {\n return isTrue(this.gridOptions.suppressHorizontalScroll);\n };\n GridOptionsWrapper.prototype.isSuppressMaxRenderedRowRestriction = function () {\n return isTrue(this.gridOptions.suppressMaxRenderedRowRestriction);\n };\n GridOptionsWrapper.prototype.isExcludeChildrenWhenTreeDataFiltering = function () {\n return isTrue(this.gridOptions.excludeChildrenWhenTreeDataFiltering);\n };\n GridOptionsWrapper.prototype.isAlwaysShowHorizontalScroll = function () {\n return isTrue(this.gridOptions.alwaysShowHorizontalScroll);\n };\n GridOptionsWrapper.prototype.isAlwaysShowVerticalScroll = function () {\n return isTrue(this.gridOptions.alwaysShowVerticalScroll);\n };\n GridOptionsWrapper.prototype.isDebounceVerticalScrollbar = function () {\n return isTrue(this.gridOptions.debounceVerticalScrollbar);\n };\n GridOptionsWrapper.prototype.isSuppressLoadingOverlay = function () {\n return isTrue(this.gridOptions.suppressLoadingOverlay);\n };\n GridOptionsWrapper.prototype.isSuppressNoRowsOverlay = function () {\n return isTrue(this.gridOptions.suppressNoRowsOverlay);\n };\n GridOptionsWrapper.prototype.isSuppressFieldDotNotation = function () {\n return isTrue(this.gridOptions.suppressFieldDotNotation);\n };\n GridOptionsWrapper.prototype.getPinnedTopRowData = function () {\n return this.gridOptions.pinnedTopRowData;\n };\n GridOptionsWrapper.prototype.getPinnedBottomRowData = function () {\n return this.gridOptions.pinnedBottomRowData;\n };\n GridOptionsWrapper.prototype.isFunctionsPassive = function () {\n return isTrue(this.gridOptions.functionsPassive);\n };\n GridOptionsWrapper.prototype.isSuppressChangeDetection = function () {\n return isTrue(this.gridOptions.suppressChangeDetection);\n };\n GridOptionsWrapper.prototype.isSuppressAnimationFrame = function () {\n return isTrue(this.gridOptions.suppressAnimationFrame);\n };\n GridOptionsWrapper.prototype.getQuickFilterText = function () {\n return this.gridOptions.quickFilterText;\n };\n GridOptionsWrapper.prototype.isCacheQuickFilter = function () {\n return isTrue(this.gridOptions.cacheQuickFilter);\n };\n GridOptionsWrapper.prototype.isUnSortIcon = function () {\n return isTrue(this.gridOptions.unSortIcon);\n };\n GridOptionsWrapper.prototype.isSuppressMenuHide = function () {\n return isTrue(this.gridOptions.suppressMenuHide);\n };\n GridOptionsWrapper.prototype.isEnterMovesDownAfterEdit = function () {\n return isTrue(this.gridOptions.enterMovesDownAfterEdit);\n };\n GridOptionsWrapper.prototype.isEnterMovesDown = function () {\n return isTrue(this.gridOptions.enterMovesDown);\n };\n GridOptionsWrapper.prototype.isUndoRedoCellEditing = function () {\n return isTrue(this.gridOptions.undoRedoCellEditing);\n };\n GridOptionsWrapper.prototype.getUndoRedoCellEditingLimit = function () {\n return toNumber(this.gridOptions.undoRedoCellEditingLimit);\n };\n GridOptionsWrapper.prototype.getRowStyle = function () {\n return this.gridOptions.rowStyle;\n };\n GridOptionsWrapper.prototype.getRowClass = function () {\n return this.gridOptions.rowClass;\n };\n GridOptionsWrapper.prototype.getRowStyleFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getRowStyle);\n };\n GridOptionsWrapper.prototype.getRowClassFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getRowClass);\n };\n GridOptionsWrapper.prototype.rowClassRules = function () {\n return this.gridOptions.rowClassRules;\n };\n GridOptionsWrapper.prototype.getServerSideStoreType = function () {\n return this.gridOptions.serverSideStoreType;\n };\n GridOptionsWrapper.prototype.getServerSideStoreParamsFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getServerSideStoreParams);\n };\n GridOptionsWrapper.prototype.getCreateChartContainerFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.createChartContainer);\n };\n GridOptionsWrapper.prototype.getPopupParent = function () {\n return this.gridOptions.popupParent;\n };\n GridOptionsWrapper.prototype.getBlockLoadDebounceMillis = function () {\n return this.gridOptions.blockLoadDebounceMillis;\n };\n GridOptionsWrapper.prototype.getPostProcessPopupFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.postProcessPopup);\n };\n GridOptionsWrapper.prototype.getPaginationNumberFormatterFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.paginationNumberFormatter);\n };\n GridOptionsWrapper.prototype.getChildCountFunc = function () {\n return this.gridOptions.getChildCount;\n };\n GridOptionsWrapper.prototype.getIsApplyServerSideTransactionFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.isApplyServerSideTransaction);\n };\n GridOptionsWrapper.prototype.getInitialGroupOrderComparator = function () {\n var _a = this.gridOptions, initialGroupOrderComparator = _a.initialGroupOrderComparator, defaultGroupOrderComparator = _a.defaultGroupOrderComparator;\n if (initialGroupOrderComparator) {\n return this.mergeGridCommonParams(initialGroupOrderComparator);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (defaultGroupOrderComparator) {\n return function (params) { return defaultGroupOrderComparator(params.nodeA, params.nodeB); };\n }\n };\n GridOptionsWrapper.prototype.getIsFullWidthCellFunc = function () {\n var _a = this.gridOptions, isFullWidthRow = _a.isFullWidthRow, isFullWidthCell = _a.isFullWidthCell;\n if (isFullWidthRow) {\n return this.mergeGridCommonParams(isFullWidthRow);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (isFullWidthCell) {\n return function (params) { return isFullWidthCell(params.rowNode); };\n }\n };\n GridOptionsWrapper.prototype.getFullWidthCellRendererParams = function () {\n return this.gridOptions.fullWidthCellRendererParams;\n };\n GridOptionsWrapper.prototype.isEmbedFullWidthRows = function () {\n return isTrue(this.gridOptions.embedFullWidthRows) || isTrue(this.gridOptions.deprecatedEmbedFullWidthRows);\n };\n GridOptionsWrapper.prototype.isDetailRowAutoHeight = function () {\n return isTrue(this.gridOptions.detailRowAutoHeight);\n };\n GridOptionsWrapper.prototype.getSuppressKeyboardEventFunc = function () {\n return this.gridOptions.suppressKeyboardEvent;\n };\n GridOptionsWrapper.prototype.getBusinessKeyForNodeFunc = function () {\n return this.gridOptions.getBusinessKeyForNode;\n };\n GridOptionsWrapper.prototype.getApi = function () {\n return this.gridOptions.api;\n };\n GridOptionsWrapper.prototype.getColumnApi = function () {\n return this.gridOptions.columnApi;\n };\n GridOptionsWrapper.prototype.isReadOnlyEdit = function () {\n return isTrue(this.gridOptions.readOnlyEdit);\n };\n GridOptionsWrapper.prototype.isImmutableData = function () {\n // we used to have a property immutableData for this. however this was deprecated\n // in favour of having Immutable Data on by default when getRowId is provided\n var getRowIdProvided = this.gridOptions.getRowId != null;\n var immutableData = isTrue(this.gridOptions.immutableData);\n // this property is a backwards compatibility property, for those who want\n // the old behaviour of Row ID's but NOT Immutable Data.\n var resetRowDataOnUpdate = isTrue(this.gridOptions.resetRowDataOnUpdate);\n if (resetRowDataOnUpdate) {\n return false;\n }\n return getRowIdProvided || immutableData;\n };\n GridOptionsWrapper.prototype.isEnsureDomOrder = function () {\n return isTrue(this.gridOptions.ensureDomOrder);\n };\n GridOptionsWrapper.prototype.isEnableCharts = function () {\n if (isTrue(this.gridOptions.enableCharts)) {\n return ModuleRegistry.assertRegistered(exports.ModuleNames.GridChartsModule, 'enableCharts');\n }\n return false;\n };\n GridOptionsWrapper.prototype.getColResizeDefault = function () {\n return this.gridOptions.colResizeDefault;\n };\n GridOptionsWrapper.prototype.isSingleClickEdit = function () {\n return isTrue(this.gridOptions.singleClickEdit);\n };\n GridOptionsWrapper.prototype.isSuppressClickEdit = function () {\n return isTrue(this.gridOptions.suppressClickEdit);\n };\n GridOptionsWrapper.prototype.isStopEditingWhenCellsLoseFocus = function () {\n return isTrue(this.gridOptions.stopEditingWhenCellsLoseFocus);\n };\n GridOptionsWrapper.prototype.getGroupDefaultExpanded = function () {\n return this.gridOptions.groupDefaultExpanded;\n };\n GridOptionsWrapper.prototype.getMaxConcurrentDatasourceRequests = function () {\n var res = toNumber(this.gridOptions.maxConcurrentDatasourceRequests);\n if (res == null) {\n return 2;\n } // 2 is the default\n if (res <= 0) {\n return;\n } // negative number, eg -1, means no max restriction\n return res;\n };\n GridOptionsWrapper.prototype.getMaxBlocksInCache = function () {\n return this.gridOptions.maxBlocksInCache;\n };\n GridOptionsWrapper.prototype.getCacheOverflowSize = function () {\n return this.gridOptions.cacheOverflowSize;\n };\n GridOptionsWrapper.prototype.getPaginationPageSize = function () {\n return toNumber(this.gridOptions.paginationPageSize);\n };\n GridOptionsWrapper.prototype.isPaginateChildRows = function () {\n var shouldPaginate = this.isGroupRemoveSingleChildren() || this.isGroupRemoveLowestSingleChildren();\n if (shouldPaginate) {\n return true;\n }\n return isTrue(this.gridOptions.paginateChildRows);\n };\n GridOptionsWrapper.prototype.getCacheBlockSize = function () {\n return oneOrGreater(this.gridOptions.cacheBlockSize);\n };\n GridOptionsWrapper.prototype.getInfiniteInitialRowCount = function () {\n return this.gridOptions.infiniteInitialRowCount;\n };\n GridOptionsWrapper.prototype.isPurgeClosedRowNodes = function () {\n return isTrue(this.gridOptions.purgeClosedRowNodes);\n };\n GridOptionsWrapper.prototype.isSuppressPaginationPanel = function () {\n return isTrue(this.gridOptions.suppressPaginationPanel);\n };\n GridOptionsWrapper.prototype.getRowData = function () {\n return this.gridOptions.rowData;\n };\n GridOptionsWrapper.prototype.isEnableRtl = function () {\n return isTrue(this.gridOptions.enableRtl);\n };\n GridOptionsWrapper.prototype.getRowGroupPanelShow = function () {\n return this.gridOptions.rowGroupPanelShow;\n };\n GridOptionsWrapper.prototype.getPivotPanelShow = function () {\n return this.gridOptions.pivotPanelShow;\n };\n GridOptionsWrapper.prototype.isAngularCompileRows = function () {\n return isTrue(this.gridOptions.angularCompileRows);\n };\n GridOptionsWrapper.prototype.isAngularCompileFilters = function () {\n return isTrue(this.gridOptions.angularCompileFilters);\n };\n GridOptionsWrapper.prototype.isDebug = function () {\n return isTrue(this.gridOptions.debug);\n };\n GridOptionsWrapper.prototype.getColumnDefs = function () {\n return this.gridOptions.columnDefs;\n };\n GridOptionsWrapper.prototype.getColumnTypes = function () {\n return this.gridOptions.columnTypes;\n };\n GridOptionsWrapper.prototype.getDatasource = function () {\n return this.gridOptions.datasource;\n };\n GridOptionsWrapper.prototype.getViewportDatasource = function () {\n return this.gridOptions.viewportDatasource;\n };\n GridOptionsWrapper.prototype.getServerSideDatasource = function () {\n return this.gridOptions.serverSideDatasource;\n };\n GridOptionsWrapper.prototype.isAccentedSort = function () {\n return isTrue(this.gridOptions.accentedSort);\n };\n GridOptionsWrapper.prototype.isEnableBrowserTooltips = function () {\n return isTrue(this.gridOptions.enableBrowserTooltips);\n };\n GridOptionsWrapper.prototype.isEnableCellExpressions = function () {\n return isTrue(this.gridOptions.enableCellExpressions);\n };\n GridOptionsWrapper.prototype.isEnableGroupEdit = function () {\n return isTrue(this.gridOptions.enableGroupEdit);\n };\n GridOptionsWrapper.prototype.isSuppressMiddleClickScrolls = function () {\n return isTrue(this.gridOptions.suppressMiddleClickScrolls);\n };\n GridOptionsWrapper.prototype.isPreventDefaultOnContextMenu = function () {\n return isTrue(this.gridOptions.preventDefaultOnContextMenu);\n };\n GridOptionsWrapper.prototype.isSuppressPreventDefaultOnMouseWheel = function () {\n return isTrue(this.gridOptions.suppressPreventDefaultOnMouseWheel);\n };\n GridOptionsWrapper.prototype.isSuppressColumnVirtualisation = function () {\n return isTrue(this.gridOptions.suppressColumnVirtualisation);\n };\n GridOptionsWrapper.prototype.isSuppressRowVirtualisation = function () {\n return isTrue(this.gridOptions.suppressRowVirtualisation);\n };\n GridOptionsWrapper.prototype.isSuppressContextMenu = function () {\n return isTrue(this.gridOptions.suppressContextMenu);\n };\n GridOptionsWrapper.prototype.isAllowContextMenuWithControlKey = function () {\n return isTrue(this.gridOptions.allowContextMenuWithControlKey);\n };\n GridOptionsWrapper.prototype.isSuppressCopyRowsToClipboard = function () {\n return isTrue(this.gridOptions.suppressCopyRowsToClipboard);\n };\n GridOptionsWrapper.prototype.isSuppressCopySingleCellRanges = function () {\n return isTrue(this.gridOptions.suppressCopySingleCellRanges);\n };\n GridOptionsWrapper.prototype.isCopyHeadersToClipboard = function () {\n return isTrue(this.gridOptions.copyHeadersToClipboard);\n };\n GridOptionsWrapper.prototype.isCopyGroupHeadersToClipboard = function () {\n return isTrue(this.gridOptions.copyGroupHeadersToClipboard);\n };\n GridOptionsWrapper.prototype.isSuppressClipboardPaste = function () {\n return isTrue(this.gridOptions.suppressClipboardPaste);\n };\n GridOptionsWrapper.prototype.isSuppressLastEmptyLineOnPaste = function () {\n return isTrue(this.gridOptions.suppressLastEmptyLineOnPaste);\n };\n GridOptionsWrapper.prototype.isPagination = function () {\n return isTrue(this.gridOptions.pagination);\n };\n GridOptionsWrapper.prototype.isSuppressEnterpriseResetOnNewColumns = function () {\n return isTrue(this.gridOptions.suppressEnterpriseResetOnNewColumns);\n };\n GridOptionsWrapper.prototype.getProcessDataFromClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processDataFromClipboard);\n };\n GridOptionsWrapper.prototype.getAsyncTransactionWaitMillis = function () {\n return exists(this.gridOptions.asyncTransactionWaitMillis) ? this.gridOptions.asyncTransactionWaitMillis : Constants.BATCH_WAIT_MILLIS;\n };\n GridOptionsWrapper.prototype.isSuppressMovableColumns = function () {\n return isTrue(this.gridOptions.suppressMovableColumns);\n };\n GridOptionsWrapper.prototype.isAnimateRows = function () {\n // never allow animating if enforcing the row order\n if (this.isEnsureDomOrder()) {\n return false;\n }\n return isTrue(this.gridOptions.animateRows);\n };\n GridOptionsWrapper.prototype.isSuppressColumnMoveAnimation = function () {\n return isTrue(this.gridOptions.suppressColumnMoveAnimation);\n };\n GridOptionsWrapper.prototype.isSuppressAggFuncInHeader = function () {\n return isTrue(this.gridOptions.suppressAggFuncInHeader);\n };\n GridOptionsWrapper.prototype.isSuppressAggAtRootLevel = function () {\n return isTrue(this.gridOptions.suppressAggAtRootLevel);\n };\n GridOptionsWrapper.prototype.isSuppressAggFilteredOnly = function () {\n var isGroupAggFiltering = this.getGroupAggFiltering() !== undefined;\n return isGroupAggFiltering || isTrue(this.gridOptions.suppressAggFilteredOnly);\n };\n GridOptionsWrapper.prototype.isRemovePivotHeaderRowWhenSingleValueColumn = function () {\n return isTrue(this.gridOptions.removePivotHeaderRowWhenSingleValueColumn);\n };\n GridOptionsWrapper.prototype.isShowOpenedGroup = function () {\n return isTrue(this.gridOptions.showOpenedGroup);\n };\n GridOptionsWrapper.prototype.isReactUi = function () {\n return isTrue(this.gridOptions.reactUi);\n };\n GridOptionsWrapper.prototype.isSuppressReactUi = function () {\n return isTrue(this.gridOptions.suppressReactUi);\n };\n GridOptionsWrapper.prototype.isEnableRangeSelection = function () {\n return ModuleRegistry.isRegistered(exports.ModuleNames.RangeSelectionModule) && isTrue(this.gridOptions.enableRangeSelection);\n };\n GridOptionsWrapper.prototype.isEnableRangeHandle = function () {\n return isTrue(this.gridOptions.enableRangeHandle);\n };\n GridOptionsWrapper.prototype.isEnableFillHandle = function () {\n return isTrue(this.gridOptions.enableFillHandle);\n };\n GridOptionsWrapper.prototype.getFillHandleDirection = function () {\n var direction = this.gridOptions.fillHandleDirection;\n if (!direction) {\n return 'xy';\n }\n if (direction !== 'x' && direction !== 'y' && direction !== 'xy') {\n doOnce(function () { return console.warn(\"AG Grid: valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'.\"); }, 'warn invalid fill direction');\n return 'xy';\n }\n return direction;\n };\n GridOptionsWrapper.prototype.getFillOperation = function () {\n return this.mergeGridCommonParams(this.gridOptions.fillOperation);\n };\n GridOptionsWrapper.prototype.isSuppressMultiRangeSelection = function () {\n return isTrue(this.gridOptions.suppressMultiRangeSelection);\n };\n GridOptionsWrapper.prototype.isPaginationAutoPageSize = function () {\n return isTrue(this.gridOptions.paginationAutoPageSize);\n };\n GridOptionsWrapper.prototype.isRememberGroupStateWhenNewData = function () {\n return isTrue(this.gridOptions.rememberGroupStateWhenNewData);\n };\n GridOptionsWrapper.prototype.getIcons = function () {\n return this.gridOptions.icons;\n };\n GridOptionsWrapper.prototype.getGroupAggFiltering = function () {\n var userValue = this.gridOptions.groupAggFiltering;\n if (typeof userValue === 'function') {\n return this.mergeGridCommonParams(userValue);\n }\n if (isTrue(userValue)) {\n return function () { return true; };\n }\n return undefined;\n };\n GridOptionsWrapper.prototype.getAggFuncs = function () {\n return this.gridOptions.aggFuncs;\n };\n GridOptionsWrapper.prototype.getSortingOrder = function () {\n return this.gridOptions.sortingOrder;\n };\n GridOptionsWrapper.prototype.getAlignedGrids = function () {\n return this.gridOptions.alignedGrids;\n };\n GridOptionsWrapper.prototype.isMasterDetail = function () {\n var masterDetail = isTrue(this.gridOptions.masterDetail);\n if (masterDetail) {\n return ModuleRegistry.assertRegistered(exports.ModuleNames.MasterDetailModule, 'masterDetail');\n }\n else {\n return false;\n }\n };\n GridOptionsWrapper.prototype.isKeepDetailRows = function () {\n return isTrue(this.gridOptions.keepDetailRows);\n };\n GridOptionsWrapper.prototype.getKeepDetailRowsCount = function () {\n var keepDetailRowsCount = this.gridOptions.keepDetailRowsCount;\n if (exists(keepDetailRowsCount) && keepDetailRowsCount > 0) {\n return this.gridOptions.keepDetailRowsCount;\n }\n return DEFAULT_KEEP_DETAIL_ROW_COUNT;\n };\n GridOptionsWrapper.prototype.getIsRowMasterFunc = function () {\n return this.gridOptions.isRowMaster;\n };\n GridOptionsWrapper.prototype.getIsRowSelectableFunc = function () {\n return this.gridOptions.isRowSelectable;\n };\n GridOptionsWrapper.prototype.getGroupRowRendererParams = function () {\n return this.gridOptions.groupRowRendererParams;\n };\n GridOptionsWrapper.prototype.getOverlayLoadingTemplate = function () {\n return this.gridOptions.overlayLoadingTemplate;\n };\n GridOptionsWrapper.prototype.getOverlayNoRowsTemplate = function () {\n return this.gridOptions.overlayNoRowsTemplate;\n };\n GridOptionsWrapper.prototype.isSuppressAutoSize = function () {\n return isTrue(this.gridOptions.suppressAutoSize);\n };\n GridOptionsWrapper.prototype.isEnableCellTextSelection = function () {\n return isTrue(this.gridOptions.enableCellTextSelection);\n };\n GridOptionsWrapper.prototype.isSuppressParentsInRowNodes = function () {\n return isTrue(this.gridOptions.suppressParentsInRowNodes);\n };\n GridOptionsWrapper.prototype.isSuppressClipboardApi = function () {\n return isTrue(this.gridOptions.suppressClipboardApi);\n };\n GridOptionsWrapper.prototype.isFunctionsReadOnly = function () {\n return isTrue(this.gridOptions.functionsReadOnly);\n };\n GridOptionsWrapper.prototype.isEnableCellTextSelect = function () {\n return isTrue(this.gridOptions.enableCellTextSelection);\n };\n GridOptionsWrapper.prototype.getDefaultColDef = function () {\n return this.gridOptions.defaultColDef;\n };\n GridOptionsWrapper.prototype.getDefaultColGroupDef = function () {\n return this.gridOptions.defaultColGroupDef;\n };\n GridOptionsWrapper.prototype.getDefaultExportParams = function (type) {\n if (this.gridOptions.defaultExportParams) {\n console.warn(\"AG Grid: Since v25.2 `defaultExportParams` has been replaced by `default\" + capitalise(type) + \"ExportParams`'\");\n if (type === 'csv') {\n return this.gridOptions.defaultExportParams;\n }\n return this.gridOptions.defaultExportParams;\n }\n if (type === 'csv' && this.gridOptions.defaultCsvExportParams) {\n return this.gridOptions.defaultCsvExportParams;\n }\n if (type === 'excel' && this.gridOptions.defaultExcelExportParams) {\n return this.gridOptions.defaultExcelExportParams;\n }\n };\n GridOptionsWrapper.prototype.isSuppressCsvExport = function () {\n return isTrue(this.gridOptions.suppressCsvExport);\n };\n GridOptionsWrapper.prototype.isAllowShowChangeAfterFilter = function () {\n return isTrue(this.gridOptions.allowShowChangeAfterFilter);\n };\n GridOptionsWrapper.prototype.isSuppressExcelExport = function () {\n return isTrue(this.gridOptions.suppressExcelExport);\n };\n GridOptionsWrapper.prototype.isSuppressMakeColumnVisibleAfterUnGroup = function () {\n return isTrue(this.gridOptions.suppressMakeColumnVisibleAfterUnGroup);\n };\n GridOptionsWrapper.prototype.getDataPathFunc = function () {\n return this.gridOptions.getDataPath;\n };\n GridOptionsWrapper.prototype.getIsServerSideGroupFunc = function () {\n return this.gridOptions.isServerSideGroup;\n };\n GridOptionsWrapper.prototype.getIsServerSideGroupOpenByDefaultFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.isServerSideGroupOpenByDefault);\n };\n GridOptionsWrapper.prototype.getIsGroupOpenByDefaultFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.isGroupOpenByDefault);\n };\n GridOptionsWrapper.prototype.getServerSideGroupKeyFunc = function () {\n return this.gridOptions.getServerSideGroupKey;\n };\n GridOptionsWrapper.prototype.getGroupRowAggFunc = function () {\n var _a = this.gridOptions, getGroupRowAgg = _a.getGroupRowAgg, groupRowAggNodes = _a.groupRowAggNodes;\n if (getGroupRowAgg) {\n return this.mergeGridCommonParams(getGroupRowAgg);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (groupRowAggNodes) {\n return function (params) { return groupRowAggNodes(params.nodes); };\n }\n };\n GridOptionsWrapper.prototype.getContextMenuItemsFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getContextMenuItems);\n };\n GridOptionsWrapper.prototype.getMainMenuItemsFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getMainMenuItems);\n };\n GridOptionsWrapper.prototype.getRowIdFunc = function () {\n var _a = this.gridOptions, getRowId = _a.getRowId, getRowNodeId = _a.getRowNodeId;\n if (getRowId) {\n return this.mergeGridCommonParams(getRowId);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (getRowNodeId) {\n return function (params) { return getRowNodeId(params.data); };\n }\n };\n GridOptionsWrapper.prototype.getNavigateToNextHeaderFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.navigateToNextHeader);\n };\n GridOptionsWrapper.prototype.getTabToNextHeaderFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.tabToNextHeader);\n };\n GridOptionsWrapper.prototype.getNavigateToNextCellFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.navigateToNextCell);\n };\n GridOptionsWrapper.prototype.getTabToNextCellFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.tabToNextCell);\n };\n GridOptionsWrapper.prototype.getGridTabIndex = function () {\n return (this.gridOptions.tabIndex || 0).toString();\n };\n GridOptionsWrapper.prototype.isTreeData = function () {\n var usingTreeData = isTrue(this.gridOptions.treeData);\n if (usingTreeData) {\n return ModuleRegistry.assertRegistered(exports.ModuleNames.RowGroupingModule, 'Tree Data');\n }\n return false;\n };\n GridOptionsWrapper.prototype.isValueCache = function () {\n return isTrue(this.gridOptions.valueCache);\n };\n GridOptionsWrapper.prototype.isValueCacheNeverExpires = function () {\n return isTrue(this.gridOptions.valueCacheNeverExpires);\n };\n GridOptionsWrapper.prototype.isDeltaSort = function () {\n return isTrue(this.gridOptions.deltaSort);\n };\n GridOptionsWrapper.prototype.isAggregateOnlyChangedColumns = function () {\n return isTrue(this.gridOptions.aggregateOnlyChangedColumns);\n };\n GridOptionsWrapper.prototype.getProcessSecondaryColDefFunc = function () {\n return this.gridOptions.processSecondaryColDef;\n };\n GridOptionsWrapper.prototype.getProcessSecondaryColGroupDefFunc = function () {\n return this.gridOptions.processSecondaryColGroupDef;\n };\n GridOptionsWrapper.prototype.getSendToClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.sendToClipboard);\n };\n GridOptionsWrapper.prototype.getProcessRowPostCreateFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processRowPostCreate);\n };\n GridOptionsWrapper.prototype.getProcessCellForClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processCellForClipboard);\n };\n GridOptionsWrapper.prototype.getProcessHeaderForClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processHeaderForClipboard);\n };\n GridOptionsWrapper.prototype.getProcessGroupHeaderForClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processGroupHeaderForClipboard);\n };\n GridOptionsWrapper.prototype.getProcessCellFromClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processCellFromClipboard);\n };\n GridOptionsWrapper.prototype.getViewportRowModelPageSize = function () {\n return oneOrGreater(this.gridOptions.viewportRowModelPageSize, DEFAULT_VIEWPORT_ROW_MODEL_PAGE_SIZE);\n };\n GridOptionsWrapper.prototype.getViewportRowModelBufferSize = function () {\n return zeroOrGreater(this.gridOptions.viewportRowModelBufferSize, DEFAULT_VIEWPORT_ROW_MODEL_BUFFER_SIZE);\n };\n GridOptionsWrapper.prototype.isServerSideSortingAlwaysResets = function () {\n return isTrue(this.gridOptions.serverSideSortingAlwaysResets);\n };\n GridOptionsWrapper.prototype.isServerSideFilteringAlwaysResets = function () {\n return isTrue(this.gridOptions.serverSideFilteringAlwaysResets);\n };\n GridOptionsWrapper.prototype.getPostSortFunc = function () {\n var _a = this.gridOptions, postSortRows = _a.postSortRows, postSort = _a.postSort;\n if (postSortRows) {\n return this.mergeGridCommonParams(postSortRows);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (postSort) {\n return function (params) { return postSort(params.nodes); };\n }\n };\n GridOptionsWrapper.prototype.getChartToolbarItemsFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getChartToolbarItems);\n };\n GridOptionsWrapper.prototype.getChartThemeOverrides = function () {\n return this.gridOptions.chartThemeOverrides;\n };\n GridOptionsWrapper.prototype.getCustomChartThemes = function () {\n return this.gridOptions.customChartThemes;\n };\n GridOptionsWrapper.prototype.getChartThemes = function () {\n // return default themes if user hasn't supplied any\n return this.gridOptions.chartThemes || ['ag-default', 'ag-material', 'ag-pastel', 'ag-vivid', 'ag-solar'];\n };\n GridOptionsWrapper.prototype.getClipboardDelimiter = function () {\n return exists(this.gridOptions.clipboardDelimiter) ? this.gridOptions.clipboardDelimiter : '\\t';\n };\n GridOptionsWrapper.prototype.setProperty = function (key, value, force) {\n if (force === void 0) { force = false; }\n var gridOptionsNoType = this.gridOptions;\n var previousValue = gridOptionsNoType[key];\n if (force || previousValue !== value) {\n gridOptionsNoType[key] = value;\n var event_1 = {\n type: key,\n currentValue: value,\n previousValue: previousValue\n };\n this.propertyEventService.dispatchEvent(event_1);\n }\n };\n GridOptionsWrapper.prototype.addEventListener = function (key, listener) {\n this.propertyEventService.addEventListener(key, listener);\n };\n GridOptionsWrapper.prototype.removeEventListener = function (key, listener) {\n this.propertyEventService.removeEventListener(key, listener);\n };\n GridOptionsWrapper.prototype.isSkipHeaderOnAutoSize = function () {\n return !!this.gridOptions.skipHeaderOnAutoSize;\n };\n GridOptionsWrapper.prototype.getAutoSizePadding = function () {\n var value = this.gridOptions.autoSizePadding;\n return value != null && value >= 0 ? value : 20;\n };\n // properties\n GridOptionsWrapper.prototype.getHeaderHeight = function () {\n if (typeof this.gridOptions.headerHeight === 'number') {\n return this.gridOptions.headerHeight;\n }\n return this.getFromTheme(25, 'headerHeight');\n };\n GridOptionsWrapper.prototype.getFloatingFiltersHeight = function () {\n if (typeof this.gridOptions.floatingFiltersHeight === 'number') {\n return this.gridOptions.floatingFiltersHeight;\n }\n return this.getFromTheme(25, 'headerHeight');\n };\n GridOptionsWrapper.prototype.getGroupHeaderHeight = function () {\n if (typeof this.gridOptions.groupHeaderHeight === 'number') {\n return this.gridOptions.groupHeaderHeight;\n }\n return this.getHeaderHeight();\n };\n GridOptionsWrapper.prototype.getPivotHeaderHeight = function () {\n if (typeof this.gridOptions.pivotHeaderHeight === 'number') {\n return this.gridOptions.pivotHeaderHeight;\n }\n return this.getHeaderHeight();\n };\n GridOptionsWrapper.prototype.getPivotGroupHeaderHeight = function () {\n if (typeof this.gridOptions.pivotGroupHeaderHeight === 'number') {\n return this.gridOptions.pivotGroupHeaderHeight;\n }\n return this.getGroupHeaderHeight();\n };\n GridOptionsWrapper.prototype.isExternalFilterPresent = function () {\n if (typeof this.gridOptions.isExternalFilterPresent === 'function') {\n return this.gridOptions.isExternalFilterPresent({ api: this.getApi(), columnApi: this.getColumnApi(), context: this.getContext() });\n }\n return false;\n };\n GridOptionsWrapper.prototype.doesExternalFilterPass = function (node) {\n if (typeof this.gridOptions.doesExternalFilterPass === 'function') {\n return this.gridOptions.doesExternalFilterPass(node);\n }\n return false;\n };\n GridOptionsWrapper.prototype.getTooltipDelay = function (type) {\n var _a = this.gridOptions, tooltipShowDelay = _a.tooltipShowDelay, tooltipHideDelay = _a.tooltipHideDelay;\n var delay = type === 'show' ? tooltipShowDelay : tooltipHideDelay;\n var capitalisedType = capitalise(type);\n if (exists(delay)) {\n if (delay < 0) {\n doOnce(function () { return console.warn(\"ag-grid: tooltip\" + capitalisedType + \"Delay should not be lower than 0\"); }, \"tooltip\" + capitalisedType + \"DelayWarn\");\n }\n return Math.max(200, delay);\n }\n return null;\n };\n GridOptionsWrapper.prototype.isTooltipMouseTrack = function () {\n return isTrue(this.gridOptions.tooltipMouseTrack);\n };\n GridOptionsWrapper.prototype.isSuppressModelUpdateAfterUpdateTransaction = function () {\n return isTrue(this.gridOptions.suppressModelUpdateAfterUpdateTransaction);\n };\n GridOptionsWrapper.prototype.getDocument = function () {\n // if user is providing document, we use the users one,\n // otherwise we use the document on the global namespace.\n var result = null;\n if (this.gridOptions.getDocument && exists(this.gridOptions.getDocument)) {\n result = this.gridOptions.getDocument();\n }\n else if (this.eGridDiv) {\n result = this.eGridDiv.ownerDocument;\n }\n if (result && exists(result)) {\n return result;\n }\n return document;\n };\n GridOptionsWrapper.prototype.getMinColWidth = function () {\n var minColWidth = this.gridOptions.minColWidth;\n if (exists(minColWidth) && minColWidth > GridOptionsWrapper_1.MIN_COL_WIDTH) {\n return this.gridOptions.minColWidth;\n }\n var measuredMin = this.getFromTheme(null, 'headerCellMinWidth');\n return exists(measuredMin) ? Math.max(measuredMin, GridOptionsWrapper_1.MIN_COL_WIDTH) : GridOptionsWrapper_1.MIN_COL_WIDTH;\n };\n GridOptionsWrapper.prototype.getMaxColWidth = function () {\n if (this.gridOptions.maxColWidth && this.gridOptions.maxColWidth > GridOptionsWrapper_1.MIN_COL_WIDTH) {\n return this.gridOptions.maxColWidth;\n }\n return null;\n };\n GridOptionsWrapper.prototype.getColWidth = function () {\n if (typeof this.gridOptions.colWidth !== 'number' || this.gridOptions.colWidth < GridOptionsWrapper_1.MIN_COL_WIDTH) {\n return 200;\n }\n return this.gridOptions.colWidth;\n };\n GridOptionsWrapper.prototype.getRowBuffer = function () {\n var rowBuffer = this.gridOptions.rowBuffer;\n if (typeof rowBuffer === 'number') {\n if (rowBuffer < 0) {\n doOnce(function () { return console.warn(\"AG Grid: rowBuffer should not be negative\"); }, 'warn rowBuffer negative');\n this.gridOptions.rowBuffer = rowBuffer = 0;\n }\n }\n else {\n rowBuffer = Constants.ROW_BUFFER_SIZE;\n }\n return rowBuffer;\n };\n GridOptionsWrapper.prototype.getRowBufferInPixels = function () {\n var rowsToBuffer = this.getRowBuffer();\n var defaultRowHeight = this.getRowHeightAsNumber();\n return rowsToBuffer * defaultRowHeight;\n };\n // the user might be using some non-standard scrollbar, eg a scrollbar that has zero\n // width and overlays (like the Safari scrollbar, but presented in Chrome). so we\n // allow the user to provide the scroll width before we work it out.\n GridOptionsWrapper.prototype.getScrollbarWidth = function () {\n if (this.scrollbarWidth == null) {\n var useGridOptions = typeof this.gridOptions.scrollbarWidth === 'number' && this.gridOptions.scrollbarWidth >= 0;\n var scrollbarWidth = useGridOptions ? this.gridOptions.scrollbarWidth : getScrollbarWidth();\n if (scrollbarWidth != null) {\n this.scrollbarWidth = scrollbarWidth;\n this.eventService.dispatchEvent({\n type: Events.EVENT_SCROLLBAR_WIDTH_CHANGED\n });\n }\n }\n return this.scrollbarWidth;\n };\n GridOptionsWrapper.prototype.checkForDeprecated = function () {\n // casting to generic object, so typescript compiles even though\n // we are looking for attributes that don't exist\n var options = this.gridOptions;\n if (options.deprecatedEmbedFullWidthRows) {\n console.warn(\"AG Grid: since v21.2, deprecatedEmbedFullWidthRows has been replaced with embedFullWidthRows.\");\n }\n if (options.rowDeselection) {\n console.warn('AG Grid: since v24.x, rowDeselection is deprecated and the behaviour is true by default. Please use `suppressRowDeselection` to prevent rows from being deselected.');\n }\n if (options.enableMultiRowDragging) {\n options.rowDragMultiRow = true;\n delete options.enableMultiRowDragging;\n console.warn('AG Grid: since v26.1, `enableMultiRowDragging` is deprecated. Please use `rowDragMultiRow`.');\n }\n var checkRenamedProperty = function (oldProp, newProp, version) {\n if (options[oldProp] != null) {\n console.warn(\"AG Grid: since version \" + version + \", '\" + oldProp + \"' is deprecated / renamed, please use the new property name '\" + newProp + \"' instead.\");\n if (options[newProp] == null) {\n options[newProp] = options[oldProp];\n }\n }\n };\n checkRenamedProperty('batchUpdateWaitMillis', 'asyncTransactionWaitMillis', '23.1.x');\n checkRenamedProperty('deltaRowDataMode', 'immutableData', '23.1.x');\n if (options.immutableColumns || options.deltaColumnMode) {\n console.warn('AG Grid: since v24.0, immutableColumns and deltaColumnMode properties are gone. The grid now works like this as default. To keep column order maintained, set grid property applyColumnDefOrder=true');\n }\n checkRenamedProperty('suppressSetColumnStateEvents', 'suppressColumnStateEvents', '24.0.x');\n if (options.groupRowInnerRenderer || options.groupRowInnerRendererParams || options.groupRowInnerRendererFramework) {\n console.warn('AG Grid: since v24.0, grid properties groupRowInnerRenderer, groupRowInnerRendererFramework and groupRowInnerRendererParams are no longer used.');\n console.warn(' Instead use the grid properties groupRowRendererParams.innerRenderer, groupRowRendererParams.innerRendererFramework and groupRowRendererParams.innerRendererParams.');\n console.warn(' For example instead of this:');\n console.warn(' groupRowInnerRenderer: \"myRenderer\"');\n console.warn(' groupRowInnerRendererParams: {x: a}');\n console.warn(' Replace with this:');\n console.warn(' groupRowRendererParams: {');\n console.warn(' innerRenderer: \"myRenderer\",');\n console.warn(' innerRendererParams: {x: a}');\n console.warn(' }');\n console.warn(' We have copied the properties over for you. However to stop this error message, please change your application code.');\n if (!options.groupRowRendererParams) {\n options.groupRowRendererParams = {};\n }\n var params = options.groupRowRendererParams;\n if (options.groupRowInnerRenderer) {\n params.innerRenderer = options.groupRowInnerRenderer;\n }\n if (options.groupRowInnerRendererParams) {\n params.innerRendererParams = options.groupRowInnerRendererParams;\n }\n if (options.groupRowInnerRendererFramework) {\n params.innerRendererFramework = options.groupRowInnerRendererFramework;\n }\n }\n if (options.rememberGroupStateWhenNewData) {\n console.warn('AG Grid: since v24.0, grid property rememberGroupStateWhenNewData is deprecated. This feature was provided before Transaction Updates worked (which keep group state). Now that transaction updates are possible and they keep group state, this feature is no longer needed.');\n }\n if (options.detailCellRendererParams && options.detailCellRendererParams.autoHeight) {\n console.warn('AG Grid: since v24.1, grid property detailCellRendererParams.autoHeight is replaced with grid property detailRowAutoHeight. This allows this feature to work when you provide a custom DetailCellRenderer');\n options.detailRowAutoHeight = true;\n }\n if (options.suppressKeyboardEvent) {\n console.warn(\"AG Grid: since v24.1 suppressKeyboardEvent in the gridOptions has been deprecated and will be removed in\\n future versions of AG Grid. If you need this to be set for every column use the defaultColDef property.\");\n }\n if (options.suppressEnterpriseResetOnNewColumns) {\n console.warn('AG Grid: since v25, grid property suppressEnterpriseResetOnNewColumns is deprecated. This was a temporary property to allow changing columns in Server Side Row Model without triggering a reload. Now that it is possible to dynamically change columns in the grid, this is no longer needed.');\n }\n if (options.suppressColumnStateEvents) {\n console.warn('AG Grid: since v25, grid property suppressColumnStateEvents no longer works due to a refactor that we did. It should be possible to achieve similar using event.source, which would be \"api\" if the event was due to setting column state via the API');\n }\n if (options.defaultExportParams) {\n console.warn('AG Grid: since v25.2, the grid property `defaultExportParams` has been replaced by `defaultCsvExportParams` and `defaultExcelExportParams`.');\n }\n if (options.stopEditingWhenGridLosesFocus) {\n console.warn('AG Grid: since v25.2.2, the grid property `stopEditingWhenGridLosesFocus` has been replaced by `stopEditingWhenCellsLoseFocus`.');\n options.stopEditingWhenCellsLoseFocus = true;\n }\n if (options.applyColumnDefOrder) {\n console.warn('AG Grid: since v26.0, the grid property `applyColumnDefOrder` is no longer needed, as this is the default behaviour. To turn this behaviour off, set maintainColumnOrder=true');\n }\n if (options.groupMultiAutoColumn) {\n console.warn(\"AG Grid: since v26.0, the grid property `groupMultiAutoColumn` has been replaced by `groupDisplayType = 'multipleColumns'`\");\n options.groupDisplayType = 'multipleColumns';\n }\n if (options.groupUseEntireRow) {\n console.warn(\"AG Grid: since v26.0, the grid property `groupUseEntireRow` has been replaced by `groupDisplayType = 'groupRows'`\");\n options.groupDisplayType = 'groupRows';\n }\n if (options.groupSuppressAutoColumn) {\n var propName = options.treeData ? 'treeDataDisplayType' : 'groupDisplayType';\n console.warn(\"AG Grid: since v26.0, the grid property `groupSuppressAutoColumn` has been replaced by `\" + propName + \" = 'custom'`\");\n options.groupDisplayType = 'custom';\n }\n if (options.defaultGroupOrderComparator) {\n console.warn(\"AG Grid: since v27.2, the grid property `defaultGroupOrderComparator` is deprecated and has been replaced by `initialGroupOrderComparator` and now receives a single params object.\");\n }\n if (options.defaultGroupSortComparator) {\n console.warn(\"AG Grid: since v26.0, the grid property `defaultGroupSortComparator` has been replaced by `initialGroupOrderComparator`\");\n options.defaultGroupOrderComparator = options.defaultGroupSortComparator;\n }\n if (options.groupRowAggNodes) {\n console.warn(\"AG Grid: since v27.2, the grid property `groupRowAggNodes` is deprecated and has been replaced by `getGroupRowAgg` and now receives a single params object.\");\n }\n if (options.postSort) {\n console.warn(\"AG Grid: since v27.2, the grid property `postSort` is deprecated and has been replaced by `postSortRows` and now receives a single params object.\");\n }\n if (options.isFullWidthCell) {\n console.warn(\"AG Grid: since v27.2, the grid property `isFullWidthCell` is deprecated and has been replaced by `isFullWidthRow` and now receives a single params object.\");\n }\n if (options.localeTextFunc) {\n console.warn(\"AG Grid: since v27.2, the grid property `localeTextFunc` is deprecated and has been replaced by `getLocaleText` and now receives a single params object.\");\n }\n if (options.colWidth) {\n console.warn('AG Grid: since v26.1, the grid property `colWidth` is deprecated and should be set via `defaultColDef.width`.');\n }\n if (options.minColWidth) {\n console.warn('AG Grid: since v26.1, the grid property `minColWidth` is deprecated and should be set via `defaultColDef.minWidth`.');\n }\n if (options.maxColWidth) {\n console.warn('AG Grid: since v26.1, the grid property `maxColWidth` is deprecated and should be set via `defaultColDef.maxWidth`.');\n }\n if (options.reactUi) {\n console.warn('AG Grid: since v27.0, React UI is on by default, so no need for reactUi=true. To turn it off, set suppressReactUi=true.');\n }\n if (options.suppressReactUi) {\n console.warn('AG Grid: The legacy React rendering engine is deprecated and will be removed in the next major version of the grid.');\n }\n if (options.suppressCellSelection) {\n console.warn('AG Grid: since v27.0, `suppressCellSelection` has been replaced by `suppressCellFocus`.');\n options.suppressCellFocus = options.suppressCellSelection;\n }\n if (options.getRowNodeId) {\n console.warn('AG Grid: since v27.1, `getRowNodeId` is deprecated and has been replaced by `getRowId`. The difference: if getRowId() is implemented then immutable data is enabled by default.');\n }\n if (options.immutableData) {\n if (options.getRowId) {\n console.warn('AG Grid: since v27.1, `immutableData` is deprecated. With the `getRowId` callback implemented, immutable data is enabled by default so you can remove `immutableData=true`.');\n }\n else {\n console.warn('AG Grid: since v27.1, `immutableData` is deprecated. To enable immutable data you must implement the `getRowId()` callback.');\n }\n }\n if (options.clipboardDeliminator) {\n console.warn('AG Grid: since v27.1, `clipboardDeliminator` has been replaced by `clipboardDelimiter`.');\n options.clipboardDelimiter = options.clipboardDeliminator;\n }\n };\n GridOptionsWrapper.prototype.checkForViolations = function () {\n if (this.isTreeData()) {\n this.treeDataViolations();\n }\n };\n GridOptionsWrapper.prototype.treeDataViolations = function () {\n if (this.isRowModelDefault()) {\n if (missing(this.getDataPathFunc())) {\n console.warn('AG Grid: property usingTreeData=true with rowModel=clientSide, but you did not ' +\n 'provide getDataPath function, please provide getDataPath function if using tree data.');\n }\n }\n if (this.isRowModelServerSide()) {\n if (missing(this.getIsServerSideGroupFunc())) {\n console.warn('AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not ' +\n 'provide isServerSideGroup function, please provide isServerSideGroup function if using tree data.');\n }\n if (missing(this.getServerSideGroupKeyFunc())) {\n console.warn('AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not ' +\n 'provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data.');\n }\n }\n };\n GridOptionsWrapper.prototype.getLocaleTextFunc = function () {\n var _this = this;\n var _a = this.gridOptions, localeText = _a.localeText, getLocaleText = _a.getLocaleText, localeTextFunc = _a.localeTextFunc;\n if (getLocaleText) {\n //key: string, defaultValue: string, variableValues?: string[]\n return function (key, defaultValue, variableValues) {\n var params = {\n key: key,\n defaultValue: defaultValue,\n variableValues: variableValues,\n api: _this.getApi(),\n columnApi: _this.getColumnApi(),\n context: _this.getContext()\n };\n return getLocaleText(params);\n };\n }\n if (localeTextFunc) {\n return localeTextFunc;\n }\n return function (key, defaultValue, variableValues) {\n var localisedText = localeText && localeText[key];\n if (localisedText && variableValues && variableValues.length) {\n var found = 0;\n while (true) {\n if (found >= variableValues.length) {\n break;\n }\n var idx = localisedText.indexOf('${variable}');\n if (idx === -1) {\n break;\n }\n localisedText = localisedText.replace('${variable}', variableValues[found++]);\n }\n }\n return (localisedText !== null && localisedText !== void 0 ? localisedText : defaultValue);\n };\n };\n // responsible for calling the onXXX functions on gridOptions\n GridOptionsWrapper.prototype.globalEventHandler = function (eventName, event) {\n // prevent events from being fired _after_ the grid has been destroyed\n if (this.destroyed) {\n return;\n }\n var callbackMethodName = ComponentUtil.getCallbackForEvent(eventName);\n if (typeof this.gridOptions[callbackMethodName] === 'function') {\n this.gridOptions[callbackMethodName](event);\n }\n };\n GridOptionsWrapper.prototype.setRowHeightVariable = function (height) {\n var oldRowHeight = this.eGridDiv.style.getPropertyValue('--ag-line-height').trim();\n var newRowHeight = height + \"px\";\n if (oldRowHeight != newRowHeight) {\n this.eGridDiv.style.setProperty('--ag-line-height', newRowHeight);\n }\n };\n // we don't allow dynamic row height for virtual paging\n GridOptionsWrapper.prototype.getRowHeightAsNumber = function () {\n if (!this.gridOptions.rowHeight || missing(this.gridOptions.rowHeight)) {\n return this.getDefaultRowHeight();\n }\n var rowHeight = this.gridOptions.rowHeight;\n if (rowHeight && this.isNumeric(rowHeight)) {\n this.setRowHeightVariable(rowHeight);\n return rowHeight;\n }\n console.warn('AG Grid row height must be a number if not using standard row model');\n return this.getDefaultRowHeight();\n };\n GridOptionsWrapper.prototype.isGetRowHeightFunction = function () {\n return typeof this.gridOptions.getRowHeight === 'function';\n };\n GridOptionsWrapper.prototype.getRowHeightForNode = function (rowNode, allowEstimate, defaultRowHeight) {\n if (allowEstimate === void 0) { allowEstimate = false; }\n if (defaultRowHeight == null) {\n defaultRowHeight = this.getDefaultRowHeight();\n }\n // check the function first, in case use set both function and\n // number, when using virtual pagination then function can be\n // used for pinned rows and the number for the body rows.\n if (this.isGetRowHeightFunction()) {\n if (allowEstimate) {\n return { height: defaultRowHeight, estimated: true };\n }\n var params = {\n node: rowNode,\n data: rowNode.data\n };\n var height = this.mergeGridCommonParams(this.gridOptions.getRowHeight)(params);\n if (this.isNumeric(height)) {\n if (height === 0) {\n doOnce(function () { return console.warn('AG Grid: The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.'); }, 'invalidRowHeight');\n }\n return { height: Math.max(1, height), estimated: false };\n }\n }\n if (rowNode.detail && this.isMasterDetail()) {\n // if autoHeight, we want the height to grow to the new height starting at 1, as otherwise a flicker would happen,\n // as the detail goes to the default (eg 200px) and then immediately shrink up/down to the new measured height\n // (due to auto height) which looks bad, especially if doing row animation.\n if (this.isDetailRowAutoHeight()) {\n return { height: 1, estimated: false };\n }\n if (this.isNumeric(this.gridOptions.detailRowHeight)) {\n return { height: this.gridOptions.detailRowHeight, estimated: false };\n }\n return { height: DEFAULT_DETAIL_ROW_HEIGHT, estimated: false };\n }\n var rowHeight = this.gridOptions.rowHeight && this.isNumeric(this.gridOptions.rowHeight) ? this.gridOptions.rowHeight : defaultRowHeight;\n return { height: rowHeight, estimated: false };\n };\n GridOptionsWrapper.prototype.isDynamicRowHeight = function () {\n return typeof this.gridOptions.getRowHeight === 'function';\n };\n GridOptionsWrapper.prototype.getListItemHeight = function () {\n return this.getFromTheme(20, 'listItemHeight');\n };\n GridOptionsWrapper.prototype.chartMenuPanelWidth = function () {\n return this.environment.chartMenuPanelWidth();\n };\n GridOptionsWrapper.prototype.isNumeric = function (value) {\n return !isNaN(value) && typeof value === 'number' && isFinite(value);\n };\n GridOptionsWrapper.prototype.getFromTheme = function (defaultValue, sassVariableName) {\n var theme = this.environment.getTheme().theme;\n if (theme && theme.indexOf('ag-theme') === 0) {\n return this.environment.getSassVariable(theme, sassVariableName);\n }\n return defaultValue;\n };\n GridOptionsWrapper.prototype.getDefaultRowHeight = function () {\n return this.getFromTheme(DEFAULT_ROW_HEIGHT, 'rowHeight');\n };\n GridOptionsWrapper.prototype.matchesGroupDisplayType = function (toMatch, supplied) {\n var groupDisplayTypeValues = ['groupRows', 'multipleColumns', 'custom', 'singleColumn'];\n if (groupDisplayTypeValues.indexOf(supplied) < 0) {\n console.warn(\"AG Grid: '\" + supplied + \"' is not a valid groupDisplayType value - possible values are: '\" + groupDisplayTypeValues.join(\"', '\") + \"'\");\n return false;\n }\n return supplied === toMatch;\n };\n GridOptionsWrapper.prototype.matchesTreeDataDisplayType = function (toMatch, supplied) {\n var treeDataDisplayTypeValues = ['auto', 'custom'];\n if (treeDataDisplayTypeValues.indexOf(supplied) < 0) {\n console.warn(\"AG Grid: '\" + supplied + \"' is not a valid treeDataDisplayType value - possible values are: '\" + treeDataDisplayTypeValues.join(\"', '\") + \"'\");\n return false;\n }\n return supplied === toMatch;\n };\n var GridOptionsWrapper_1;\n GridOptionsWrapper.MIN_COL_WIDTH = 10;\n GridOptionsWrapper.PROP_HEADER_HEIGHT = 'headerHeight';\n GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN = 'groupRemoveSingleChildren';\n GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN = 'groupRemoveLowestSingleChildren';\n GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT = 'pivotHeaderHeight';\n GridOptionsWrapper.PROP_SUPPRESS_CLIPBOARD_PASTE = 'suppressClipboardPaste';\n GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT = 'groupHeaderHeight';\n GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT = 'pivotGroupHeaderHeight';\n GridOptionsWrapper.PROP_NAVIGATE_TO_NEXT_CELL = 'navigateToNextCell';\n GridOptionsWrapper.PROP_TAB_TO_NEXT_CELL = 'tabToNextCell';\n GridOptionsWrapper.PROP_NAVIGATE_TO_NEXT_HEADER = 'navigateToNextHeader';\n GridOptionsWrapper.PROP_TAB_TO_NEXT_HEADER = 'tabToNextHeader';\n GridOptionsWrapper.PROP_IS_EXTERNAL_FILTER_PRESENT = 'isExternalFilterPresent';\n GridOptionsWrapper.PROP_DOES_EXTERNAL_FILTER_PASS = 'doesExternalFilterPass';\n GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT = 'floatingFiltersHeight';\n GridOptionsWrapper.PROP_SUPPRESS_ROW_CLICK_SELECTION = 'suppressRowClickSelection';\n GridOptionsWrapper.PROP_SUPPRESS_ROW_DRAG = 'suppressRowDrag';\n GridOptionsWrapper.PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG = 'suppressMoveWhenRowDragging';\n GridOptionsWrapper.PROP_GET_ROW_CLASS = 'getRowClass';\n GridOptionsWrapper.PROP_GET_ROW_STYLE = 'getRowStyle';\n GridOptionsWrapper.PROP_GET_ROW_HEIGHT = 'getRowHeight';\n GridOptionsWrapper.PROP_POPUP_PARENT = 'popupParent';\n GridOptionsWrapper.PROP_DOM_LAYOUT = 'domLayout';\n GridOptionsWrapper.PROP_ROW_CLASS = 'rowClass';\n GridOptionsWrapper.PROP_FILL_HANDLE_DIRECTION = 'fillHandleDirection';\n GridOptionsWrapper.PROP_GROUP_ROW_AGG_NODES = 'groupRowAggNodes';\n GridOptionsWrapper.PROP_GET_GROUP_ROW_AGG = 'getGroupRowAgg';\n GridOptionsWrapper.PROP_GET_BUSINESS_KEY_FOR_NODE = 'getBusinessKeyForNode';\n GridOptionsWrapper.PROP_GET_CHILD_COUNT = 'getChildCount';\n GridOptionsWrapper.PROP_PROCESS_ROW_POST_CREATE = 'processRowPostCreate';\n GridOptionsWrapper.PROP_GET_ROW_NODE_ID = 'getRowNodeId';\n GridOptionsWrapper.PROP_GET_ROW_ID = 'getRowId';\n GridOptionsWrapper.PROP_IS_FULL_WIDTH_CELL = 'isFullWidthCell';\n GridOptionsWrapper.PROP_IS_FULL_WIDTH_ROW = 'isFullWidthRow';\n GridOptionsWrapper.PROP_IS_ROW_SELECTABLE = 'isRowSelectable';\n GridOptionsWrapper.PROP_IS_ROW_MASTER = 'isRowMaster';\n GridOptionsWrapper.PROP_POST_SORT = 'postSort';\n GridOptionsWrapper.PROP_POST_SORT_ROWS = 'postSortRows';\n GridOptionsWrapper.PROP_GET_DOCUMENT = 'getDocument';\n GridOptionsWrapper.PROP_POST_PROCESS_POPUP = 'postProcessPopup';\n GridOptionsWrapper.PROP_DEFAULT_GROUP_ORDER_COMPARATOR = 'defaultGroupOrderComparator';\n GridOptionsWrapper.PROP_INITIAL_GROUP_ORDER_COMPARATOR = 'initialGroupOrderComparator';\n GridOptionsWrapper.PROP_PAGINATION_NUMBER_FORMATTER = 'paginationNumberFormatter';\n GridOptionsWrapper.PROP_GET_CONTEXT_MENU_ITEMS = 'getContextMenuItems';\n GridOptionsWrapper.PROP_GET_MAIN_MENU_ITEMS = 'getMainMenuItems';\n GridOptionsWrapper.PROP_PROCESS_CELL_FOR_CLIPBOARD = 'processCellForClipboard';\n GridOptionsWrapper.PROP_PROCESS_CELL_FROM_CLIPBOARD = 'processCellFromClipboard';\n GridOptionsWrapper.PROP_SEND_TO_CLIPBOARD = 'sendToClipboard';\n GridOptionsWrapper.PROP_PROCESS_TO_SECONDARY_COLDEF = 'processSecondaryColDef';\n GridOptionsWrapper.PROP_PROCESS_SECONDARY_COL_GROUP_DEF = 'processSecondaryColGroupDef';\n GridOptionsWrapper.PROP_GET_CHART_TOOLBAR_ITEMS = 'getChartToolbarItems';\n GridOptionsWrapper.PROP_GET_SERVER_SIDE_STORE_PARAMS = 'getServerSideStoreParams';\n GridOptionsWrapper.PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT = 'isServerSideGroupOpenByDefault';\n GridOptionsWrapper.PROP_IS_APPLY_SERVER_SIDE_TRANSACTION = 'isApplyServerSideTransaction';\n GridOptionsWrapper.PROP_IS_SERVER_SIDE_GROUP = 'isServerSideGroup';\n GridOptionsWrapper.PROP_GET_SERVER_SIDE_GROUP_KEY = 'getServerSideGroupKey';\n __decorate$I([\n Autowired('gridOptions')\n ], GridOptionsWrapper.prototype, \"gridOptions\", void 0);\n __decorate$I([\n Autowired('eventService')\n ], GridOptionsWrapper.prototype, \"eventService\", void 0);\n __decorate$I([\n Autowired('environment')\n ], GridOptionsWrapper.prototype, \"environment\", void 0);\n __decorate$I([\n Autowired('eGridDiv')\n ], GridOptionsWrapper.prototype, \"eGridDiv\", void 0);\n __decorate$I([\n __param$3(0, Qualifier('gridApi')), __param$3(1, Qualifier('columnApi'))\n ], GridOptionsWrapper.prototype, \"agWire\", null);\n __decorate$I([\n PreDestroy\n ], GridOptionsWrapper.prototype, \"destroy\", null);\n __decorate$I([\n PostConstruct\n ], GridOptionsWrapper.prototype, \"init\", null);\n GridOptionsWrapper = GridOptionsWrapper_1 = __decorate$I([\n Bean('gridOptionsWrapper')\n ], GridOptionsWrapper);\n return GridOptionsWrapper;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$Q = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$J = (undefined && undefined.__decorate) || function (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(function (LayoutCssClasses) {\n LayoutCssClasses[\"AUTO_HEIGHT\"] = \"ag-layout-auto-height\";\n LayoutCssClasses[\"NORMAL\"] = \"ag-layout-normal\";\n LayoutCssClasses[\"PRINT\"] = \"ag-layout-print\";\n})(exports.LayoutCssClasses || (exports.LayoutCssClasses = {}));\nvar LayoutFeature = /** @class */ (function (_super) {\n __extends$Q(LayoutFeature, _super);\n function LayoutFeature(view) {\n var _this = _super.call(this) || this;\n _this.view = view;\n return _this;\n }\n LayoutFeature.prototype.postConstruct = function () {\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.updateLayoutClasses.bind(this));\n this.updateLayoutClasses();\n };\n LayoutFeature.prototype.updateLayoutClasses = function () {\n var domLayout = this.gridOptionsWrapper.getDomLayout();\n var params = {\n autoHeight: domLayout === Constants.DOM_LAYOUT_AUTO_HEIGHT,\n normal: domLayout === Constants.DOM_LAYOUT_NORMAL,\n print: domLayout === Constants.DOM_LAYOUT_PRINT\n };\n var cssClass = params.autoHeight ? exports.LayoutCssClasses.AUTO_HEIGHT :\n params.print ? exports.LayoutCssClasses.PRINT : exports.LayoutCssClasses.NORMAL;\n this.view.updateLayoutClasses(cssClass, params);\n };\n __decorate$J([\n Autowired('gridOptionsWrapper')\n ], LayoutFeature.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$J([\n PostConstruct\n ], LayoutFeature.prototype, \"postConstruct\", null);\n return LayoutFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$R = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$K = (undefined && undefined.__decorate) || function (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};\nvar GridBodyScrollFeature = /** @class */ (function (_super) {\n __extends$R(GridBodyScrollFeature, _super);\n function GridBodyScrollFeature(eBodyViewport) {\n var _this = _super.call(this) || this;\n _this.scrollLeft = -1;\n _this.nextScrollTop = -1;\n _this.scrollTop = -1;\n _this.eBodyViewport = eBodyViewport;\n _this.resetLastHorizontalScrollElementDebounced = debounce(_this.resetLastHorizontalScrollElement.bind(_this), 500);\n return _this;\n }\n GridBodyScrollFeature.prototype.postConstruct = function () {\n var _this = this;\n this.enableRtl = this.gridOptionsWrapper.isEnableRtl();\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onDisplayedColumnsWidthChanged.bind(this));\n this.ctrlsService.whenReady(function (p) {\n _this.centerRowContainerCtrl = p.centerRowContainerCtrl;\n _this.onDisplayedColumnsWidthChanged();\n _this.addScrollListener();\n });\n };\n GridBodyScrollFeature.prototype.addScrollListener = function () {\n var fakeHScroll = this.ctrlsService.getFakeHScrollCtrl();\n this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(), 'scroll', this.onCenterViewportScroll.bind(this));\n this.addManagedListener(fakeHScroll.getViewport(), 'scroll', this.onFakeHorizontalScroll.bind(this));\n var onVerticalScroll = this.gridOptionsWrapper.isDebounceVerticalScrollbar() ?\n debounce(this.onVerticalScroll.bind(this), 100)\n : this.onVerticalScroll.bind(this);\n this.addManagedListener(this.eBodyViewport, 'scroll', onVerticalScroll);\n };\n GridBodyScrollFeature.prototype.onDisplayedColumnsWidthChanged = function () {\n if (this.enableRtl) {\n // because RTL is all backwards, a change in the width of the row\n // can cause a change in the scroll position, without a scroll event,\n // because the scroll position in RTL is a function that depends on\n // the width. to be convinced of this, take out this line, enable RTL,\n // scroll all the way to the left and then resize a column\n this.horizontallyScrollHeaderCenterAndFloatingCenter();\n }\n };\n GridBodyScrollFeature.prototype.horizontallyScrollHeaderCenterAndFloatingCenter = function (scrollLeft) {\n // when doing RTL, this method gets called once prematurely\n var notYetInitialised = this.centerRowContainerCtrl == null;\n if (notYetInitialised) {\n return;\n }\n if (scrollLeft === undefined) {\n scrollLeft = this.centerRowContainerCtrl.getCenterViewportScrollLeft();\n }\n var offset = this.enableRtl ? scrollLeft : -scrollLeft;\n var topCenterContainer = this.ctrlsService.getTopCenterRowContainerCtrl();\n var bottomCenterContainer = this.ctrlsService.getBottomCenterRowContainerCtrl();\n var fakeHScroll = this.ctrlsService.getFakeHScrollCtrl();\n var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();\n centerHeaderContainer.setHorizontalScroll(offset);\n bottomCenterContainer.setContainerTranslateX(offset);\n topCenterContainer.setContainerTranslateX(offset);\n var partner = this.lastHorizontalScrollElement === this.centerRowContainerCtrl.getViewportElement() ?\n fakeHScroll.getViewport() : this.centerRowContainerCtrl.getViewportElement();\n setScrollLeft(partner, Math.abs(scrollLeft), this.enableRtl);\n };\n GridBodyScrollFeature.prototype.isControllingScroll = function (eDiv) {\n if (!this.lastHorizontalScrollElement) {\n this.lastHorizontalScrollElement = eDiv;\n return true;\n }\n return eDiv === this.lastHorizontalScrollElement;\n };\n GridBodyScrollFeature.prototype.onFakeHorizontalScroll = function () {\n var fakeHScrollViewport = this.ctrlsService.getFakeHScrollCtrl().getViewport();\n if (!this.isControllingScroll(fakeHScrollViewport)) {\n return;\n }\n this.onBodyHorizontalScroll(fakeHScrollViewport);\n };\n GridBodyScrollFeature.prototype.onCenterViewportScroll = function () {\n var centerContainerViewport = this.centerRowContainerCtrl.getViewportElement();\n if (!this.isControllingScroll(centerContainerViewport)) {\n return;\n }\n this.onBodyHorizontalScroll(centerContainerViewport);\n };\n GridBodyScrollFeature.prototype.onBodyHorizontalScroll = function (eSource) {\n var centerContainerViewport = this.centerRowContainerCtrl.getViewportElement();\n var scrollLeft = centerContainerViewport.scrollLeft;\n if (this.shouldBlockScrollUpdate('horizontal', scrollLeft, true)) {\n return;\n }\n // we do Math.round() rather than Math.floor(), to mirror how scroll values are applied.\n // eg if a scale is applied (ie user has zoomed the browser), then applying scroll=200\n // could result in 199.88, which then floor(199.88) = 199, however round(199.88) = 200.\n // initially Math.floor() was used, however this caused (almost) infinite loop with aligned grids,\n // as the scroll would move 1px at at time bouncing from one grid to the next (eg one grid would cause\n // scroll to 200px, the next to 199px, then the first back to 198px and so on).\n this.doHorizontalScroll(Math.round(getScrollLeft(eSource, this.enableRtl)));\n this.resetLastHorizontalScrollElementDebounced();\n };\n GridBodyScrollFeature.prototype.onVerticalScroll = function () {\n var scrollTop = this.eBodyViewport.scrollTop;\n if (this.shouldBlockScrollUpdate('vertical', scrollTop, true)) {\n return;\n }\n this.animationFrameService.setScrollTop(scrollTop);\n this.nextScrollTop = scrollTop;\n if (this.gridOptionsWrapper.isSuppressAnimationFrame()) {\n this.scrollTop = this.nextScrollTop;\n this.redrawRowsAfterScroll();\n }\n else {\n this.animationFrameService.schedule();\n }\n };\n GridBodyScrollFeature.prototype.resetLastHorizontalScrollElement = function () {\n this.lastHorizontalScrollElement = null;\n };\n GridBodyScrollFeature.prototype.doHorizontalScroll = function (scrollLeft) {\n var fakeHScrollViewport = this.ctrlsService.getFakeHScrollCtrl().getViewport();\n var fakeScrollLeft = getScrollLeft(fakeHScrollViewport, this.enableRtl);\n if (this.scrollLeft === scrollLeft && scrollLeft === fakeScrollLeft) {\n return;\n }\n this.scrollLeft = scrollLeft;\n this.fireScrollEvent('horizontal');\n this.horizontallyScrollHeaderCenterAndFloatingCenter(scrollLeft);\n this.onHorizontalViewportChanged();\n };\n GridBodyScrollFeature.prototype.fireScrollEvent = function (direction) {\n var _this = this;\n var bodyScrollEvent = {\n type: Events.EVENT_BODY_SCROLL,\n api: this.gridApi,\n columnApi: this.columnApi,\n direction: direction,\n left: this.scrollLeft,\n top: this.scrollTop\n };\n this.eventService.dispatchEvent(bodyScrollEvent);\n window.clearTimeout(this.scrollTimer);\n this.scrollTimer = undefined;\n this.scrollTimer = window.setTimeout(function () {\n var bodyScrollEndEvent = Object.assign({}, bodyScrollEvent, {\n type: Events.EVENT_BODY_SCROLL_END\n });\n _this.eventService.dispatchEvent(bodyScrollEndEvent);\n }, 100);\n };\n GridBodyScrollFeature.prototype.shouldBlockScrollUpdate = function (direction, scrollTo, touchOnly) {\n // touch devices allow elastic scroll - which temporally scrolls the panel outside of the viewport\n // (eg user uses touch to go to the left of the grid, but drags past the left, the rows will actually\n // scroll past the left until the user releases the mouse). when this happens, we want ignore the scroll,\n // as otherwise it was causing the rows and header to flicker.\n if (touchOnly === void 0) { touchOnly = false; }\n // sometimes when scrolling, we got values that extended the maximum scroll allowed. we used to\n // ignore these scrolls. problem is the max scroll position could be skipped (eg the previous scroll event\n // could be 10px before the max position, and then current scroll event could be 20px after the max position).\n // if we just ignored the last event, we would be setting the scroll to 10px before the max position, when in\n // actual fact the user has exceeded the max scroll and thus scroll should be set to the max.\n if (touchOnly && !isIOSUserAgent()) {\n return false;\n }\n if (direction === 'vertical') {\n var clientHeight = getInnerHeight(this.eBodyViewport);\n var scrollHeight = this.eBodyViewport.scrollHeight;\n if (scrollTo < 0 || (scrollTo + clientHeight > scrollHeight)) {\n return true;\n }\n }\n if (direction === 'horizontal') {\n var clientWidth = this.centerRowContainerCtrl.getCenterWidth();\n var scrollWidth = this.centerRowContainerCtrl.getViewportElement().scrollWidth;\n if (this.enableRtl && isRtlNegativeScroll()) {\n if (scrollTo > 0) {\n return true;\n }\n }\n else if (scrollTo < 0) {\n return true;\n }\n if (Math.abs(scrollTo) + clientWidth > scrollWidth) {\n return true;\n }\n }\n return false;\n };\n GridBodyScrollFeature.prototype.redrawRowsAfterScroll = function () {\n this.fireScrollEvent('vertical');\n };\n GridBodyScrollFeature.prototype.onHorizontalViewportChanged = function () {\n this.centerRowContainerCtrl.onHorizontalViewportChanged();\n };\n // this is to cater for AG-3274, where grid is removed from the dom and then inserted back in again.\n // (which happens with some implementations of tabbing). this can result in horizontal scroll getting\n // reset back to the left, however no scroll event is fired. so we need to get header to also scroll\n // back to the left to be kept in sync.\n // adding and removing the grid from the DOM both resets the scroll position and\n // triggers a resize event, so notify listeners if the scroll position has changed\n GridBodyScrollFeature.prototype.checkScrollLeft = function () {\n if (this.scrollLeft !== this.centerRowContainerCtrl.getCenterViewportScrollLeft()) {\n this.onBodyHorizontalScroll(this.centerRowContainerCtrl.getViewportElement());\n }\n };\n GridBodyScrollFeature.prototype.executeAnimationFrameScroll = function () {\n var frameNeeded = this.scrollTop != this.nextScrollTop;\n if (frameNeeded) {\n this.scrollTop = this.nextScrollTop;\n this.redrawRowsAfterScroll();\n }\n return frameNeeded;\n };\n // called by scrollHorizontally method and alignedGridsService\n GridBodyScrollFeature.prototype.setHorizontalScrollPosition = function (hScrollPosition) {\n var minScrollLeft = 0;\n var maxScrollLeft = this.centerRowContainerCtrl.getViewportElement().scrollWidth - this.centerRowContainerCtrl.getCenterWidth();\n if (this.shouldBlockScrollUpdate('horizontal', hScrollPosition)) {\n if (this.enableRtl && isRtlNegativeScroll()) {\n hScrollPosition = hScrollPosition > 0 ? 0 : maxScrollLeft;\n }\n else {\n hScrollPosition = Math.min(Math.max(hScrollPosition, minScrollLeft), maxScrollLeft);\n }\n }\n setScrollLeft(this.centerRowContainerCtrl.getViewportElement(), Math.abs(hScrollPosition), this.enableRtl);\n // we need to manually do the event handling (rather than wait for the event)\n // for the alignedGridsService, as if we don't, the aligned grid service gets\n // notified async, and then it's 'consuming' flag doesn't get used right, and\n // we can end up with an infinite loop\n this.doHorizontalScroll(hScrollPosition);\n };\n GridBodyScrollFeature.prototype.setVerticalScrollPosition = function (vScrollPosition) {\n this.eBodyViewport.scrollTop = vScrollPosition;\n };\n GridBodyScrollFeature.prototype.getVScrollPosition = function () {\n var result = {\n top: this.eBodyViewport.scrollTop,\n bottom: this.eBodyViewport.scrollTop + this.eBodyViewport.offsetHeight\n };\n return result;\n };\n GridBodyScrollFeature.prototype.getHScrollPosition = function () {\n return this.centerRowContainerCtrl.getHScrollPosition();\n };\n GridBodyScrollFeature.prototype.isHorizontalScrollShowing = function () {\n return this.centerRowContainerCtrl.isHorizontalScrollShowing();\n };\n // called by the headerRootComp and moveColumnController\n GridBodyScrollFeature.prototype.scrollHorizontally = function (pixels) {\n var oldScrollPosition = this.centerRowContainerCtrl.getViewportElement().scrollLeft;\n this.setHorizontalScrollPosition(oldScrollPosition + pixels);\n return this.centerRowContainerCtrl.getViewportElement().scrollLeft - oldScrollPosition;\n };\n // gets called by rowRenderer when new data loaded, as it will want to scroll to the top\n GridBodyScrollFeature.prototype.scrollToTop = function () {\n this.eBodyViewport.scrollTop = 0;\n };\n // Valid values for position are bottom, middle and top\n GridBodyScrollFeature.prototype.ensureNodeVisible = function (comparator, position) {\n if (position === void 0) { position = null; }\n // look for the node index we want to display\n var rowCount = this.rowModel.getRowCount();\n var comparatorIsAFunction = typeof comparator === 'function';\n var indexToSelect = -1;\n // go through all the nodes, find the one we want to show\n for (var i = 0; i < rowCount; i++) {\n var node = this.rowModel.getRow(i);\n if (comparatorIsAFunction) {\n if (comparator(node)) {\n indexToSelect = i;\n break;\n }\n }\n else {\n // check object equality against node and data\n if (comparator === node || comparator === node.data) {\n indexToSelect = i;\n break;\n }\n }\n }\n if (indexToSelect >= 0) {\n this.ensureIndexVisible(indexToSelect, position);\n }\n };\n // Valid values for position are bottom, middle and top\n // position should be {'top','middle','bottom', or undefined/null}.\n // if undefined/null, then the grid will to the minimal amount of scrolling,\n // eg if grid needs to scroll up, it scrolls until row is on top,\n // if grid needs to scroll down, it scrolls until row is on bottom,\n // if row is already in view, grid does not scroll\n GridBodyScrollFeature.prototype.ensureIndexVisible = function (index, position) {\n // if for print or auto height, everything is always visible\n if (this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT) {\n return;\n }\n var rowCount = this.paginationProxy.getRowCount();\n if (typeof index !== 'number' || index < 0 || index >= rowCount) {\n console.warn('invalid row index for ensureIndexVisible: ' + index);\n return;\n }\n var isPaging = this.gridOptionsWrapper.isPagination();\n var paginationPanelEnabled = isPaging && !this.gridOptionsWrapper.isSuppressPaginationPanel();\n if (!paginationPanelEnabled) {\n this.paginationProxy.goToPageWithIndex(index);\n }\n var rowNode = this.paginationProxy.getRow(index);\n var rowGotShiftedDuringOperation;\n do {\n var startingRowTop = rowNode.rowTop;\n var startingRowHeight = rowNode.rowHeight;\n var paginationOffset = this.paginationProxy.getPixelOffset();\n var rowTopPixel = rowNode.rowTop - paginationOffset;\n var rowBottomPixel = rowTopPixel + rowNode.rowHeight;\n var scrollPosition = this.getVScrollPosition();\n var heightOffset = this.heightScaler.getDivStretchOffset();\n var vScrollTop = scrollPosition.top + heightOffset;\n var vScrollBottom = scrollPosition.bottom + heightOffset;\n var viewportHeight = vScrollBottom - vScrollTop;\n // work out the pixels for top, middle and bottom up front,\n // make the if/else below easier to read\n var pxTop = this.heightScaler.getScrollPositionForPixel(rowTopPixel);\n var pxBottom = this.heightScaler.getScrollPositionForPixel(rowBottomPixel - viewportHeight);\n // make sure if middle, the row is not outside the top of the grid\n var pxMiddle = Math.min((pxTop + pxBottom) / 2, rowTopPixel);\n var rowBelowViewport = vScrollTop > rowTopPixel;\n var rowAboveViewport = vScrollBottom < rowBottomPixel;\n var newScrollPosition = null;\n if (position === 'top') {\n newScrollPosition = pxTop;\n }\n else if (position === 'bottom') {\n newScrollPosition = pxBottom;\n }\n else if (position === 'middle') {\n newScrollPosition = pxMiddle;\n }\n else if (rowBelowViewport) {\n // if row is before, scroll up with row at top\n newScrollPosition = pxTop;\n }\n else if (rowAboveViewport) {\n // if row is below, scroll down with row at bottom\n newScrollPosition = pxBottom;\n }\n if (newScrollPosition !== null) {\n this.eBodyViewport.scrollTop = newScrollPosition;\n this.rowRenderer.redrawAfterScroll();\n }\n // the row can get shifted if during the rendering (during rowRenderer.redrawAfterScroll()),\n // the height of a row changes due to lazy calculation of row heights when using\n // colDef.autoHeight or gridOptions.getRowHeight.\n // if row was shifted, then the position we scrolled to is incorrect.\n rowGotShiftedDuringOperation = (startingRowTop !== rowNode.rowTop)\n || (startingRowHeight !== rowNode.rowHeight);\n } while (rowGotShiftedDuringOperation);\n // so when we return back to user, the cells have rendered\n this.animationFrameService.flushAllFrames();\n };\n GridBodyScrollFeature.prototype.ensureColumnVisible = function (key, position) {\n if (position === void 0) { position = 'auto'; }\n var column = this.columnModel.getGridColumn(key);\n if (!column) {\n return;\n }\n // calling ensureColumnVisible on a pinned column doesn't make sense\n if (column.isPinned()) {\n return;\n }\n // defensive\n if (!this.columnModel.isColumnDisplayed(column)) {\n return;\n }\n var newHorizontalScroll = this.getPositionedHorizontalScroll(column, position);\n if (newHorizontalScroll !== null) {\n this.centerRowContainerCtrl.setCenterViewportScrollLeft(newHorizontalScroll);\n }\n // this will happen anyway, as the move will cause a 'scroll' event on the body, however\n // it is possible that the ensureColumnVisible method is called from within AG Grid and\n // the caller will need to have the columns rendered to continue, which will be before\n // the event has been worked on (which is the case for cell navigation).\n this.centerRowContainerCtrl.onHorizontalViewportChanged();\n // so when we return back to user, the cells have rendered\n this.animationFrameService.flushAllFrames();\n };\n GridBodyScrollFeature.prototype.getPositionedHorizontalScroll = function (column, position) {\n var _a = this.isColumnOutsideViewport(column), columnBeforeStart = _a.columnBeforeStart, columnAfterEnd = _a.columnAfterEnd;\n var viewportTooSmallForColumn = this.centerRowContainerCtrl.getCenterWidth() < column.getActualWidth();\n var viewportWidth = this.centerRowContainerCtrl.getCenterWidth();\n var isRtl = this.enableRtl;\n var alignColToStart = (isRtl ? columnBeforeStart : columnAfterEnd) || viewportTooSmallForColumn;\n var alignColToEnd = isRtl ? columnAfterEnd : columnBeforeStart;\n if (position !== 'auto') {\n alignColToStart = position === 'start';\n alignColToEnd = position === 'end';\n }\n var isMiddle = position === 'middle';\n if (alignColToStart || alignColToEnd || isMiddle) {\n var _b = this.getColumnBounds(column), colLeft = _b.colLeft, colMiddle = _b.colMiddle, colRight = _b.colRight;\n if (isMiddle) {\n return colMiddle - viewportWidth / 2;\n }\n if (alignColToStart) {\n return isRtl ? colRight : colLeft;\n }\n return isRtl ? (colLeft - viewportWidth) : (colRight - viewportWidth);\n }\n return null;\n };\n GridBodyScrollFeature.prototype.isColumnOutsideViewport = function (column) {\n var _a = this.getViewportBounds(), viewportStart = _a.start, viewportEnd = _a.end;\n var _b = this.getColumnBounds(column), colLeft = _b.colLeft, colRight = _b.colRight;\n var isRtl = this.enableRtl;\n var columnBeforeStart = isRtl ? (viewportStart > colRight) : (viewportEnd < colRight);\n var columnAfterEnd = isRtl ? (viewportEnd < colLeft) : (viewportStart > colLeft);\n return { columnBeforeStart: columnBeforeStart, columnAfterEnd: columnAfterEnd };\n };\n GridBodyScrollFeature.prototype.getColumnBounds = function (column) {\n var isRtl = this.enableRtl;\n var bodyWidth = this.columnModel.getBodyContainerWidth();\n var colWidth = column.getActualWidth();\n var colLeft = column.getLeft();\n var multiplier = isRtl ? -1 : 1;\n var colLeftPixel = isRtl ? (bodyWidth - colLeft) : colLeft;\n var colRightPixel = colLeftPixel + colWidth * multiplier;\n var colMidPixel = colLeftPixel + colWidth / 2 * multiplier;\n return { colLeft: colLeftPixel, colMiddle: colMidPixel, colRight: colRightPixel };\n };\n GridBodyScrollFeature.prototype.getViewportBounds = function () {\n var viewportWidth = this.centerRowContainerCtrl.getCenterWidth();\n var scrollPosition = this.centerRowContainerCtrl.getCenterViewportScrollLeft();\n var viewportStartPixel = scrollPosition;\n var viewportEndPixel = viewportWidth + scrollPosition;\n return { start: viewportStartPixel, end: viewportEndPixel, width: viewportWidth };\n };\n __decorate$K([\n Autowired('ctrlsService')\n ], GridBodyScrollFeature.prototype, \"ctrlsService\", void 0);\n __decorate$K([\n Autowired('animationFrameService')\n ], GridBodyScrollFeature.prototype, \"animationFrameService\", void 0);\n __decorate$K([\n Autowired('columnApi')\n ], GridBodyScrollFeature.prototype, \"columnApi\", void 0);\n __decorate$K([\n Autowired('gridApi')\n ], GridBodyScrollFeature.prototype, \"gridApi\", void 0);\n __decorate$K([\n Autowired('paginationProxy')\n ], GridBodyScrollFeature.prototype, \"paginationProxy\", void 0);\n __decorate$K([\n Autowired('rowModel')\n ], GridBodyScrollFeature.prototype, \"rowModel\", void 0);\n __decorate$K([\n Autowired('rowContainerHeightService')\n ], GridBodyScrollFeature.prototype, \"heightScaler\", void 0);\n __decorate$K([\n Autowired('rowRenderer')\n ], GridBodyScrollFeature.prototype, \"rowRenderer\", void 0);\n __decorate$K([\n Autowired('columnModel')\n ], GridBodyScrollFeature.prototype, \"columnModel\", void 0);\n __decorate$K([\n PostConstruct\n ], GridBodyScrollFeature.prototype, \"postConstruct\", null);\n return GridBodyScrollFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar AutoScrollService = /** @class */ (function () {\n function AutoScrollService(params) {\n this.tickingInterval = null;\n this.onScrollCallback = null;\n this.scrollContainer = params.scrollContainer;\n this.scrollHorizontally = params.scrollAxis.indexOf('x') !== -1;\n this.scrollVertically = params.scrollAxis.indexOf('y') !== -1;\n this.scrollByTick = params.scrollByTick != null ? params.scrollByTick : 20;\n if (params.onScrollCallback) {\n this.onScrollCallback = params.onScrollCallback;\n }\n if (this.scrollVertically) {\n this.getVerticalPosition = params.getVerticalPosition;\n this.setVerticalPosition = params.setVerticalPosition;\n }\n if (this.scrollHorizontally) {\n this.getHorizontalPosition = params.getHorizontalPosition;\n this.setHorizontalPosition = params.setHorizontalPosition;\n }\n this.shouldSkipVerticalScroll = params.shouldSkipVerticalScroll || (function () { return false; });\n this.shouldSkipHorizontalScroll = params.shouldSkipHorizontalScroll || (function () { return false; });\n }\n AutoScrollService.prototype.check = function (mouseEvent, forceSkipVerticalScroll) {\n if (forceSkipVerticalScroll === void 0) { forceSkipVerticalScroll = false; }\n var skipVerticalScroll = forceSkipVerticalScroll || this.shouldSkipVerticalScroll();\n if (skipVerticalScroll && this.shouldSkipHorizontalScroll()) {\n return;\n }\n var rect = this.scrollContainer.getBoundingClientRect();\n var scrollTick = this.scrollByTick;\n this.tickLeft = mouseEvent.clientX < (rect.left + scrollTick);\n this.tickRight = mouseEvent.clientX > (rect.right - scrollTick);\n this.tickUp = mouseEvent.clientY < (rect.top + scrollTick) && !skipVerticalScroll;\n this.tickDown = mouseEvent.clientY > (rect.bottom - scrollTick) && !skipVerticalScroll;\n if (this.tickLeft || this.tickRight || this.tickUp || this.tickDown) {\n this.ensureTickingStarted();\n }\n else {\n this.ensureCleared();\n }\n };\n AutoScrollService.prototype.ensureTickingStarted = function () {\n if (this.tickingInterval === null) {\n this.tickingInterval = window.setInterval(this.doTick.bind(this), 100);\n this.tickCount = 0;\n }\n };\n AutoScrollService.prototype.doTick = function () {\n this.tickCount++;\n var tickAmount;\n tickAmount = this.tickCount > 20 ? 200 : (this.tickCount > 10 ? 80 : 40);\n if (this.scrollVertically) {\n var vScrollPosition = this.getVerticalPosition();\n if (this.tickUp) {\n this.setVerticalPosition(vScrollPosition - tickAmount);\n }\n if (this.tickDown) {\n this.setVerticalPosition(vScrollPosition + tickAmount);\n }\n }\n if (this.scrollHorizontally) {\n var hScrollPosition = this.getHorizontalPosition();\n if (this.tickLeft) {\n this.setHorizontalPosition(hScrollPosition - tickAmount);\n }\n if (this.tickRight) {\n this.setHorizontalPosition(hScrollPosition + tickAmount);\n }\n }\n if (this.onScrollCallback) {\n this.onScrollCallback();\n }\n };\n AutoScrollService.prototype.ensureCleared = function () {\n if (this.tickingInterval) {\n window.clearInterval(this.tickingInterval);\n this.tickingInterval = null;\n }\n };\n return AutoScrollService;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$S = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$a = (undefined && undefined.__assign) || function () {\n __assign$a = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$a.apply(this, arguments);\n};\nvar __decorate$L = (undefined && undefined.__decorate) || function (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};\nvar __read$7 = (undefined && undefined.__read) || function (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};\nvar __spread$5 = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$7(arguments[i]));\n return ar;\n};\nvar RowDragFeature = /** @class */ (function (_super) {\n __extends$S(RowDragFeature, _super);\n function RowDragFeature(eContainer) {\n var _this = _super.call(this) || this;\n _this.isMultiRowDrag = false;\n _this.isGridSorted = false;\n _this.isGridFiltered = false;\n _this.isRowGroupActive = false;\n _this.eContainer = eContainer;\n return _this;\n }\n RowDragFeature.prototype.postConstruct = function () {\n var _this = this;\n if (this.gridOptionsWrapper.isRowModelDefault()) {\n this.clientSideRowModel = this.rowModel;\n }\n var refreshStatus = function () {\n _this.onSortChanged();\n _this.onFilterChanged();\n _this.onRowGroupChanged();\n };\n this.addManagedListener(this.eventService, Events.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.onRowGroupChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, function () {\n refreshStatus();\n });\n refreshStatus();\n this.ctrlsService.whenReady(function () {\n var gridBodyCon = _this.ctrlsService.getGridBodyCtrl();\n _this.autoScrollService = new AutoScrollService({\n scrollContainer: gridBodyCon.getBodyViewportElement(),\n scrollAxis: 'y',\n getVerticalPosition: function () { return gridBodyCon.getScrollFeature().getVScrollPosition().top; },\n setVerticalPosition: function (position) { return gridBodyCon.getScrollFeature().setVerticalScrollPosition(position); },\n onScrollCallback: function () { _this.onDragging(_this.lastDraggingEvent); }\n });\n });\n };\n RowDragFeature.prototype.onSortChanged = function () {\n this.isGridSorted = this.sortController.isSortActive();\n };\n RowDragFeature.prototype.onFilterChanged = function () {\n this.isGridFiltered = this.filterManager.isAnyFilterPresent();\n };\n RowDragFeature.prototype.onRowGroupChanged = function () {\n var rowGroups = this.columnModel.getRowGroupColumns();\n this.isRowGroupActive = !missingOrEmpty(rowGroups);\n };\n RowDragFeature.prototype.getContainer = function () {\n return this.eContainer;\n };\n RowDragFeature.prototype.isInterestedIn = function (type) {\n return type === exports.DragSourceType.RowDrag;\n };\n RowDragFeature.prototype.getIconName = function () {\n var managedDrag = this.gridOptionsWrapper.isRowDragManaged();\n if (managedDrag && this.shouldPreventRowMove()) {\n return DragAndDropService.ICON_NOT_ALLOWED;\n }\n return DragAndDropService.ICON_MOVE;\n };\n RowDragFeature.prototype.shouldPreventRowMove = function () {\n return this.isGridSorted || this.isGridFiltered || this.isRowGroupActive;\n };\n RowDragFeature.prototype.getRowNodes = function (draggingEvent) {\n var _this = this;\n if (!this.isFromThisGrid(draggingEvent)) {\n return draggingEvent.dragItem.rowNodes || [];\n }\n var isRowDragMultiRow = this.gridOptionsWrapper.isRowDragMultiRow();\n var selectedNodes = __spread$5(this.selectionService.getSelectedNodes()).sort(function (a, b) { return _this.getRowIndexNumber(a) - _this.getRowIndexNumber(b); });\n var currentNode = draggingEvent.dragItem.rowNode;\n if (isRowDragMultiRow && selectedNodes.indexOf(currentNode) !== -1) {\n this.isMultiRowDrag = true;\n return selectedNodes;\n }\n this.isMultiRowDrag = false;\n return [currentNode];\n };\n RowDragFeature.prototype.onDragEnter = function (draggingEvent) {\n // builds a lits of all rows being dragged before firing events\n draggingEvent.dragItem.rowNodes = this.getRowNodes(draggingEvent);\n // when entering, we fire the enter event, then in onEnterOrDragging,\n // we also fire the move event. so we get both events when entering.\n this.dispatchGridEvent(Events.EVENT_ROW_DRAG_ENTER, draggingEvent);\n this.getRowNodes(draggingEvent).forEach(function (rowNode) {\n rowNode.setDragging(true);\n });\n this.onEnterOrDragging(draggingEvent);\n };\n RowDragFeature.prototype.onDragging = function (draggingEvent) {\n this.onEnterOrDragging(draggingEvent);\n };\n RowDragFeature.prototype.isFromThisGrid = function (draggingEvent) {\n var dragSourceDomDataKey = draggingEvent.dragSource.dragSourceDomDataKey;\n return dragSourceDomDataKey === this.gridOptionsWrapper.getDomDataKey();\n };\n RowDragFeature.prototype.isDropZoneWithinThisGrid = function (draggingEvent) {\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n var gridGui = gridBodyCon.getGui();\n var dropZoneTarget = draggingEvent.dropZoneTarget;\n return !gridGui.contains(dropZoneTarget);\n };\n RowDragFeature.prototype.onEnterOrDragging = function (draggingEvent) {\n // this event is fired for enter and move\n this.dispatchGridEvent(Events.EVENT_ROW_DRAG_MOVE, draggingEvent);\n this.lastDraggingEvent = draggingEvent;\n var pixel = this.mouseEventService.getNormalisedPosition(draggingEvent).y;\n var managedDrag = this.gridOptionsWrapper.isRowDragManaged();\n if (managedDrag) {\n this.doManagedDrag(draggingEvent, pixel);\n }\n this.autoScrollService.check(draggingEvent.event);\n };\n RowDragFeature.prototype.doManagedDrag = function (draggingEvent, pixel) {\n var isFromThisGrid = this.isFromThisGrid(draggingEvent);\n var managedDrag = this.gridOptionsWrapper.isRowDragManaged();\n var rowNodes = draggingEvent.dragItem.rowNodes;\n if (managedDrag && this.shouldPreventRowMove()) {\n return;\n }\n if (this.gridOptionsWrapper.isSuppressMoveWhenRowDragging() || !isFromThisGrid) {\n if (!this.isDropZoneWithinThisGrid(draggingEvent)) {\n this.clientSideRowModel.highlightRowAtPixel(rowNodes[0], pixel);\n }\n }\n else {\n this.moveRows(rowNodes, pixel);\n }\n };\n RowDragFeature.prototype.getRowIndexNumber = function (rowNode) {\n return parseInt(last(rowNode.getRowIndexString().split('-')), 10);\n };\n RowDragFeature.prototype.moveRowAndClearHighlight = function (draggingEvent) {\n var _this = this;\n var lastHighlightedRowNode = this.clientSideRowModel.getLastHighlightedRowNode();\n var isBelow = lastHighlightedRowNode && lastHighlightedRowNode.highlighted === exports.RowHighlightPosition.Below;\n var pixel = this.mouseEventService.getNormalisedPosition(draggingEvent).y;\n var rowNodes = draggingEvent.dragItem.rowNodes;\n var increment = isBelow ? 1 : 0;\n if (this.isFromThisGrid(draggingEvent)) {\n rowNodes.forEach(function (rowNode) {\n if (rowNode.rowTop < pixel) {\n increment -= 1;\n }\n });\n this.moveRows(rowNodes, pixel, increment);\n }\n else {\n var getRowIdFunc_1 = this.gridOptionsWrapper.getRowIdFunc();\n var addIndex = this.clientSideRowModel.getRowIndexAtPixel(pixel) + 1;\n if (this.clientSideRowModel.getHighlightPosition(pixel) === exports.RowHighlightPosition.Above) {\n addIndex--;\n }\n this.clientSideRowModel.updateRowData({\n add: rowNodes\n .map(function (node) { return node.data; })\n .filter(function (data) { return !_this.clientSideRowModel.getRowNode(getRowIdFunc_1 ? getRowIdFunc_1({ data: data, level: 0 }) : data.id); }),\n addIndex: addIndex\n });\n }\n this.clearRowHighlight();\n };\n RowDragFeature.prototype.clearRowHighlight = function () {\n this.clientSideRowModel.highlightRowAtPixel(null);\n };\n RowDragFeature.prototype.moveRows = function (rowNodes, pixel, increment) {\n if (increment === void 0) { increment = 0; }\n var rowWasMoved = this.clientSideRowModel.ensureRowsAtPixel(rowNodes, pixel, increment);\n if (rowWasMoved) {\n this.focusService.clearFocusedCell();\n if (this.rangeService) {\n this.rangeService.removeAllCellRanges();\n }\n }\n };\n RowDragFeature.prototype.addRowDropZone = function (params) {\n var _this = this;\n if (!params.getContainer()) {\n doOnce(function () { return console.warn('AG Grid: addRowDropZone - A container target needs to be provided'); }, 'add-drop-zone-empty-target');\n return;\n }\n if (this.dragAndDropService.findExternalZone(params)) {\n console.warn('AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.');\n return;\n }\n var processedParams = {\n getContainer: params.getContainer\n };\n if (params.fromGrid) {\n params.fromGrid = undefined;\n processedParams = params;\n }\n else {\n if (params.onDragEnter) {\n processedParams.onDragEnter = function (e) {\n params.onDragEnter(_this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_ENTER, e));\n };\n }\n if (params.onDragLeave) {\n processedParams.onDragLeave = function (e) {\n params.onDragLeave(_this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_LEAVE, e));\n };\n }\n if (params.onDragging) {\n processedParams.onDragging = function (e) {\n params.onDragging(_this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_MOVE, e));\n };\n }\n if (params.onDragStop) {\n processedParams.onDragStop = function (e) {\n params.onDragStop(_this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_END, e));\n };\n }\n }\n this.dragAndDropService.addDropTarget(__assign$a({ isInterestedIn: function (type) { return type === exports.DragSourceType.RowDrag; }, getIconName: function () { return DragAndDropService.ICON_MOVE; }, external: true }, processedParams));\n };\n RowDragFeature.prototype.getRowDropZone = function (events) {\n var _this = this;\n var getContainer = this.getContainer.bind(this);\n var onDragEnter = this.onDragEnter.bind(this);\n var onDragLeave = this.onDragLeave.bind(this);\n var onDragging = this.onDragging.bind(this);\n var onDragStop = this.onDragStop.bind(this);\n if (!events) {\n return { getContainer: getContainer, onDragEnter: onDragEnter, onDragLeave: onDragLeave, onDragging: onDragging, onDragStop: onDragStop, /* @private */ fromGrid: true };\n }\n return {\n getContainer: getContainer,\n onDragEnter: events.onDragEnter\n ? (function (e) {\n onDragEnter(e);\n events.onDragEnter(_this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_ENTER, e));\n })\n : onDragEnter,\n onDragLeave: events.onDragLeave\n ? (function (e) {\n onDragLeave(e);\n events.onDragLeave(_this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_LEAVE, e));\n })\n : onDragLeave,\n onDragging: events.onDragging\n ? (function (e) {\n onDragging(e);\n events.onDragging(_this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_MOVE, e));\n })\n : onDragging,\n onDragStop: events.onDragStop\n ? (function (e) {\n onDragStop(e);\n events.onDragStop(_this.draggingToRowDragEvent(Events.EVENT_ROW_DRAG_END, e));\n })\n : onDragStop,\n fromGrid: true /* @private */\n };\n };\n RowDragFeature.prototype.draggingToRowDragEvent = function (type, draggingEvent) {\n var yNormalised = this.mouseEventService.getNormalisedPosition(draggingEvent).y;\n var mouseIsPastLastRow = yNormalised > this.paginationProxy.getCurrentPageHeight();\n var overIndex = -1;\n var overNode;\n if (!mouseIsPastLastRow) {\n overIndex = this.rowModel.getRowIndexAtPixel(yNormalised);\n overNode = this.rowModel.getRow(overIndex);\n }\n var vDirectionString;\n switch (draggingEvent.vDirection) {\n case exports.VerticalDirection.Down:\n vDirectionString = 'down';\n break;\n case exports.VerticalDirection.Up:\n vDirectionString = 'up';\n break;\n default:\n vDirectionString = null;\n break;\n }\n var event = {\n type: type,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n event: draggingEvent.event,\n node: draggingEvent.dragItem.rowNode,\n nodes: draggingEvent.dragItem.rowNodes,\n overIndex: overIndex,\n overNode: overNode,\n y: yNormalised,\n vDirection: vDirectionString\n };\n return event;\n };\n RowDragFeature.prototype.dispatchGridEvent = function (type, draggingEvent) {\n var event = this.draggingToRowDragEvent(type, draggingEvent);\n this.eventService.dispatchEvent(event);\n };\n RowDragFeature.prototype.onDragLeave = function (draggingEvent) {\n this.dispatchGridEvent(Events.EVENT_ROW_DRAG_LEAVE, draggingEvent);\n this.stopDragging(draggingEvent);\n if (this.gridOptionsWrapper.isRowDragManaged()) {\n this.clearRowHighlight();\n }\n if (this.isFromThisGrid(draggingEvent)) {\n this.isMultiRowDrag = false;\n }\n };\n RowDragFeature.prototype.onDragStop = function (draggingEvent) {\n this.dispatchGridEvent(Events.EVENT_ROW_DRAG_END, draggingEvent);\n this.stopDragging(draggingEvent);\n if (this.gridOptionsWrapper.isRowDragManaged() &&\n (this.gridOptionsWrapper.isSuppressMoveWhenRowDragging() || !this.isFromThisGrid(draggingEvent)) &&\n !this.isDropZoneWithinThisGrid(draggingEvent)) {\n this.moveRowAndClearHighlight(draggingEvent);\n }\n };\n RowDragFeature.prototype.stopDragging = function (draggingEvent) {\n this.autoScrollService.ensureCleared();\n this.getRowNodes(draggingEvent).forEach(function (rowNode) {\n rowNode.setDragging(false);\n });\n };\n __decorate$L([\n Autowired('dragAndDropService')\n ], RowDragFeature.prototype, \"dragAndDropService\", void 0);\n __decorate$L([\n Autowired('rowModel')\n ], RowDragFeature.prototype, \"rowModel\", void 0);\n __decorate$L([\n Autowired('paginationProxy')\n ], RowDragFeature.prototype, \"paginationProxy\", void 0);\n __decorate$L([\n Autowired('columnModel')\n ], RowDragFeature.prototype, \"columnModel\", void 0);\n __decorate$L([\n Autowired('focusService')\n ], RowDragFeature.prototype, \"focusService\", void 0);\n __decorate$L([\n Autowired('sortController')\n ], RowDragFeature.prototype, \"sortController\", void 0);\n __decorate$L([\n Autowired('filterManager')\n ], RowDragFeature.prototype, \"filterManager\", void 0);\n __decorate$L([\n Autowired('selectionService')\n ], RowDragFeature.prototype, \"selectionService\", void 0);\n __decorate$L([\n Autowired('mouseEventService')\n ], RowDragFeature.prototype, \"mouseEventService\", void 0);\n __decorate$L([\n Autowired('ctrlsService')\n ], RowDragFeature.prototype, \"ctrlsService\", void 0);\n __decorate$L([\n Optional('rangeService')\n ], RowDragFeature.prototype, \"rangeService\", void 0);\n __decorate$L([\n Autowired('columnApi')\n ], RowDragFeature.prototype, \"columnApi\", void 0);\n __decorate$L([\n Autowired('gridApi')\n ], RowDragFeature.prototype, \"gridApi\", void 0);\n __decorate$L([\n PostConstruct\n ], RowDragFeature.prototype, \"postConstruct\", null);\n return RowDragFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$T = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$M = (undefined && undefined.__decorate) || function (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(function (RowAnimationCssClasses) {\n RowAnimationCssClasses[\"ANIMATION_ON\"] = \"ag-row-animation\";\n RowAnimationCssClasses[\"ANIMATION_OFF\"] = \"ag-row-no-animation\";\n})(exports.RowAnimationCssClasses || (exports.RowAnimationCssClasses = {}));\nvar CSS_CLASS_CELL_SELECTABLE = 'ag-selectable';\nvar CSS_CLASS_FORCE_VERTICAL_SCROLL = 'ag-force-vertical-scroll';\nvar CSS_CLASS_COLUMN_MOVING = 'ag-column-moving';\nvar GridBodyCtrl = /** @class */ (function (_super) {\n __extends$T(GridBodyCtrl, _super);\n function GridBodyCtrl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridBodyCtrl.prototype.getScrollFeature = function () {\n return this.bodyScrollFeature;\n };\n GridBodyCtrl.prototype.getBodyViewportElement = function () {\n return this.eBodyViewport;\n };\n GridBodyCtrl.prototype.setComp = function (comp, eGridBody, eBodyViewport, eTop, eBottom) {\n this.comp = comp;\n this.eGridBody = eGridBody;\n this.eBodyViewport = eBodyViewport;\n this.eTop = eTop;\n this.eBottom = eBottom;\n this.setCellTextSelection(this.gridOptionsWrapper.isEnableCellTextSelect());\n this.createManagedBean(new LayoutFeature(this.comp));\n this.bodyScrollFeature = this.createManagedBean(new GridBodyScrollFeature(this.eBodyViewport));\n this.addRowDragListener();\n this.setupRowAnimationCssClass();\n this.addEventListeners();\n this.addFocusListeners([eTop, eBodyViewport, eBottom]);\n this.onGridColumnsChanged();\n this.addBodyViewportListener();\n this.setFloatingHeights();\n this.disableBrowserDragging();\n this.addStopEditingWhenGridLosesFocus();\n this.ctrlsService.registerGridBodyCtrl(this);\n };\n GridBodyCtrl.prototype.getComp = function () {\n return this.comp;\n };\n GridBodyCtrl.prototype.addEventListeners = function () {\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, this.onGridColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, this.onScrollVisibilityChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_PINNED_ROW_DATA_CHANGED, this.setFloatingHeights.bind(this));\n };\n GridBodyCtrl.prototype.addFocusListeners = function (elements) {\n var _this = this;\n elements.forEach(function (element) {\n _this.addManagedListener(element, 'focusin', function () {\n element.classList.add('ag-has-focus');\n });\n _this.addManagedListener(element, 'focusout', function (e) {\n if (!element.contains(e.relatedTarget)) {\n element.classList.remove('ag-has-focus');\n }\n });\n });\n };\n // used by ColumnAnimationService\n GridBodyCtrl.prototype.setColumnMovingCss = function (moving) {\n this.comp.setColumnMovingCss(moving ? CSS_CLASS_COLUMN_MOVING : null, moving);\n };\n GridBodyCtrl.prototype.setCellTextSelection = function (selectable) {\n if (selectable === void 0) { selectable = false; }\n var cssClass = selectable ? CSS_CLASS_CELL_SELECTABLE : null;\n this.comp.setCellSelectableCss(cssClass, selectable);\n };\n GridBodyCtrl.prototype.onScrollVisibilityChanged = function () {\n var visible = this.scrollVisibleService.isVerticalScrollShowing();\n this.setVerticalScrollPaddingVisible(visible);\n };\n GridBodyCtrl.prototype.onGridColumnsChanged = function () {\n var columns = this.columnModel.getAllGridColumns();\n this.comp.setColumnCount(columns ? columns.length : 0);\n };\n // if we do not do this, then the user can select a pic in the grid (eg an image in a custom cell renderer)\n // and then that will start the browser native drag n' drop, which messes up with our own drag and drop.\n GridBodyCtrl.prototype.disableBrowserDragging = function () {\n this.addManagedListener(this.eGridBody, 'dragstart', function (event) {\n if (event.target instanceof HTMLImageElement) {\n event.preventDefault();\n return false;\n }\n });\n };\n GridBodyCtrl.prototype.addStopEditingWhenGridLosesFocus = function () {\n var _this = this;\n if (!this.gridOptionsWrapper.isStopEditingWhenCellsLoseFocus()) {\n return;\n }\n var focusOutListener = function (event) {\n // this is the element the focus is moving to\n var elementWithFocus = event.relatedTarget;\n if (getTabIndex(elementWithFocus) === null) {\n _this.rowRenderer.stopEditing();\n return;\n }\n var clickInsideGrid = \n // see if click came from inside the viewports\n viewports.some(function (viewport) { return viewport.contains(elementWithFocus); })\n // and also that it's not from a detail grid\n && _this.mouseEventService.isElementInThisGrid(elementWithFocus);\n if (!clickInsideGrid) {\n var popupService = _this.popupService;\n clickInsideGrid =\n popupService.getActivePopups().some(function (popup) { return popup.contains(elementWithFocus); }) ||\n popupService.isElementWithinCustomPopup(elementWithFocus);\n }\n if (!clickInsideGrid) {\n _this.rowRenderer.stopEditing();\n }\n };\n var viewports = [this.eBodyViewport, this.eBottom, this.eTop];\n viewports.forEach(function (viewport) { return _this.addManagedListener(viewport, 'focusout', focusOutListener); });\n };\n GridBodyCtrl.prototype.updateRowCount = function () {\n var headerCount = this.headerNavigationService.getHeaderRowCount();\n var modelType = this.paginationProxy.getType();\n var rowCount = -1;\n if (modelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n rowCount = 0;\n this.paginationProxy.forEachNode(function (node) {\n if (!node.group) {\n rowCount++;\n }\n });\n }\n var total = rowCount === -1 ? -1 : (headerCount + rowCount);\n this.comp.setRowCount(total);\n };\n GridBodyCtrl.prototype.registerBodyViewportResizeListener = function (listener) {\n this.comp.registerBodyViewportResizeListener(listener);\n };\n GridBodyCtrl.prototype.setVerticalScrollPaddingVisible = function (visible) {\n var overflowY = visible ? 'scroll' : 'hidden';\n this.comp.setPinnedTopBottomOverflowY(overflowY);\n };\n GridBodyCtrl.prototype.isVerticalScrollShowing = function () {\n var show = this.gridOptionsWrapper.isAlwaysShowVerticalScroll();\n var cssClass = show ? CSS_CLASS_FORCE_VERTICAL_SCROLL : null;\n this.comp.setAlwaysVerticalScrollClass(cssClass, show);\n return show || isVerticalScrollShowing(this.eBodyViewport);\n };\n GridBodyCtrl.prototype.setupRowAnimationCssClass = function () {\n var _this = this;\n var listener = function () {\n // we don't want to use row animation if scaling, as rows jump strangely as you scroll,\n // when scaling and doing row animation.\n var animateRows = _this.gridOptionsWrapper.isAnimateRows() && !_this.rowContainerHeightService.isStretching();\n var animateRowsCssClass = animateRows ? exports.RowAnimationCssClasses.ANIMATION_ON : exports.RowAnimationCssClasses.ANIMATION_OFF;\n _this.comp.setRowAnimationCssOnBodyViewport(animateRowsCssClass, animateRows);\n };\n listener();\n this.addManagedListener(this.eventService, Events.EVENT_HEIGHT_SCALE_CHANGED, listener);\n };\n GridBodyCtrl.prototype.getGridBodyElement = function () {\n return this.eGridBody;\n };\n GridBodyCtrl.prototype.addBodyViewportListener = function () {\n var _this = this;\n // we want to listen for clicks directly on the eBodyViewport, so the user has a way of showing\n // the context menu if no rows or columns are displayed, or user simply clicks outside of a cell\n var listener = function (mouseEvent) {\n if (_this.gridOptionsWrapper.isPreventDefaultOnContextMenu()) {\n mouseEvent.preventDefault();\n }\n var target = mouseEvent.target;\n if (target === _this.eBodyViewport || target === _this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()) {\n // show it\n if (_this.contextMenuFactory) {\n _this.contextMenuFactory.onContextMenu(mouseEvent, null, null, null, null, _this.eGridBody);\n }\n }\n };\n this.addManagedListener(this.eBodyViewport, 'contextmenu', listener);\n this.addManagedListener(this.eBodyViewport, 'wheel', this.onWheel.bind(this));\n };\n GridBodyCtrl.prototype.onWheel = function (e) {\n if (!this.gridOptionsWrapper.isSuppressScrollWhenPopupsAreOpen()) {\n return;\n }\n if (this.popupService.hasAnchoredPopup()) {\n e.preventDefault();\n }\n };\n GridBodyCtrl.prototype.getGui = function () {\n return this.eGridBody;\n };\n // called by rowDragFeature\n GridBodyCtrl.prototype.scrollVertically = function (pixels) {\n var oldScrollPosition = this.eBodyViewport.scrollTop;\n this.bodyScrollFeature.setVerticalScrollPosition(oldScrollPosition + pixels);\n return this.eBodyViewport.scrollTop - oldScrollPosition;\n };\n GridBodyCtrl.prototype.addRowDragListener = function () {\n this.rowDragFeature = this.createManagedBean(new RowDragFeature(this.eBodyViewport));\n this.dragAndDropService.addDropTarget(this.rowDragFeature);\n };\n GridBodyCtrl.prototype.getRowDragFeature = function () {\n return this.rowDragFeature;\n };\n GridBodyCtrl.prototype.setFloatingHeights = function () {\n var pinnedRowModel = this.pinnedRowModel;\n var floatingTopHeight = pinnedRowModel.getPinnedTopTotalHeight();\n if (floatingTopHeight) {\n // adding 1px for cell bottom border\n floatingTopHeight += 1;\n }\n var floatingBottomHeight = pinnedRowModel.getPinnedBottomTotalHeight();\n if (floatingBottomHeight) {\n // adding 1px for cell bottom border\n floatingBottomHeight += 1;\n }\n this.comp.setTopHeight(floatingTopHeight);\n this.comp.setBottomHeight(floatingBottomHeight);\n this.comp.setTopDisplay(floatingTopHeight ? 'inherit' : 'none');\n this.comp.setBottomDisplay(floatingBottomHeight ? 'inherit' : 'none');\n };\n // method will call itself if no available width. this covers if the grid\n // isn't visible, but is just about to be visible.\n GridBodyCtrl.prototype.sizeColumnsToFit = function (nextTimeout) {\n var _this = this;\n var removeScrollWidth = this.isVerticalScrollShowing();\n var scrollWidthToRemove = removeScrollWidth ? this.gridOptionsWrapper.getScrollbarWidth() : 0;\n var bodyViewportWidth = getInnerWidth(this.eBodyViewport);\n var availableWidth = bodyViewportWidth - scrollWidthToRemove;\n if (availableWidth > 0) {\n this.columnModel.sizeColumnsToFit(availableWidth, \"sizeColumnsToFit\");\n return;\n }\n if (nextTimeout === undefined) {\n window.setTimeout(function () {\n _this.sizeColumnsToFit(100);\n }, 0);\n }\n else if (nextTimeout === 100) {\n window.setTimeout(function () {\n _this.sizeColumnsToFit(500);\n }, 100);\n }\n else if (nextTimeout === 500) {\n window.setTimeout(function () {\n _this.sizeColumnsToFit(-1);\n }, 500);\n }\n else {\n console.warn('AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with ' +\n 'zero width, maybe the grid is not visible yet on the screen?');\n }\n };\n // + rangeService\n GridBodyCtrl.prototype.addScrollEventListener = function (listener) {\n this.eBodyViewport.addEventListener('scroll', listener);\n };\n // + focusService\n GridBodyCtrl.prototype.removeScrollEventListener = function (listener) {\n this.eBodyViewport.removeEventListener('scroll', listener);\n };\n __decorate$M([\n Autowired('rowContainerHeightService')\n ], GridBodyCtrl.prototype, \"rowContainerHeightService\", void 0);\n __decorate$M([\n Autowired('ctrlsService')\n ], GridBodyCtrl.prototype, \"ctrlsService\", void 0);\n __decorate$M([\n Autowired('columnModel')\n ], GridBodyCtrl.prototype, \"columnModel\", void 0);\n __decorate$M([\n Autowired('scrollVisibleService')\n ], GridBodyCtrl.prototype, \"scrollVisibleService\", void 0);\n __decorate$M([\n Optional('contextMenuFactory')\n ], GridBodyCtrl.prototype, \"contextMenuFactory\", void 0);\n __decorate$M([\n Autowired('headerNavigationService')\n ], GridBodyCtrl.prototype, \"headerNavigationService\", void 0);\n __decorate$M([\n Autowired('paginationProxy')\n ], GridBodyCtrl.prototype, \"paginationProxy\", void 0);\n __decorate$M([\n Autowired('dragAndDropService')\n ], GridBodyCtrl.prototype, \"dragAndDropService\", void 0);\n __decorate$M([\n Autowired('pinnedRowModel')\n ], GridBodyCtrl.prototype, \"pinnedRowModel\", void 0);\n __decorate$M([\n Autowired('rowRenderer')\n ], GridBodyCtrl.prototype, \"rowRenderer\", void 0);\n __decorate$M([\n Autowired('popupService')\n ], GridBodyCtrl.prototype, \"popupService\", void 0);\n __decorate$M([\n Autowired('mouseEventService')\n ], GridBodyCtrl.prototype, \"mouseEventService\", void 0);\n return GridBodyCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n(function (SelectionHandleType) {\n SelectionHandleType[SelectionHandleType[\"FILL\"] = 0] = \"FILL\";\n SelectionHandleType[SelectionHandleType[\"RANGE\"] = 1] = \"RANGE\";\n})(exports.SelectionHandleType || (exports.SelectionHandleType = {}));\n(function (CellRangeType) {\n CellRangeType[CellRangeType[\"VALUE\"] = 0] = \"VALUE\";\n CellRangeType[CellRangeType[\"DIMENSION\"] = 1] = \"DIMENSION\";\n})(exports.CellRangeType || (exports.CellRangeType = {}));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar CSS_CELL_RANGE_SELECTED = 'ag-cell-range-selected';\nvar CSS_CELL_RANGE_CHART = 'ag-cell-range-chart';\nvar CSS_CELL_RANGE_SINGLE_CELL = 'ag-cell-range-single-cell';\nvar CSS_CELL_RANGE_CHART_CATEGORY = 'ag-cell-range-chart-category';\nvar CSS_CELL_RANGE_HANDLE = 'ag-cell-range-handle';\nvar CSS_CELL_RANGE_TOP = 'ag-cell-range-top';\nvar CSS_CELL_RANGE_RIGHT = 'ag-cell-range-right';\nvar CSS_CELL_RANGE_BOTTOM = 'ag-cell-range-bottom';\nvar CSS_CELL_RANGE_LEFT = 'ag-cell-range-left';\nvar CellRangeFeature = /** @class */ (function () {\n function CellRangeFeature(beans, ctrl) {\n this.beans = beans;\n this.cellCtrl = ctrl;\n }\n CellRangeFeature.prototype.setComp = function (cellComp, eGui) {\n this.cellComp = cellComp;\n this.eGui = eGui;\n this.onRangeSelectionChanged();\n };\n CellRangeFeature.prototype.onRangeSelectionChanged = function () {\n // when using reactUi, given UI is async, it's possible this method is called before the comp is registered\n if (!this.cellComp) {\n return;\n }\n this.rangeCount = this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition());\n this.hasChartRange = this.getHasChartRange();\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED, this.rangeCount !== 0);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + \"-1\", this.rangeCount === 1);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + \"-2\", this.rangeCount === 2);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + \"-3\", this.rangeCount === 3);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + \"-4\", this.rangeCount >= 4);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_CHART, this.hasChartRange);\n setAriaSelected(this.eGui, this.rangeCount > 0 ? true : undefined);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SINGLE_CELL, this.isSingleCell());\n this.updateRangeBorders();\n this.refreshHandle();\n };\n CellRangeFeature.prototype.updateRangeBorders = function () {\n var rangeBorders = this.getRangeBorders();\n var isSingleCell = this.isSingleCell();\n var isTop = !isSingleCell && rangeBorders.top;\n var isRight = !isSingleCell && rangeBorders.right;\n var isBottom = !isSingleCell && rangeBorders.bottom;\n var isLeft = !isSingleCell && rangeBorders.left;\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_TOP, isTop);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_RIGHT, isRight);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_BOTTOM, isBottom);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_LEFT, isLeft);\n };\n CellRangeFeature.prototype.isSingleCell = function () {\n var rangeService = this.beans.rangeService;\n return this.rangeCount === 1 && rangeService && !rangeService.isMoreThanOneCell();\n };\n CellRangeFeature.prototype.getHasChartRange = function () {\n var rangeService = this.beans.rangeService;\n if (!this.rangeCount || !rangeService) {\n return false;\n }\n var cellRanges = rangeService.getCellRanges();\n return cellRanges.length > 0 && cellRanges.every(function (range) { return includes([exports.CellRangeType.DIMENSION, exports.CellRangeType.VALUE], range.type); });\n };\n CellRangeFeature.prototype.updateRangeBordersIfRangeCount = function () {\n // we only need to update range borders if we are in a range\n if (this.rangeCount > 0) {\n this.updateRangeBorders();\n this.refreshHandle();\n }\n };\n CellRangeFeature.prototype.getRangeBorders = function () {\n var _this = this;\n var isRtl = this.beans.gridOptionsWrapper.isEnableRtl();\n var top = false;\n var right = false;\n var bottom = false;\n var left = false;\n var thisCol = this.cellCtrl.getCellPosition().column;\n var _a = this.beans, rangeService = _a.rangeService, columnModel = _a.columnModel;\n var leftCol;\n var rightCol;\n if (isRtl) {\n leftCol = columnModel.getDisplayedColAfter(thisCol);\n rightCol = columnModel.getDisplayedColBefore(thisCol);\n }\n else {\n leftCol = columnModel.getDisplayedColBefore(thisCol);\n rightCol = columnModel.getDisplayedColAfter(thisCol);\n }\n var ranges = rangeService.getCellRanges().filter(function (range) { return rangeService.isCellInSpecificRange(_this.cellCtrl.getCellPosition(), range); });\n // this means we are the first column in the grid\n if (!leftCol) {\n left = true;\n }\n // this means we are the last column in the grid\n if (!rightCol) {\n right = true;\n }\n for (var i = 0; i < ranges.length; i++) {\n if (top && right && bottom && left) {\n break;\n }\n var range = ranges[i];\n var startRow = rangeService.getRangeStartRow(range);\n var endRow = rangeService.getRangeEndRow(range);\n if (!top && this.beans.rowPositionUtils.sameRow(startRow, this.cellCtrl.getCellPosition())) {\n top = true;\n }\n if (!bottom && this.beans.rowPositionUtils.sameRow(endRow, this.cellCtrl.getCellPosition())) {\n bottom = true;\n }\n if (!left && leftCol && range.columns.indexOf(leftCol) < 0) {\n left = true;\n }\n if (!right && rightCol && range.columns.indexOf(rightCol) < 0) {\n right = true;\n }\n }\n return { top: top, right: right, bottom: bottom, left: left };\n };\n CellRangeFeature.prototype.refreshHandle = function () {\n if (!this.beans.rangeService) {\n return;\n }\n var shouldHaveSelectionHandle = this.shouldHaveSelectionHandle();\n if (this.selectionHandle && !shouldHaveSelectionHandle) {\n this.selectionHandle = this.beans.context.destroyBean(this.selectionHandle);\n }\n if (shouldHaveSelectionHandle) {\n this.addSelectionHandle();\n }\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_HANDLE, !!this.selectionHandle);\n };\n CellRangeFeature.prototype.shouldHaveSelectionHandle = function () {\n var _a = this.beans, gridOptionsWrapper = _a.gridOptionsWrapper, rangeService = _a.rangeService;\n var cellRanges = rangeService.getCellRanges();\n var rangesLen = cellRanges.length;\n if (this.rangeCount < 1 || rangesLen < 1) {\n return false;\n }\n var cellRange = last(cellRanges);\n var cellPosition = this.cellCtrl.getCellPosition();\n var isFillHandleAvailable = gridOptionsWrapper.isEnableFillHandle() && !this.cellCtrl.isSuppressFillHandle();\n var isRangeHandleAvailable = gridOptionsWrapper.isEnableRangeHandle();\n var handleIsAvailable = rangesLen === 1 && !this.cellCtrl.isEditing() && (isFillHandleAvailable || isRangeHandleAvailable);\n if (this.hasChartRange) {\n var hasCategoryRange = cellRanges[0].type === exports.CellRangeType.DIMENSION;\n var isCategoryCell = hasCategoryRange && rangeService.isCellInSpecificRange(cellPosition, cellRanges[0]);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_CHART_CATEGORY, isCategoryCell);\n handleIsAvailable = cellRange.type === exports.CellRangeType.VALUE;\n }\n return handleIsAvailable &&\n cellRange.endRow != null &&\n rangeService.isContiguousRange(cellRange) &&\n rangeService.isBottomRightCell(cellRange, cellPosition);\n };\n CellRangeFeature.prototype.addSelectionHandle = function () {\n var _a = this.beans, gridOptionsWrapper = _a.gridOptionsWrapper, rangeService = _a.rangeService;\n var cellRangeType = last(rangeService.getCellRanges()).type;\n var selectionHandleFill = gridOptionsWrapper.isEnableFillHandle() && missing(cellRangeType);\n var type = selectionHandleFill ? exports.SelectionHandleType.FILL : exports.SelectionHandleType.RANGE;\n if (this.selectionHandle && this.selectionHandle.getType() !== type) {\n this.selectionHandle = this.beans.context.destroyBean(this.selectionHandle);\n }\n if (!this.selectionHandle) {\n this.selectionHandle = this.beans.selectionHandleFactory.createSelectionHandle(type);\n }\n this.selectionHandle.refresh(this.cellCtrl);\n };\n CellRangeFeature.prototype.destroy = function () {\n this.beans.context.destroyBean(this.selectionHandle);\n };\n return CellRangeFeature;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$U = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Takes care of:\n * #) Cell Width (including when doing cell spanning, which makes width cover many columns)\n * #) Cell Height (when doing row span, otherwise we don't touch the height as it's just row height)\n * #) Cell Left (the horizontal positioning of the cell, the vertical positioning is on the row)\n */\nvar CellPositionFeature = /** @class */ (function (_super) {\n __extends$U(CellPositionFeature, _super);\n function CellPositionFeature(ctrl, beans) {\n var _this = _super.call(this) || this;\n _this.cellCtrl = ctrl;\n _this.beans = beans;\n _this.column = ctrl.getColumn();\n _this.rowNode = ctrl.getRowNode();\n _this.setupColSpan();\n _this.setupRowSpan();\n return _this;\n }\n CellPositionFeature.prototype.setupRowSpan = function () {\n this.rowSpan = this.column.getRowSpan(this.rowNode);\n };\n CellPositionFeature.prototype.setComp = function (eGui) {\n this.eGui = eGui;\n this.onLeftChanged();\n this.onWidthChanged();\n this.applyRowSpan();\n };\n CellPositionFeature.prototype.onDisplayColumnsChanged = function () {\n var colsSpanning = this.getColSpanningList();\n if (!areEqual(this.colsSpanning, colsSpanning)) {\n this.colsSpanning = colsSpanning;\n this.onWidthChanged();\n this.onLeftChanged(); // left changes when doing RTL\n }\n };\n CellPositionFeature.prototype.setupColSpan = function () {\n // if no col span is active, then we don't set it up, as it would be wasteful of CPU\n if (this.column.getColDef().colSpan == null) {\n return;\n }\n this.colsSpanning = this.getColSpanningList();\n // because we are col spanning, a reorder of the cols can change what cols we are spanning over\n this.addManagedListener(this.beans.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayColumnsChanged.bind(this));\n // because we are spanning over multiple cols, we check for width any time any cols width changes.\n // this is expensive - really we should be explicitly checking only the cols we are spanning over\n // instead of every col, however it would be tricky code to track the cols we are spanning over, so\n // because hardly anyone will be using colSpan, am favouring this easier way for more maintainable code.\n this.addManagedListener(this.beans.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onWidthChanged.bind(this));\n };\n CellPositionFeature.prototype.onWidthChanged = function () {\n if (!this.eGui) {\n return;\n }\n var width = this.getCellWidth();\n this.eGui.style.width = width + \"px\";\n };\n CellPositionFeature.prototype.getCellWidth = function () {\n if (!this.colsSpanning) {\n return this.column.getActualWidth();\n }\n return this.colsSpanning.reduce(function (width, col) { return width + col.getActualWidth(); }, 0);\n };\n CellPositionFeature.prototype.getColSpanningList = function () {\n var colSpan = this.column.getColSpan(this.rowNode);\n var colsSpanning = [];\n // if just one col, the col span is just the column we are in\n if (colSpan === 1) {\n colsSpanning.push(this.column);\n }\n else {\n var pointer = this.column;\n var pinned = this.column.getPinned();\n for (var i = 0; pointer && i < colSpan; i++) {\n colsSpanning.push(pointer);\n pointer = this.beans.columnModel.getDisplayedColAfter(pointer);\n if (!pointer || missing(pointer)) {\n break;\n }\n // we do not allow col spanning to span outside of pinned areas\n if (pinned !== pointer.getPinned()) {\n break;\n }\n }\n }\n return colsSpanning;\n };\n CellPositionFeature.prototype.onLeftChanged = function () {\n if (!this.eGui) {\n return;\n }\n var left = this.modifyLeftForPrintLayout(this.getCellLeft());\n this.eGui.style.left = left + 'px';\n };\n CellPositionFeature.prototype.getCellLeft = function () {\n var mostLeftCol;\n if (this.beans.gridOptionsWrapper.isEnableRtl() && this.colsSpanning) {\n mostLeftCol = last(this.colsSpanning);\n }\n else {\n mostLeftCol = this.column;\n }\n return mostLeftCol.getLeft();\n };\n CellPositionFeature.prototype.modifyLeftForPrintLayout = function (leftPosition) {\n if (!this.cellCtrl.isPrintLayout() || this.column.getPinned() === Constants.PINNED_LEFT) {\n return leftPosition;\n }\n var leftWidth = this.beans.columnModel.getDisplayedColumnsLeftWidth();\n if (this.column.getPinned() === Constants.PINNED_RIGHT) {\n var bodyWidth = this.beans.columnModel.getBodyContainerWidth();\n return leftWidth + bodyWidth + (leftPosition || 0);\n }\n // is in body\n return leftWidth + (leftPosition || 0);\n };\n CellPositionFeature.prototype.applyRowSpan = function () {\n if (this.rowSpan === 1) {\n return;\n }\n var singleRowHeight = this.beans.gridOptionsWrapper.getRowHeightAsNumber();\n var totalRowHeight = singleRowHeight * this.rowSpan;\n this.eGui.style.height = totalRowHeight + \"px\";\n this.eGui.style.zIndex = '1';\n };\n // overriding to make public, as we don't dispose this bean via context\n CellPositionFeature.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n return CellPositionFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$V = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar CellCustomStyleFeature = /** @class */ (function (_super) {\n __extends$V(CellCustomStyleFeature, _super);\n function CellCustomStyleFeature(ctrl, beans) {\n var _this = _super.call(this) || this;\n _this.staticClasses = [];\n _this.cellCtrl = ctrl;\n _this.beans = beans;\n _this.column = ctrl.getColumn();\n _this.rowNode = ctrl.getRowNode();\n return _this;\n }\n CellCustomStyleFeature.prototype.setComp = function (comp) {\n this.cellComp = comp;\n this.applyUserStyles();\n this.applyCellClassRules();\n this.applyClassesFromColDef();\n };\n CellCustomStyleFeature.prototype.applyCellClassRules = function () {\n var _this = this;\n var colDef = this.column.getColDef();\n var cellClassParams = {\n value: this.cellCtrl.getValue(),\n data: this.rowNode.data,\n node: this.rowNode,\n colDef: colDef,\n rowIndex: this.rowNode.rowIndex,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext()\n };\n this.beans.stylingService.processClassRules(colDef.cellClassRules, cellClassParams, function (className) { return _this.cellComp.addOrRemoveCssClass(className, true); }, function (className) { return _this.cellComp.addOrRemoveCssClass(className, false); });\n };\n CellCustomStyleFeature.prototype.applyUserStyles = function () {\n var colDef = this.column.getColDef();\n if (!colDef.cellStyle) {\n return;\n }\n var styles;\n if (typeof colDef.cellStyle === 'function') {\n var cellStyleParams = {\n column: this.column,\n value: this.cellCtrl.getValue(),\n colDef: colDef,\n data: this.rowNode.data,\n node: this.rowNode,\n rowIndex: this.rowNode.rowIndex,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext(),\n };\n var cellStyleFunc = colDef.cellStyle;\n styles = cellStyleFunc(cellStyleParams);\n }\n else {\n styles = colDef.cellStyle;\n }\n this.cellComp.setUserStyles(styles);\n };\n CellCustomStyleFeature.prototype.applyClassesFromColDef = function () {\n var _this = this;\n var colDef = this.column.getColDef();\n var cellClassParams = {\n value: this.cellCtrl.getValue(),\n data: this.rowNode.data,\n node: this.rowNode,\n colDef: colDef,\n rowIndex: this.rowNode.rowIndex,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext()\n };\n if (this.staticClasses.length) {\n this.staticClasses.forEach(function (className) { return _this.cellComp.addOrRemoveCssClass(className, false); });\n }\n this.staticClasses = this.beans.stylingService.getStaticCellClasses(colDef, cellClassParams);\n if (this.staticClasses.length) {\n this.staticClasses.forEach(function (className) { return _this.cellComp.addOrRemoveCssClass(className, true); });\n }\n };\n // overriding to make public, as we don't dispose this bean via context\n CellCustomStyleFeature.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n return CellCustomStyleFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$W = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar TooltipFeature = /** @class */ (function (_super) {\n __extends$W(TooltipFeature, _super);\n function TooltipFeature(ctrl, beans) {\n var _this = _super.call(this) || this;\n _this.ctrl = ctrl;\n _this.beans = beans;\n return _this;\n }\n TooltipFeature.prototype.setComp = function (comp) {\n this.comp = comp;\n this.setupTooltip();\n };\n TooltipFeature.prototype.setupTooltip = function () {\n this.browserTooltips = this.beans.gridOptionsWrapper.isEnableBrowserTooltips();\n this.updateTooltipText();\n if (this.browserTooltips) {\n this.comp.setTitle(this.tooltip != null ? this.tooltip : undefined);\n }\n else {\n this.createTooltipFeatureIfNeeded();\n }\n };\n TooltipFeature.prototype.updateTooltipText = function () {\n this.tooltip = this.ctrl.getTooltipValue();\n };\n TooltipFeature.prototype.createTooltipFeatureIfNeeded = function () {\n var _this = this;\n if (this.genericTooltipFeature != null) {\n return;\n }\n var parent = {\n getTooltipParams: function () { return _this.getTooltipParams(); },\n getGui: function () { return _this.ctrl.getGui(); }\n };\n this.genericTooltipFeature = this.createManagedBean(new CustomTooltipFeature(parent), this.beans.context);\n };\n TooltipFeature.prototype.refreshToolTip = function () {\n this.updateTooltipText();\n if (this.browserTooltips) {\n this.comp.setTitle(this.tooltip != null ? this.tooltip : undefined);\n }\n };\n TooltipFeature.prototype.getTooltipParams = function () {\n var ctrl = this.ctrl;\n var column = ctrl.getColumn ? ctrl.getColumn() : undefined;\n var colDef = ctrl.getColDef ? ctrl.getColDef() : undefined;\n var rowNode = ctrl.getRowNode ? ctrl.getRowNode() : undefined;\n return {\n location: ctrl.getLocation(),\n colDef: colDef,\n column: column,\n rowIndex: ctrl.getRowIndex ? ctrl.getRowIndex() : undefined,\n node: rowNode,\n data: rowNode ? rowNode.data : undefined,\n value: this.getTooltipText(),\n valueFormatted: ctrl.getValueFormatted ? ctrl.getValueFormatted() : undefined,\n };\n };\n TooltipFeature.prototype.getTooltipText = function () {\n return this.tooltip;\n };\n // overriding to make public, as we don't dispose this bean via context\n TooltipFeature.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n return TooltipFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$N = (undefined && undefined.__decorate) || function (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/** Using the IoC has a slight performance consideration, which is no problem most of the\n * time, unless we are trashing objects - which is the case when scrolling and rowComp\n * and cellComp. So for performance reasons, RowComp and CellComp do not get autowired\n * with the IoC. Instead they get passed this object which is all the beans the RowComp\n * and CellComp need. Not autowiring all the cells gives performance improvement. */\nvar Beans = /** @class */ (function () {\n function Beans() {\n }\n Beans.prototype.postConstruct = function () {\n this.doingMasterDetail = this.gridOptionsWrapper.isMasterDetail();\n if (this.gridOptionsWrapper.isRowModelDefault()) {\n this.clientSideRowModel = this.rowModel;\n }\n if (this.gridOptionsWrapper.isRowModelServerSide()) {\n this.serverSideRowModel = this.rowModel;\n }\n };\n __decorate$N([\n Autowired('resizeObserverService')\n ], Beans.prototype, \"resizeObserverService\", void 0);\n __decorate$N([\n Autowired('paginationProxy')\n ], Beans.prototype, \"paginationProxy\", void 0);\n __decorate$N([\n Autowired('context')\n ], Beans.prototype, \"context\", void 0);\n __decorate$N([\n Autowired('columnApi')\n ], Beans.prototype, \"columnApi\", void 0);\n __decorate$N([\n Autowired('gridApi')\n ], Beans.prototype, \"gridApi\", void 0);\n __decorate$N([\n Autowired('gridOptionsWrapper')\n ], Beans.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$N([\n Autowired('expressionService')\n ], Beans.prototype, \"expressionService\", void 0);\n __decorate$N([\n Autowired('rowRenderer')\n ], Beans.prototype, \"rowRenderer\", void 0);\n __decorate$N([\n Autowired('templateService')\n ], Beans.prototype, \"templateService\", void 0);\n __decorate$N([\n Autowired('valueService')\n ], Beans.prototype, \"valueService\", void 0);\n __decorate$N([\n Autowired('eventService')\n ], Beans.prototype, \"eventService\", void 0);\n __decorate$N([\n Autowired('columnModel')\n ], Beans.prototype, \"columnModel\", void 0);\n __decorate$N([\n Autowired('headerNavigationService')\n ], Beans.prototype, \"headerNavigationService\", void 0);\n __decorate$N([\n Autowired('navigationService')\n ], Beans.prototype, \"navigationService\", void 0);\n __decorate$N([\n Autowired('columnAnimationService')\n ], Beans.prototype, \"columnAnimationService\", void 0);\n __decorate$N([\n Optional('rangeService')\n ], Beans.prototype, \"rangeService\", void 0);\n __decorate$N([\n Autowired('focusService')\n ], Beans.prototype, \"focusService\", void 0);\n __decorate$N([\n Optional('contextMenuFactory')\n ], Beans.prototype, \"contextMenuFactory\", void 0);\n __decorate$N([\n Autowired('popupService')\n ], Beans.prototype, \"popupService\", void 0);\n __decorate$N([\n Autowired('valueFormatterService')\n ], Beans.prototype, \"valueFormatterService\", void 0);\n __decorate$N([\n Autowired('stylingService')\n ], Beans.prototype, \"stylingService\", void 0);\n __decorate$N([\n Autowired('columnHoverService')\n ], Beans.prototype, \"columnHoverService\", void 0);\n __decorate$N([\n Autowired('userComponentFactory')\n ], Beans.prototype, \"userComponentFactory\", void 0);\n __decorate$N([\n Autowired('userComponentRegistry')\n ], Beans.prototype, \"userComponentRegistry\", void 0);\n __decorate$N([\n Autowired('animationFrameService')\n ], Beans.prototype, \"animationFrameService\", void 0);\n __decorate$N([\n Autowired('dragAndDropService')\n ], Beans.prototype, \"dragAndDropService\", void 0);\n __decorate$N([\n Autowired('sortController')\n ], Beans.prototype, \"sortController\", void 0);\n __decorate$N([\n Autowired('filterManager')\n ], Beans.prototype, \"filterManager\", void 0);\n __decorate$N([\n Autowired('rowContainerHeightService')\n ], Beans.prototype, \"rowContainerHeightService\", void 0);\n __decorate$N([\n Autowired('frameworkOverrides')\n ], Beans.prototype, \"frameworkOverrides\", void 0);\n __decorate$N([\n Autowired('cellPositionUtils')\n ], Beans.prototype, \"cellPositionUtils\", void 0);\n __decorate$N([\n Autowired('rowPositionUtils')\n ], Beans.prototype, \"rowPositionUtils\", void 0);\n __decorate$N([\n Autowired('selectionService')\n ], Beans.prototype, \"selectionService\", void 0);\n __decorate$N([\n Optional('selectionHandleFactory')\n ], Beans.prototype, \"selectionHandleFactory\", void 0);\n __decorate$N([\n Autowired('rowCssClassCalculator')\n ], Beans.prototype, \"rowCssClassCalculator\", void 0);\n __decorate$N([\n Autowired('rowModel')\n ], Beans.prototype, \"rowModel\", void 0);\n __decorate$N([\n Autowired('ctrlsService')\n ], Beans.prototype, \"ctrlsService\", void 0);\n __decorate$N([\n Autowired('ctrlsFactory')\n ], Beans.prototype, \"ctrlsFactory\", void 0);\n __decorate$N([\n Autowired('agStackComponentsRegistry')\n ], Beans.prototype, \"agStackComponentsRegistry\", void 0);\n __decorate$N([\n Autowired('valueCache')\n ], Beans.prototype, \"valueCache\", void 0);\n __decorate$N([\n Autowired('rowNodeEventThrottle')\n ], Beans.prototype, \"rowNodeEventThrottle\", void 0);\n __decorate$N([\n PostConstruct\n ], Beans.prototype, \"postConstruct\", null);\n Beans = __decorate$N([\n Bean('beans')\n ], Beans);\n return Beans;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$X = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar CellMouseListenerFeature = /** @class */ (function (_super) {\n __extends$X(CellMouseListenerFeature, _super);\n function CellMouseListenerFeature(ctrl, beans, column) {\n var _this = _super.call(this) || this;\n _this.cellCtrl = ctrl;\n _this.beans = beans;\n _this.column = column;\n return _this;\n }\n CellMouseListenerFeature.prototype.onMouseEvent = function (eventName, mouseEvent) {\n if (isStopPropagationForAgGrid(mouseEvent)) {\n return;\n }\n switch (eventName) {\n case 'click':\n this.onCellClicked(mouseEvent);\n break;\n case 'mousedown':\n case 'touchstart':\n this.onMouseDown(mouseEvent);\n break;\n case 'dblclick':\n this.onCellDoubleClicked(mouseEvent);\n break;\n case 'mouseout':\n this.onMouseOut(mouseEvent);\n break;\n case 'mouseover':\n this.onMouseOver(mouseEvent);\n break;\n }\n };\n CellMouseListenerFeature.prototype.onCellClicked = function (mouseEvent) {\n // iPad doesn't have double click - so we need to mimic it to enable editing for iPad.\n if (this.isDoubleClickOnIPad()) {\n this.onCellDoubleClicked(mouseEvent);\n mouseEvent.preventDefault(); // if we don't do this, then iPad zooms in\n return;\n }\n var _a = this.beans, eventService = _a.eventService, gridOptionsWrapper = _a.gridOptionsWrapper;\n var cellClickedEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_CLICKED);\n eventService.dispatchEvent(cellClickedEvent);\n var colDef = this.column.getColDef();\n if (colDef.onCellClicked) {\n // to make callback async, do in a timeout\n window.setTimeout(function () { return colDef.onCellClicked(cellClickedEvent); }, 0);\n }\n var editOnSingleClick = (gridOptionsWrapper.isSingleClickEdit() || colDef.singleClickEdit)\n && !gridOptionsWrapper.isSuppressClickEdit();\n if (editOnSingleClick) {\n this.cellCtrl.startRowOrCellEdit();\n }\n };\n // returns true if on iPad and this is second 'click' event in 200ms\n CellMouseListenerFeature.prototype.isDoubleClickOnIPad = function () {\n if (!isIOSUserAgent() || isEventSupported('dblclick')) {\n return false;\n }\n var nowMillis = new Date().getTime();\n var res = nowMillis - this.lastIPadMouseClickEvent < 200;\n this.lastIPadMouseClickEvent = nowMillis;\n return res;\n };\n CellMouseListenerFeature.prototype.onCellDoubleClicked = function (mouseEvent) {\n var colDef = this.column.getColDef();\n // always dispatch event to eventService\n var cellDoubleClickedEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_DOUBLE_CLICKED);\n this.beans.eventService.dispatchEvent(cellDoubleClickedEvent);\n // check if colDef also wants to handle event\n if (typeof colDef.onCellDoubleClicked === 'function') {\n // to make the callback async, do in a timeout\n window.setTimeout(function () { return colDef.onCellDoubleClicked(cellDoubleClickedEvent); }, 0);\n }\n var editOnDoubleClick = !this.beans.gridOptionsWrapper.isSingleClickEdit()\n && !this.beans.gridOptionsWrapper.isSuppressClickEdit();\n if (editOnDoubleClick) {\n this.cellCtrl.startRowOrCellEdit(null, null, mouseEvent);\n }\n };\n CellMouseListenerFeature.prototype.onMouseDown = function (mouseEvent) {\n var ctrlKey = mouseEvent.ctrlKey, metaKey = mouseEvent.metaKey, shiftKey = mouseEvent.shiftKey;\n var target = mouseEvent.target;\n var _a = this.beans, eventService = _a.eventService, rangeService = _a.rangeService;\n // do not change the range for right-clicks inside an existing range\n if (this.isRightClickInExistingRange(mouseEvent)) {\n return;\n }\n var ranges = rangeService && rangeService.getCellRanges().length != 0;\n if (!shiftKey || !ranges) {\n // We only need to pass true to focusCell when the browser is IE/Edge and we are trying\n // to focus the cell itself. This should never be true if the mousedown was triggered\n // due to a click on a cell editor for example.\n var forceBrowserFocus = (isBrowserEdge()) && !this.cellCtrl.isEditing() && !isFocusableFormField(target);\n this.cellCtrl.focusCell(forceBrowserFocus);\n }\n // if shift clicking, and a range exists, we keep the focus on the cell that started the\n // range as the user then changes the range selection.\n if (shiftKey && ranges) {\n // this stops the cell from getting focused\n mouseEvent.preventDefault();\n }\n // if we are clicking on a checkbox, we need to make sure the cell wrapping that checkbox\n // is focused but we don't want to change the range selection, so return here.\n if (this.containsWidget(target)) {\n return;\n }\n if (rangeService) {\n var thisCell = this.cellCtrl.getCellPosition();\n if (shiftKey) {\n rangeService.extendLatestRangeToCell(thisCell);\n }\n else {\n var ctrlKeyPressed = ctrlKey || metaKey;\n rangeService.setRangeToCell(thisCell, ctrlKeyPressed);\n }\n }\n eventService.dispatchEvent(this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_MOUSE_DOWN));\n };\n CellMouseListenerFeature.prototype.isRightClickInExistingRange = function (mouseEvent) {\n var rangeService = this.beans.rangeService;\n if (rangeService) {\n var cellInRange = rangeService.isCellInAnyRange(this.cellCtrl.getCellPosition());\n if (cellInRange && mouseEvent.button === 2) {\n return true;\n }\n }\n return false;\n };\n CellMouseListenerFeature.prototype.containsWidget = function (target) {\n return isElementChildOfClass(target, 'ag-selection-checkbox', 3);\n };\n CellMouseListenerFeature.prototype.onMouseOut = function (mouseEvent) {\n if (this.mouseStayingInsideCell(mouseEvent)) {\n return;\n }\n var cellMouseOutEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_MOUSE_OUT);\n this.beans.eventService.dispatchEvent(cellMouseOutEvent);\n this.beans.columnHoverService.clearMouseOver();\n };\n CellMouseListenerFeature.prototype.onMouseOver = function (mouseEvent) {\n if (this.mouseStayingInsideCell(mouseEvent)) {\n return;\n }\n var cellMouseOverEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_MOUSE_OVER);\n this.beans.eventService.dispatchEvent(cellMouseOverEvent);\n this.beans.columnHoverService.setMouseOver([this.column]);\n };\n CellMouseListenerFeature.prototype.mouseStayingInsideCell = function (e) {\n if (!e.target || !e.relatedTarget) {\n return false;\n }\n var eGui = this.cellCtrl.getGui();\n var cellContainsTarget = eGui.contains(e.target);\n var cellContainsRelatedTarget = eGui.contains(e.relatedTarget);\n return cellContainsTarget && cellContainsRelatedTarget;\n };\n CellMouseListenerFeature.prototype.destroy = function () {\n };\n return CellMouseListenerFeature;\n}(Beans));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$Y = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar CellKeyboardListenerFeature = /** @class */ (function (_super) {\n __extends$Y(CellKeyboardListenerFeature, _super);\n function CellKeyboardListenerFeature(ctrl, beans, column, rowNode, rowCtrl) {\n var _this = _super.call(this) || this;\n _this.cellCtrl = ctrl;\n _this.beans = beans;\n _this.rowNode = rowNode;\n _this.rowCtrl = rowCtrl;\n return _this;\n }\n CellKeyboardListenerFeature.prototype.setComp = function (eGui) {\n this.eGui = eGui;\n };\n CellKeyboardListenerFeature.prototype.onKeyDown = function (event) {\n var key = event.key;\n switch (key) {\n case KeyCode.ENTER:\n this.onEnterKeyDown(event);\n break;\n case KeyCode.F2:\n this.onF2KeyDown(event);\n break;\n case KeyCode.ESCAPE:\n this.onEscapeKeyDown(event);\n break;\n case KeyCode.TAB:\n this.onTabKeyDown(event);\n break;\n case KeyCode.BACKSPACE:\n case KeyCode.DELETE:\n this.onBackspaceOrDeleteKeyPressed(key, event);\n break;\n case KeyCode.DOWN:\n case KeyCode.UP:\n case KeyCode.RIGHT:\n case KeyCode.LEFT:\n this.onNavigationKeyPressed(event, key);\n break;\n }\n };\n CellKeyboardListenerFeature.prototype.onNavigationKeyPressed = function (event, key) {\n if (this.cellCtrl.isEditing()) {\n return;\n }\n if (event.shiftKey && this.cellCtrl.isRangeSelectionEnabled()) {\n this.onShiftRangeSelect(event);\n }\n else {\n this.beans.navigationService.navigateToNextCell(event, key, this.cellCtrl.getCellPosition(), true);\n }\n // if we don't prevent default, the grid will scroll with the navigation keys\n event.preventDefault();\n };\n CellKeyboardListenerFeature.prototype.onShiftRangeSelect = function (event) {\n if (!this.beans.rangeService) {\n return;\n }\n var endCell = this.beans.rangeService.extendLatestRangeInDirection(event);\n if (endCell) {\n this.beans.navigationService.ensureCellVisible(endCell);\n }\n };\n CellKeyboardListenerFeature.prototype.onTabKeyDown = function (event) {\n this.beans.navigationService.onTabKeyDown(this.cellCtrl, event);\n };\n CellKeyboardListenerFeature.prototype.onBackspaceOrDeleteKeyPressed = function (key, event) {\n if (!this.cellCtrl.isEditing()) {\n this.cellCtrl.startRowOrCellEdit(key, undefined, event);\n }\n };\n CellKeyboardListenerFeature.prototype.onEnterKeyDown = function (e) {\n if (this.cellCtrl.isEditing() || this.rowCtrl.isEditing()) {\n this.cellCtrl.stopEditingAndFocus();\n }\n else {\n if (this.beans.gridOptionsWrapper.isEnterMovesDown()) {\n this.beans.navigationService.navigateToNextCell(null, KeyCode.DOWN, this.cellCtrl.getCellPosition(), false);\n }\n else {\n this.cellCtrl.startRowOrCellEdit(KeyCode.ENTER, undefined, e);\n if (this.cellCtrl.isEditing()) {\n // if we started editing, then we need to prevent default, otherwise the Enter action can get\n // applied to the cell editor. this happened, for example, with largeTextCellEditor where not\n // preventing default results in a 'new line' character getting inserted in the text area\n // when the editing was started\n e.preventDefault();\n }\n }\n }\n };\n CellKeyboardListenerFeature.prototype.onF2KeyDown = function (event) {\n if (!this.cellCtrl.isEditing()) {\n this.cellCtrl.startRowOrCellEdit(KeyCode.F2, undefined, event);\n }\n };\n CellKeyboardListenerFeature.prototype.onEscapeKeyDown = function (event) {\n if (this.cellCtrl.isEditing()) {\n this.cellCtrl.stopRowOrCellEdit(true);\n this.cellCtrl.focusCell(true);\n }\n };\n CellKeyboardListenerFeature.prototype.onKeyPress = function (event) {\n // check this, in case focus is on a (for example) a text field inside the cell,\n // in which cse we should not be listening for these key pressed\n var eventTarget = event.target;\n var eventOnChildComponent = eventTarget !== this.eGui;\n if (eventOnChildComponent || this.cellCtrl.isEditing()) {\n return;\n }\n var pressedChar = String.fromCharCode(event.charCode);\n if (pressedChar === ' ') {\n this.onSpaceKeyPressed(event);\n }\n else if (isEventFromPrintableCharacter(event)) {\n this.cellCtrl.startRowOrCellEdit(null, pressedChar, event);\n // if we don't prevent default, then the keypress also gets applied to the text field\n // (at least when doing the default editor), but we need to allow the editor to decide\n // what it wants to do. we only do this IF editing was started - otherwise it messes\n // up when the use is not doing editing, but using rendering with text fields in cellRenderer\n // (as it would block the the user from typing into text fields).\n event.preventDefault();\n }\n };\n CellKeyboardListenerFeature.prototype.onSpaceKeyPressed = function (event) {\n var gridOptionsWrapper = this.beans.gridOptionsWrapper;\n if (!this.cellCtrl.isEditing() && gridOptionsWrapper.isRowSelection()) {\n var currentSelection = this.rowNode.isSelected();\n var newSelection = !currentSelection;\n if (newSelection || !gridOptionsWrapper.isSuppressRowDeselection()) {\n var groupSelectsFiltered = this.beans.gridOptionsWrapper.isGroupSelectsFiltered();\n var updatedCount = this.rowNode.setSelectedParams({\n newValue: newSelection,\n rangeSelect: event.shiftKey,\n groupSelectsFiltered: groupSelectsFiltered\n });\n if (currentSelection === undefined && updatedCount === 0) {\n this.rowNode.setSelectedParams({\n newValue: false,\n rangeSelect: event.shiftKey,\n groupSelectsFiltered: groupSelectsFiltered\n });\n }\n }\n }\n // prevent default as space key, by default, moves browser scroll down\n event.preventDefault();\n };\n CellKeyboardListenerFeature.prototype.destroy = function () {\n };\n return CellKeyboardListenerFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$Z = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$O = (undefined && undefined.__decorate) || function (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};\nvar DndSourceComp = /** @class */ (function (_super) {\n __extends$Z(DndSourceComp, _super);\n function DndSourceComp(rowNode, column, beans, eCell) {\n var _this = _super.call(this, \"
\") || this;\n _this.rowNode = rowNode;\n _this.column = column;\n _this.beans = beans;\n _this.eCell = eCell;\n return _this;\n }\n DndSourceComp.prototype.postConstruct = function () {\n var eGui = this.getGui();\n eGui.appendChild(createIconNoSpan('rowDrag', this.beans.gridOptionsWrapper, null));\n // we need to stop the event propagation here to avoid starting a range selection while dragging\n this.addGuiEventListener('mousedown', function (e) {\n e.stopPropagation();\n });\n this.addDragSource();\n this.checkVisibility();\n };\n DndSourceComp.prototype.addDragSource = function () {\n this.addGuiEventListener('dragstart', this.onDragStart.bind(this));\n };\n DndSourceComp.prototype.onDragStart = function (dragEvent) {\n var _this = this;\n var providedOnRowDrag = this.column.getColDef().dndSourceOnRowDrag;\n dragEvent.dataTransfer.setDragImage(this.eCell, 0, 0);\n // default behaviour is to convert data to json and set into drag component\n var defaultOnRowDrag = function () {\n try {\n var jsonData = JSON.stringify(_this.rowNode.data);\n dragEvent.dataTransfer.setData('application/json', jsonData);\n dragEvent.dataTransfer.setData('text/plain', jsonData);\n }\n catch (e) {\n // if we cannot convert the data to json, then we do not set the type\n }\n };\n if (providedOnRowDrag) {\n var params = {\n rowNode: this.rowNode, dragEvent: dragEvent,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n providedOnRowDrag(params);\n }\n else {\n defaultOnRowDrag();\n }\n };\n DndSourceComp.prototype.checkVisibility = function () {\n var visible = this.column.isDndSource(this.rowNode);\n this.setDisplayed(visible);\n };\n __decorate$O([\n PostConstruct\n ], DndSourceComp.prototype, \"postConstruct\", null);\n return DndSourceComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$_ = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$b = (undefined && undefined.__assign) || function () {\n __assign$b = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$b.apply(this, arguments);\n};\nvar CSS_CELL = 'ag-cell';\nvar CSS_AUTO_HEIGHT = 'ag-cell-auto-height';\nvar CSS_NORMAL_HEIGHT = 'ag-cell-normal-height';\nvar CSS_CELL_FOCUS = 'ag-cell-focus';\nvar CSS_CELL_FIRST_RIGHT_PINNED = 'ag-cell-first-right-pinned';\nvar CSS_CELL_LAST_LEFT_PINNED = 'ag-cell-last-left-pinned';\nvar CSS_CELL_NOT_INLINE_EDITING = 'ag-cell-not-inline-editing';\nvar CSS_CELL_INLINE_EDITING = 'ag-cell-inline-editing';\nvar CSS_CELL_POPUP_EDITING = 'ag-cell-popup-editing';\nvar CSS_COLUMN_HOVER = 'ag-column-hover';\nvar CSS_CELL_WRAP_TEXT = 'ag-cell-wrap-text';\nvar instanceIdSequence$1 = 0;\nvar CellCtrl = /** @class */ (function (_super) {\n __extends$_(CellCtrl, _super);\n function CellCtrl(column, rowNode, beans, rowCtrl) {\n var _this = _super.call(this) || this;\n _this.suppressRefreshCell = false;\n _this.column = column;\n _this.rowNode = rowNode;\n _this.beans = beans;\n _this.rowCtrl = rowCtrl;\n // unique id to this instance, including the column ID to help with debugging in React as it's used in 'key'\n _this.instanceId = column.getId() + '-' + instanceIdSequence$1++;\n _this.createCellPosition();\n _this.addFeatures();\n return _this;\n }\n CellCtrl.prototype.addFeatures = function () {\n var _this = this;\n this.cellPositionFeature = new CellPositionFeature(this, this.beans);\n this.addDestroyFunc(function () { return _this.cellPositionFeature.destroy(); });\n this.cellCustomStyleFeature = new CellCustomStyleFeature(this, this.beans);\n this.addDestroyFunc(function () { return _this.cellCustomStyleFeature.destroy(); });\n this.cellMouseListenerFeature = new CellMouseListenerFeature(this, this.beans, this.column);\n this.addDestroyFunc(function () { return _this.cellMouseListenerFeature.destroy(); });\n this.cellKeyboardListenerFeature = new CellKeyboardListenerFeature(this, this.beans, this.column, this.rowNode, this.rowCtrl);\n this.addDestroyFunc(function () { return _this.cellKeyboardListenerFeature.destroy(); });\n var rangeSelectionEnabled = this.beans.rangeService && this.beans.gridOptionsWrapper.isEnableRangeSelection();\n if (rangeSelectionEnabled) {\n this.cellRangeFeature = new CellRangeFeature(this.beans, this);\n this.addDestroyFunc(function () { return _this.cellRangeFeature.destroy(); });\n }\n this.addTooltipFeature();\n };\n CellCtrl.prototype.addTooltipFeature = function () {\n var _this = this;\n var getTooltipValue = function () {\n var colDef = _this.column.getColDef();\n var data = _this.rowNode.data;\n if (colDef.tooltipField && exists(data)) {\n return getValueUsingField(data, colDef.tooltipField, _this.column.isTooltipFieldContainsDots());\n }\n var valueGetter = colDef.tooltipValueGetter;\n if (valueGetter) {\n return valueGetter({\n location: 'cell',\n api: _this.beans.gridOptionsWrapper.getApi(),\n columnApi: _this.beans.gridOptionsWrapper.getColumnApi(),\n context: _this.beans.gridOptionsWrapper.getContext(),\n colDef: _this.column.getColDef(),\n column: _this.column,\n rowIndex: _this.cellPosition.rowIndex,\n node: _this.rowNode,\n data: _this.rowNode.data,\n value: _this.value,\n valueFormatted: _this.valueFormatted,\n });\n }\n return null;\n };\n var tooltipCtrl = {\n getColumn: function () { return _this.column; },\n getColDef: function () { return _this.column.getColDef(); },\n getRowIndex: function () { return _this.cellPosition.rowIndex; },\n getRowNode: function () { return _this.rowNode; },\n getGui: function () { return _this.getGui(); },\n getLocation: function () { return 'cell'; },\n getTooltipValue: getTooltipValue,\n // this makes no sense, why is the cell formatted value passed to the tooltip???\n getValueFormatted: function () { return _this.valueFormatted; }\n };\n this.tooltipFeature = new TooltipFeature(tooltipCtrl, this.beans);\n this.addDestroyFunc(function () { return _this.tooltipFeature.destroy(); });\n };\n CellCtrl.prototype.setComp = function (comp, eGui, eCellWrapper, printLayout, startEditing) {\n this.cellComp = comp;\n this.gow = this.beans.gridOptionsWrapper;\n this.eGui = eGui;\n this.eCellWrapper = eCellWrapper;\n this.printLayout = printLayout;\n // we force to make sure formatter gets called at least once,\n // even if value has not changed (is is undefined)\n this.updateAndFormatValue(true);\n this.addDomData();\n this.onCellFocused();\n this.applyStaticCssClasses();\n this.setWrapText();\n this.onFirstRightPinnedChanged();\n this.onLastLeftPinnedChanged();\n this.onColumnHover();\n this.setupControlComps();\n this.setupAutoHeight();\n this.setAriaColIndex();\n if (!this.gow.isSuppressCellFocus()) {\n this.cellComp.setTabIndex(-1);\n }\n var colIdSanitised = escapeString(this.column.getId());\n this.cellComp.setColId(colIdSanitised);\n this.cellComp.setRole('gridcell');\n this.cellPositionFeature.setComp(eGui);\n this.cellCustomStyleFeature.setComp(comp);\n this.tooltipFeature.setComp(comp);\n this.cellKeyboardListenerFeature.setComp(this.eGui);\n if (this.cellRangeFeature) {\n this.cellRangeFeature.setComp(comp, eGui);\n }\n if (startEditing && this.isCellEditable()) {\n this.startEditing();\n }\n else {\n this.showValue();\n }\n };\n CellCtrl.prototype.setupAutoHeight = function () {\n var _this = this;\n if (!this.column.isAutoHeight()) {\n return;\n }\n var eAutoHeightContainer = this.eCellWrapper;\n var eParentCell = eAutoHeightContainer.parentElement;\n // taking minRowHeight from getRowHeightForNode means the getRowHeight() callback is used,\n // thus allowing different min heights for different rows.\n var minRowHeight = this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height;\n var measureHeight = function (timesCalled) {\n if (_this.editing) {\n return;\n }\n // because of the retry's below, it's possible the retry's go beyond\n // the rows life.\n if (!_this.isAlive()) {\n return;\n }\n var _a = getElementSize(eParentCell), paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom;\n var wrapperHeight = eAutoHeightContainer.offsetHeight;\n var autoHeight = wrapperHeight + paddingTop + paddingBottom;\n if (timesCalled < 5) {\n // if not in doc yet, means framework not yet inserted, so wait for next VM turn,\n // maybe it will be ready next VM turn\n var doc = _this.beans.gridOptionsWrapper.getDocument();\n var notYetInDom = !doc || !doc.contains(eAutoHeightContainer);\n // this happens in React, where React hasn't put any content in. we say 'possibly'\n // as a) may not be React and b) the cell could be empty anyway\n var possiblyNoContentYet = autoHeight == 0;\n if (notYetInDom || possiblyNoContentYet) {\n _this.beans.frameworkOverrides.setTimeout(function () { return measureHeight(timesCalled + 1); }, 0);\n return;\n }\n }\n var newHeight = Math.max(autoHeight, minRowHeight);\n _this.rowNode.setRowAutoHeight(newHeight, _this.column);\n };\n var listener = function () { return measureHeight(0); };\n // do once to set size in case size doesn't change, common when cell is blank\n listener();\n var destroyResizeObserver = this.beans.resizeObserverService.observeResize(eAutoHeightContainer, listener);\n this.addDestroyFunc(function () {\n destroyResizeObserver();\n _this.rowNode.setRowAutoHeight(undefined, _this.column);\n });\n };\n CellCtrl.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n CellCtrl.prototype.showValue = function (forceNewCellRendererInstance) {\n if (forceNewCellRendererInstance === void 0) { forceNewCellRendererInstance = false; }\n var valueToDisplay = this.valueFormatted != null ? this.valueFormatted : this.value;\n var params = this.createCellRendererParams();\n var compDetails = this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(), params);\n this.cellComp.setRenderDetails(compDetails, valueToDisplay, forceNewCellRendererInstance);\n this.refreshHandle();\n };\n CellCtrl.prototype.setupControlComps = function () {\n var colDef = this.column.getColDef();\n this.includeSelection = this.isIncludeControl(colDef.checkboxSelection);\n this.includeRowDrag = this.isIncludeControl(colDef.rowDrag);\n this.includeDndSource = this.isIncludeControl(colDef.dndSource);\n this.cellComp.setIncludeSelection(this.includeSelection);\n this.cellComp.setIncludeDndSource(this.includeDndSource);\n this.cellComp.setIncludeRowDrag(this.includeRowDrag);\n };\n CellCtrl.prototype.isForceWrapper = function () {\n // text selection requires the value to be wrapped in another element\n var forceWrapper = this.beans.gridOptionsWrapper.isEnableCellTextSelection() || this.column.isAutoHeight();\n return forceWrapper;\n };\n CellCtrl.prototype.isIncludeControl = function (value) {\n var rowNodePinned = this.rowNode.rowPinned != null;\n var isFunc = typeof value === 'function';\n var res = rowNodePinned ? false : isFunc || value === true;\n return res;\n };\n CellCtrl.prototype.refreshShouldDestroy = function () {\n var colDef = this.column.getColDef();\n var selectionChanged = this.includeSelection != this.isIncludeControl(colDef.checkboxSelection);\n var rowDragChanged = this.includeRowDrag != this.isIncludeControl(colDef.rowDrag);\n var dndSourceChanged = this.includeDndSource != this.isIncludeControl(colDef.dndSource);\n return selectionChanged || rowDragChanged || dndSourceChanged;\n };\n // either called internally if single cell editing, or called by rowRenderer if row editing\n CellCtrl.prototype.startEditing = function (key, charPress, cellStartedEdit, event) {\n if (key === void 0) { key = null; }\n if (charPress === void 0) { charPress = null; }\n if (cellStartedEdit === void 0) { cellStartedEdit = false; }\n if (event === void 0) { event = null; }\n var _a, _b;\n if (!this.isCellEditable() || this.editing) {\n return;\n }\n var editorParams = this.createCellEditorParams(key, charPress, cellStartedEdit);\n var colDef = this.column.getColDef();\n var compDetails = this.beans.userComponentFactory.getCellEditorDetails(colDef, editorParams);\n // if cellEditorSelector was used, we give preference to popup and popupPosition from the selector\n var popup = ((_a = compDetails) === null || _a === void 0 ? void 0 : _a.popupFromSelector) != null ? compDetails.popupFromSelector : !!colDef.cellEditorPopup;\n var position = ((_b = compDetails) === null || _b === void 0 ? void 0 : _b.popupPositionFromSelector) != null ? compDetails.popupPositionFromSelector : colDef.cellEditorPopupPosition;\n this.setEditing(true, popup);\n this.cellComp.setEditDetails(compDetails, popup, position);\n var e = this.createEvent(event, Events.EVENT_CELL_EDITING_STARTED);\n this.beans.eventService.dispatchEvent(e);\n };\n CellCtrl.prototype.setEditing = function (editing, inPopup) {\n if (inPopup === void 0) { inPopup = false; }\n if (this.editing === editing) {\n return;\n }\n this.editing = editing;\n this.editingInPopup = inPopup;\n this.setInlineEditingClass();\n };\n // pass in 'true' to cancel the editing.\n CellCtrl.prototype.stopRowOrCellEdit = function (cancel) {\n if (cancel === void 0) { cancel = false; }\n if (this.beans.gridOptionsWrapper.isFullRowEdit()) {\n this.rowCtrl.stopRowEditing(cancel);\n }\n else {\n this.stopEditing(cancel);\n }\n };\n CellCtrl.prototype.onPopupEditorClosed = function () {\n if (!this.isEditing()) {\n return;\n }\n // note: this happens because of a click outside of the grid or if the popupEditor\n // is closed with `Escape` key. if another cell was clicked, then the editing will\n // have already stopped and returned on the conditional above.\n this.stopEditingAndFocus();\n };\n CellCtrl.prototype.takeValueFromCellEditor = function (cancel) {\n var noValueResult = { newValueExists: false };\n if (cancel) {\n return noValueResult;\n }\n var cellEditor = this.cellComp.getCellEditor();\n if (!cellEditor) {\n return noValueResult;\n }\n var userWantsToCancel = cellEditor.isCancelAfterEnd && cellEditor.isCancelAfterEnd();\n if (userWantsToCancel) {\n return noValueResult;\n }\n var newValue = cellEditor.getValue();\n return {\n newValue: newValue,\n newValueExists: true\n };\n };\n /**\n * @returns `True` if the value changes, otherwise `False`.\n */\n CellCtrl.prototype.saveNewValue = function (oldValue, newValue) {\n if (newValue === oldValue) {\n return false;\n }\n if (this.beans.gridOptionsWrapper.isReadOnlyEdit()) {\n this.dispatchEventForSaveValueReadOnly(oldValue, newValue);\n return false;\n }\n // we suppressRefreshCell because the call to rowNode.setDataValue() results in change detection\n // getting triggered, which results in all cells getting refreshed. we do not want this refresh\n // to happen on this call as we want to call it explicitly below. otherwise refresh gets called twice.\n // if we only did this refresh (and not the one below) then the cell would flash and not be forced.\n this.suppressRefreshCell = true;\n var valueChanged = this.rowNode.setDataValue(this.column, newValue);\n this.suppressRefreshCell = false;\n return valueChanged;\n };\n CellCtrl.prototype.dispatchEventForSaveValueReadOnly = function (oldValue, newValue) {\n var rowNode = this.rowNode;\n var event = {\n type: Events.EVENT_CELL_EDIT_REQUEST,\n event: null,\n rowIndex: rowNode.rowIndex,\n rowPinned: rowNode.rowPinned,\n column: this.column,\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi,\n colDef: this.column.getColDef(),\n context: this.beans.gridOptionsWrapper.getContext(),\n data: rowNode.data,\n node: rowNode,\n oldValue: oldValue,\n newValue: newValue,\n value: newValue,\n source: undefined\n };\n this.beans.eventService.dispatchEvent(event);\n };\n /**\n * Ends the Cell Editing\n * @param cancel `True` if the edit process is being canceled.\n * @returns `True` if the value of the `GridCell` has been updated, otherwise `False`.\n */\n CellCtrl.prototype.stopEditing = function (cancel) {\n if (cancel === void 0) { cancel = false; }\n if (!this.editing) {\n return false;\n }\n var _a = this.takeValueFromCellEditor(cancel), newValue = _a.newValue, newValueExists = _a.newValueExists;\n var oldValue = this.getValueFromValueService();\n var valueChanged = false;\n if (newValueExists) {\n valueChanged = this.saveNewValue(oldValue, newValue);\n }\n this.setEditing(false);\n this.cellComp.setEditDetails(); // passing nothing stops editing\n this.updateAndFormatValue();\n this.refreshCell({ forceRefresh: true, suppressFlash: true });\n this.dispatchEditingStoppedEvent(oldValue, newValue);\n return valueChanged;\n };\n CellCtrl.prototype.dispatchEditingStoppedEvent = function (oldValue, newValue) {\n var editingStoppedEvent = __assign$b(__assign$b({}, this.createEvent(null, Events.EVENT_CELL_EDITING_STOPPED)), { oldValue: oldValue,\n newValue: newValue });\n this.beans.eventService.dispatchEvent(editingStoppedEvent);\n };\n // if we are editing inline, then we don't have the padding in the cell (set in the themes)\n // to allow the text editor full access to the entire cell\n CellCtrl.prototype.setInlineEditingClass = function () {\n if (!this.isAlive()) {\n return;\n }\n // ag-cell-inline-editing - appears when user is inline editing\n // ag-cell-not-inline-editing - appears when user is no inline editing\n // ag-cell-popup-editing - appears when user is editing cell in popup (appears on the cell, not on the popup)\n // note: one of {ag-cell-inline-editing, ag-cell-not-inline-editing} is always present, they toggle.\n // however {ag-cell-popup-editing} shows when popup, so you have both {ag-cell-popup-editing}\n // and {ag-cell-not-inline-editing} showing at the same time.\n var editingInline = this.editing && !this.editingInPopup;\n var popupEditorShowing = this.editing && this.editingInPopup;\n this.cellComp.addOrRemoveCssClass(CSS_CELL_INLINE_EDITING, editingInline);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING, !editingInline);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_POPUP_EDITING, popupEditorShowing);\n this.rowCtrl.setInlineEditingCss(this.editing);\n };\n // this is needed as the JS CellComp still allows isPopup() on the CellEditor class, so\n // it's possible the editor is in a popup even though it's not configured via the colDef as so\n CellCtrl.prototype.hackSayEditingInPopup = function () {\n if (this.editingInPopup) {\n return;\n }\n this.editingInPopup = true;\n this.setInlineEditingClass();\n };\n CellCtrl.prototype.createCellEditorParams = function (key, charPress, cellStartedEdit) {\n var res = {\n value: this.getValueFromValueService(),\n key: key,\n eventKey: key,\n charPress: charPress,\n column: this.column,\n colDef: this.column.getColDef(),\n rowIndex: this.getCellPosition().rowIndex,\n node: this.rowNode,\n data: this.rowNode.data,\n api: this.beans.gridOptionsWrapper.getApi(),\n cellStartedEdit: cellStartedEdit,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext(),\n onKeyDown: this.onKeyDown.bind(this),\n stopEditing: this.stopEditingAndFocus.bind(this),\n eGridCell: this.getGui(),\n parseValue: this.parseValue.bind(this),\n formatValue: this.formatValue.bind(this)\n };\n return res;\n };\n CellCtrl.prototype.createCellRendererParams = function () {\n var _this = this;\n var addRowCompListener = function (eventType, listener) {\n console.warn('AG Grid: since AG Grid v26, params.addRowCompListener() is deprecated. If you need this functionality, please contact AG Grid support and advise why so that we can revert with an appropriate workaround, as we dont have any valid use cases for it. This method was originally provided as a work around to know when cells were destroyed in AG Grid before custom Cell Renderers could be provided.');\n _this.rowCtrl.addEventListener(eventType, listener);\n };\n var res = {\n value: this.value,\n valueFormatted: this.valueFormatted,\n getValue: this.getValueFromValueService.bind(this),\n setValue: function (value) { return _this.beans.valueService.setValue(_this.rowNode, _this.column, value); },\n formatValue: this.formatValue.bind(this),\n data: this.rowNode.data,\n node: this.rowNode,\n colDef: this.column.getColDef(),\n column: this.column,\n rowIndex: this.getCellPosition().rowIndex,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext(),\n refreshCell: this.refreshCell.bind(this),\n eGridCell: this.getGui(),\n eParentOfValue: this.cellComp.getParentOfValue(),\n registerRowDragger: function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) { return _this.registerRowDragger(rowDraggerElement, dragStartPixels, suppressVisibilityChange); },\n // this function is not documented anywhere, so we could drop it\n // it was in the olden days to allow user to register for when rendered\n // row was removed (the row comp was removed), however now that the user\n // can provide components for cells, the destroy method gets call when this\n // happens so no longer need to fire event.\n addRowCompListener: addRowCompListener\n };\n return res;\n };\n CellCtrl.prototype.parseValue = function (newValue) {\n var colDef = this.column.getColDef();\n var params = {\n node: this.rowNode,\n data: this.rowNode.data,\n oldValue: this.getValue(),\n newValue: newValue,\n colDef: colDef,\n column: this.column,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext()\n };\n var valueParser = colDef.valueParser;\n return exists(valueParser) ? this.beans.expressionService.evaluate(valueParser, params) : newValue;\n };\n CellCtrl.prototype.setFocusOutOnEditor = function () {\n if (!this.editing) {\n return;\n }\n var cellEditor = this.cellComp.getCellEditor();\n if (cellEditor && cellEditor.focusOut) {\n cellEditor.focusOut();\n }\n };\n CellCtrl.prototype.setFocusInOnEditor = function () {\n if (!this.editing) {\n return;\n }\n var cellEditor = this.cellComp.getCellEditor();\n if (cellEditor && cellEditor.focusIn) {\n // if the editor is present, then we just focus it\n cellEditor.focusIn();\n }\n else {\n // if the editor is not present, it means async cell editor (eg React fibre)\n // and we are trying to set focus before the cell editor is present, so we\n // focus the cell instead\n this.focusCell(true);\n }\n };\n CellCtrl.prototype.onCellChanged = function (event) {\n // because of async in React, the cellComp may not be set yet, if no cellComp then we are\n // yet to initialise the cell, so no need to refresh.\n if (!this.cellComp) {\n return;\n }\n var eventImpactsThisCell = event.column === this.column;\n if (eventImpactsThisCell) {\n this.refreshCell({});\n }\n };\n // + stop editing {forceRefresh: true, suppressFlash: true}\n // + event cellChanged {}\n // + cellRenderer.params.refresh() {} -> method passes 'as is' to the cellRenderer, so params could be anything\n // + rowCtrl: event dataChanged {suppressFlash: !update, newData: !update}\n // + rowCtrl: api refreshCells() {animate: true/false}\n // + rowRenderer: api softRefreshView() {}\n CellCtrl.prototype.refreshCell = function (params) {\n // if we are in the middle of 'stopEditing', then we don't refresh here, as refresh gets called explicitly\n if (this.suppressRefreshCell || this.editing) {\n return;\n }\n // In React, due to async, it's possible a refresh was asked for before the CellComp\n // has been set. If this happens, we skip the refresh, as the cell is going to be\n // initialised anyway once the CellComp is set.\n if (!this.cellComp) {\n return;\n }\n var colDef = this.column.getColDef();\n var newData = params != null && !!params.newData;\n var suppressFlash = (params != null && !!params.suppressFlash) || !!colDef.suppressCellFlash;\n // we always refresh if cell has no value - this can happen when user provides Cell Renderer and the\n // cell renderer doesn't rely on a value, instead it could be looking directly at the data, or maybe\n // printing the current time (which would be silly)???. Generally speaking\n // non of {field, valueGetter, showRowGroup} is bad in the users application, however for this edge case, it's\n // best always refresh and take the performance hit rather than never refresh and users complaining in support\n // that cells are not updating.\n var noValueProvided = colDef.field == null && colDef.valueGetter == null && colDef.showRowGroup == null;\n var forceRefresh = (params && params.forceRefresh) || noValueProvided || newData;\n var valuesDifferent = this.updateAndFormatValue();\n var dataNeedsUpdating = forceRefresh || valuesDifferent;\n if (dataNeedsUpdating) {\n // if it's 'new data', then we don't refresh the cellRenderer, even if refresh method is available.\n // this is because if the whole data is new (ie we are showing stock price 'BBA' now and not 'SSD')\n // then we are not showing a movement in the stock price, rather we are showing different stock.\n this.showValue(newData);\n // we don't want to flash the cells when processing a filter change, as otherwise the UI would\n // be to busy. see comment in FilterManager with regards processingFilterChange\n var processingFilterChange = this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();\n var flashCell = !suppressFlash && !processingFilterChange &&\n (this.beans.gridOptionsWrapper.isEnableCellChangeFlash() || colDef.enableCellChangeFlash);\n if (flashCell) {\n this.flashCell();\n }\n this.cellCustomStyleFeature.applyUserStyles();\n this.cellCustomStyleFeature.applyClassesFromColDef();\n }\n this.refreshToolTip();\n // we do cellClassRules even if the value has not changed, so that users who have rules that\n // look at other parts of the row (where the other part of the row might of changed) will work.\n this.cellCustomStyleFeature.applyCellClassRules();\n };\n // cell editors call this, when they want to stop for reasons other\n // than what we pick up on. eg selecting from a dropdown ends editing.\n CellCtrl.prototype.stopEditingAndFocus = function (suppressNavigateAfterEdit) {\n if (suppressNavigateAfterEdit === void 0) { suppressNavigateAfterEdit = false; }\n this.stopRowOrCellEdit();\n this.focusCell(true);\n if (!suppressNavigateAfterEdit) {\n this.navigateAfterEdit();\n }\n };\n CellCtrl.prototype.navigateAfterEdit = function () {\n var fullRowEdit = this.beans.gridOptionsWrapper.isFullRowEdit();\n if (fullRowEdit) {\n return;\n }\n var enterMovesDownAfterEdit = this.beans.gridOptionsWrapper.isEnterMovesDownAfterEdit();\n if (enterMovesDownAfterEdit) {\n this.beans.navigationService.navigateToNextCell(null, KeyCode.DOWN, this.getCellPosition(), false);\n }\n };\n // user can also call this via API\n CellCtrl.prototype.flashCell = function (delays) {\n var flashDelay = delays && delays.flashDelay;\n var fadeDelay = delays && delays.fadeDelay;\n this.animateCell('data-changed', flashDelay, fadeDelay);\n };\n CellCtrl.prototype.animateCell = function (cssName, flashDelay, fadeDelay) {\n var _this = this;\n var fullName = \"ag-cell-\" + cssName;\n var animationFullName = \"ag-cell-\" + cssName + \"-animation\";\n var gridOptionsWrapper = this.beans.gridOptionsWrapper;\n if (!flashDelay) {\n flashDelay = gridOptionsWrapper.getCellFlashDelay();\n }\n if (!exists(fadeDelay)) {\n fadeDelay = gridOptionsWrapper.getCellFadeDelay();\n }\n // we want to highlight the cells, without any animation\n this.cellComp.addOrRemoveCssClass(fullName, true);\n this.cellComp.addOrRemoveCssClass(animationFullName, false);\n // then once that is applied, we remove the highlight with animation\n window.setTimeout(function () {\n _this.cellComp.addOrRemoveCssClass(fullName, false);\n _this.cellComp.addOrRemoveCssClass(animationFullName, true);\n _this.eGui.style.transition = \"background-color \" + fadeDelay + \"ms\";\n window.setTimeout(function () {\n // and then to leave things as we got them, we remove the animation\n _this.cellComp.addOrRemoveCssClass(animationFullName, false);\n _this.eGui.style.transition = '';\n }, fadeDelay);\n }, flashDelay);\n };\n CellCtrl.prototype.onFlashCells = function (event) {\n if (!this.cellComp) {\n return;\n }\n var cellId = this.beans.cellPositionUtils.createId(this.getCellPosition());\n var shouldFlash = event.cells[cellId];\n if (shouldFlash) {\n this.animateCell('highlight');\n }\n };\n CellCtrl.prototype.isCellEditable = function () {\n return this.column.isCellEditable(this.rowNode);\n };\n CellCtrl.prototype.isSuppressFillHandle = function () {\n return this.column.isSuppressFillHandle();\n };\n CellCtrl.prototype.formatValue = function (value) {\n var res = this.callValueFormatter(value);\n return res != null ? res : value;\n };\n CellCtrl.prototype.callValueFormatter = function (value) {\n return this.beans.valueFormatterService.formatValue(this.column, this.rowNode, value);\n };\n CellCtrl.prototype.updateAndFormatValue = function (force) {\n if (force === void 0) { force = false; }\n var oldValue = this.value;\n var oldValueFormatted = this.valueFormatted;\n this.value = this.getValueFromValueService();\n this.valueFormatted = this.callValueFormatter(this.value);\n var valuesDifferent = force ? true :\n !this.valuesAreEqual(oldValue, this.value) || this.valueFormatted != oldValueFormatted;\n return valuesDifferent;\n };\n CellCtrl.prototype.valuesAreEqual = function (val1, val2) {\n // if the user provided an equals method, use that, otherwise do simple comparison\n var colDef = this.column.getColDef();\n return colDef.equals ? colDef.equals(val1, val2) : val1 === val2;\n };\n CellCtrl.prototype.getComp = function () {\n return this.cellComp;\n };\n CellCtrl.prototype.getValueFromValueService = function () {\n // if we don't check this, then the grid will render leaf groups as open even if we are not\n // allowing the user to open leaf groups. confused? remember for pivot mode we don't allow\n // opening leaf groups, so we have to force leafGroups to be closed in case the user expanded\n // them via the API, or user user expanded them in the UI before turning on pivot mode\n var lockedClosedGroup = this.rowNode.leafGroup && this.beans.columnModel.isPivotMode();\n var isOpenGroup = this.rowNode.group && this.rowNode.expanded && !this.rowNode.footer && !lockedClosedGroup;\n // are we showing group footers\n var groupFootersEnabled = this.beans.gridOptionsWrapper.isGroupIncludeFooter();\n // if doing footers, we normally don't show agg data at group level when group is open\n var groupAlwaysShowAggData = this.beans.gridOptionsWrapper.isGroupSuppressBlankHeader();\n // if doing grouping and footers, we don't want to include the agg value\n // in the header when the group is open\n var ignoreAggData = (isOpenGroup && groupFootersEnabled) && !groupAlwaysShowAggData;\n var value = this.beans.valueService.getValue(this.column, this.rowNode, false, ignoreAggData);\n return value;\n };\n CellCtrl.prototype.getValue = function () {\n return this.value;\n };\n CellCtrl.prototype.getValueFormatted = function () {\n return this.valueFormatted;\n };\n CellCtrl.prototype.addDomData = function () {\n var _this = this;\n var element = this.getGui();\n this.beans.gridOptionsWrapper.setDomData(element, CellCtrl.DOM_DATA_KEY_CELL_CTRL, this);\n this.addDestroyFunc(function () { return _this.beans.gridOptionsWrapper.setDomData(element, CellCtrl.DOM_DATA_KEY_CELL_CTRL, null); });\n };\n CellCtrl.prototype.createEvent = function (domEvent, eventType) {\n var event = {\n type: eventType,\n node: this.rowNode,\n data: this.rowNode.data,\n value: this.value,\n column: this.column,\n colDef: this.column.getColDef(),\n context: this.beans.gridOptionsWrapper.getContext(),\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi,\n rowPinned: this.rowNode.rowPinned,\n event: domEvent,\n rowIndex: this.rowNode.rowIndex\n };\n return event;\n };\n CellCtrl.prototype.onKeyPress = function (event) {\n this.cellKeyboardListenerFeature.onKeyPress(event);\n };\n CellCtrl.prototype.onKeyDown = function (event) {\n this.cellKeyboardListenerFeature.onKeyDown(event);\n };\n CellCtrl.prototype.onMouseEvent = function (eventName, mouseEvent) {\n this.cellMouseListenerFeature.onMouseEvent(eventName, mouseEvent);\n };\n CellCtrl.prototype.getGui = function () {\n return this.eGui;\n };\n CellCtrl.prototype.refreshToolTip = function () {\n this.tooltipFeature.refreshToolTip();\n };\n CellCtrl.prototype.getColSpanningList = function () {\n return this.cellPositionFeature.getColSpanningList();\n };\n CellCtrl.prototype.onLeftChanged = function () {\n if (!this.cellComp) {\n return;\n }\n this.cellPositionFeature.onLeftChanged();\n };\n CellCtrl.prototype.onDisplayedColumnsChanged = function () {\n if (!this.eGui) {\n return;\n }\n this.setAriaColIndex();\n };\n CellCtrl.prototype.setAriaColIndex = function () {\n var colIdx = this.beans.columnModel.getAriaColumnIndex(this.column);\n setAriaColIndex(this.getGui(), colIdx); // for react, we don't use JSX, as it slowed down column moving\n };\n CellCtrl.prototype.isSuppressNavigable = function () {\n return this.column.isSuppressNavigable(this.rowNode);\n };\n CellCtrl.prototype.onWidthChanged = function () {\n return this.cellPositionFeature.onWidthChanged();\n };\n CellCtrl.prototype.getColumn = function () {\n return this.column;\n };\n CellCtrl.prototype.getRowNode = function () {\n return this.rowNode;\n };\n CellCtrl.prototype.getBeans = function () {\n return this.beans;\n };\n CellCtrl.prototype.isPrintLayout = function () {\n return this.printLayout;\n };\n CellCtrl.prototype.appendChild = function (htmlElement) {\n this.eGui.appendChild(htmlElement);\n };\n CellCtrl.prototype.refreshHandle = function () {\n if (this.editing) {\n return;\n }\n if (this.cellRangeFeature) {\n this.cellRangeFeature.refreshHandle();\n }\n };\n CellCtrl.prototype.getCellPosition = function () {\n return this.cellPosition;\n };\n CellCtrl.prototype.isEditing = function () {\n return this.editing;\n };\n // called by rowRenderer when user navigates via tab key\n CellCtrl.prototype.startRowOrCellEdit = function (key, charPress, event) {\n if (event === void 0) { event = null; }\n if (this.beans.gridOptionsWrapper.isFullRowEdit()) {\n this.rowCtrl.startRowEditing(key, charPress, this);\n }\n else {\n this.startEditing(key, charPress, true, event);\n }\n };\n CellCtrl.prototype.getRowCtrl = function () {\n return this.rowCtrl;\n };\n CellCtrl.prototype.getRowPosition = function () {\n return {\n rowIndex: this.cellPosition.rowIndex,\n rowPinned: this.cellPosition.rowPinned\n };\n };\n CellCtrl.prototype.updateRangeBordersIfRangeCount = function () {\n if (!this.cellComp) {\n return;\n }\n if (this.cellRangeFeature) {\n this.cellRangeFeature.updateRangeBordersIfRangeCount();\n }\n };\n CellCtrl.prototype.onRangeSelectionChanged = function () {\n if (!this.cellComp) {\n return;\n }\n if (this.cellRangeFeature) {\n this.cellRangeFeature.onRangeSelectionChanged();\n }\n };\n CellCtrl.prototype.isRangeSelectionEnabled = function () {\n return this.cellRangeFeature != null;\n };\n CellCtrl.prototype.focusCell = function (forceBrowserFocus) {\n if (forceBrowserFocus === void 0) { forceBrowserFocus = false; }\n this.beans.focusService.setFocusedCell(this.getCellPosition().rowIndex, this.column, this.rowNode.rowPinned, forceBrowserFocus);\n };\n CellCtrl.prototype.onRowIndexChanged = function () {\n // when index changes, this influences items that need the index, so we update the\n // grid cell so they are working off the new index.\n this.createCellPosition();\n // when the index of the row changes, ie means the cell may have lost or gained focus\n this.onCellFocused();\n // check range selection\n if (this.cellRangeFeature) {\n this.cellRangeFeature.onRangeSelectionChanged();\n }\n };\n CellCtrl.prototype.onFirstRightPinnedChanged = function () {\n if (!this.cellComp) {\n return;\n }\n var firstRightPinned = this.column.isFirstRightPinned();\n this.cellComp.addOrRemoveCssClass(CSS_CELL_FIRST_RIGHT_PINNED, firstRightPinned);\n };\n CellCtrl.prototype.onLastLeftPinnedChanged = function () {\n if (!this.cellComp) {\n return;\n }\n var lastLeftPinned = this.column.isLastLeftPinned();\n this.cellComp.addOrRemoveCssClass(CSS_CELL_LAST_LEFT_PINNED, lastLeftPinned);\n };\n CellCtrl.prototype.onCellFocused = function (event) {\n if (!this.cellComp || this.gow.isSuppressCellFocus()) {\n return;\n }\n var cellFocused = this.beans.focusService.isCellFocused(this.cellPosition);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_FOCUS, cellFocused);\n // see if we need to force browser focus - this can happen if focus is programmatically set\n if (cellFocused && event && event.forceBrowserFocus) {\n var focusEl = this.cellComp.getFocusableElement();\n focusEl.focus();\n }\n // if another cell was focused, and we are editing, then stop editing\n var fullRowEdit = this.beans.gridOptionsWrapper.isFullRowEdit();\n if (!cellFocused && !fullRowEdit && this.editing) {\n this.stopRowOrCellEdit();\n }\n };\n CellCtrl.prototype.createCellPosition = function () {\n this.cellPosition = {\n rowIndex: this.rowNode.rowIndex,\n rowPinned: makeNull(this.rowNode.rowPinned),\n column: this.column\n };\n };\n // CSS Classes that only get applied once, they never change\n CellCtrl.prototype.applyStaticCssClasses = function () {\n this.cellComp.addOrRemoveCssClass(CSS_CELL, true);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING, true);\n // normal cells fill the height of the row. autoHeight cells have no height to let them\n // fit the height of content.\n var autoHeight = this.column.isAutoHeight() == true;\n this.cellComp.addOrRemoveCssClass(CSS_AUTO_HEIGHT, autoHeight);\n this.cellComp.addOrRemoveCssClass(CSS_NORMAL_HEIGHT, !autoHeight);\n };\n CellCtrl.prototype.onColumnHover = function () {\n if (!this.cellComp) {\n return;\n }\n if (!this.beans.gridOptionsWrapper.isColumnHoverHighlight()) {\n return;\n }\n var isHovered = this.beans.columnHoverService.isHovered(this.column);\n this.cellComp.addOrRemoveCssClass(CSS_COLUMN_HOVER, isHovered);\n };\n CellCtrl.prototype.onNewColumnsLoaded = function () {\n if (!this.cellComp) {\n return;\n }\n this.setWrapText();\n if (!this.editing) {\n this.refreshCell({ forceRefresh: true, suppressFlash: true });\n }\n };\n CellCtrl.prototype.setWrapText = function () {\n var value = this.column.getColDef().wrapText == true;\n this.cellComp.addOrRemoveCssClass(CSS_CELL_WRAP_TEXT, value);\n };\n CellCtrl.prototype.dispatchCellContextMenuEvent = function (event) {\n var colDef = this.column.getColDef();\n var cellContextMenuEvent = this.createEvent(event, Events.EVENT_CELL_CONTEXT_MENU);\n this.beans.eventService.dispatchEvent(cellContextMenuEvent);\n if (colDef.onCellContextMenu) {\n // to make the callback async, do in a timeout\n window.setTimeout(function () { return colDef.onCellContextMenu(cellContextMenuEvent); }, 0);\n }\n };\n CellCtrl.prototype.getCellRenderer = function () {\n return this.cellComp ? this.cellComp.getCellRenderer() : null;\n };\n CellCtrl.prototype.getCellEditor = function () {\n return this.cellComp ? this.cellComp.getCellEditor() : null;\n };\n CellCtrl.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n CellCtrl.prototype.createSelectionCheckbox = function () {\n var cbSelectionComponent = new CheckboxSelectionComponent();\n this.beans.context.createBean(cbSelectionComponent);\n cbSelectionComponent.init({ rowNode: this.rowNode, column: this.column });\n // put the checkbox in before the value\n return cbSelectionComponent;\n };\n CellCtrl.prototype.createDndSource = function () {\n var dndSourceComp = new DndSourceComp(this.rowNode, this.column, this.beans, this.eGui);\n this.beans.context.createBean(dndSourceComp);\n return dndSourceComp;\n };\n CellCtrl.prototype.registerRowDragger = function (customElement, dragStartPixels, suppressVisibilityChange) {\n var _this = this;\n // if previously existed, then we are only updating\n if (this.customRowDragComp) {\n this.customRowDragComp.setDragElement(customElement, dragStartPixels);\n return;\n }\n var newComp = this.createRowDragComp(customElement, dragStartPixels, suppressVisibilityChange);\n if (newComp) {\n this.customRowDragComp = newComp;\n this.addDestroyFunc(function () { return _this.beans.context.destroyBean(newComp); });\n }\n };\n CellCtrl.prototype.createRowDragComp = function (customElement, dragStartPixels, suppressVisibilityChange) {\n var _this = this;\n var pagination = this.beans.gridOptionsWrapper.isPagination();\n var rowDragManaged = this.beans.gridOptionsWrapper.isRowDragManaged();\n var clientSideRowModelActive = this.beans.gridOptionsWrapper.isRowModelDefault();\n if (rowDragManaged) {\n // row dragging only available in default row model\n if (!clientSideRowModelActive) {\n doOnce(function () { return console.warn('AG Grid: managed row dragging is only allowed in the Client Side Row Model'); }, 'CellComp.addRowDragging');\n return;\n }\n if (pagination) {\n doOnce(function () { return console.warn('AG Grid: managed row dragging is not possible when doing pagination'); }, 'CellComp.addRowDragging');\n return;\n }\n }\n // otherwise (normal case) we are creating a RowDraggingComp for the first time\n var rowDragComp = new RowDragComp(function () { return _this.value; }, this.rowNode, this.column, customElement, dragStartPixels, suppressVisibilityChange);\n this.beans.context.createBean(rowDragComp);\n return rowDragComp;\n };\n CellCtrl.DOM_DATA_KEY_CELL_CTRL = 'cellCtrl';\n return CellCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$$ = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read$8 = (undefined && undefined.__read) || function (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};\nvar __spread$6 = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$8(arguments[i]));\n return ar;\n};\nvar RowType;\n(function (RowType) {\n RowType[\"Normal\"] = \"Normal\";\n RowType[\"FullWidth\"] = \"FullWidth\";\n RowType[\"FullWidthLoading\"] = \"FullWidthLoading\";\n RowType[\"FullWidthGroup\"] = \"FullWidthGroup\";\n RowType[\"FullWidthDetail\"] = \"FullWidthDetail\";\n})(RowType || (RowType = {}));\nvar instanceIdSequence$2 = 0;\nvar RowCtrl = /** @class */ (function (_super) {\n __extends$$(RowCtrl, _super);\n function RowCtrl(rowNode, beans, animateIn, useAnimationFrameForCreate, printLayout) {\n var _this = _super.call(this) || this;\n _this.allRowGuis = [];\n _this.active = true;\n _this.centerCellCtrls = { list: [], map: {} };\n _this.leftCellCtrls = { list: [], map: {} };\n _this.rightCellCtrls = { list: [], map: {} };\n _this.lastMouseDownOnDragger = false;\n _this.updateColumnListsPending = false;\n _this.beans = beans;\n _this.rowNode = rowNode;\n _this.paginationPage = _this.beans.paginationProxy.getCurrentPage();\n _this.useAnimationFrameForCreate = useAnimationFrameForCreate;\n _this.printLayout = printLayout;\n _this.instanceId = rowNode.id + '-' + instanceIdSequence$2++;\n _this.setAnimateFlags(animateIn);\n _this.rowFocused = _this.beans.focusService.isRowFocused(_this.rowNode.rowIndex, _this.rowNode.rowPinned);\n _this.rowLevel = _this.beans.rowCssClassCalculator.calculateRowLevel(_this.rowNode);\n _this.setRowType();\n _this.addListeners();\n _this.setInitialRowTop();\n return _this;\n }\n RowCtrl.prototype.getBeans = function () {\n return this.beans;\n };\n RowCtrl.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n RowCtrl.prototype.setComp = function (rowComp, element, containerType) {\n var gui = { rowComp: rowComp, element: element, containerType: containerType };\n this.allRowGuis.push(gui);\n if (containerType === exports.RowContainerType.LEFT) {\n this.leftGui = gui;\n }\n else if (containerType === exports.RowContainerType.RIGHT) {\n this.rightGui = gui;\n }\n else if (containerType === exports.RowContainerType.FULL_WIDTH) {\n this.fullWidthGui = gui;\n }\n else {\n this.centerGui = gui;\n }\n var allNormalPresent = this.leftGui != null && this.rightGui != null && this.centerGui != null;\n var fullWidthPresent = this.fullWidthGui != null;\n if (allNormalPresent || fullWidthPresent) {\n this.initialiseRowComps();\n }\n };\n RowCtrl.prototype.isCacheable = function () {\n return this.rowType === RowType.FullWidthDetail\n && this.beans.gridOptionsWrapper.isKeepDetailRows();\n };\n RowCtrl.prototype.setCached = function (cached) {\n var displayValue = cached ? 'none' : '';\n this.allRowGuis.forEach(function (rg) { return rg.element.style.display = displayValue; });\n };\n RowCtrl.prototype.initialiseRowComps = function () {\n var _this = this;\n var gow = this.beans.gridOptionsWrapper;\n this.onRowHeightChanged();\n this.updateRowIndexes();\n this.setFocusedClasses();\n this.setStylesFromGridOptions();\n if (gow.isRowSelection() && this.rowNode.selectable) {\n this.onRowSelected();\n }\n this.updateColumnLists(!this.useAnimationFrameForCreate);\n if (this.slideRowIn) {\n executeNextVMTurn(this.onTopChanged.bind(this));\n }\n if (this.fadeRowIn) {\n executeNextVMTurn(function () {\n _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', false); });\n });\n }\n var businessKey = this.getRowBusinessKey();\n var rowIdSanitised = escapeString(this.rowNode.id);\n var businessKeySanitised = escapeString(businessKey);\n this.allRowGuis.forEach(function (gui) {\n var comp = gui.rowComp;\n comp.setRole('row');\n var initialRowClasses = _this.getInitialRowClasses(gui.containerType);\n initialRowClasses.forEach(function (name) { return comp.addOrRemoveCssClass(name, true); });\n if (_this.rowNode.group) {\n setAriaExpanded(gui.element, _this.rowNode.expanded == true);\n }\n if (rowIdSanitised != null) {\n comp.setRowId(rowIdSanitised);\n }\n if (businessKeySanitised != null) {\n comp.setRowBusinessKey(businessKeySanitised);\n }\n if (_this.isFullWidth() && !_this.beans.gridOptionsWrapper.isSuppressCellFocus()) {\n comp.setTabIndex(-1);\n }\n // DOM DATA\n gow.setDomData(gui.element, RowCtrl.DOM_DATA_KEY_ROW_CTRL, _this);\n _this.addDestroyFunc(function () { return gow.setDomData(gui.element, RowCtrl.DOM_DATA_KEY_ROW_CTRL, null); });\n // adding hover functionality adds listener to this row, so we\n // do it lazily in an animation frame\n if (_this.useAnimationFrameForCreate) {\n _this.beans.animationFrameService.createTask(_this.addHoverFunctionality.bind(_this, gui.element), _this.rowNode.rowIndex, 'createTasksP2');\n }\n else {\n _this.addHoverFunctionality(gui.element);\n }\n if (_this.isFullWidth()) {\n _this.setupFullWidth(gui);\n }\n if (gow.isRowDragEntireRow()) {\n _this.addRowDraggerToRow(gui);\n }\n if (_this.useAnimationFrameForCreate) {\n // the height animation we only want active after the row is alive for 1 second.\n // this stops the row animation working when rows are initially crated. otherwise\n // auto-height rows get inserted into the dom and resized immediately, which gives\n // very bad UX (eg 10 rows get inserted, then all 10 expand, look particularly bad\n // when scrolling). so this makes sure when rows are shown for the first time, they\n // are resized immediately without animation.\n _this.beans.animationFrameService.addDestroyTask(function () {\n if (!_this.isAlive()) {\n return;\n }\n gui.rowComp.addOrRemoveCssClass('ag-after-created', true);\n });\n }\n });\n this.executeProcessRowPostCreateFunc();\n };\n RowCtrl.prototype.addRowDraggerToRow = function (gui) {\n var gow = this.beans.gridOptionsWrapper;\n if (gow.isEnableRangeSelection()) {\n doOnce(function () {\n console.warn('AG Grid: Setting `rowDragEntireRow: true` in the gridOptions doesn\\'t work with `enableRangeSelection: true`');\n }, 'rowDragAndRangeSelectionEnabled');\n return;\n }\n var rowDragComp = new RowDragComp(function () { return '1 row'; }, this.rowNode, undefined, gui.element, undefined, true);\n this.createManagedBean(rowDragComp, this.beans.context);\n };\n RowCtrl.prototype.setupFullWidth = function (gui) {\n var pinned = this.getPinnedForContainer(gui.containerType);\n var params = this.createFullWidthParams(gui.element, pinned);\n var masterDetailModuleLoaded = ModuleRegistry.isRegistered(exports.ModuleNames.MasterDetailModule);\n if (this.rowType == RowType.FullWidthDetail && !masterDetailModuleLoaded) {\n if (ModuleRegistry.isPackageBased()) {\n console.warn(\"AG Grid: cell renderer 'agDetailCellRenderer' (for master detail) not found. Can only be used with ag-grid-enterprise package.\");\n }\n else {\n console.warn(\"AG Grid: cell renderer 'agDetailCellRenderer' (for master detail) not found. Can only be used with AG Grid Enterprise Module \" + exports.ModuleNames.MasterDetailModule);\n }\n return;\n }\n var compDetails;\n switch (this.rowType) {\n case RowType.FullWidthDetail:\n compDetails = this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(params);\n break;\n case RowType.FullWidthGroup:\n compDetails = this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(params);\n break;\n case RowType.FullWidthLoading:\n compDetails = this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(params);\n break;\n default:\n compDetails = this.beans.userComponentFactory.getFullWidthCellRendererDetails(params);\n break;\n }\n gui.rowComp.showFullWidth(compDetails);\n };\n RowCtrl.prototype.isPrintLayout = function () {\n return this.printLayout;\n };\n // use by autoWidthCalculator, as it clones the elements\n RowCtrl.prototype.getCellElement = function (column) {\n var cellCtrl = this.getCellCtrl(column);\n return cellCtrl ? cellCtrl.getGui() : null;\n };\n RowCtrl.prototype.executeProcessRowPostCreateFunc = function () {\n var func = this.beans.gridOptionsWrapper.getProcessRowPostCreateFunc();\n if (!func) {\n return;\n }\n var params = {\n eRow: this.centerGui ? this.centerGui.element : undefined,\n ePinnedLeftRow: this.leftGui ? this.leftGui.element : undefined,\n ePinnedRightRow: this.rightGui ? this.rightGui.element : undefined,\n node: this.rowNode,\n rowIndex: this.rowNode.rowIndex,\n addRenderedRowListener: this.addEventListener.bind(this),\n };\n func(params);\n };\n RowCtrl.prototype.setRowType = function () {\n var isStub = this.rowNode.stub;\n var isFullWidthCell = this.rowNode.isFullWidthCell();\n var isDetailCell = this.beans.doingMasterDetail && this.rowNode.detail;\n var pivotMode = this.beans.columnModel.isPivotMode();\n // we only use full width for groups, not footers. it wouldn't make sense to include footers if not looking\n // for totals. if users complain about this, then we should introduce a new property 'footerUseEntireRow'\n // so each can be set independently (as a customer complained about footers getting full width, hence\n // introducing this logic)\n var isGroupRow = !!this.rowNode.group && !this.rowNode.footer;\n var isFullWidthGroup = isGroupRow && this.beans.gridOptionsWrapper.isGroupUseEntireRow(pivotMode);\n if (isStub) {\n this.rowType = RowType.FullWidthLoading;\n }\n else if (isDetailCell) {\n this.rowType = RowType.FullWidthDetail;\n }\n else if (isFullWidthCell) {\n this.rowType = RowType.FullWidth;\n }\n else if (isFullWidthGroup) {\n this.rowType = RowType.FullWidthGroup;\n }\n else {\n this.rowType = RowType.Normal;\n }\n };\n RowCtrl.prototype.updateColumnLists = function (suppressAnimationFrame) {\n var _this = this;\n if (suppressAnimationFrame === void 0) { suppressAnimationFrame = false; }\n if (this.isFullWidth()) {\n return;\n }\n var noAnimation = suppressAnimationFrame\n || this.beans.gridOptionsWrapper.isSuppressAnimationFrame()\n || this.printLayout;\n if (noAnimation) {\n this.updateColumnListsImpl();\n return;\n }\n if (this.updateColumnListsPending) {\n return;\n }\n this.beans.animationFrameService.createTask(function () {\n if (!_this.active) {\n return;\n }\n _this.updateColumnListsImpl();\n }, this.rowNode.rowIndex, 'createTasksP1');\n this.updateColumnListsPending = true;\n };\n RowCtrl.prototype.createCellCtrls = function (prev, cols, pinned) {\n var _this = this;\n if (pinned === void 0) { pinned = null; }\n var res = {\n list: [],\n map: {}\n };\n var addCell = function (colInstanceId, cellCtrl) {\n res.list.push(cellCtrl);\n res.map[colInstanceId] = cellCtrl;\n };\n cols.forEach(function (col) {\n // we use instanceId's rather than colId as it's possible there is a Column with same Id,\n // but it's referring to a different column instance. Happens a lot with pivot, as pivot col id's are\n // reused eg pivot_0, pivot_1 etc\n var colInstanceId = col.getInstanceId();\n var cellCtrl = prev.map[colInstanceId];\n if (!cellCtrl) {\n cellCtrl = new CellCtrl(col, _this.rowNode, _this.beans, _this);\n }\n addCell(colInstanceId, cellCtrl);\n });\n prev.list.forEach(function (prevCellCtrl) {\n var cellInResult = res.map[prevCellCtrl.getColumn().getInstanceId()] != null;\n if (cellInResult) {\n return;\n }\n var keepCell = !_this.isCellEligibleToBeRemoved(prevCellCtrl, pinned);\n if (keepCell) {\n addCell(prevCellCtrl.getColumn().getInstanceId(), prevCellCtrl);\n return;\n }\n prevCellCtrl.destroy();\n });\n return res;\n };\n RowCtrl.prototype.updateColumnListsImpl = function () {\n var _this = this;\n this.updateColumnListsPending = false;\n var columnModel = this.beans.columnModel;\n if (this.printLayout) {\n this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, columnModel.getAllDisplayedColumns());\n this.leftCellCtrls = { list: [], map: {} };\n this.rightCellCtrls = { list: [], map: {} };\n }\n else {\n var centerCols = columnModel.getViewportCenterColumnsForRow(this.rowNode);\n this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, centerCols);\n var leftCols = columnModel.getDisplayedLeftColumnsForRow(this.rowNode);\n this.leftCellCtrls = this.createCellCtrls(this.leftCellCtrls, leftCols, Constants.PINNED_LEFT);\n var rightCols = columnModel.getDisplayedRightColumnsForRow(this.rowNode);\n this.rightCellCtrls = this.createCellCtrls(this.rightCellCtrls, rightCols, Constants.PINNED_RIGHT);\n }\n this.allRowGuis.forEach(function (item) {\n var cellControls = item.containerType === exports.RowContainerType.LEFT ? _this.leftCellCtrls :\n item.containerType === exports.RowContainerType.RIGHT ? _this.rightCellCtrls : _this.centerCellCtrls;\n item.rowComp.setCellCtrls(cellControls.list);\n });\n };\n RowCtrl.prototype.isCellEligibleToBeRemoved = function (cellCtrl, nextContainerPinned) {\n var REMOVE_CELL = true;\n var KEEP_CELL = false;\n // always remove the cell if it's not rendered or if it's in the wrong pinned location\n var column = cellCtrl.getColumn();\n if (column.getPinned() != nextContainerPinned) {\n return REMOVE_CELL;\n }\n // we want to try and keep editing and focused cells\n var editing = cellCtrl.isEditing();\n var focused = this.beans.focusService.isCellFocused(cellCtrl.getCellPosition());\n var mightWantToKeepCell = editing || focused;\n if (mightWantToKeepCell) {\n var column_1 = cellCtrl.getColumn();\n var displayedColumns = this.beans.columnModel.getAllDisplayedColumns();\n var cellStillDisplayed = displayedColumns.indexOf(column_1) >= 0;\n return cellStillDisplayed ? KEEP_CELL : REMOVE_CELL;\n }\n return REMOVE_CELL;\n };\n RowCtrl.prototype.setAnimateFlags = function (animateIn) {\n if (animateIn) {\n var oldRowTopExists = exists(this.rowNode.oldRowTop);\n // if the row had a previous position, we slide it in (animate row top)\n this.slideRowIn = oldRowTopExists;\n // if the row had no previous position, we fade it in (animate\n this.fadeRowIn = !oldRowTopExists;\n }\n else {\n this.slideRowIn = false;\n this.fadeRowIn = false;\n }\n };\n RowCtrl.prototype.isEditing = function () {\n return this.editingRow;\n };\n RowCtrl.prototype.stopRowEditing = function (cancel) {\n this.stopEditing(cancel);\n };\n RowCtrl.prototype.isFullWidth = function () {\n return this.rowType !== RowType.Normal;\n };\n RowCtrl.prototype.getRowType = function () {\n return this.rowType;\n };\n RowCtrl.prototype.refreshFullWidth = function () {\n var _this = this;\n // returns 'true' if refresh succeeded\n var tryRefresh = function (gui, pinned) {\n if (!gui) {\n return true;\n } // no refresh needed\n var cellRenderer = gui.rowComp.getFullWidthCellRenderer();\n // no cell renderer, either means comp not yet ready, or comp ready but now reference\n // to it (happens in react when comp is stateless). if comp not ready, we don't need to\n // refresh, however we don't know which one, so we refresh to cover the case where it's\n // react comp without reference so need to force a refresh\n if (!cellRenderer) {\n return false;\n }\n // no refresh method present, so can't refresh, hard refresh needed\n if (!cellRenderer.refresh) {\n return false;\n }\n var params = _this.createFullWidthParams(gui.element, pinned);\n var refreshSucceeded = cellRenderer.refresh(params);\n return refreshSucceeded;\n };\n var fullWidthSuccess = tryRefresh(this.fullWidthGui, null);\n var centerSuccess = tryRefresh(this.centerGui, null);\n var leftSuccess = tryRefresh(this.leftGui, Constants.PINNED_LEFT);\n var rightSuccess = tryRefresh(this.rightGui, Constants.PINNED_RIGHT);\n var allFullWidthRowsRefreshed = fullWidthSuccess && centerSuccess && leftSuccess && rightSuccess;\n return allFullWidthRowsRefreshed;\n };\n RowCtrl.prototype.addListeners = function () {\n this.addManagedListener(this.rowNode, RowNode.EVENT_HEIGHT_CHANGED, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_SELECTED, this.onRowSelected.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_INDEX_CHANGED, this.onRowIndexChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_TOP_CHANGED, this.onTopChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_EXPANDED_CHANGED, this.updateExpandedCss.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_HAS_CHILDREN_CHANGED, this.updateExpandedCss.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.onRowNodeDataChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.onRowNodeCellChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_HIGHLIGHT_CHANGED, this.onRowNodeHighlightChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_DRAGGING_CHANGED, this.onRowNodeDraggingChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_UI_LEVEL_CHANGED, this.onUiLevelChanged.bind(this));\n var eventService = this.beans.eventService;\n this.addManagedListener(eventService, Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED, this.onPaginationPixelOffsetChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_HEIGHT_SCALE_CHANGED, this.onTopChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_VIRTUAL_COLUMNS_CHANGED, this.onVirtualColumnsChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_CELL_FOCUSED, this.onCellFocusChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_PAGINATION_CHANGED, this.onPaginationChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_MODEL_UPDATED, this.onModelUpdated.bind(this));\n this.addManagedListener(eventService, Events.EVENT_COLUMN_MOVED, this.onColumnMoved.bind(this));\n this.addListenersForCellComps();\n };\n RowCtrl.prototype.onColumnMoved = function () {\n this.updateColumnLists();\n };\n RowCtrl.prototype.addListenersForCellComps = function () {\n var _this = this;\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_INDEX_CHANGED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onRowIndexChanged(); });\n });\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, function (event) {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onCellChanged(event); });\n });\n };\n RowCtrl.prototype.onRowNodeDataChanged = function (event) {\n // if this is an update, we want to refresh, as this will allow the user to put in a transition\n // into the cellRenderer refresh method. otherwise this might be completely new data, in which case\n // we will want to completely replace the cells\n this.getAllCellCtrls().forEach(function (cellCtrl) {\n return cellCtrl.refreshCell({\n suppressFlash: !event.update,\n newData: !event.update\n });\n });\n // check for selected also, as this could be after lazy loading of the row data, in which case\n // the id might of just gotten set inside the row and the row selected state may of changed\n // as a result. this is what happens when selected rows are loaded in virtual pagination.\n // - niall note - since moving to the stub component, this may no longer be true, as replacing\n // the stub component now replaces the entire row\n this.onRowSelected();\n // as data has changed, then the style and class needs to be recomputed\n this.postProcessCss();\n };\n RowCtrl.prototype.onRowNodeCellChanged = function () {\n // as data has changed, then the style and class needs to be recomputed\n this.postProcessCss();\n };\n RowCtrl.prototype.postProcessCss = function () {\n this.setStylesFromGridOptions();\n this.postProcessClassesFromGridOptions();\n this.postProcessRowClassRules();\n this.postProcessRowDragging();\n };\n RowCtrl.prototype.onRowNodeHighlightChanged = function () {\n var highlighted = this.rowNode.highlighted;\n this.allRowGuis.forEach(function (gui) {\n var aboveOn = highlighted === exports.RowHighlightPosition.Above;\n var belowOn = highlighted === exports.RowHighlightPosition.Below;\n gui.rowComp.addOrRemoveCssClass('ag-row-highlight-above', aboveOn);\n gui.rowComp.addOrRemoveCssClass('ag-row-highlight-below', belowOn);\n });\n };\n RowCtrl.prototype.onRowNodeDraggingChanged = function () {\n this.postProcessRowDragging();\n };\n RowCtrl.prototype.postProcessRowDragging = function () {\n var dragging = this.rowNode.dragging;\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-dragging', dragging); });\n };\n RowCtrl.prototype.updateExpandedCss = function () {\n var expandable = this.rowNode.isExpandable();\n var expanded = this.rowNode.expanded == true;\n this.allRowGuis.forEach(function (gui) {\n gui.rowComp.addOrRemoveCssClass('ag-row-group', expandable);\n gui.rowComp.addOrRemoveCssClass('ag-row-group-expanded', expandable && expanded);\n gui.rowComp.addOrRemoveCssClass('ag-row-group-contracted', expandable && !expanded);\n setAriaExpanded(gui.element, expandable && expanded);\n });\n };\n RowCtrl.prototype.onDisplayedColumnsChanged = function () {\n // we skip animations for onDisplayedColumnChanged, as otherwise the client could remove columns and\n // then set data, and any old valueGetter's (ie from cols that were removed) would still get called.\n this.updateColumnLists(true);\n if (this.beans.columnModel.wasAutoRowHeightEverActive()) {\n this.rowNode.checkAutoHeights();\n }\n };\n RowCtrl.prototype.onVirtualColumnsChanged = function () {\n this.updateColumnLists();\n };\n RowCtrl.prototype.getRowPosition = function () {\n return {\n rowPinned: makeNull(this.rowNode.rowPinned),\n rowIndex: this.rowNode.rowIndex\n };\n };\n RowCtrl.prototype.onKeyboardNavigate = function (keyboardEvent) {\n var currentFullWidthComp = this.allRowGuis.find(function (c) { return c.element.contains(keyboardEvent.target); });\n var currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;\n var isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;\n if (!isFullWidthContainerFocused) {\n return;\n }\n var node = this.rowNode;\n var lastFocusedCell = this.beans.focusService.getFocusedCell();\n var cellPosition = {\n rowIndex: node.rowIndex,\n rowPinned: node.rowPinned,\n column: (lastFocusedCell && lastFocusedCell.column)\n };\n this.beans.navigationService.navigateToNextCell(keyboardEvent, keyboardEvent.key, cellPosition, true);\n keyboardEvent.preventDefault();\n };\n RowCtrl.prototype.onTabKeyDown = function (keyboardEvent) {\n if (keyboardEvent.defaultPrevented || isStopPropagationForAgGrid(keyboardEvent)) {\n return;\n }\n var currentFullWidthComp = this.allRowGuis.find(function (c) { return c.element.contains(keyboardEvent.target); });\n var currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;\n var isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;\n var nextEl = null;\n if (!isFullWidthContainerFocused) {\n nextEl = this.beans.focusService.findNextFocusableElement(currentFullWidthContainer, false, keyboardEvent.shiftKey);\n }\n if ((this.isFullWidth() && isFullWidthContainerFocused) || !nextEl) {\n this.beans.navigationService.onTabKeyDown(this, keyboardEvent);\n }\n };\n RowCtrl.prototype.onFullWidthRowFocused = function (event) {\n var _a;\n var node = this.rowNode;\n var isFocused = this.isFullWidth() && event.rowIndex === node.rowIndex && event.rowPinned == node.rowPinned;\n var element = this.fullWidthGui ? this.fullWidthGui.element : (_a = this.centerGui) === null || _a === void 0 ? void 0 : _a.element;\n if (!element) {\n return;\n } // can happen with react ui, comp not yet ready\n element.classList.toggle('ag-full-width-focus', isFocused);\n if (isFocused) {\n // we don't scroll normal rows into view when we focus them, so we don't want\n // to scroll Full Width rows either.\n element.focus({ preventScroll: true });\n }\n };\n RowCtrl.prototype.refreshCell = function (cellCtrl) {\n this.centerCellCtrls = this.removeCellCtrl(this.centerCellCtrls, cellCtrl);\n this.leftCellCtrls = this.removeCellCtrl(this.leftCellCtrls, cellCtrl);\n this.rightCellCtrls = this.removeCellCtrl(this.rightCellCtrls, cellCtrl);\n this.updateColumnLists();\n };\n RowCtrl.prototype.removeCellCtrl = function (prev, cellCtrlToRemove) {\n var res = {\n list: [],\n map: {}\n };\n prev.list.forEach(function (cellCtrl) {\n if (cellCtrl === cellCtrlToRemove) {\n return;\n }\n res.list.push(cellCtrl);\n res.map[cellCtrl.getInstanceId()] = cellCtrl;\n });\n return res;\n };\n RowCtrl.prototype.onMouseEvent = function (eventName, mouseEvent) {\n switch (eventName) {\n case 'dblclick':\n this.onRowDblClick(mouseEvent);\n break;\n case 'click':\n this.onRowClick(mouseEvent);\n break;\n case 'touchstart':\n case 'mousedown':\n this.onRowMouseDown(mouseEvent);\n break;\n }\n };\n RowCtrl.prototype.createRowEvent = function (type, domEvent) {\n return {\n type: type,\n node: this.rowNode,\n data: this.rowNode.data,\n rowIndex: this.rowNode.rowIndex,\n rowPinned: this.rowNode.rowPinned,\n context: this.beans.gridOptionsWrapper.getContext(),\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n event: domEvent\n };\n };\n RowCtrl.prototype.createRowEventWithSource = function (type, domEvent) {\n var event = this.createRowEvent(type, domEvent);\n // when first developing this, we included the rowComp in the event.\n // this seems very weird. so when introducing the event types, i left the 'source'\n // out of the type, and just include the source in the two places where this event\n // was fired (rowClicked and rowDoubleClicked). it doesn't make sense for any\n // users to be using this, as the rowComp isn't an object we expose, so would be\n // very surprising if a user was using it.\n event.source = this;\n return event;\n };\n RowCtrl.prototype.onRowDblClick = function (mouseEvent) {\n if (isStopPropagationForAgGrid(mouseEvent)) {\n return;\n }\n var agEvent = this.createRowEventWithSource(Events.EVENT_ROW_DOUBLE_CLICKED, mouseEvent);\n this.beans.eventService.dispatchEvent(agEvent);\n };\n RowCtrl.prototype.onRowMouseDown = function (mouseEvent) {\n this.lastMouseDownOnDragger = isElementChildOfClass(mouseEvent.target, 'ag-row-drag', 3);\n if (!this.isFullWidth()) {\n return;\n }\n var node = this.rowNode;\n var columnModel = this.beans.columnModel;\n this.beans.focusService.setFocusedCell(node.rowIndex, columnModel.getAllDisplayedColumns()[0], node.rowPinned, true);\n };\n RowCtrl.prototype.onRowClick = function (mouseEvent) {\n var stop = isStopPropagationForAgGrid(mouseEvent) || this.lastMouseDownOnDragger;\n if (stop) {\n return;\n }\n var agEvent = this.createRowEventWithSource(Events.EVENT_ROW_CLICKED, mouseEvent);\n this.beans.eventService.dispatchEvent(agEvent);\n // ctrlKey for windows, metaKey for Apple\n var multiSelectKeyPressed = mouseEvent.ctrlKey || mouseEvent.metaKey;\n var shiftKeyPressed = mouseEvent.shiftKey;\n // we do not allow selecting the group by clicking, when groupSelectChildren, as the logic to\n // handle this is broken. to observe, change the logic below and allow groups to be selected.\n // you will see the group gets selected, then all children get selected, then the grid unselects\n // the children (as the default behaviour when clicking is to unselect other rows) which results\n // in the group getting unselected (as all children are unselected). the correct thing would be\n // to change this, so that children of the selected group are not then subsequenly un-selected.\n var groupSelectsChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();\n if (\n // we do not allow selecting groups by clicking (as the click here expands the group), or if it's a detail row,\n // so return if it's a group row\n (groupSelectsChildren && this.rowNode.group) ||\n // this is needed so we don't unselect other rows when we click this row, eg if this row is not selectable,\n // and we click it, the selection should not change (ie any currently selected row should stay selected)\n !this.rowNode.selectable ||\n // we also don't allow selection of pinned rows\n this.rowNode.rowPinned ||\n // if no selection method enabled, do nothing\n !this.beans.gridOptionsWrapper.isRowSelection() ||\n // if click selection suppressed, do nothing\n this.beans.gridOptionsWrapper.isSuppressRowClickSelection()) {\n return;\n }\n var multiSelectOnClick = this.beans.gridOptionsWrapper.isRowMultiSelectWithClick();\n var rowDeselectionWithCtrl = !this.beans.gridOptionsWrapper.isSuppressRowDeselection();\n if (this.rowNode.isSelected()) {\n if (multiSelectOnClick) {\n this.rowNode.setSelectedParams({ newValue: false });\n }\n else if (multiSelectKeyPressed) {\n if (rowDeselectionWithCtrl) {\n this.rowNode.setSelectedParams({ newValue: false });\n }\n }\n else {\n // selected with no multi key, must make sure anything else is unselected\n this.rowNode.setSelectedParams({ newValue: true, clearSelection: !shiftKeyPressed, rangeSelect: shiftKeyPressed });\n }\n }\n else {\n var clearSelection = multiSelectOnClick ? false : !multiSelectKeyPressed;\n this.rowNode.setSelectedParams({ newValue: true, clearSelection: clearSelection, rangeSelect: shiftKeyPressed });\n }\n };\n RowCtrl.prototype.setupDetailRowAutoHeight = function (eDetailGui) {\n var _this = this;\n if (this.rowType !== RowType.FullWidthDetail) {\n return;\n }\n if (!this.beans.gridOptionsWrapper.isDetailRowAutoHeight()) {\n return;\n }\n var checkRowSizeFunc = function () {\n var clientHeight = eDetailGui.clientHeight;\n // if the UI is not ready, the height can be 0, which we ignore, as otherwise a flicker will occur\n // as UI goes from the default height, to 0, then to the real height as UI becomes ready. this means\n // it's not possible for have 0 as auto-height, however this is an improbable use case, as even an\n // empty detail grid would still have some styling around it giving at least a few pixels.\n if (clientHeight != null && clientHeight > 0) {\n // we do the update in a timeout, to make sure we are not calling from inside the grid\n // doing another update\n var updateRowHeightFunc = function () {\n _this.rowNode.setRowHeight(clientHeight);\n if (_this.beans.clientSideRowModel) {\n _this.beans.clientSideRowModel.onRowHeightChanged();\n }\n else if (_this.beans.serverSideRowModel) {\n _this.beans.serverSideRowModel.onRowHeightChanged();\n }\n };\n _this.beans.frameworkOverrides.setTimeout(updateRowHeightFunc, 0);\n }\n };\n var resizeObserverDestroyFunc = this.beans.resizeObserverService.observeResize(eDetailGui, checkRowSizeFunc);\n this.addDestroyFunc(resizeObserverDestroyFunc);\n checkRowSizeFunc();\n };\n RowCtrl.prototype.createFullWidthParams = function (eRow, pinned) {\n var _this = this;\n var params = {\n fullWidth: true,\n data: this.rowNode.data,\n node: this.rowNode,\n value: this.rowNode.key,\n valueFormatted: this.rowNode.key,\n rowIndex: this.rowNode.rowIndex,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext(),\n // these need to be taken out, as part of 'afterAttached' now\n eGridCell: eRow,\n eParentOfValue: eRow,\n pinned: pinned,\n addRenderedRowListener: this.addEventListener.bind(this),\n registerRowDragger: function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) { return _this.addFullWidthRowDragging(rowDraggerElement, dragStartPixels, value, suppressVisibilityChange); }\n };\n return params;\n };\n RowCtrl.prototype.addFullWidthRowDragging = function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) {\n if (value === void 0) { value = ''; }\n if (!this.isFullWidth()) {\n return;\n }\n var rowDragComp = new RowDragComp(function () { return value; }, this.rowNode, undefined, rowDraggerElement, dragStartPixels, suppressVisibilityChange);\n this.createManagedBean(rowDragComp, this.beans.context);\n };\n RowCtrl.prototype.onUiLevelChanged = function () {\n var newLevel = this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);\n if (this.rowLevel != newLevel) {\n var classToAdd_1 = 'ag-row-level-' + newLevel;\n var classToRemove_1 = 'ag-row-level-' + this.rowLevel;\n this.allRowGuis.forEach(function (gui) {\n gui.rowComp.addOrRemoveCssClass(classToAdd_1, true);\n gui.rowComp.addOrRemoveCssClass(classToRemove_1, false);\n });\n }\n this.rowLevel = newLevel;\n };\n RowCtrl.prototype.isFirstRowOnPage = function () {\n return this.rowNode.rowIndex === this.beans.paginationProxy.getPageFirstRow();\n };\n RowCtrl.prototype.isLastRowOnPage = function () {\n return this.rowNode.rowIndex === this.beans.paginationProxy.getPageLastRow();\n };\n RowCtrl.prototype.onModelUpdated = function () {\n this.refreshFirstAndLastRowStyles();\n };\n RowCtrl.prototype.refreshFirstAndLastRowStyles = function () {\n var newFirst = this.isFirstRowOnPage();\n var newLast = this.isLastRowOnPage();\n if (this.firstRowOnPage !== newFirst) {\n this.firstRowOnPage = newFirst;\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-first', newFirst); });\n }\n if (this.lastRowOnPage !== newLast) {\n this.lastRowOnPage = newLast;\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-last', newLast); });\n }\n };\n RowCtrl.prototype.stopEditing = function (cancel) {\n if (cancel === void 0) { cancel = false; }\n var cellEdits = this.getAllCellCtrls().map(function (cellCtrl) { return cellCtrl.stopEditing(cancel); });\n if (!this.editingRow) {\n return;\n }\n if (!cancel && cellEdits.some(function (edit) { return edit; })) {\n var event_1 = this.createRowEvent(Events.EVENT_ROW_VALUE_CHANGED);\n this.beans.eventService.dispatchEvent(event_1);\n }\n this.setEditingRow(false);\n };\n RowCtrl.prototype.setInlineEditingCss = function (editing) {\n this.allRowGuis.forEach(function (gui) {\n gui.rowComp.addOrRemoveCssClass(\"ag-row-inline-editing\", editing);\n gui.rowComp.addOrRemoveCssClass(\"ag-row-not-inline-editing\", !editing);\n });\n };\n RowCtrl.prototype.setEditingRow = function (value) {\n this.editingRow = value;\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-editing', value); });\n var event = value ?\n this.createRowEvent(Events.EVENT_ROW_EDITING_STARTED)\n : this.createRowEvent(Events.EVENT_ROW_EDITING_STOPPED);\n this.beans.eventService.dispatchEvent(event);\n };\n RowCtrl.prototype.startRowEditing = function (key, charPress, sourceRenderedCell, event) {\n if (key === void 0) { key = null; }\n if (charPress === void 0) { charPress = null; }\n if (sourceRenderedCell === void 0) { sourceRenderedCell = null; }\n if (event === void 0) { event = null; }\n // don't do it if already editing\n if (this.editingRow) {\n return;\n }\n this.getAllCellCtrls().forEach(function (cellCtrl) {\n var cellStartedEdit = cellCtrl === sourceRenderedCell;\n if (cellStartedEdit) {\n cellCtrl.startEditing(key, charPress, cellStartedEdit, event);\n }\n else {\n cellCtrl.startEditing(null, null, cellStartedEdit, event);\n }\n });\n this.setEditingRow(true);\n };\n RowCtrl.prototype.getAllCellCtrls = function () {\n var res = __spread$6(this.centerCellCtrls.list, this.leftCellCtrls.list, this.rightCellCtrls.list);\n return res;\n };\n RowCtrl.prototype.postProcessClassesFromGridOptions = function () {\n var _this = this;\n var cssClasses = this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);\n if (!cssClasses || !cssClasses.length) {\n return;\n }\n cssClasses.forEach(function (classStr) {\n _this.allRowGuis.forEach(function (c) { return c.rowComp.addOrRemoveCssClass(classStr, true); });\n });\n };\n RowCtrl.prototype.postProcessRowClassRules = function () {\n var _this = this;\n this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode, function (className) {\n _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass(className, true); });\n }, function (className) {\n _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass(className, false); });\n });\n };\n RowCtrl.prototype.setStylesFromGridOptions = function () {\n var rowStyles = this.processStylesFromGridOptions();\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.setUserStyles(rowStyles); });\n };\n RowCtrl.prototype.getRowBusinessKey = function () {\n var businessKeyForNodeFunc = this.beans.gridOptionsWrapper.getBusinessKeyForNodeFunc();\n if (typeof businessKeyForNodeFunc !== 'function') {\n return;\n }\n return businessKeyForNodeFunc(this.rowNode);\n };\n RowCtrl.prototype.getPinnedForContainer = function (rowContainerType) {\n var pinned = rowContainerType === exports.RowContainerType.LEFT ? Constants.PINNED_LEFT :\n rowContainerType === exports.RowContainerType.RIGHT ? Constants.PINNED_RIGHT : null;\n return pinned;\n };\n RowCtrl.prototype.getInitialRowClasses = function (rowContainerType) {\n var pinned = this.getPinnedForContainer(rowContainerType);\n var params = {\n rowNode: this.rowNode,\n rowFocused: this.rowFocused,\n fadeRowIn: this.fadeRowIn,\n rowIsEven: this.rowNode.rowIndex % 2 === 0,\n rowLevel: this.rowLevel,\n fullWidthRow: this.isFullWidth(),\n firstRowOnPage: this.isFirstRowOnPage(),\n lastRowOnPage: this.isLastRowOnPage(),\n printLayout: this.printLayout,\n expandable: this.rowNode.isExpandable(),\n pinned: pinned\n };\n return this.beans.rowCssClassCalculator.getInitialRowClasses(params);\n };\n RowCtrl.prototype.processStylesFromGridOptions = function () {\n // part 1 - rowStyle\n var rowStyle = this.beans.gridOptionsWrapper.getRowStyle();\n if (rowStyle && typeof rowStyle === 'function') {\n console.warn('AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead');\n return;\n }\n // part 1 - rowStyleFunc\n var rowStyleFunc = this.beans.gridOptionsWrapper.getRowStyleFunc();\n var rowStyleFuncResult;\n if (rowStyleFunc) {\n var params = {\n data: this.rowNode.data,\n node: this.rowNode,\n rowIndex: this.rowNode.rowIndex\n };\n rowStyleFuncResult = rowStyleFunc(params);\n }\n return Object.assign({}, rowStyle, rowStyleFuncResult);\n };\n RowCtrl.prototype.onRowSelected = function () {\n var _this = this;\n // Treat undefined as false, if we pass undefined down it gets treated as toggle class, rather than explicitly\n // setting the required value\n var selected = !!this.rowNode.isSelected();\n this.allRowGuis.forEach(function (gui) {\n gui.rowComp.addOrRemoveCssClass('ag-row-selected', selected);\n setAriaSelected(gui.element, selected ? true : undefined);\n var ariaLabel = _this.createAriaLabel();\n setAriaLabel(gui.element, ariaLabel == null ? '' : ariaLabel);\n });\n };\n RowCtrl.prototype.createAriaLabel = function () {\n var selected = this.rowNode.isSelected();\n if (selected && this.beans.gridOptionsWrapper.isSuppressRowDeselection()) {\n return undefined;\n }\n var translate = this.beans.gridOptionsWrapper.getLocaleTextFunc();\n var label = translate(selected ? 'ariaRowDeselect' : 'ariaRowSelect', \"Press SPACE to \" + (selected ? 'deselect' : 'select') + \" this row.\");\n return label;\n };\n RowCtrl.prototype.isUseAnimationFrameForCreate = function () {\n return this.useAnimationFrameForCreate;\n };\n RowCtrl.prototype.addHoverFunctionality = function (eRow) {\n var _this = this;\n // because we use animation frames to do this, it's possible the row no longer exists\n // by the time we get to add it\n if (!this.active) {\n return;\n }\n // because mouseenter and mouseleave do not propagate, we cannot listen on the gridPanel\n // like we do for all the other mouse events.\n // because of the pinning, we cannot simply add / remove the class based on the eRow. we\n // have to check all eRow's (body & pinned). so the trick is if any of the rows gets a\n // mouse hover, it sets such in the rowNode, and then all three reflect the change as\n // all are listening for event on the row node.\n // step 1 - add listener, to set flag on row node\n this.addManagedListener(eRow, 'mouseenter', function () { return _this.rowNode.onMouseEnter(); });\n this.addManagedListener(eRow, 'mouseleave', function () { return _this.rowNode.onMouseLeave(); });\n // step 2 - listen for changes on row node (which any eRow can trigger)\n this.addManagedListener(this.rowNode, RowNode.EVENT_MOUSE_ENTER, function () {\n // if hover turned off, we don't add the class. we do this here so that if the application\n // toggles this property mid way, we remove the hover form the last row, but we stop\n // adding hovers from that point onwards.\n if (!_this.beans.gridOptionsWrapper.isSuppressRowHoverHighlight()) {\n eRow.classList.add('ag-row-hover');\n }\n });\n this.addManagedListener(this.rowNode, RowNode.EVENT_MOUSE_LEAVE, function () {\n eRow.classList.remove('ag-row-hover');\n });\n };\n // for animation, we don't want to animate entry or exit to a very far away pixel,\n // otherwise the row would move so fast, it would appear to disappear. so this method\n // moves the row closer to the viewport if it is far away, so the row slide in / out\n // at a speed the user can see.\n RowCtrl.prototype.roundRowTopToBounds = function (rowTop) {\n var gridBodyCon = this.beans.ctrlsService.getGridBodyCtrl();\n var range = gridBodyCon.getScrollFeature().getVScrollPosition();\n var minPixel = this.applyPaginationOffset(range.top, true) - 100;\n var maxPixel = this.applyPaginationOffset(range.bottom, true) + 100;\n return Math.min(Math.max(minPixel, rowTop), maxPixel);\n };\n RowCtrl.prototype.getFrameworkOverrides = function () {\n return this.beans.frameworkOverrides;\n };\n RowCtrl.prototype.onRowHeightChanged = function () {\n // check for exists first - if the user is resetting the row height, then\n // it will be null (or undefined) momentarily until the next time the flatten\n // stage is called where the row will then update again with a new height\n if (this.rowNode.rowHeight == null) {\n return;\n }\n var rowHeight = this.rowNode.rowHeight;\n var defaultRowHeight = this.beans.gridOptionsWrapper.getDefaultRowHeight();\n var isHeightFromFunc = this.beans.gridOptionsWrapper.isGetRowHeightFunction();\n var heightFromFunc = isHeightFromFunc ? this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height : undefined;\n var lineHeight = heightFromFunc ? Math.min(defaultRowHeight, heightFromFunc) - 2 + \"px\" : undefined;\n this.allRowGuis.forEach(function (gui) {\n gui.element.style.height = rowHeight + \"px\";\n // If the row height is coming from a function, this means some rows can\n // be smaller than the theme had intended. so we set --ag-line-height on\n // the row, which is picked up by the theme CSS and is used in a calc\n // for the CSS line-height property, which makes sure the line-height is\n // not bigger than the row height, otherwise the row text would not fit.\n // We do not use rowNode.rowHeight here, as this could be the result of autoHeight,\n // and we found using the autoHeight result causes a loop, where changing the\n // line-height them impacts the cell height, resulting in a new autoHeight,\n // resulting in a new line-height and so on loop. \n // const heightFromFunc = this.beans.gridOptionsWrapper.getRowHeightForNode(this.rowNode).height;\n if (lineHeight) {\n gui.element.style.setProperty('--ag-line-height', lineHeight);\n }\n });\n };\n RowCtrl.prototype.addEventListener = function (eventType, listener) {\n if (eventType === 'renderedRowRemoved' || eventType === 'rowRemoved') {\n eventType = Events.EVENT_VIRTUAL_ROW_REMOVED;\n console.warn('AG Grid: Since version 11, event renderedRowRemoved is now called ' + Events.EVENT_VIRTUAL_ROW_REMOVED);\n }\n _super.prototype.addEventListener.call(this, eventType, listener);\n };\n RowCtrl.prototype.removeEventListener = function (eventType, listener) {\n if (eventType === 'renderedRowRemoved' || eventType === 'rowRemoved') {\n eventType = Events.EVENT_VIRTUAL_ROW_REMOVED;\n console.warn('AG Grid: Since version 11, event renderedRowRemoved and rowRemoved is now called ' + Events.EVENT_VIRTUAL_ROW_REMOVED);\n }\n _super.prototype.removeEventListener.call(this, eventType, listener);\n };\n // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.\n RowCtrl.prototype.destroyFirstPass = function () {\n this.active = false;\n // why do we have this method? shouldn't everything below be added as a destroy func beside\n // the corresponding create logic?\n this.setupRemoveAnimation();\n var event = this.createRowEvent(Events.EVENT_VIRTUAL_ROW_REMOVED);\n this.dispatchEvent(event);\n this.beans.eventService.dispatchEvent(event);\n _super.prototype.destroy.call(this);\n };\n RowCtrl.prototype.setupRemoveAnimation = function () {\n var rowStillVisibleJustNotInViewport = this.rowNode.rowTop != null;\n if (rowStillVisibleJustNotInViewport) {\n // if the row is not rendered, but in viewport, it means it has moved,\n // so we animate the row out. if the new location is very far away,\n // the animation will be so fast the row will look like it's just disappeared,\n // so instead we animate to a position just outside the viewport.\n var rowTop = this.roundRowTopToBounds(this.rowNode.rowTop);\n this.setRowTop(rowTop);\n }\n else {\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', true); });\n }\n };\n RowCtrl.prototype.destroySecondPass = function () {\n this.allRowGuis.length = 0;\n var destroyCellCtrls = function (ctrls) {\n ctrls.list.forEach(function (c) { return c.destroy(); });\n return { list: [], map: {} };\n };\n this.centerCellCtrls = destroyCellCtrls(this.centerCellCtrls);\n this.leftCellCtrls = destroyCellCtrls(this.leftCellCtrls);\n this.rightCellCtrls = destroyCellCtrls(this.rightCellCtrls);\n };\n RowCtrl.prototype.setFocusedClasses = function () {\n var _this = this;\n this.allRowGuis.forEach(function (gui) {\n gui.rowComp.addOrRemoveCssClass('ag-row-focus', _this.rowFocused);\n gui.rowComp.addOrRemoveCssClass('ag-row-no-focus', !_this.rowFocused);\n });\n };\n RowCtrl.prototype.onCellFocusChanged = function () {\n var rowFocused = this.beans.focusService.isRowFocused(this.rowNode.rowIndex, this.rowNode.rowPinned);\n if (rowFocused !== this.rowFocused) {\n this.rowFocused = rowFocused;\n this.setFocusedClasses();\n }\n // if we are editing, then moving the focus out of a row will stop editing\n if (!rowFocused && this.editingRow) {\n this.stopEditing(false);\n }\n };\n RowCtrl.prototype.onPaginationChanged = function () {\n var currentPage = this.beans.paginationProxy.getCurrentPage();\n // it is possible this row is in the new page, but the page number has changed, which means\n // it needs to reposition itself relative to the new page\n if (this.paginationPage !== currentPage) {\n this.paginationPage = currentPage;\n this.onTopChanged();\n }\n this.refreshFirstAndLastRowStyles();\n };\n RowCtrl.prototype.onTopChanged = function () {\n this.setRowTop(this.rowNode.rowTop);\n };\n RowCtrl.prototype.onPaginationPixelOffsetChanged = function () {\n // the pixel offset is used when calculating rowTop to set on the row DIV\n this.onTopChanged();\n };\n // applies pagination offset, eg if on second page, and page height is 500px, then removes\n // 500px from the top position, so a row with rowTop 600px is displayed at location 100px.\n // reverse will take the offset away rather than add.\n RowCtrl.prototype.applyPaginationOffset = function (topPx, reverse) {\n if (reverse === void 0) { reverse = false; }\n if (this.rowNode.isRowPinned()) {\n return topPx;\n }\n var pixelOffset = this.beans.paginationProxy.getPixelOffset();\n var multiplier = reverse ? 1 : -1;\n return topPx + (pixelOffset * multiplier);\n };\n RowCtrl.prototype.setRowTop = function (pixels) {\n // print layout uses normal flow layout for row positioning\n if (this.printLayout) {\n return;\n }\n // need to make sure rowTop is not null, as this can happen if the node was once\n // visible (ie parent group was expanded) but is now not visible\n if (exists(pixels)) {\n var afterPaginationPixels = this.applyPaginationOffset(pixels);\n var afterScalingPixels = this.rowNode.isRowPinned() ? afterPaginationPixels : this.beans.rowContainerHeightService.getRealPixelPosition(afterPaginationPixels);\n var topPx = afterScalingPixels + \"px\";\n this.setRowTopStyle(topPx);\n }\n };\n RowCtrl.prototype.getInitialRowTop = function () {\n return this.initialTop;\n };\n RowCtrl.prototype.getInitialTransform = function () {\n return this.initialTransform;\n };\n RowCtrl.prototype.setInitialRowTop = function () {\n // print layout uses normal flow layout for row positioning\n if (this.printLayout) {\n return '';\n }\n // if sliding in, we take the old row top. otherwise we just set the current row top.\n var pixels = this.slideRowIn ? this.roundRowTopToBounds(this.rowNode.oldRowTop) : this.rowNode.rowTop;\n var afterPaginationPixels = this.applyPaginationOffset(pixels);\n // we don't apply scaling if row is pinned\n var afterScalingPixels = this.rowNode.isRowPinned() ? afterPaginationPixels : this.beans.rowContainerHeightService.getRealPixelPosition(afterPaginationPixels);\n var res = afterScalingPixels + 'px';\n var suppressRowTransform = this.beans.gridOptionsWrapper.isSuppressRowTransform();\n if (suppressRowTransform) {\n this.initialTop = res;\n }\n else {\n this.initialTransform = \"translateY(\" + res + \")\";\n }\n };\n RowCtrl.prototype.setRowTopStyle = function (topPx) {\n var suppressRowTransform = this.beans.gridOptionsWrapper.isSuppressRowTransform();\n this.allRowGuis.forEach(function (gui) { return suppressRowTransform ?\n gui.rowComp.setTop(topPx) :\n gui.rowComp.setTransform(\"translateY(\" + topPx + \")\"); });\n };\n RowCtrl.prototype.getRowNode = function () {\n return this.rowNode;\n };\n RowCtrl.prototype.getCellCtrl = function (column) {\n // first up, check for cell directly linked to this column\n var res = null;\n this.getAllCellCtrls().forEach(function (cellCtrl) {\n if (cellCtrl.getColumn() == column) {\n res = cellCtrl;\n }\n });\n if (res != null) {\n return res;\n }\n // second up, if not found, then check for spanned cols.\n // we do this second (and not at the same time) as this is\n // more expensive, as spanning cols is a\n // infrequently used feature so we don't need to do this most\n // of the time\n this.getAllCellCtrls().forEach(function (cellCtrl) {\n if (cellCtrl.getColSpanningList().indexOf(column) >= 0) {\n res = cellCtrl;\n }\n });\n return res;\n };\n RowCtrl.prototype.onRowIndexChanged = function () {\n // we only bother updating if the rowIndex is present. if it is not present, it means this row\n // is child of a group node, and the group node was closed, it's the only way to have no row index.\n // when this happens, row is about to be de-rendered, so we don't care, rowComp is about to die!\n if (this.rowNode.rowIndex != null) {\n this.onCellFocusChanged();\n this.updateRowIndexes();\n this.postProcessCss();\n }\n };\n RowCtrl.prototype.updateRowIndexes = function () {\n var rowIndexStr = this.rowNode.getRowIndexString();\n var headerRowCount = this.beans.headerNavigationService.getHeaderRowCount();\n var rowIsEven = this.rowNode.rowIndex % 2 === 0;\n var ariaRowIndex = headerRowCount + this.rowNode.rowIndex + 1;\n this.allRowGuis.forEach(function (c) {\n c.rowComp.setRowIndex(rowIndexStr);\n c.rowComp.addOrRemoveCssClass('ag-row-even', rowIsEven);\n c.rowComp.addOrRemoveCssClass('ag-row-odd', !rowIsEven);\n setAriaRowIndex(c.element, ariaRowIndex);\n });\n };\n // returns the pinned left container, either the normal one, or the embedded full with one if exists\n RowCtrl.prototype.getPinnedLeftRowElement = function () {\n return this.leftGui ? this.leftGui.element : undefined;\n };\n // returns the pinned right container, either the normal one, or the embedded full with one if exists\n RowCtrl.prototype.getPinnedRightRowElement = function () {\n return this.rightGui ? this.rightGui.element : undefined;\n };\n // returns the body container, either the normal one, or the embedded full with one if exists\n RowCtrl.prototype.getBodyRowElement = function () {\n return this.centerGui ? this.centerGui.element : undefined;\n };\n // returns the full width container\n RowCtrl.prototype.getFullWidthRowElement = function () {\n return this.fullWidthGui ? this.fullWidthGui.element : undefined;\n };\n RowCtrl.DOM_DATA_KEY_ROW_CTRL = 'renderedRow';\n return RowCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$10 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$P = (undefined && undefined.__decorate) || function (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};\nvar __read$9 = (undefined && undefined.__read) || function (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};\nvar RowContainerEventsFeature = /** @class */ (function (_super) {\n __extends$10(RowContainerEventsFeature, _super);\n function RowContainerEventsFeature(element) {\n var _this = _super.call(this) || this;\n _this.element = element;\n return _this;\n }\n RowContainerEventsFeature.prototype.postConstruct = function () {\n this.addMouseListeners();\n this.mockContextMenuForIPad();\n this.addKeyboardEvents();\n };\n RowContainerEventsFeature.prototype.addKeyboardEvents = function () {\n var _this = this;\n var eventNames = ['keydown', 'keypress'];\n eventNames.forEach(function (eventName) {\n var listener = _this.processKeyboardEvent.bind(_this, eventName);\n _this.addManagedListener(_this.element, eventName, listener);\n });\n };\n RowContainerEventsFeature.prototype.addMouseListeners = function () {\n var _this = this;\n var mouseDownEvent = isEventSupported('touchstart') ? 'touchstart' : 'mousedown';\n var eventNames = ['dblclick', 'contextmenu', 'mouseover', 'mouseout', 'click', mouseDownEvent];\n eventNames.forEach(function (eventName) {\n var listener = _this.processMouseEvent.bind(_this, eventName);\n _this.addManagedListener(_this.element, eventName, listener);\n });\n };\n RowContainerEventsFeature.prototype.processMouseEvent = function (eventName, mouseEvent) {\n if (!this.mouseEventService.isEventFromThisGrid(mouseEvent) ||\n isStopPropagationForAgGrid(mouseEvent)) {\n return;\n }\n var rowComp = this.getRowForEvent(mouseEvent);\n var cellCtrl = this.mouseEventService.getRenderedCellForEvent(mouseEvent);\n if (eventName === \"contextmenu\") {\n this.handleContextMenuMouseEvent(mouseEvent, null, rowComp, cellCtrl);\n }\n else {\n if (cellCtrl) {\n cellCtrl.onMouseEvent(eventName, mouseEvent);\n }\n if (rowComp) {\n rowComp.onMouseEvent(eventName, mouseEvent);\n }\n }\n };\n RowContainerEventsFeature.prototype.mockContextMenuForIPad = function () {\n var _this = this;\n // we do NOT want this when not in iPad, otherwise we will be doing\n if (!isIOSUserAgent()) {\n return;\n }\n var touchListener = new TouchListener(this.element);\n var longTapListener = function (event) {\n var rowComp = _this.getRowForEvent(event.touchEvent);\n var cellComp = _this.mouseEventService.getRenderedCellForEvent(event.touchEvent);\n _this.handleContextMenuMouseEvent(null, event.touchEvent, rowComp, cellComp);\n };\n this.addManagedListener(touchListener, TouchListener.EVENT_LONG_TAP, longTapListener);\n this.addDestroyFunc(function () { return touchListener.destroy(); });\n };\n RowContainerEventsFeature.prototype.getRowForEvent = function (event) {\n var sourceElement = event.target;\n while (sourceElement) {\n var rowCon = this.gridOptionsWrapper.getDomData(sourceElement, RowCtrl.DOM_DATA_KEY_ROW_CTRL);\n if (rowCon) {\n return rowCon;\n }\n sourceElement = sourceElement.parentElement;\n }\n return null;\n };\n RowContainerEventsFeature.prototype.handleContextMenuMouseEvent = function (mouseEvent, touchEvent, rowComp, cellCtrl) {\n var rowNode = rowComp ? rowComp.getRowNode() : null;\n var column = cellCtrl ? cellCtrl.getColumn() : null;\n var value = null;\n if (column) {\n var event_1 = mouseEvent ? mouseEvent : touchEvent;\n cellCtrl.dispatchCellContextMenuEvent(event_1);\n value = this.valueService.getValue(column, rowNode);\n }\n // if user clicked on a cell, anchor to that cell, otherwise anchor to the grid panel\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n var anchorToElement = cellCtrl ? cellCtrl.getGui() : gridBodyCon.getGridBodyElement();\n if (this.contextMenuFactory) {\n this.contextMenuFactory.onContextMenu(mouseEvent, touchEvent, rowNode, column, value, anchorToElement);\n }\n };\n RowContainerEventsFeature.prototype.processKeyboardEvent = function (eventName, keyboardEvent) {\n var cellComp = getCtrlForEvent(this.gridOptionsWrapper, keyboardEvent, CellCtrl.DOM_DATA_KEY_CELL_CTRL);\n var rowComp = getCtrlForEvent(this.gridOptionsWrapper, keyboardEvent, RowCtrl.DOM_DATA_KEY_ROW_CTRL);\n if (keyboardEvent.defaultPrevented) {\n return;\n }\n if (cellComp) {\n this.processCellKeyboardEvent(cellComp, eventName, keyboardEvent);\n }\n else if (rowComp && rowComp.isFullWidth()) {\n this.processFullWidthRowKeyboardEvent(rowComp, eventName, keyboardEvent);\n }\n };\n RowContainerEventsFeature.prototype.processCellKeyboardEvent = function (cellCtrl, eventName, keyboardEvent) {\n var rowNode = cellCtrl.getRowNode();\n var column = cellCtrl.getColumn();\n var editing = cellCtrl.isEditing();\n var gridProcessingAllowed = !isUserSuppressingKeyboardEvent(this.gridOptionsWrapper, keyboardEvent, rowNode, column, editing);\n if (gridProcessingAllowed) {\n switch (eventName) {\n case 'keydown':\n // first see if it's a scroll key, page up / down, home / end etc\n var wasScrollKey = !editing && this.navigationService.handlePageScrollingKey(keyboardEvent);\n // if not a scroll key, then we pass onto cell\n if (!wasScrollKey) {\n cellCtrl.onKeyDown(keyboardEvent);\n }\n // perform clipboard and undo / redo operations\n this.doGridOperations(keyboardEvent, cellCtrl.isEditing());\n break;\n case 'keypress':\n cellCtrl.onKeyPress(keyboardEvent);\n break;\n }\n }\n if (eventName === 'keydown') {\n var cellKeyDownEvent = cellCtrl.createEvent(keyboardEvent, Events.EVENT_CELL_KEY_DOWN);\n this.eventService.dispatchEvent(cellKeyDownEvent);\n }\n if (eventName === 'keypress') {\n var cellKeyPressEvent = cellCtrl.createEvent(keyboardEvent, Events.EVENT_CELL_KEY_PRESS);\n this.eventService.dispatchEvent(cellKeyPressEvent);\n }\n };\n RowContainerEventsFeature.prototype.processFullWidthRowKeyboardEvent = function (rowComp, eventName, keyboardEvent) {\n var rowNode = rowComp.getRowNode();\n var focusedCell = this.focusService.getFocusedCell();\n var column = (focusedCell && focusedCell.column);\n var gridProcessingAllowed = !isUserSuppressingKeyboardEvent(this.gridOptionsWrapper, keyboardEvent, rowNode, column, false);\n if (gridProcessingAllowed) {\n var key = keyboardEvent.key;\n if (eventName === 'keydown') {\n switch (key) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n rowComp.onKeyboardNavigate(keyboardEvent);\n break;\n case KeyCode.TAB:\n rowComp.onTabKeyDown(keyboardEvent);\n default:\n }\n }\n }\n if (eventName === 'keydown') {\n var cellKeyDownEvent = rowComp.createRowEvent(Events.EVENT_CELL_KEY_DOWN, keyboardEvent);\n this.eventService.dispatchEvent(cellKeyDownEvent);\n }\n if (eventName === 'keypress') {\n var cellKeyPressEvent = rowComp.createRowEvent(Events.EVENT_CELL_KEY_PRESS, keyboardEvent);\n this.eventService.dispatchEvent(cellKeyPressEvent);\n }\n };\n RowContainerEventsFeature.prototype.doGridOperations = function (keyboardEvent, editing) {\n // check if ctrl or meta key pressed\n if (!keyboardEvent.ctrlKey && !keyboardEvent.metaKey) {\n return;\n }\n // if the cell the event came from is editing, then we do not\n // want to do the default shortcut keys, otherwise the editor\n // (eg a text field) would not be able to do the normal cut/copy/paste\n if (editing) {\n return;\n }\n // for copy / paste, we don't want to execute when the event\n // was from a child grid (happens in master detail)\n if (!this.mouseEventService.isEventFromThisGrid(keyboardEvent)) {\n return;\n }\n switch (keyboardEvent.code) {\n case KeyCode.A:\n return this.onCtrlAndA(keyboardEvent);\n case KeyCode.C:\n return this.onCtrlAndC(keyboardEvent);\n case KeyCode.V:\n return this.onCtrlAndV();\n case KeyCode.D:\n return this.onCtrlAndD(keyboardEvent);\n case KeyCode.Z:\n return keyboardEvent.shiftKey ? this.undoRedoService.redo() : this.undoRedoService.undo();\n case KeyCode.Y:\n return this.undoRedoService.redo();\n }\n };\n RowContainerEventsFeature.prototype.onCtrlAndA = function (event) {\n var _a = this, pinnedRowModel = _a.pinnedRowModel, paginationProxy = _a.paginationProxy, rangeService = _a.rangeService;\n var PINNED_BOTTOM = Constants.PINNED_BOTTOM, PINNED_TOP = Constants.PINNED_TOP;\n if (rangeService && paginationProxy.isRowsToRender()) {\n var _b = __read$9([\n pinnedRowModel.isEmpty(PINNED_TOP),\n pinnedRowModel.isEmpty(PINNED_BOTTOM)\n ], 2), isEmptyPinnedTop = _b[0], isEmptyPinnedBottom = _b[1];\n var floatingStart = isEmptyPinnedTop ? null : PINNED_TOP;\n var floatingEnd = void 0;\n var rowEnd = void 0;\n if (isEmptyPinnedBottom) {\n floatingEnd = null;\n rowEnd = this.paginationProxy.getRowCount() - 1;\n }\n else {\n floatingEnd = PINNED_BOTTOM;\n rowEnd = pinnedRowModel.getPinnedBottomRowData().length - 1;\n }\n var allDisplayedColumns = this.columnModel.getAllDisplayedColumns();\n if (missingOrEmpty(allDisplayedColumns)) {\n return;\n }\n rangeService.setCellRange({\n rowStartIndex: 0,\n rowStartPinned: floatingStart,\n rowEndIndex: rowEnd,\n rowEndPinned: floatingEnd,\n columnStart: allDisplayedColumns[0],\n columnEnd: last(allDisplayedColumns)\n });\n }\n event.preventDefault();\n };\n RowContainerEventsFeature.prototype.onCtrlAndC = function (event) {\n if (!this.clipboardService || this.gridOptionsWrapper.isEnableCellTextSelection()) {\n return;\n }\n this.clipboardService.copyToClipboard();\n event.preventDefault();\n };\n RowContainerEventsFeature.prototype.onCtrlAndV = function () {\n if (ModuleRegistry.isRegistered(exports.ModuleNames.ClipboardModule) && !this.gridOptionsWrapper.isSuppressClipboardPaste()) {\n this.clipboardService.pasteFromClipboard();\n }\n };\n RowContainerEventsFeature.prototype.onCtrlAndD = function (event) {\n if (ModuleRegistry.isRegistered(exports.ModuleNames.ClipboardModule) && !this.gridOptionsWrapper.isSuppressClipboardPaste()) {\n this.clipboardService.copyRangeDown();\n }\n event.preventDefault();\n };\n __decorate$P([\n Autowired('mouseEventService')\n ], RowContainerEventsFeature.prototype, \"mouseEventService\", void 0);\n __decorate$P([\n Autowired('valueService')\n ], RowContainerEventsFeature.prototype, \"valueService\", void 0);\n __decorate$P([\n Optional('contextMenuFactory')\n ], RowContainerEventsFeature.prototype, \"contextMenuFactory\", void 0);\n __decorate$P([\n Autowired('ctrlsService')\n ], RowContainerEventsFeature.prototype, \"ctrlsService\", void 0);\n __decorate$P([\n Autowired('navigationService')\n ], RowContainerEventsFeature.prototype, \"navigationService\", void 0);\n __decorate$P([\n Autowired('focusService')\n ], RowContainerEventsFeature.prototype, \"focusService\", void 0);\n __decorate$P([\n Autowired('undoRedoService')\n ], RowContainerEventsFeature.prototype, \"undoRedoService\", void 0);\n __decorate$P([\n Autowired('columnModel')\n ], RowContainerEventsFeature.prototype, \"columnModel\", void 0);\n __decorate$P([\n Autowired('paginationProxy')\n ], RowContainerEventsFeature.prototype, \"paginationProxy\", void 0);\n __decorate$P([\n Autowired('pinnedRowModel')\n ], RowContainerEventsFeature.prototype, \"pinnedRowModel\", void 0);\n __decorate$P([\n Optional('rangeService')\n ], RowContainerEventsFeature.prototype, \"rangeService\", void 0);\n __decorate$P([\n Optional('clipboardService')\n ], RowContainerEventsFeature.prototype, \"clipboardService\", void 0);\n __decorate$P([\n PostConstruct\n ], RowContainerEventsFeature.prototype, \"postConstruct\", null);\n return RowContainerEventsFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$11 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$Q = (undefined && undefined.__decorate) || function (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// listens to changes in the center viewport size, for column and row virtualisation,\n// and adjusts grid as necessary. there are two viewports, one for horizontal and one for\n// vertical scrolling.\nvar ViewportSizeFeature = /** @class */ (function (_super) {\n __extends$11(ViewportSizeFeature, _super);\n function ViewportSizeFeature(centerContainerCtrl) {\n var _this = _super.call(this) || this;\n _this.centerContainerCtrl = centerContainerCtrl;\n return _this;\n }\n ViewportSizeFeature.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function () {\n _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();\n _this.listenForResize();\n });\n this.addManagedListener(this.eventService, Events.EVENT_SCROLLBAR_WIDTH_CHANGED, this.onScrollbarWidthChanged.bind(this));\n };\n ViewportSizeFeature.prototype.listenForResize = function () {\n var _this = this;\n var listener = function () { return _this.onCenterViewportResized(); };\n // centerContainer gets horizontal resizes\n this.centerContainerCtrl.registerViewportResizeListener(listener);\n // eBodyViewport gets vertical resizes\n this.gridBodyCtrl.registerBodyViewportResizeListener(listener);\n };\n ViewportSizeFeature.prototype.onScrollbarWidthChanged = function () {\n this.checkViewportAndScrolls();\n };\n ViewportSizeFeature.prototype.onCenterViewportResized = function () {\n if (this.centerContainerCtrl.isViewportVisible()) {\n this.checkViewportAndScrolls();\n var newWidth = this.centerContainerCtrl.getCenterWidth();\n if (newWidth !== this.centerWidth) {\n this.centerWidth = newWidth;\n this.columnModel.refreshFlexedColumns({ viewportWidth: this.centerWidth, updateBodyWidths: true, fireResizedEvent: true });\n }\n }\n else {\n this.bodyHeight = 0;\n }\n };\n // gets called every time the viewport size changes. we use this to check visibility of scrollbars\n // in the grid panel, and also to check size and position of viewport for row and column virtualisation.\n ViewportSizeFeature.prototype.checkViewportAndScrolls = function () {\n // results in updating anything that depends on scroll showing\n this.updateScrollVisibleService();\n // fires event if height changes, used by PaginationService, HeightScalerService, RowRenderer\n this.checkBodyHeight();\n // check for virtual columns for ColumnController\n this.onHorizontalViewportChanged();\n this.gridBodyCtrl.getScrollFeature().checkScrollLeft();\n };\n ViewportSizeFeature.prototype.getBodyHeight = function () {\n return this.bodyHeight;\n };\n ViewportSizeFeature.prototype.checkBodyHeight = function () {\n var eBodyViewport = this.gridBodyCtrl.getBodyViewportElement();\n var bodyHeight = getInnerHeight(eBodyViewport);\n if (this.bodyHeight !== bodyHeight) {\n this.bodyHeight = bodyHeight;\n var event_1 = {\n type: Events.EVENT_BODY_HEIGHT_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n };\n ViewportSizeFeature.prototype.updateScrollVisibleService = function () {\n // because of column animation (which takes 200ms), we have to do this twice.\n // eg if user removes cols anywhere except at the RHS, then the cols on the RHS\n // will animate to the left to fill the gap. this animation means just after\n // the cols are removed, the remaining cols are still in the original location\n // at the start of the animation, so pre animation the H scrollbar is still needed,\n // but post animation it is not.\n this.updateScrollVisibleServiceImpl();\n setTimeout(this.updateScrollVisibleServiceImpl.bind(this), 500);\n };\n ViewportSizeFeature.prototype.updateScrollVisibleServiceImpl = function () {\n var params = {\n horizontalScrollShowing: this.isHorizontalScrollShowing(),\n verticalScrollShowing: this.gridBodyCtrl.isVerticalScrollShowing()\n };\n this.scrollVisibleService.setScrollsVisible(params);\n // fix - gridComp should just listen to event from above\n this.gridBodyCtrl.setVerticalScrollPaddingVisible(params.verticalScrollShowing);\n };\n ViewportSizeFeature.prototype.isHorizontalScrollShowing = function () {\n var isAlwaysShowHorizontalScroll = this.gridOptionsWrapper.isAlwaysShowHorizontalScroll();\n return isAlwaysShowHorizontalScroll || this.centerContainerCtrl.isViewportHScrollShowing();\n };\n // this gets called whenever a change in the viewport, so we can inform column controller it has to work\n // out the virtual columns again. gets called from following locations:\n // + ensureColVisible, scroll, init, layoutChanged, displayedColumnsChanged, API (doLayout)\n ViewportSizeFeature.prototype.onHorizontalViewportChanged = function () {\n var scrollWidth = this.centerContainerCtrl.getCenterWidth();\n var scrollPosition = this.centerContainerCtrl.getViewportScrollLeft();\n this.columnModel.setViewportPosition(scrollWidth, scrollPosition);\n };\n __decorate$Q([\n Autowired('ctrlsService')\n ], ViewportSizeFeature.prototype, \"ctrlsService\", void 0);\n __decorate$Q([\n Autowired('columnModel')\n ], ViewportSizeFeature.prototype, \"columnModel\", void 0);\n __decorate$Q([\n Autowired('scrollVisibleService')\n ], ViewportSizeFeature.prototype, \"scrollVisibleService\", void 0);\n __decorate$Q([\n Autowired('columnApi')\n ], ViewportSizeFeature.prototype, \"columnApi\", void 0);\n __decorate$Q([\n Autowired('gridApi')\n ], ViewportSizeFeature.prototype, \"gridApi\", void 0);\n __decorate$Q([\n PostConstruct\n ], ViewportSizeFeature.prototype, \"postConstruct\", null);\n return ViewportSizeFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$12 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$R = (undefined && undefined.__decorate) || function (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};\nvar SetPinnedLeftWidthFeature = /** @class */ (function (_super) {\n __extends$12(SetPinnedLeftWidthFeature, _super);\n function SetPinnedLeftWidthFeature(element) {\n var _this = _super.call(this) || this;\n _this.element = element;\n return _this;\n }\n SetPinnedLeftWidthFeature.prototype.postConstruct = function () {\n this.addManagedListener(this.eventService, Events.EVENT_LEFT_PINNED_WIDTH_CHANGED, this.onPinnedLeftWidthChanged.bind(this));\n };\n SetPinnedLeftWidthFeature.prototype.onPinnedLeftWidthChanged = function () {\n var leftWidth = this.pinnedWidthService.getPinnedLeftWidth();\n var displayed = leftWidth > 0;\n setDisplayed(this.element, displayed);\n if (displayed) {\n setFixedWidth(this.element, leftWidth);\n }\n };\n __decorate$R([\n Autowired('pinnedWidthService')\n ], SetPinnedLeftWidthFeature.prototype, \"pinnedWidthService\", void 0);\n __decorate$R([\n PostConstruct\n ], SetPinnedLeftWidthFeature.prototype, \"postConstruct\", null);\n return SetPinnedLeftWidthFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$13 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$S = (undefined && undefined.__decorate) || function (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};\nvar SetPinnedRightWidthFeature = /** @class */ (function (_super) {\n __extends$13(SetPinnedRightWidthFeature, _super);\n function SetPinnedRightWidthFeature(element) {\n var _this = _super.call(this) || this;\n _this.element = element;\n return _this;\n }\n SetPinnedRightWidthFeature.prototype.postConstruct = function () {\n this.addManagedListener(this.eventService, Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED, this.onPinnedRightWidthChanged.bind(this));\n };\n SetPinnedRightWidthFeature.prototype.onPinnedRightWidthChanged = function () {\n var rightWidth = this.pinnedWidthService.getPinnedRightWidth();\n var displayed = rightWidth > 0;\n setDisplayed(this.element, displayed);\n if (displayed) {\n setFixedWidth(this.element, rightWidth);\n }\n };\n __decorate$S([\n Autowired('pinnedWidthService')\n ], SetPinnedRightWidthFeature.prototype, \"pinnedWidthService\", void 0);\n __decorate$S([\n PostConstruct\n ], SetPinnedRightWidthFeature.prototype, \"postConstruct\", null);\n return SetPinnedRightWidthFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$14 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$T = (undefined && undefined.__decorate) || function (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};\nvar SetHeightFeature = /** @class */ (function (_super) {\n __extends$14(SetHeightFeature, _super);\n function SetHeightFeature(eContainer, eWrapper) {\n var _this = _super.call(this) || this;\n _this.eContainer = eContainer;\n _this.eWrapper = eWrapper;\n return _this;\n }\n SetHeightFeature.prototype.postConstruct = function () {\n this.addManagedListener(this.eventService, Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED, this.onHeightChanged.bind(this));\n };\n SetHeightFeature.prototype.onHeightChanged = function () {\n var height = this.maxDivHeightScaler.getUiContainerHeight();\n var heightString = height != null ? height + \"px\" : \"\";\n this.eContainer.style.height = heightString;\n if (this.eWrapper) {\n this.eWrapper.style.height = heightString;\n }\n };\n __decorate$T([\n Autowired(\"rowContainerHeightService\")\n ], SetHeightFeature.prototype, \"maxDivHeightScaler\", void 0);\n __decorate$T([\n PostConstruct\n ], SetHeightFeature.prototype, \"postConstruct\", null);\n return SetHeightFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$15 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$U = (undefined && undefined.__decorate) || function (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};\nvar DragListenerFeature = /** @class */ (function (_super) {\n __extends$15(DragListenerFeature, _super);\n function DragListenerFeature(eContainer) {\n var _this = _super.call(this) || this;\n _this.eContainer = eContainer;\n return _this;\n }\n DragListenerFeature.prototype.postConstruct = function () {\n var _this = this;\n if (!this.gridOptionsWrapper.isEnableRangeSelection() || // no range selection if no property\n missing(this.rangeService) // no range selection if not enterprise version\n ) {\n return;\n }\n var params = {\n dragStartPixels: 0,\n eElement: this.eContainer,\n onDragStart: this.rangeService.onDragStart.bind(this.rangeService),\n onDragStop: this.rangeService.onDragStop.bind(this.rangeService),\n onDragging: this.rangeService.onDragging.bind(this.rangeService)\n };\n this.dragService.addDragSource(params);\n this.addDestroyFunc(function () { return _this.dragService.removeDragSource(params); });\n };\n __decorate$U([\n Optional('rangeService')\n ], DragListenerFeature.prototype, \"rangeService\", void 0);\n __decorate$U([\n Autowired('dragService')\n ], DragListenerFeature.prototype, \"dragService\", void 0);\n __decorate$U([\n PostConstruct\n ], DragListenerFeature.prototype, \"postConstruct\", null);\n return DragListenerFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$16 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$V = (undefined && undefined.__decorate) || function (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};\nvar CenterWidthFeature = /** @class */ (function (_super) {\n __extends$16(CenterWidthFeature, _super);\n function CenterWidthFeature(callback) {\n var _this = _super.call(this) || this;\n _this.callback = callback;\n return _this;\n }\n CenterWidthFeature.prototype.postConstruct = function () {\n var listener = this.setWidth.bind(this);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, listener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, listener);\n this.setWidth();\n };\n CenterWidthFeature.prototype.setWidth = function () {\n var columnModel = this.columnModel;\n var printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n var centerWidth = columnModel.getBodyContainerWidth();\n var leftWidth = columnModel.getDisplayedColumnsLeftWidth();\n var rightWidth = columnModel.getDisplayedColumnsRightWidth();\n var totalWidth = printLayout ? centerWidth + leftWidth + rightWidth : centerWidth;\n this.callback(totalWidth);\n };\n __decorate$V([\n Autowired('columnModel')\n ], CenterWidthFeature.prototype, \"columnModel\", void 0);\n __decorate$V([\n PostConstruct\n ], CenterWidthFeature.prototype, \"postConstruct\", null);\n return CenterWidthFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$17 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$W = (undefined && undefined.__decorate) || function (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};\nvar __read$a = (undefined && undefined.__read) || function (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};\nvar __spread$7 = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$a(arguments[i]));\n return ar;\n};\n(function (RowContainerName) {\n RowContainerName[\"LEFT\"] = \"left\";\n RowContainerName[\"RIGHT\"] = \"right\";\n RowContainerName[\"CENTER\"] = \"center\";\n RowContainerName[\"FULL_WIDTH\"] = \"fullWidth\";\n RowContainerName[\"TOP_LEFT\"] = \"topLeft\";\n RowContainerName[\"TOP_RIGHT\"] = \"topRight\";\n RowContainerName[\"TOP_CENTER\"] = \"topCenter\";\n RowContainerName[\"TOP_FULL_WIDTH\"] = \"topFullWidth\";\n RowContainerName[\"BOTTOM_LEFT\"] = \"bottomLeft\";\n RowContainerName[\"BOTTOM_RIGHT\"] = \"bottomRight\";\n RowContainerName[\"BOTTOM_CENTER\"] = \"bottomCenter\";\n RowContainerName[\"BOTTOM_FULL_WIDTH\"] = \"bottomFullWidth\";\n})(exports.RowContainerName || (exports.RowContainerName = {}));\n(function (RowContainerType) {\n RowContainerType[\"LEFT\"] = \"left\";\n RowContainerType[\"RIGHT\"] = \"right\";\n RowContainerType[\"CENTER\"] = \"center\";\n RowContainerType[\"FULL_WIDTH\"] = \"fullWidth\";\n})(exports.RowContainerType || (exports.RowContainerType = {}));\nfunction getRowContainerTypeForName(name) {\n switch (name) {\n case exports.RowContainerName.CENTER:\n case exports.RowContainerName.TOP_CENTER:\n case exports.RowContainerName.BOTTOM_CENTER:\n return exports.RowContainerType.CENTER;\n case exports.RowContainerName.LEFT:\n case exports.RowContainerName.TOP_LEFT:\n case exports.RowContainerName.BOTTOM_LEFT:\n return exports.RowContainerType.LEFT;\n case exports.RowContainerName.RIGHT:\n case exports.RowContainerName.TOP_RIGHT:\n case exports.RowContainerName.BOTTOM_RIGHT:\n return exports.RowContainerType.RIGHT;\n case exports.RowContainerName.FULL_WIDTH:\n case exports.RowContainerName.TOP_FULL_WIDTH:\n case exports.RowContainerName.BOTTOM_FULL_WIDTH:\n return exports.RowContainerType.FULL_WIDTH;\n default:\n throw Error('Invalid Row Container Type');\n }\n}\nvar ContainerCssClasses = convertToMap([\n [exports.RowContainerName.CENTER, 'ag-center-cols-container'],\n [exports.RowContainerName.LEFT, 'ag-pinned-left-cols-container'],\n [exports.RowContainerName.RIGHT, 'ag-pinned-right-cols-container'],\n [exports.RowContainerName.FULL_WIDTH, 'ag-full-width-container'],\n [exports.RowContainerName.TOP_CENTER, 'ag-floating-top-container'],\n [exports.RowContainerName.TOP_LEFT, 'ag-pinned-left-floating-top'],\n [exports.RowContainerName.TOP_RIGHT, 'ag-pinned-right-floating-top'],\n [exports.RowContainerName.TOP_FULL_WIDTH, 'ag-floating-top-full-width-container'],\n [exports.RowContainerName.BOTTOM_CENTER, 'ag-floating-bottom-container'],\n [exports.RowContainerName.BOTTOM_LEFT, 'ag-pinned-left-floating-bottom'],\n [exports.RowContainerName.BOTTOM_RIGHT, 'ag-pinned-right-floating-bottom'],\n [exports.RowContainerName.BOTTOM_FULL_WIDTH, 'ag-floating-bottom-full-width-container'],\n]);\nvar ViewportCssClasses = convertToMap([\n [exports.RowContainerName.CENTER, 'ag-center-cols-viewport'],\n [exports.RowContainerName.TOP_CENTER, 'ag-floating-top-viewport'],\n [exports.RowContainerName.BOTTOM_CENTER, 'ag-floating-bottom-viewport'],\n]);\nvar WrapperCssClasses = convertToMap([\n [exports.RowContainerName.CENTER, 'ag-center-cols-clipper'],\n]);\nvar RowContainerCtrl = /** @class */ (function (_super) {\n __extends$17(RowContainerCtrl, _super);\n function RowContainerCtrl(name) {\n var _this = _super.call(this) || this;\n _this.name = name;\n return _this;\n }\n RowContainerCtrl.getRowContainerCssClasses = function (name) {\n var containerClass = ContainerCssClasses.get(name);\n var viewportClass = ViewportCssClasses.get(name);\n var wrapperClass = WrapperCssClasses.get(name);\n return { container: containerClass, viewport: viewportClass, wrapper: wrapperClass };\n };\n RowContainerCtrl.getPinned = function (name) {\n switch (name) {\n case exports.RowContainerName.BOTTOM_LEFT:\n case exports.RowContainerName.TOP_LEFT:\n case exports.RowContainerName.LEFT:\n return Constants.PINNED_LEFT;\n case exports.RowContainerName.BOTTOM_RIGHT:\n case exports.RowContainerName.TOP_RIGHT:\n case exports.RowContainerName.RIGHT:\n return Constants.PINNED_RIGHT;\n default:\n return null;\n }\n };\n RowContainerCtrl.prototype.postConstruct = function () {\n var _this = this;\n this.enableRtl = this.gridOptionsWrapper.isEnableRtl();\n this.embedFullWidthRows = this.gridOptionsWrapper.isEmbedFullWidthRows();\n this.forContainers([exports.RowContainerName.CENTER], function () { return _this.viewportSizeFeature = _this.createManagedBean(new ViewportSizeFeature(_this)); });\n };\n RowContainerCtrl.prototype.registerWithCtrlsService = function () {\n switch (this.name) {\n case exports.RowContainerName.CENTER:\n this.ctrlsService.registerCenterRowContainerCtrl(this);\n break;\n case exports.RowContainerName.LEFT:\n this.ctrlsService.registerLeftRowContainerCtrl(this);\n break;\n case exports.RowContainerName.RIGHT:\n this.ctrlsService.registerRightRowContainerCtrl(this);\n break;\n case exports.RowContainerName.TOP_CENTER:\n this.ctrlsService.registerTopCenterRowContainerCtrl(this);\n break;\n case exports.RowContainerName.TOP_LEFT:\n this.ctrlsService.registerTopLeftRowContainerCon(this);\n break;\n case exports.RowContainerName.TOP_RIGHT:\n this.ctrlsService.registerTopRightRowContainerCtrl(this);\n break;\n case exports.RowContainerName.BOTTOM_CENTER:\n this.ctrlsService.registerBottomCenterRowContainerCtrl(this);\n break;\n case exports.RowContainerName.BOTTOM_LEFT:\n this.ctrlsService.registerBottomLeftRowContainerCtrl(this);\n break;\n case exports.RowContainerName.BOTTOM_RIGHT:\n this.ctrlsService.registerBottomRightRowContainerCtrl(this);\n break;\n }\n };\n RowContainerCtrl.prototype.forContainers = function (names, callback) {\n if (names.indexOf(this.name) >= 0) {\n callback();\n }\n };\n RowContainerCtrl.prototype.getContainerElement = function () {\n return this.eContainer;\n };\n RowContainerCtrl.prototype.getViewportSizeFeature = function () {\n return this.viewportSizeFeature;\n };\n RowContainerCtrl.prototype.setComp = function (view, eContainer, eViewport, eWrapper) {\n var _this = this;\n this.comp = view;\n this.eContainer = eContainer;\n this.eViewport = eViewport;\n this.eWrapper = eWrapper;\n this.createManagedBean(new RowContainerEventsFeature(this.eContainer));\n this.addPreventScrollWhileDragging();\n this.listenOnDomOrder();\n this.stopHScrollOnPinnedRows();\n var allTopNoFW = [exports.RowContainerName.TOP_CENTER, exports.RowContainerName.TOP_LEFT, exports.RowContainerName.TOP_RIGHT];\n var allBottomNoFW = [exports.RowContainerName.BOTTOM_CENTER, exports.RowContainerName.BOTTOM_LEFT, exports.RowContainerName.BOTTOM_RIGHT];\n var allMiddleNoFW = [exports.RowContainerName.CENTER, exports.RowContainerName.LEFT, exports.RowContainerName.RIGHT];\n var allNoFW = __spread$7(allTopNoFW, allBottomNoFW, allMiddleNoFW);\n var allMiddle = [exports.RowContainerName.CENTER, exports.RowContainerName.LEFT, exports.RowContainerName.RIGHT, exports.RowContainerName.FULL_WIDTH];\n var allCenter = [exports.RowContainerName.CENTER, exports.RowContainerName.TOP_CENTER, exports.RowContainerName.BOTTOM_CENTER];\n var allLeft = [exports.RowContainerName.LEFT, exports.RowContainerName.BOTTOM_LEFT, exports.RowContainerName.TOP_LEFT];\n var allRight = [exports.RowContainerName.RIGHT, exports.RowContainerName.BOTTOM_RIGHT, exports.RowContainerName.TOP_RIGHT];\n this.forContainers(allLeft, function () { return _this.createManagedBean(new SetPinnedLeftWidthFeature(_this.eContainer)); });\n this.forContainers(allRight, function () { return _this.createManagedBean(new SetPinnedRightWidthFeature(_this.eContainer)); });\n this.forContainers(allMiddle, function () { return _this.createManagedBean(new SetHeightFeature(_this.eContainer, _this.eWrapper)); });\n this.forContainers(allNoFW, function () { return _this.createManagedBean(new DragListenerFeature(_this.eContainer)); });\n this.forContainers(allCenter, function () { return _this.createManagedBean(new CenterWidthFeature(function (width) { return _this.comp.setContainerWidth(width + \"px\"); })); });\n this.addListeners();\n this.registerWithCtrlsService();\n };\n RowContainerCtrl.prototype.addListeners = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, function () { return _this.onScrollVisibilityChanged(); });\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, function () { return _this.onDisplayedColumnsChanged(); });\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, function () { return _this.onDisplayedColumnsWidthChanged(); });\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_ROWS_CHANGED, function () { return _this.onDisplayedRowsChanged(); });\n this.onScrollVisibilityChanged();\n this.onDisplayedColumnsChanged();\n this.onDisplayedColumnsWidthChanged();\n this.onDisplayedRowsChanged();\n };\n RowContainerCtrl.prototype.listenOnDomOrder = function () {\n var _this = this;\n var listener = function () { return _this.comp.setDomOrder(_this.gridOptionsWrapper.isEnsureDomOrder()); };\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, listener);\n listener();\n };\n // when editing a pinned row, if the cell is half outside the scrollable area, the browser can\n // scroll the column into view. we do not want this, the pinned sections should never scroll.\n // so we listen to scrolls on these containers and reset the scroll if we find one.\n RowContainerCtrl.prototype.stopHScrollOnPinnedRows = function () {\n var _this = this;\n this.forContainers([exports.RowContainerName.TOP_CENTER, exports.RowContainerName.BOTTOM_CENTER], function () {\n var resetScrollLeft = function () { return _this.eViewport.scrollLeft = 0; };\n _this.addManagedListener(_this.eViewport, 'scroll', resetScrollLeft);\n });\n };\n RowContainerCtrl.prototype.onDisplayedColumnsChanged = function () {\n var _this = this;\n this.forContainers([exports.RowContainerName.CENTER], function () { return _this.onHorizontalViewportChanged(); });\n };\n RowContainerCtrl.prototype.onDisplayedColumnsWidthChanged = function () {\n var _this = this;\n this.forContainers([exports.RowContainerName.CENTER], function () { return _this.onHorizontalViewportChanged(); });\n };\n RowContainerCtrl.prototype.onScrollVisibilityChanged = function () {\n if (this.name !== exports.RowContainerName.CENTER) {\n return;\n }\n var visible = this.scrollVisibleService.isHorizontalScrollShowing();\n var scrollbarWidth = visible ? (this.gridOptionsWrapper.getScrollbarWidth() || 0) : 0;\n var height = scrollbarWidth == 0 ? '100%' : \"calc(100% + \" + scrollbarWidth + \"px)\";\n this.comp.setViewportHeight(height);\n };\n // this methods prevents the grid views from being scrolled while the dragService is being used\n // eg. the view should not scroll up and down while dragging rows using the rowDragComp.\n RowContainerCtrl.prototype.addPreventScrollWhileDragging = function () {\n var _this = this;\n var preventScroll = function (e) {\n if (_this.dragService.isDragging()) {\n if (e.cancelable) {\n e.preventDefault();\n }\n }\n };\n this.eContainer.addEventListener('touchmove', preventScroll, { passive: false });\n this.addDestroyFunc(function () { return _this.eContainer.removeEventListener('touchmove', preventScroll); });\n };\n // this gets called whenever a change in the viewport, so we can inform column controller it has to work\n // out the virtual columns again. gets called from following locations:\n // + ensureColVisible, scroll, init, layoutChanged, displayedColumnsChanged, API (doLayout)\n RowContainerCtrl.prototype.onHorizontalViewportChanged = function () {\n var scrollWidth = this.getCenterWidth();\n var scrollPosition = this.getCenterViewportScrollLeft();\n this.columnModel.setViewportPosition(scrollWidth, scrollPosition);\n };\n RowContainerCtrl.prototype.getCenterWidth = function () {\n return getInnerWidth(this.eViewport);\n };\n RowContainerCtrl.prototype.getCenterViewportScrollLeft = function () {\n // we defer to a util, as how you calculated scrollLeft when doing RTL depends on the browser\n return getScrollLeft(this.eViewport, this.enableRtl);\n };\n RowContainerCtrl.prototype.registerViewportResizeListener = function (listener) {\n var unsubscribeFromResize = this.resizeObserverService.observeResize(this.eViewport, listener);\n this.addDestroyFunc(function () { return unsubscribeFromResize(); });\n };\n RowContainerCtrl.prototype.isViewportVisible = function () {\n return isVisible(this.eViewport);\n };\n RowContainerCtrl.prototype.isViewportHScrollShowing = function () {\n return isHorizontalScrollShowing(this.eViewport);\n };\n RowContainerCtrl.prototype.getViewportScrollLeft = function () {\n return getScrollLeft(this.eViewport, this.enableRtl);\n };\n RowContainerCtrl.prototype.isHorizontalScrollShowing = function () {\n var isAlwaysShowHorizontalScroll = this.gridOptionsWrapper.isAlwaysShowHorizontalScroll();\n return isAlwaysShowHorizontalScroll || isHorizontalScrollShowing(this.eViewport);\n };\n RowContainerCtrl.prototype.getViewportElement = function () {\n return this.eViewport;\n };\n RowContainerCtrl.prototype.setContainerTranslateX = function (amount) {\n this.eContainer.style.transform = \"translateX(\" + amount + \"px)\";\n };\n RowContainerCtrl.prototype.getHScrollPosition = function () {\n var res = {\n left: this.eViewport.scrollLeft,\n right: this.eViewport.scrollLeft + this.eViewport.offsetWidth\n };\n return res;\n };\n RowContainerCtrl.prototype.setCenterViewportScrollLeft = function (value) {\n // we defer to a util, as how you calculated scrollLeft when doing RTL depends on the browser\n setScrollLeft(this.eViewport, value, this.enableRtl);\n };\n RowContainerCtrl.prototype.onDisplayedRowsChanged = function () {\n var _this = this;\n var fullWithContainer = this.name === exports.RowContainerName.TOP_FULL_WIDTH\n || this.name === exports.RowContainerName.BOTTOM_FULL_WIDTH\n || this.name === exports.RowContainerName.FULL_WIDTH;\n var doesRowMatch = function (rowCtrl) {\n var fullWidthRow = rowCtrl.isFullWidth();\n var printLayout = _this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n var embedFW = _this.embedFullWidthRows || printLayout;\n var match = fullWithContainer ?\n !embedFW && fullWidthRow\n : embedFW || !fullWidthRow;\n return match;\n };\n // this list contains either all pinned top, center or pinned bottom rows\n var allRowsRegardlessOfFullWidth = this.getRowCtrls();\n // this filters out rows not for this container, eg if it's a full with row, but we are not full with container\n var rowsThisContainer = allRowsRegardlessOfFullWidth.filter(doesRowMatch);\n this.comp.setRowCtrls(rowsThisContainer);\n };\n RowContainerCtrl.prototype.getRowCtrls = function () {\n switch (this.name) {\n case exports.RowContainerName.TOP_CENTER:\n case exports.RowContainerName.TOP_LEFT:\n case exports.RowContainerName.TOP_RIGHT:\n case exports.RowContainerName.TOP_FULL_WIDTH:\n return this.rowRenderer.getTopRowCtrls();\n case exports.RowContainerName.BOTTOM_CENTER:\n case exports.RowContainerName.BOTTOM_LEFT:\n case exports.RowContainerName.BOTTOM_RIGHT:\n case exports.RowContainerName.BOTTOM_FULL_WIDTH:\n return this.rowRenderer.getBottomRowCtrls();\n default:\n return this.rowRenderer.getRowCtrls();\n }\n };\n __decorate$W([\n Autowired('scrollVisibleService')\n ], RowContainerCtrl.prototype, \"scrollVisibleService\", void 0);\n __decorate$W([\n Autowired('dragService')\n ], RowContainerCtrl.prototype, \"dragService\", void 0);\n __decorate$W([\n Autowired('ctrlsService')\n ], RowContainerCtrl.prototype, \"ctrlsService\", void 0);\n __decorate$W([\n Autowired('columnModel')\n ], RowContainerCtrl.prototype, \"columnModel\", void 0);\n __decorate$W([\n Autowired('resizeObserverService')\n ], RowContainerCtrl.prototype, \"resizeObserverService\", void 0);\n __decorate$W([\n Autowired('rowRenderer')\n ], RowContainerCtrl.prototype, \"rowRenderer\", void 0);\n __decorate$W([\n PostConstruct\n ], RowContainerCtrl.prototype, \"postConstruct\", null);\n return RowContainerCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$18 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$X = (undefined && undefined.__decorate) || function (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};\nvar GRID_BODY_TEMPLATE = /* html */ \"
\\n \\n
\\n \\n \\n \\n \\n
\\n
\\n \\n \\n \\n \\n
\\n
\\n \\n \\n \\n \\n
\\n \\n \\n
\";\nvar GridBodyComp = /** @class */ (function (_super) {\n __extends$18(GridBodyComp, _super);\n function GridBodyComp() {\n return _super.call(this, GRID_BODY_TEMPLATE) || this;\n }\n GridBodyComp.prototype.init = function () {\n var _this = this;\n var setHeight = function (height, element) {\n var heightString = height + \"px\";\n element.style.minHeight = heightString;\n element.style.height = heightString;\n };\n var compProxy = {\n setRowAnimationCssOnBodyViewport: function (cssClass, animate) { return _this.setRowAnimationCssOnBodyViewport(cssClass, animate); },\n setColumnCount: function (count) { return setAriaColCount(_this.getGui(), count); },\n setRowCount: function (count) { return setAriaRowCount(_this.getGui(), count); },\n setTopHeight: function (height) { return setHeight(height, _this.eTop); },\n setBottomHeight: function (height) { return setHeight(height, _this.eBottom); },\n setTopDisplay: function (display) { return _this.eTop.style.display = display; },\n setBottomDisplay: function (display) { return _this.eBottom.style.display = display; },\n setColumnMovingCss: function (cssClass, flag) { return _this.addOrRemoveCssClass(CSS_CLASS_COLUMN_MOVING, flag); },\n updateLayoutClasses: function (cssClass, params) {\n var bodyViewportClassList = _this.eBodyViewport.classList;\n bodyViewportClassList.toggle(exports.LayoutCssClasses.AUTO_HEIGHT, params.autoHeight);\n bodyViewportClassList.toggle(exports.LayoutCssClasses.NORMAL, params.normal);\n bodyViewportClassList.toggle(exports.LayoutCssClasses.PRINT, params.print);\n _this.addOrRemoveCssClass(exports.LayoutCssClasses.AUTO_HEIGHT, params.autoHeight);\n _this.addOrRemoveCssClass(exports.LayoutCssClasses.NORMAL, params.normal);\n _this.addOrRemoveCssClass(exports.LayoutCssClasses.PRINT, params.print);\n },\n setAlwaysVerticalScrollClass: function (cssClass, on) {\n return _this.eBodyViewport.classList.toggle(CSS_CLASS_FORCE_VERTICAL_SCROLL, on);\n },\n registerBodyViewportResizeListener: function (listener) {\n var unsubscribeFromResize = _this.resizeObserverService.observeResize(_this.eBodyViewport, listener);\n _this.addDestroyFunc(function () { return unsubscribeFromResize(); });\n },\n setPinnedTopBottomOverflowY: function (overflow) { return _this.eTop.style.overflowY = _this.eBottom.style.overflowY = overflow; },\n setCellSelectableCss: function (cssClass, selectable) {\n [_this.eTop, _this.eBodyViewport, _this.eBottom]\n .forEach(function (ct) { return ct.classList.toggle(CSS_CLASS_CELL_SELECTABLE, selectable); });\n },\n };\n this.ctrl = this.createManagedBean(new GridBodyCtrl());\n this.ctrl.setComp(compProxy, this.getGui(), this.eBodyViewport, this.eTop, this.eBottom);\n if (this.rangeService || this.gridOptionsWrapper.isRowSelectionMulti()) {\n setAriaMultiSelectable(this.getGui(), true);\n }\n };\n GridBodyComp.prototype.setRowAnimationCssOnBodyViewport = function (cssClass, animateRows) {\n var bodyViewportClassList = this.eBodyViewport.classList;\n bodyViewportClassList.toggle(exports.RowAnimationCssClasses.ANIMATION_ON, animateRows);\n bodyViewportClassList.toggle(exports.RowAnimationCssClasses.ANIMATION_OFF, !animateRows);\n };\n GridBodyComp.prototype.getFloatingTopBottom = function () {\n return [this.eTop, this.eBottom];\n };\n __decorate$X([\n Autowired('resizeObserverService')\n ], GridBodyComp.prototype, \"resizeObserverService\", void 0);\n __decorate$X([\n Optional('rangeService')\n ], GridBodyComp.prototype, \"rangeService\", void 0);\n __decorate$X([\n RefSelector('eBodyViewport')\n ], GridBodyComp.prototype, \"eBodyViewport\", void 0);\n __decorate$X([\n RefSelector('eTop')\n ], GridBodyComp.prototype, \"eTop\", void 0);\n __decorate$X([\n RefSelector('eBottom')\n ], GridBodyComp.prototype, \"eBottom\", void 0);\n __decorate$X([\n RefSelector('gridHeader')\n ], GridBodyComp.prototype, \"headerRootComp\", void 0);\n __decorate$X([\n PostConstruct\n ], GridBodyComp.prototype, \"init\", null);\n return GridBodyComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$19 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$Y = (undefined && undefined.__decorate) || function (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};\nvar ScrollVisibleService = /** @class */ (function (_super) {\n __extends$19(ScrollVisibleService, _super);\n function ScrollVisibleService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ScrollVisibleService.prototype.postConstruct = function () {\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onDisplayedColumnsWidthChanged.bind(this));\n };\n ScrollVisibleService.prototype.onDisplayedColumnsChanged = function () {\n this.update();\n };\n ScrollVisibleService.prototype.onDisplayedColumnsWidthChanged = function () {\n this.update();\n };\n ScrollVisibleService.prototype.update = function () {\n // because of column animation (which takes 200ms), we have to do this twice.\n // eg if user removes cols anywhere except at the RHS, then the cols on the RHS\n // will animate to the left to fill the gap. this animation means just after\n // the cols are removed, the remaining cols are still in the original location\n // at the start of the animation, so pre animation the H scrollbar is still needed,\n // but post animation it is not.\n this.updateImpl();\n setTimeout(this.updateImpl.bind(this), 500);\n };\n ScrollVisibleService.prototype.updateImpl = function () {\n var centerRowCtrl = this.ctrlsService.getCenterRowContainerCtrl();\n if (!centerRowCtrl) {\n return;\n }\n var params = {\n horizontalScrollShowing: centerRowCtrl.isHorizontalScrollShowing(),\n verticalScrollShowing: this.isVerticalScrollShowing()\n };\n this.setScrollsVisible(params);\n };\n ScrollVisibleService.prototype.setScrollsVisible = function (params) {\n var atLeastOneDifferent = this.horizontalScrollShowing !== params.horizontalScrollShowing ||\n this.verticalScrollShowing !== params.verticalScrollShowing;\n if (atLeastOneDifferent) {\n this.horizontalScrollShowing = params.horizontalScrollShowing;\n this.verticalScrollShowing = params.verticalScrollShowing;\n var event_1 = {\n type: Events.EVENT_SCROLL_VISIBILITY_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n };\n // used by pagination service - to know page height\n ScrollVisibleService.prototype.isHorizontalScrollShowing = function () {\n return this.horizontalScrollShowing;\n };\n // used by header container\n ScrollVisibleService.prototype.isVerticalScrollShowing = function () {\n return this.verticalScrollShowing;\n };\n __decorate$Y([\n Autowired('columnApi')\n ], ScrollVisibleService.prototype, \"columnApi\", void 0);\n __decorate$Y([\n Autowired('gridApi')\n ], ScrollVisibleService.prototype, \"gridApi\", void 0);\n __decorate$Y([\n Autowired('ctrlsService')\n ], ScrollVisibleService.prototype, \"ctrlsService\", void 0);\n __decorate$Y([\n PostConstruct\n ], ScrollVisibleService.prototype, \"postConstruct\", null);\n ScrollVisibleService = __decorate$Y([\n Bean('scrollVisibleService')\n ], ScrollVisibleService);\n return ScrollVisibleService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1a = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$Z = (undefined && undefined.__decorate) || function (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};\nvar MouseEventService = /** @class */ (function (_super) {\n __extends$1a(MouseEventService, _super);\n function MouseEventService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.gridInstanceId = MouseEventService_1.gridInstanceSequence.next();\n return _this;\n }\n MouseEventService_1 = MouseEventService;\n // we put the instance id onto the main DOM element. this is used for events, when grids are inside grids,\n // so the grid can work out if the even came from this grid or a grid inside this one. see the ctrl+v logic\n // for where this is used.\n MouseEventService.prototype.stampTopLevelGridCompWithGridInstance = function (eGridDiv) {\n eGridDiv[MouseEventService_1.GRID_DOM_KEY] = this.gridInstanceId;\n };\n MouseEventService.prototype.getRenderedCellForEvent = function (event) {\n return getCtrlForEvent(this.gridOptionsWrapper, event, CellCtrl.DOM_DATA_KEY_CELL_CTRL);\n };\n // walks the path of the event, and returns true if this grid is the first one that it finds. if doing\n // master / detail grids, and a child grid is found, then it returns false. this stops things like copy/paste\n // getting executed on many grids at the same time.\n MouseEventService.prototype.isEventFromThisGrid = function (event) {\n var res = this.isElementInThisGrid(event.target);\n return res;\n };\n MouseEventService.prototype.isElementInThisGrid = function (element) {\n var pointer = element;\n while (pointer) {\n var instanceId = pointer[MouseEventService_1.GRID_DOM_KEY];\n if (exists(instanceId)) {\n var eventFromThisGrid = instanceId === this.gridInstanceId;\n return eventFromThisGrid;\n }\n pointer = pointer.parentElement;\n }\n return false;\n };\n MouseEventService.prototype.getCellPositionForEvent = function (event) {\n var cellComp = this.getRenderedCellForEvent(event);\n return cellComp ? cellComp.getCellPosition() : null;\n };\n MouseEventService.prototype.getNormalisedPosition = function (event) {\n var gridPanelHasScrolls = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_NORMAL;\n var e = event;\n var x;\n var y;\n if (e.clientX != null || e.clientY != null) {\n x = e.clientX;\n y = e.clientY;\n }\n else {\n x = e.x;\n y = e.y;\n }\n if (gridPanelHasScrolls) {\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n var vRange = gridBodyCon.getScrollFeature().getVScrollPosition();\n var hRange = gridBodyCon.getScrollFeature().getHScrollPosition();\n x += hRange.left;\n y += vRange.top;\n }\n return { x: x, y: y };\n };\n var MouseEventService_1;\n MouseEventService.gridInstanceSequence = new NumberSequence();\n MouseEventService.GRID_DOM_KEY = '__ag_grid_instance';\n __decorate$Z([\n Autowired('ctrlsService')\n ], MouseEventService.prototype, \"ctrlsService\", void 0);\n MouseEventService = MouseEventService_1 = __decorate$Z([\n Bean('mouseEventService')\n ], MouseEventService);\n return MouseEventService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1b = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$c = (undefined && undefined.__assign) || function () {\n __assign$c = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$c.apply(this, arguments);\n};\nvar __decorate$_ = (undefined && undefined.__decorate) || function (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};\nvar NavigationService = /** @class */ (function (_super) {\n __extends$1b(NavigationService, _super);\n function NavigationService() {\n var _this = _super.call(this) || this;\n _this.onPageDown = throttle(_this.onPageDown, 100);\n _this.onPageUp = throttle(_this.onPageUp, 100);\n return _this;\n }\n NavigationService.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function (p) {\n _this.gridBodyCon = p.gridBodyCtrl;\n });\n };\n NavigationService.prototype.handlePageScrollingKey = function (event) {\n var key = event.key;\n var alt = event.altKey;\n var ctrl = event.ctrlKey || event.metaKey;\n var rangeServiceShouldHandleShift = !!this.rangeService && event.shiftKey;\n var currentCell = this.mouseEventService.getCellPositionForEvent(event);\n if (!currentCell) {\n return false;\n }\n var processed = false;\n switch (key) {\n case KeyCode.PAGE_HOME:\n case KeyCode.PAGE_END:\n // handle home and end when ctrl & alt are NOT pressed\n if (!ctrl && !alt) {\n this.onHomeOrEndKey(key);\n processed = true;\n }\n break;\n case KeyCode.LEFT:\n case KeyCode.RIGHT:\n case KeyCode.UP:\n case KeyCode.DOWN:\n // handle when ctrl is pressed only, if shift is pressed\n // it will be handled by the rangeService\n if (ctrl && !alt && !rangeServiceShouldHandleShift) {\n this.onCtrlUpDownLeftRight(key, currentCell);\n processed = true;\n }\n break;\n case KeyCode.PAGE_DOWN:\n // handle page up and page down when ctrl & alt are NOT pressed\n if (!ctrl && !alt) {\n this.onPageDown(currentCell);\n processed = true;\n }\n break;\n case KeyCode.PAGE_UP:\n // handle page up and page down when ctrl & alt are NOT pressed\n if (!ctrl && !alt) {\n this.onPageUp(currentCell);\n processed = true;\n }\n break;\n }\n if (processed) {\n event.preventDefault();\n }\n return processed;\n };\n NavigationService.prototype.navigateTo = function (navigateParams) {\n var scrollIndex = navigateParams.scrollIndex, scrollType = navigateParams.scrollType, scrollColumn = navigateParams.scrollColumn, focusIndex = navigateParams.focusIndex, focusColumn = navigateParams.focusColumn;\n if (exists(scrollColumn) && !scrollColumn.isPinned()) {\n this.gridBodyCon.getScrollFeature().ensureColumnVisible(scrollColumn);\n }\n if (exists(scrollIndex)) {\n this.gridBodyCon.getScrollFeature().ensureIndexVisible(scrollIndex, scrollType);\n }\n // make sure the cell is rendered, needed if we are to focus\n this.animationFrameService.flushAllFrames();\n // if we don't do this, the range will be left on the last cell, which will leave the last focused cell\n // highlighted.\n this.focusService.setFocusedCell(focusIndex, focusColumn, null, true);\n if (this.rangeService) {\n var cellPosition = { rowIndex: focusIndex, rowPinned: null, column: focusColumn };\n this.rangeService.setRangeToCell(cellPosition);\n }\n };\n NavigationService.prototype.onPageDown = function (gridCell) {\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n var scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();\n var pixelsInOnePage = this.getViewportHeight();\n var pagingPixelOffset = this.paginationProxy.getPixelOffset();\n var currentPageBottomPixel = scrollPosition.top + pixelsInOnePage;\n var currentPageBottomRow = this.paginationProxy.getRowIndexAtPixel(currentPageBottomPixel + pagingPixelOffset);\n if (this.columnModel.isAutoRowHeightActive()) {\n this.navigateToNextPageWithAutoHeight(gridCell, currentPageBottomRow);\n }\n else {\n this.navigateToNextPage(gridCell, currentPageBottomRow);\n }\n };\n NavigationService.prototype.onPageUp = function (gridCell) {\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n var scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();\n var pagingPixelOffset = this.paginationProxy.getPixelOffset();\n var currentPageTopPixel = scrollPosition.top;\n var currentPageTopRow = this.paginationProxy.getRowIndexAtPixel(currentPageTopPixel + pagingPixelOffset);\n if (this.columnModel.isAutoRowHeightActive()) {\n this.navigateToNextPageWithAutoHeight(gridCell, currentPageTopRow, true);\n }\n else {\n this.navigateToNextPage(gridCell, currentPageTopRow, true);\n }\n };\n NavigationService.prototype.navigateToNextPage = function (gridCell, scrollIndex, up) {\n if (up === void 0) { up = false; }\n var _a, _b;\n var pixelsInOnePage = this.getViewportHeight();\n var firstRow = this.paginationProxy.getPageFirstRow();\n var lastRow = this.paginationProxy.getPageLastRow();\n var pagingPixelOffset = this.paginationProxy.getPixelOffset();\n var currentRowNode = this.paginationProxy.getRow(gridCell.rowIndex);\n var rowPixelDiff = up\n ? (((_a = currentRowNode) === null || _a === void 0 ? void 0 : _a.rowHeight) - pixelsInOnePage - pagingPixelOffset)\n : (pixelsInOnePage - pagingPixelOffset);\n var nextCellPixel = ((_b = currentRowNode) === null || _b === void 0 ? void 0 : _b.rowTop) + rowPixelDiff;\n var focusIndex = this.paginationProxy.getRowIndexAtPixel(nextCellPixel + pagingPixelOffset);\n if (focusIndex === gridCell.rowIndex) {\n var diff = up ? -1 : 1;\n scrollIndex = focusIndex = gridCell.rowIndex + diff;\n }\n var scrollType;\n if (up) {\n scrollType = 'bottom';\n if (focusIndex < firstRow) {\n focusIndex = firstRow;\n }\n if (scrollIndex < firstRow) {\n scrollIndex = firstRow;\n }\n }\n else {\n scrollType = 'top';\n if (focusIndex > lastRow) {\n focusIndex = lastRow;\n }\n if (scrollIndex > lastRow) {\n scrollIndex = lastRow;\n }\n }\n if (this.isRowTallerThanView(focusIndex)) {\n scrollIndex = focusIndex;\n scrollType = 'top';\n }\n this.navigateTo({\n scrollIndex: scrollIndex,\n scrollType: scrollType,\n scrollColumn: null,\n focusIndex: focusIndex,\n focusColumn: gridCell.column\n });\n };\n NavigationService.prototype.navigateToNextPageWithAutoHeight = function (gridCell, scrollIndex, up) {\n var _this = this;\n if (up === void 0) { up = false; }\n // because autoHeight will calculate the height of rows after scroll\n // first we scroll towards the required point, then we add a small\n // delay to allow the height to be recalculated, check which index\n // should be focused and then finally navigate to that index.\n // TODO: we should probably have an event fired once to scrollbar has\n // settled and all rowHeights have been calculated instead of relying\n // on a setTimeout of 50ms.\n this.navigateTo({\n scrollIndex: scrollIndex,\n scrollType: up ? 'bottom' : 'top',\n scrollColumn: null,\n focusIndex: scrollIndex,\n focusColumn: gridCell.column\n });\n setTimeout(function () {\n var focusIndex = _this.getNextFocusIndexForAutoHeight(gridCell, up);\n _this.navigateTo({\n scrollIndex: scrollIndex,\n scrollType: up ? 'bottom' : 'top',\n scrollColumn: null,\n focusIndex: focusIndex,\n focusColumn: gridCell.column\n });\n }, 50);\n };\n NavigationService.prototype.getNextFocusIndexForAutoHeight = function (gridCell, up) {\n if (up === void 0) { up = false; }\n var _a;\n var step = up ? -1 : 1;\n var pixelsInOnePage = this.getViewportHeight();\n var lastRowIndex = this.paginationProxy.getPageLastRow();\n var pixelSum = 0;\n var currentIndex = gridCell.rowIndex;\n while (currentIndex >= 0 && currentIndex <= lastRowIndex) {\n var currentCell = this.paginationProxy.getRow(currentIndex);\n if (currentCell) {\n var currentCellHeight = (_a = currentCell.rowHeight, (_a !== null && _a !== void 0 ? _a : 0));\n if (pixelSum + currentCellHeight > pixelsInOnePage) {\n break;\n }\n pixelSum += currentCellHeight;\n }\n currentIndex += step;\n }\n return Math.max(0, Math.min(currentIndex, lastRowIndex));\n };\n NavigationService.prototype.getViewportHeight = function () {\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n var scrollPosition = gridBodyCon.getScrollFeature().getVScrollPosition();\n var scrollbarWidth = this.gridOptionsWrapper.getScrollbarWidth();\n var pixelsInOnePage = scrollPosition.bottom - scrollPosition.top;\n if (this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()) {\n pixelsInOnePage -= scrollbarWidth;\n }\n return pixelsInOnePage;\n };\n NavigationService.prototype.isRowTallerThanView = function (rowIndex) {\n var rowNode = this.paginationProxy.getRow(rowIndex);\n if (!rowNode) {\n return false;\n }\n var rowHeight = rowNode.rowHeight;\n if (typeof rowHeight !== 'number') {\n return false;\n }\n return rowHeight > this.getViewportHeight();\n };\n NavigationService.prototype.onCtrlUpDownLeftRight = function (key, gridCell) {\n var cellToFocus = this.cellNavigationService.getNextCellToFocus(key, gridCell, true);\n var rowIndex = cellToFocus.rowIndex, column = cellToFocus.column;\n this.navigateTo({\n scrollIndex: rowIndex,\n scrollType: null,\n scrollColumn: column,\n focusIndex: rowIndex,\n focusColumn: column\n });\n };\n // home brings focus to top left cell, end brings focus to bottom right, grid scrolled to bring\n // same cell into view (which means either scroll all the way up, or all the way down).\n NavigationService.prototype.onHomeOrEndKey = function (key) {\n var homeKey = key === KeyCode.PAGE_HOME;\n var allColumns = this.columnModel.getAllDisplayedColumns();\n var columnToSelect = homeKey ? allColumns[0] : last(allColumns);\n var scrollIndex = homeKey ? this.paginationProxy.getPageFirstRow() : this.paginationProxy.getPageLastRow();\n this.navigateTo({\n scrollIndex: scrollIndex,\n scrollType: null,\n scrollColumn: columnToSelect,\n focusIndex: scrollIndex,\n focusColumn: columnToSelect\n });\n };\n // result of keyboard event\n NavigationService.prototype.onTabKeyDown = function (previous, keyboardEvent) {\n var backwards = keyboardEvent.shiftKey;\n var movedToNextCell = this.tabToNextCellCommon(previous, backwards, keyboardEvent);\n if (movedToNextCell) {\n // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default\n // to the normal tabbing so user can exit the grid.\n keyboardEvent.preventDefault();\n return;\n }\n // if we didn't move to next cell, then need to tab out of the cells, ie to the header (if going\n // backwards)\n if (backwards) {\n var _a = previous.getRowPosition(), rowIndex = _a.rowIndex, rowPinned = _a.rowPinned;\n var firstRow = rowPinned ? rowIndex === 0 : rowIndex === this.paginationProxy.getPageFirstRow();\n if (firstRow) {\n keyboardEvent.preventDefault();\n this.focusService.focusLastHeader(keyboardEvent);\n }\n }\n else {\n // if the case it's a popup editor, the focus is on the editor and not the previous cell.\n // in order for the tab navigation to work, we need to focus the browser back onto the\n // previous cell.\n if (previous instanceof CellCtrl) {\n previous.focusCell(true);\n }\n if (this.focusService.focusNextGridCoreContainer(backwards)) {\n keyboardEvent.preventDefault();\n }\n }\n };\n // comes from API\n NavigationService.prototype.tabToNextCell = function (backwards, event) {\n var focusedCell = this.focusService.getFocusedCell();\n // if no focus, then cannot navigate\n if (!focusedCell) {\n return false;\n }\n var cellOrRow = this.getCellByPosition(focusedCell);\n // if cell is not rendered, means user has scrolled away from the cell\n // or that the focusedCell is a Full Width Row\n if (!cellOrRow) {\n cellOrRow = this.rowRenderer.getRowByPosition(focusedCell);\n if (!cellOrRow || !cellOrRow.isFullWidth()) {\n return false;\n }\n }\n return this.tabToNextCellCommon(cellOrRow, backwards, event);\n };\n NavigationService.prototype.tabToNextCellCommon = function (previous, backwards, event) {\n var editing = previous.isEditing();\n // if cell is not editing, there is still chance row is editing if it's Full Row Editing\n if (!editing && previous instanceof CellCtrl) {\n var cell = previous;\n var row = cell.getRowCtrl();\n if (row) {\n editing = row.isEditing();\n }\n }\n var res;\n if (editing) {\n // if we are editing, we know it's not a Full Width Row (RowComp)\n if (this.gridOptionsWrapper.isFullRowEdit()) {\n res = this.moveToNextEditingRow(previous, backwards, event);\n }\n else {\n res = this.moveToNextEditingCell(previous, backwards, event);\n }\n }\n else {\n res = this.moveToNextCellNotEditing(previous, backwards);\n }\n // if a cell wasn't found, it's possible that focus was moved to the header\n return res || !!this.focusService.getFocusedHeader();\n };\n NavigationService.prototype.moveToNextEditingCell = function (previousCell, backwards, event) {\n if (event === void 0) { event = null; }\n var previousPos = previousCell.getCellPosition();\n // need to do this before getting next cell to edit, in case the next cell\n // has editable function (eg colDef.editable=func() ) and it depends on the\n // result of this cell, so need to save updates from the first edit, in case\n // the value is referenced in the function.\n previousCell.stopEditing();\n // find the next cell to start editing\n var nextCell = this.findNextCellToFocusOn(previousPos, backwards, true);\n if (nextCell == null) {\n return false;\n }\n // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default\n // to the normal tabbing so user can exit the grid.\n nextCell.startEditing(null, null, true, event);\n nextCell.focusCell(false);\n return true;\n };\n NavigationService.prototype.moveToNextEditingRow = function (previousCell, backwards, event) {\n if (event === void 0) { event = null; }\n var previousPos = previousCell.getCellPosition();\n // find the next cell to start editing\n var nextCell = this.findNextCellToFocusOn(previousPos, backwards, true);\n if (nextCell == null) {\n return false;\n }\n var nextPos = nextCell.getCellPosition();\n var previousEditable = this.isCellEditable(previousPos);\n var nextEditable = this.isCellEditable(nextPos);\n var rowsMatch = nextPos && previousPos.rowIndex === nextPos.rowIndex && previousPos.rowPinned === nextPos.rowPinned;\n if (previousEditable) {\n previousCell.setFocusOutOnEditor();\n }\n if (!rowsMatch) {\n var pRow = previousCell.getRowCtrl();\n pRow.stopEditing();\n var nRow = nextCell.getRowCtrl();\n nRow.startRowEditing(undefined, undefined, undefined, event);\n }\n if (nextEditable) {\n nextCell.setFocusInOnEditor();\n nextCell.focusCell();\n }\n else {\n nextCell.focusCell(true);\n }\n return true;\n };\n NavigationService.prototype.moveToNextCellNotEditing = function (previousCell, backwards) {\n var displayedColumns = this.columnModel.getAllDisplayedColumns();\n var cellPos;\n if (previousCell instanceof RowCtrl) {\n cellPos = __assign$c(__assign$c({}, previousCell.getRowPosition()), { column: backwards ? displayedColumns[0] : last(displayedColumns) });\n }\n else {\n cellPos = previousCell.getCellPosition();\n }\n // find the next cell to start editing\n var nextCell = this.findNextCellToFocusOn(cellPos, backwards, false);\n // only prevent default if we found a cell. so if user is on last cell and hits tab, then we default\n // to the normal tabbing so user can exit the grid.\n if (nextCell instanceof CellCtrl) {\n nextCell.focusCell(true);\n }\n else if (nextCell) {\n return this.tryToFocusFullWidthRow(nextCell.getRowPosition(), backwards);\n }\n return exists(nextCell);\n };\n // called by the cell, when tab is pressed while editing.\n // @return: RenderedCell when navigation successful, otherwise null\n NavigationService.prototype.findNextCellToFocusOn = function (previousPosition, backwards, startEditing) {\n var nextPosition = previousPosition;\n while (true) {\n if (previousPosition !== nextPosition) {\n previousPosition = nextPosition;\n }\n if (!backwards) {\n nextPosition = this.getLastCellOfColSpan(nextPosition);\n }\n nextPosition = this.cellNavigationService.getNextTabbedCell(nextPosition, backwards);\n // allow user to override what cell to go to next\n var userFunc = this.gridOptionsWrapper.getTabToNextCellFunc();\n if (exists(userFunc)) {\n var params = {\n backwards: backwards,\n editing: startEditing,\n previousCellPosition: previousPosition,\n nextCellPosition: nextPosition ? nextPosition : null\n };\n var userCell = userFunc(params);\n if (exists(userCell)) {\n if (userCell.floating) {\n doOnce(function () { console.warn(\"AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?\"); }, 'no floating in userCell');\n userCell.rowPinned = userCell.floating;\n }\n nextPosition = {\n rowIndex: userCell.rowIndex,\n column: userCell.column,\n rowPinned: userCell.rowPinned\n };\n }\n else {\n nextPosition = null;\n }\n }\n // if no 'next cell', means we have got to last cell of grid, so nothing to move to,\n // so bottom right cell going forwards, or top left going backwards\n if (!nextPosition) {\n return null;\n }\n if (nextPosition.rowIndex < 0) {\n var headerLen = this.headerNavigationService.getHeaderRowCount();\n this.focusService.focusHeaderPosition({\n headerPosition: {\n headerRowIndex: headerLen + (nextPosition.rowIndex),\n column: nextPosition.column\n }\n });\n return null;\n }\n // if editing, but cell not editable, skip cell. we do this before we do all of\n // the 'ensure index visible' and 'flush all frames', otherwise if we are skipping\n // a bunch of cells (eg 10 rows) then all the work on ensuring cell visible is useless\n // (except for the last one) which causes grid to stall for a while.\n // note - for full row edit, we do focus non-editable cells, as the row stays in edit mode.\n var fullRowEdit = this.gridOptionsWrapper.isFullRowEdit();\n if (startEditing && !fullRowEdit) {\n var cellIsEditable = this.isCellEditable(nextPosition);\n if (!cellIsEditable) {\n continue;\n }\n }\n this.ensureCellVisible(nextPosition);\n // we have to call this after ensureColumnVisible - otherwise it could be a virtual column\n // or row that is not currently in view, hence the renderedCell would not exist\n var nextCell = this.getCellByPosition(nextPosition);\n // if next cell is fullWidth row, then no rendered cell,\n // as fullWidth rows have no cells, so we skip it\n if (!nextCell) {\n var row = this.rowRenderer.getRowByPosition(nextPosition);\n if (!row || !row.isFullWidth()) {\n continue;\n }\n else {\n return row;\n }\n }\n if (nextCell.isSuppressNavigable()) {\n continue;\n }\n // by default, when we click a cell, it gets selected into a range, so to keep keyboard navigation\n // consistent, we set into range here also.\n if (this.rangeService) {\n this.rangeService.setRangeToCell(nextPosition);\n }\n // we successfully tabbed onto a grid cell, so return true\n return nextCell;\n }\n };\n NavigationService.prototype.isCellEditable = function (cell) {\n var rowNode = this.lookupRowNodeForCell(cell);\n if (rowNode) {\n return cell.column.isCellEditable(rowNode);\n }\n return false;\n };\n NavigationService.prototype.getCellByPosition = function (cellPosition) {\n var rowCtrl = this.rowRenderer.getRowByPosition(cellPosition);\n if (!rowCtrl) {\n return null;\n }\n return rowCtrl.getCellCtrl(cellPosition.column);\n };\n NavigationService.prototype.lookupRowNodeForCell = function (cell) {\n if (cell.rowPinned === Constants.PINNED_TOP) {\n return this.pinnedRowModel.getPinnedTopRow(cell.rowIndex);\n }\n if (cell.rowPinned === Constants.PINNED_BOTTOM) {\n return this.pinnedRowModel.getPinnedBottomRow(cell.rowIndex);\n }\n return this.paginationProxy.getRow(cell.rowIndex);\n };\n // we use index for rows, but column object for columns, as the next column (by index) might not\n // be visible (header grouping) so it's not reliable, so using the column object instead.\n NavigationService.prototype.navigateToNextCell = function (event, key, currentCell, allowUserOverride) {\n // we keep searching for a next cell until we find one. this is how the group rows get skipped\n var nextCell = currentCell;\n var hitEdgeOfGrid = false;\n while (nextCell && (nextCell === currentCell || !this.isValidNavigateCell(nextCell))) {\n // if the current cell is spanning across multiple columns, we need to move\n // our current position to be the last cell on the right before finding the\n // the next target.\n if (this.gridOptionsWrapper.isEnableRtl()) {\n if (key === KeyCode.LEFT) {\n nextCell = this.getLastCellOfColSpan(nextCell);\n }\n }\n else if (key === KeyCode.RIGHT) {\n nextCell = this.getLastCellOfColSpan(nextCell);\n }\n nextCell = this.cellNavigationService.getNextCellToFocus(key, nextCell);\n // eg if going down, and nextCell=undefined, means we are gone past the last row\n hitEdgeOfGrid = missing(nextCell);\n }\n if (hitEdgeOfGrid && event && event.key === KeyCode.UP) {\n nextCell = {\n rowIndex: -1,\n rowPinned: null,\n column: currentCell.column\n };\n }\n // allow user to override what cell to go to next. when doing normal cell navigation (with keys)\n // we allow this, however if processing 'enter after edit' we don't allow override\n if (allowUserOverride) {\n var userFunc = this.gridOptionsWrapper.getNavigateToNextCellFunc();\n if (exists(userFunc)) {\n var params = {\n key: key,\n previousCellPosition: currentCell,\n nextCellPosition: nextCell ? nextCell : null,\n event: event\n };\n var userCell = userFunc(params);\n if (exists(userCell)) {\n if (userCell.floating) {\n doOnce(function () { console.warn(\"AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?\"); }, 'no floating in userCell');\n userCell.rowPinned = userCell.floating;\n }\n nextCell = {\n rowPinned: userCell.rowPinned,\n rowIndex: userCell.rowIndex,\n column: userCell.column\n };\n }\n else {\n nextCell = null;\n }\n }\n }\n // no next cell means we have reached a grid boundary, eg left, right, top or bottom of grid\n if (!nextCell) {\n return;\n }\n if (nextCell.rowIndex < 0) {\n var headerLen = this.headerNavigationService.getHeaderRowCount();\n this.focusService.focusHeaderPosition({\n headerPosition: { headerRowIndex: headerLen + (nextCell.rowIndex), column: currentCell.column },\n event: event || undefined\n });\n return;\n }\n // in case we have col spanning we get the cellComp and use it to get the\n // position. This was we always focus the first cell inside the spanning.\n var normalisedPosition = this.getNormalisedPosition(nextCell);\n if (normalisedPosition) {\n this.focusPosition(normalisedPosition);\n }\n else {\n this.tryToFocusFullWidthRow(nextCell);\n }\n };\n NavigationService.prototype.getNormalisedPosition = function (cellPosition) {\n // ensureCellVisible first, to make sure cell at position is rendered.\n this.ensureCellVisible(cellPosition);\n var cellComp = this.getCellByPosition(cellPosition);\n // not guaranteed to have a cellComp when using the SSRM as blocks are loading.\n if (!cellComp) {\n return null;\n }\n cellPosition = cellComp.getCellPosition();\n // we call this again, as nextCell can be different to it's previous value due to Column Spanning\n // (ie if cursor moving from right to left, and cell is spanning columns, then nextCell was the\n // last column in the group, however now it's the first column in the group). if we didn't do\n // ensureCellVisible again, then we could only be showing the last portion (last column) of the\n // merged cells.\n this.ensureCellVisible(cellPosition);\n return cellPosition;\n };\n NavigationService.prototype.tryToFocusFullWidthRow = function (position, backwards) {\n if (backwards === void 0) { backwards = false; }\n var displayedColumns = this.columnModel.getAllDisplayedColumns();\n var rowComp = this.rowRenderer.getRowByPosition(position);\n if (!rowComp || !rowComp.isFullWidth()) {\n return false;\n }\n var currentCellFocused = this.focusService.getFocusedCell();\n var cellPosition = {\n rowIndex: position.rowIndex,\n rowPinned: position.rowPinned,\n column: position.column || (backwards ? last(displayedColumns) : displayedColumns[0])\n };\n this.focusPosition(cellPosition);\n var fromBelow = currentCellFocused != null ? this.rowPositionUtils.before(cellPosition, currentCellFocused) : false;\n var focusEvent = {\n type: Events.EVENT_FULL_WIDTH_ROW_FOCUSED,\n api: this.gridApi,\n columnApi: this.columnApi,\n rowIndex: cellPosition.rowIndex,\n rowPinned: cellPosition.rowPinned,\n column: cellPosition.column,\n isFullWidthCell: true,\n floating: cellPosition.rowPinned,\n fromBelow: fromBelow\n };\n this.eventService.dispatchEvent(focusEvent);\n return true;\n };\n NavigationService.prototype.focusPosition = function (cellPosition) {\n this.focusService.setFocusedCell(cellPosition.rowIndex, cellPosition.column, cellPosition.rowPinned, true);\n if (this.rangeService) {\n this.rangeService.setRangeToCell(cellPosition);\n }\n };\n NavigationService.prototype.isValidNavigateCell = function (cell) {\n var rowNode = this.rowPositionUtils.getRowNode(cell);\n // we do not allow focusing on detail rows and full width rows\n return !!rowNode;\n };\n NavigationService.prototype.getLastCellOfColSpan = function (cell) {\n var cellCtrl = this.getCellByPosition(cell);\n if (!cellCtrl) {\n return cell;\n }\n var colSpanningList = cellCtrl.getColSpanningList();\n if (colSpanningList.length === 1) {\n return cell;\n }\n return {\n rowIndex: cell.rowIndex,\n column: last(colSpanningList),\n rowPinned: cell.rowPinned\n };\n };\n NavigationService.prototype.ensureCellVisible = function (gridCell) {\n // this scrolls the row into view\n if (missing(gridCell.rowPinned)) {\n this.gridBodyCon.getScrollFeature().ensureIndexVisible(gridCell.rowIndex);\n }\n if (!gridCell.column.isPinned()) {\n this.gridBodyCon.getScrollFeature().ensureColumnVisible(gridCell.column);\n }\n // need to nudge the scrolls for the floating items. otherwise when we set focus on a non-visible\n // floating cell, the scrolls get out of sync\n this.gridBodyCon.getScrollFeature().horizontallyScrollHeaderCenterAndFloatingCenter();\n // need to flush frames, to make sure the correct cells are rendered\n this.animationFrameService.flushAllFrames();\n };\n __decorate$_([\n Autowired('columnApi')\n ], NavigationService.prototype, \"columnApi\", void 0);\n __decorate$_([\n Autowired('gridApi')\n ], NavigationService.prototype, \"gridApi\", void 0);\n __decorate$_([\n Autowired('mouseEventService')\n ], NavigationService.prototype, \"mouseEventService\", void 0);\n __decorate$_([\n Autowired('paginationProxy')\n ], NavigationService.prototype, \"paginationProxy\", void 0);\n __decorate$_([\n Autowired('focusService')\n ], NavigationService.prototype, \"focusService\", void 0);\n __decorate$_([\n Autowired('animationFrameService')\n ], NavigationService.prototype, \"animationFrameService\", void 0);\n __decorate$_([\n Optional('rangeService')\n ], NavigationService.prototype, \"rangeService\", void 0);\n __decorate$_([\n Autowired('columnModel')\n ], NavigationService.prototype, \"columnModel\", void 0);\n __decorate$_([\n Autowired('ctrlsService')\n ], NavigationService.prototype, \"ctrlsService\", void 0);\n __decorate$_([\n Autowired('rowRenderer')\n ], NavigationService.prototype, \"rowRenderer\", void 0);\n __decorate$_([\n Autowired('headerNavigationService')\n ], NavigationService.prototype, \"headerNavigationService\", void 0);\n __decorate$_([\n Autowired(\"rowPositionUtils\")\n ], NavigationService.prototype, \"rowPositionUtils\", void 0);\n __decorate$_([\n Autowired(\"cellNavigationService\")\n ], NavigationService.prototype, \"cellNavigationService\", void 0);\n __decorate$_([\n Autowired(\"pinnedRowModel\")\n ], NavigationService.prototype, \"pinnedRowModel\", void 0);\n __decorate$_([\n PostConstruct\n ], NavigationService.prototype, \"postConstruct\", null);\n NavigationService = __decorate$_([\n Bean('navigationService')\n ], NavigationService);\n return NavigationService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1c = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$$ = (undefined && undefined.__decorate) || function (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};\nvar PopupEditorWrapper = /** @class */ (function (_super) {\n __extends$1c(PopupEditorWrapper, _super);\n function PopupEditorWrapper(params) {\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.params = params;\n return _this;\n }\n PopupEditorWrapper.prototype.postConstruct = function () {\n this.gridOptionsWrapper.setDomData(this.getGui(), PopupEditorWrapper.DOM_KEY_POPUP_EDITOR_WRAPPER, true);\n this.addKeyDownListener();\n };\n PopupEditorWrapper.prototype.addKeyDownListener = function () {\n var _this = this;\n var eGui = this.getGui();\n var params = this.params;\n var listener = function (event) {\n if (!isUserSuppressingKeyboardEvent(_this.gridOptionsWrapper, event, params.node, params.column, true)) {\n params.onKeyDown(event);\n }\n };\n this.addManagedListener(eGui, 'keydown', listener);\n };\n PopupEditorWrapper.DOM_KEY_POPUP_EDITOR_WRAPPER = 'popupEditorWrapper';\n __decorate$$([\n PostConstruct\n ], PopupEditorWrapper.prototype, \"postConstruct\", null);\n return PopupEditorWrapper;\n}(PopupComponent));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1d = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar CellComp = /** @class */ (function (_super) {\n __extends$1d(CellComp, _super);\n function CellComp(beans, cellCtrl, printLayout, eRow, editingRow) {\n var _this = _super.call(this) || this;\n // every time we go into edit mode, or back again, this gets incremented.\n // it's the components way of dealing with the async nature of framework components,\n // so if a framework component takes a while to be created, we know if the object\n // is still relevant when creating is finished. eg we could click edit / un-edit 20\n // times before the first React edit component comes back - we should discard\n // the first 19.\n _this.rendererVersion = 0;\n _this.editorVersion = 0;\n _this.beans = beans;\n _this.column = cellCtrl.getColumn();\n _this.rowNode = cellCtrl.getRowNode();\n _this.rowCtrl = cellCtrl.getRowCtrl();\n _this.eRow = eRow;\n _this.setTemplate(/* html */ \"
\");\n var eGui = _this.getGui();\n _this.forceWrapper = cellCtrl.isForceWrapper();\n _this.refreshWrapper(false);\n var setAttribute = function (name, value, element) {\n var actualElement = element ? element : eGui;\n if (value != null && value != '') {\n actualElement.setAttribute(name, value);\n }\n else {\n actualElement.removeAttribute(name);\n }\n };\n var compProxy = {\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n setUserStyles: function (styles) { return addStylesToElement(eGui, styles); },\n getFocusableElement: function () { return _this.getFocusableElement(); },\n setTabIndex: function (tabIndex) { return setAttribute('tabindex', tabIndex.toString()); },\n setRole: function (role) { return setAriaRole(eGui, role); },\n setColId: function (colId) { return setAttribute('col-id', colId); },\n setTitle: function (title) { return setAttribute('title', title); },\n setIncludeSelection: function (include) { return _this.includeSelection = include; },\n setIncludeRowDrag: function (include) { return _this.includeRowDrag = include; },\n setIncludeDndSource: function (include) { return _this.includeDndSource = include; },\n setRenderDetails: function (compDetails, valueToDisplay, force) {\n return _this.setRenderDetails(compDetails, valueToDisplay, force);\n },\n setEditDetails: function (compDetails, popup, position) {\n return _this.setEditDetails(compDetails, popup, position);\n },\n getCellEditor: function () { return _this.cellEditor || null; },\n getCellRenderer: function () { return _this.cellRenderer || null; },\n getParentOfValue: function () { return _this.getParentOfValue(); }\n };\n _this.cellCtrl = cellCtrl;\n cellCtrl.setComp(compProxy, _this.getGui(), _this.eCellWrapper, printLayout, editingRow);\n return _this;\n }\n CellComp.prototype.getParentOfValue = function () {\n if (this.eCellValue) {\n // if not editing, and using wrapper, then value goes in eCellValue\n return this.eCellValue;\n }\n if (this.eCellWrapper) {\n // if editing, and using wrapper, value (cell editor) goes in eCellWrapper\n return this.eCellWrapper;\n }\n // if editing or rendering, and not using wrapper, value (or comp) is directly inside cell\n return this.getGui();\n };\n CellComp.prototype.setRenderDetails = function (compDetails, valueToDisplay, forceNewCellRendererInstance) {\n // this can happen if the users asks for the cell to refresh, but we are not showing the vale as we are editing\n var isInlineEditing = this.cellEditor && !this.cellEditorPopupWrapper;\n if (isInlineEditing) {\n return;\n }\n // this means firstRender will be true for one pass only, as it's initialised to undefined\n this.firstRender = this.firstRender == null;\n // if display template has changed, means any previous Cell Renderer is in the wrong location\n var controlWrapperChanged = this.refreshWrapper(false);\n // all of these have dependencies on the eGui, so only do them after eGui is set\n if (compDetails) {\n var neverRefresh = forceNewCellRendererInstance || controlWrapperChanged;\n var cellRendererRefreshSuccessful = neverRefresh ? false : this.refreshCellRenderer(compDetails);\n if (!cellRendererRefreshSuccessful) {\n this.destroyRenderer();\n this.createCellRendererInstance(compDetails);\n }\n }\n else {\n this.destroyRenderer();\n this.insertValueWithoutCellRenderer(valueToDisplay);\n }\n };\n CellComp.prototype.setEditDetails = function (compDetails, popup, position) {\n if (compDetails) {\n this.createCellEditorInstance(compDetails, popup, position);\n }\n else {\n this.destroyEditor();\n }\n };\n CellComp.prototype.removeControls = function () {\n this.checkboxSelectionComp = this.beans.context.destroyBean(this.checkboxSelectionComp);\n this.dndSourceComp = this.beans.context.destroyBean(this.dndSourceComp);\n this.rowDraggingComp = this.beans.context.destroyBean(this.rowDraggingComp);\n };\n // returns true if wrapper was changed\n CellComp.prototype.refreshWrapper = function (editing) {\n var providingControls = this.includeRowDrag || this.includeDndSource || this.includeSelection;\n var usingWrapper = providingControls || this.forceWrapper;\n var putWrapperIn = usingWrapper && this.eCellWrapper == null;\n if (putWrapperIn) {\n this.eCellWrapper = loadTemplate(\"
\");\n this.getGui().appendChild(this.eCellWrapper);\n }\n var takeWrapperOut = !usingWrapper && this.eCellWrapper != null;\n if (takeWrapperOut) {\n removeFromParent(this.eCellWrapper);\n this.eCellWrapper = undefined;\n }\n this.addOrRemoveCssClass('ag-cell-value', !usingWrapper);\n var usingCellValue = !editing && usingWrapper;\n var putCellValueIn = usingCellValue && this.eCellValue == null;\n if (putCellValueIn) {\n this.eCellValue = loadTemplate(\"\");\n this.eCellWrapper.appendChild(this.eCellValue);\n }\n var takeCellValueOut = !usingCellValue && this.eCellValue != null;\n if (takeCellValueOut) {\n removeFromParent(this.eCellValue);\n this.eCellValue = undefined;\n }\n var templateChanged = putWrapperIn || takeWrapperOut || putCellValueIn || takeCellValueOut;\n if (templateChanged) {\n this.removeControls();\n }\n if (!editing && providingControls) {\n this.addControls();\n }\n return templateChanged;\n };\n CellComp.prototype.addControls = function () {\n var id = this.eCellValue.id = \"cell-\" + this.getCompId();\n var describedByIds = [];\n if (this.includeRowDrag) {\n if (this.rowDraggingComp == null) {\n this.rowDraggingComp = this.cellCtrl.createRowDragComp();\n if (this.rowDraggingComp) {\n // put the checkbox in before the value\n this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(), this.eCellValue);\n }\n }\n }\n if (this.includeDndSource) {\n if (this.dndSourceComp == null) {\n this.dndSourceComp = this.cellCtrl.createDndSource();\n // put the checkbox in before the value\n this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(), this.eCellValue);\n }\n }\n if (this.includeSelection) {\n if (this.checkboxSelectionComp == null) {\n this.checkboxSelectionComp = this.cellCtrl.createSelectionCheckbox();\n this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(), this.eCellValue);\n }\n describedByIds.push(this.checkboxSelectionComp.getCheckboxId());\n }\n describedByIds.push(id);\n setAriaDescribedBy(this.getGui(), describedByIds.join(' '));\n };\n CellComp.prototype.createCellEditorInstance = function (compDetails, popup, position) {\n var _this = this;\n var versionCopy = this.editorVersion;\n var cellEditorPromise = compDetails.newAgStackInstance();\n if (!cellEditorPromise) {\n return;\n } // if empty, userComponentFactory already did a console message\n var params = compDetails.params;\n cellEditorPromise.then(function (c) { return _this.afterCellEditorCreated(versionCopy, c, params, popup, position); });\n // if we don't do this, and editor component is async, then there will be a period\n // when the component isn't present and keyboard navigation won't work - so example\n // of user hitting tab quickly (more quickly than renderers getting created) won't work\n var cellEditorAsync = missing(this.cellEditor);\n if (cellEditorAsync && params.cellStartedEdit) {\n this.cellCtrl.focusCell(true);\n }\n };\n CellComp.prototype.insertValueWithoutCellRenderer = function (valueToDisplay) {\n var eParent = this.getParentOfValue();\n clearElement(eParent);\n var escapedValue = valueToDisplay != null ? escapeString(valueToDisplay) : null;\n if (escapedValue != null) {\n eParent.innerHTML = escapedValue;\n }\n };\n CellComp.prototype.destroyEditorAndRenderer = function () {\n this.destroyRenderer();\n this.destroyEditor();\n };\n CellComp.prototype.destroyRenderer = function () {\n var context = this.beans.context;\n this.cellRenderer = context.destroyBean(this.cellRenderer);\n removeFromParent(this.cellRendererGui);\n this.cellRendererGui = null;\n this.rendererVersion++;\n };\n CellComp.prototype.destroyEditor = function () {\n var context = this.beans.context;\n if (this.hideEditorPopup) {\n this.hideEditorPopup();\n }\n this.hideEditorPopup = undefined;\n this.cellEditor = context.destroyBean(this.cellEditor);\n this.cellEditorPopupWrapper = context.destroyBean(this.cellEditorPopupWrapper);\n removeFromParent(this.cellEditorGui);\n this.cellEditorGui = null;\n this.editorVersion++;\n };\n CellComp.prototype.refreshCellRenderer = function (compClassAndParams) {\n if (this.cellRenderer == null || this.cellRenderer.refresh == null) {\n return false;\n }\n // if different Cell Renderer configured this time (eg user is using selector, and\n // returns different component) then don't refresh, force recreate of Cell Renderer\n if (this.cellRendererClass !== compClassAndParams.componentClass) {\n return false;\n }\n // take any custom params off of the user\n var result = this.cellRenderer.refresh(compClassAndParams.params);\n // NOTE on undefined: previous version of the cellRenderer.refresh() interface\n // returned nothing, if the method existed, we assumed it refreshed. so for\n // backwards compatibility, we assume if method exists and returns nothing,\n // that it was successful.\n return result === true || result === undefined;\n };\n CellComp.prototype.createCellRendererInstance = function (compDetails) {\n var _this = this;\n // never use task service if angularCompileRows=true, as that assume the cell renderers\n // are finished when the row is created. also we never use it if animation frame service\n // is turned off.\n // and lastly we never use it if doing auto-height, as the auto-height service checks the\n // row height directly after the cell is created, it doesn't wait around for the tasks to complete\n var angularCompileRows = this.beans.gridOptionsWrapper.isAngularCompileRows();\n var suppressAnimationFrame = this.beans.gridOptionsWrapper.isSuppressAnimationFrame();\n var useTaskService = !angularCompileRows && !suppressAnimationFrame;\n var displayComponentVersionCopy = this.rendererVersion;\n var componentClass = compDetails.componentClass;\n var createCellRendererFunc = function () {\n var staleTask = _this.rendererVersion !== displayComponentVersionCopy || !_this.isAlive();\n if (staleTask) {\n return;\n }\n // this can return null in the event that the user has switched from a renderer component to nothing, for example\n // when using a cellRendererSelect to return a component or null depending on row data etc\n var componentPromise = compDetails.newAgStackInstance();\n var callback = _this.afterCellRendererCreated.bind(_this, displayComponentVersionCopy, componentClass);\n if (componentPromise) {\n componentPromise.then(callback);\n }\n };\n // we only use task service when rendering for first time, which means it is not used when doing edits.\n // if we changed this (always use task service) would make sense, however it would break tests, possibly\n // test of users.\n if (useTaskService && this.firstRender) {\n this.beans.animationFrameService.createTask(createCellRendererFunc, this.rowNode.rowIndex, 'createTasksP2');\n }\n else {\n createCellRendererFunc();\n }\n };\n CellComp.prototype.getCtrl = function () {\n return this.cellCtrl;\n };\n CellComp.prototype.getRowCtrl = function () {\n return this.rowCtrl;\n };\n CellComp.prototype.getCellRenderer = function () {\n return this.cellRenderer;\n };\n CellComp.prototype.getCellEditor = function () {\n return this.cellEditor;\n };\n CellComp.prototype.afterCellRendererCreated = function (cellRendererVersion, cellRendererClass, cellRenderer) {\n var staleTask = !this.isAlive() || cellRendererVersion !== this.rendererVersion;\n if (staleTask) {\n this.beans.context.destroyBean(cellRenderer);\n return;\n }\n this.cellRenderer = cellRenderer;\n this.cellRendererClass = cellRendererClass;\n this.cellRendererGui = this.cellRenderer.getGui();\n if (this.cellRendererGui != null) {\n var eParent = this.getParentOfValue();\n clearElement(eParent);\n eParent.appendChild(this.cellRendererGui);\n }\n };\n CellComp.prototype.afterCellEditorCreated = function (requestVersion, cellEditor, params, popup, position) {\n // if editingCell=false, means user cancelled the editor before component was ready.\n // if versionMismatch, then user cancelled the edit, then started the edit again, and this\n // is the first editor which is now stale.\n var staleComp = requestVersion !== this.editorVersion;\n if (staleComp) {\n this.beans.context.destroyBean(cellEditor);\n return;\n }\n var editingCancelledByUserComp = cellEditor.isCancelBeforeStart && cellEditor.isCancelBeforeStart();\n if (editingCancelledByUserComp) {\n this.beans.context.destroyBean(cellEditor);\n this.cellCtrl.stopEditing();\n return;\n }\n if (!cellEditor.getGui) {\n console.warn(\"AG Grid: cellEditor for column \" + this.column.getId() + \" is missing getGui() method\");\n this.beans.context.destroyBean(cellEditor);\n return;\n }\n this.cellEditor = cellEditor;\n this.cellEditorGui = cellEditor.getGui();\n var cellEditorInPopup = popup || (cellEditor.isPopup !== undefined && cellEditor.isPopup());\n if (cellEditorInPopup) {\n if (!popup) {\n this.cellCtrl.hackSayEditingInPopup();\n }\n this.addPopupCellEditor(params, position);\n }\n else {\n this.addInCellEditor();\n }\n if (cellEditor.afterGuiAttached) {\n cellEditor.afterGuiAttached();\n }\n };\n CellComp.prototype.addInCellEditor = function () {\n var eGui = this.getGui();\n // if focus is inside the cell, we move focus to the cell itself\n // before removing it's contents, otherwise errors could be thrown.\n var eDocument = this.beans.gridOptionsWrapper.getDocument();\n if (eGui.contains(eDocument.activeElement)) {\n eGui.focus();\n }\n this.destroyRenderer();\n this.refreshWrapper(true);\n this.clearParentOfValue();\n if (this.cellEditorGui) {\n var eParent = this.getParentOfValue();\n eParent.appendChild(this.cellEditorGui);\n }\n };\n CellComp.prototype.addPopupCellEditor = function (params, position) {\n var _this = this;\n if (this.beans.gridOptionsWrapper.isFullRowEdit()) {\n console.warn('AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both ' +\n '- either turn off fullRowEdit, or stop using popup editors.');\n }\n var cellEditor = this.cellEditor;\n // if a popup, then we wrap in a popup editor and return the popup\n this.cellEditorPopupWrapper = this.beans.context.createBean(new PopupEditorWrapper(params));\n var ePopupGui = this.cellEditorPopupWrapper.getGui();\n if (this.cellEditorGui) {\n ePopupGui.appendChild(this.cellEditorGui);\n }\n var popupService = this.beans.popupService;\n var useModelPopup = this.beans.gridOptionsWrapper.isStopEditingWhenCellsLoseFocus();\n // see if position provided by colDef, if not then check old way of method on cellComp\n var positionToUse = position != null ? position : cellEditor.getPopupPosition ? cellEditor.getPopupPosition() : 'over';\n var positionParams = {\n column: this.column,\n rowNode: this.rowNode,\n type: 'popupCellEditor',\n eventSource: this.getGui(),\n ePopup: ePopupGui,\n keepWithinBounds: true\n };\n var positionCallback = positionToUse === 'under' ?\n popupService.positionPopupUnderComponent.bind(popupService, positionParams)\n : popupService.positionPopupOverComponent.bind(popupService, positionParams);\n var translate = this.beans.gridOptionsWrapper.getLocaleTextFunc();\n var addPopupRes = popupService.addPopup({\n modal: useModelPopup,\n eChild: ePopupGui,\n closeOnEsc: true,\n closedCallback: function () { _this.cellCtrl.onPopupEditorClosed(); },\n anchorToElement: this.getGui(),\n positionCallback: positionCallback,\n ariaLabel: translate('ariaLabelCellEditor', 'Cell Editor')\n });\n if (addPopupRes) {\n this.hideEditorPopup = addPopupRes.hideFunc;\n }\n };\n CellComp.prototype.detach = function () {\n this.eRow.removeChild(this.getGui());\n };\n // if the row is also getting destroyed, then we don't need to remove from dom,\n // as the row will also get removed, so no need to take out the cells from the row\n // if the row is going (removing is an expensive operation, so only need to remove\n // the top part)\n //\n // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.\n CellComp.prototype.destroy = function () {\n this.cellCtrl.stopEditing();\n this.destroyEditorAndRenderer();\n this.removeControls();\n _super.prototype.destroy.call(this);\n };\n CellComp.prototype.clearParentOfValue = function () {\n var eGui = this.getGui();\n // if focus is inside the cell, we move focus to the cell itself\n // before removing it's contents, otherwise errors could be thrown.\n var eDocument = this.beans.gridOptionsWrapper.getDocument();\n if (eGui.contains(eDocument.activeElement)) {\n eGui.focus({\n preventScroll: true\n });\n }\n clearElement(this.getParentOfValue());\n };\n return CellComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1e = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar RowComp = /** @class */ (function (_super) {\n __extends$1e(RowComp, _super);\n function RowComp(ctrl, beans, containerType) {\n var _this = _super.call(this) || this;\n _this.cellComps = {};\n _this.beans = beans;\n _this.rowCtrl = ctrl;\n _this.setTemplate(/* html */ \"
\");\n var eGui = _this.getGui();\n var style = eGui.style;\n var compProxy = {\n setDomOrder: function (domOrder) { return _this.domOrder = domOrder; },\n setCellCtrls: function (cellCtrls) { return _this.setCellCtrls(cellCtrls); },\n showFullWidth: function (compDetails) { return _this.showFullWidth(compDetails); },\n getFullWidthCellRenderer: function () { return _this.getFullWidthCellRenderer(); },\n addOrRemoveCssClass: function (name, on) { return _this.addOrRemoveCssClass(name, on); },\n setUserStyles: function (styles) { return addStylesToElement(eGui, styles); },\n setTop: function (top) { return style.top = top; },\n setTransform: function (transform) { return style.transform = transform; },\n setRowIndex: function (rowIndex) { return eGui.setAttribute('row-index', rowIndex); },\n setRole: function (role) { return setAriaRole(eGui, role); },\n setRowId: function (rowId) { return eGui.setAttribute('row-id', rowId); },\n setRowBusinessKey: function (businessKey) { return eGui.setAttribute('row-business-key', businessKey); },\n setTabIndex: function (tabIndex) { return eGui.setAttribute('tabindex', tabIndex.toString()); }\n };\n ctrl.setComp(compProxy, _this.getGui(), containerType);\n return _this;\n }\n RowComp.prototype.getInitialStyle = function () {\n var transform = this.rowCtrl.getInitialTransform();\n var top = this.rowCtrl.getInitialRowTop();\n return transform ? \"transform: \" + transform : \"top: \" + top;\n };\n RowComp.prototype.showFullWidth = function (compDetails) {\n var _this = this;\n var callback = function (cellRenderer) {\n if (_this.isAlive()) {\n var eGui = cellRenderer.getGui();\n _this.getGui().appendChild(eGui);\n _this.rowCtrl.setupDetailRowAutoHeight(eGui);\n _this.setFullWidthRowComp(cellRenderer);\n }\n else {\n _this.beans.context.destroyBean(cellRenderer);\n }\n };\n // if not in cache, create new one\n var res = compDetails.newAgStackInstance();\n if (!res) {\n return;\n }\n res.then(callback);\n };\n RowComp.prototype.setCellCtrls = function (cellCtrls) {\n var _this = this;\n var cellsToRemove = Object.assign({}, this.cellComps);\n cellCtrls.forEach(function (cellCtrl) {\n var key = cellCtrl.getInstanceId();\n var existingCellComp = _this.cellComps[key];\n if (existingCellComp == null) {\n _this.newCellComp(cellCtrl);\n }\n else {\n cellsToRemove[key] = null;\n }\n });\n var cellCompsToRemove = getAllValuesInObject(cellsToRemove)\n .filter(function (cellComp) { return cellComp != null; });\n this.destroyCells(cellCompsToRemove);\n this.ensureDomOrder(cellCtrls);\n };\n RowComp.prototype.ensureDomOrder = function (cellCtrls) {\n var _this = this;\n if (!this.domOrder) {\n return;\n }\n var elementsInOrder = [];\n cellCtrls.forEach(function (cellCtrl) {\n var cellComp = _this.cellComps[cellCtrl.getInstanceId()];\n if (cellComp) {\n elementsInOrder.push(cellComp.getGui());\n }\n });\n setDomChildOrder(this.getGui(), elementsInOrder);\n };\n RowComp.prototype.newCellComp = function (cellCtrl) {\n var cellComp = new CellComp(this.beans, cellCtrl, this.rowCtrl.isPrintLayout(), this.getGui(), this.rowCtrl.isEditing());\n this.cellComps[cellCtrl.getInstanceId()] = cellComp;\n this.getGui().appendChild(cellComp.getGui());\n };\n RowComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.destroyAllCells();\n };\n RowComp.prototype.destroyAllCells = function () {\n var cellsToDestroy = getAllValuesInObject(this.cellComps).filter(function (cp) { return cp != null; });\n this.destroyCells(cellsToDestroy);\n };\n RowComp.prototype.setFullWidthRowComp = function (fullWidthRowComponent) {\n var _this = this;\n if (this.fullWidthCellRenderer) {\n console.error('AG Grid - should not be setting fullWidthRowComponent twice');\n }\n this.fullWidthCellRenderer = fullWidthRowComponent;\n this.addDestroyFunc(function () {\n _this.fullWidthCellRenderer = _this.beans.context.destroyBean(_this.fullWidthCellRenderer);\n });\n };\n RowComp.prototype.getFullWidthCellRenderer = function () {\n return this.fullWidthCellRenderer;\n };\n RowComp.prototype.destroyCells = function (cellComps) {\n var _this = this;\n cellComps.forEach(function (cellComp) {\n // could be old reference, ie removed cell\n if (!cellComp) {\n return;\n }\n // check cellComp belongs in this container\n var instanceId = cellComp.getCtrl().getInstanceId();\n if (_this.cellComps[instanceId] !== cellComp) {\n return;\n }\n cellComp.detach();\n cellComp.destroy();\n _this.cellComps[instanceId] = null;\n });\n };\n return RowComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1f = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$d = (undefined && undefined.__assign) || function () {\n __assign$d = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$d.apply(this, arguments);\n};\nvar __decorate$10 = (undefined && undefined.__decorate) || function (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};\nfunction templateFactory() {\n var name = Component.elementGettingCreated.getAttribute('name');\n var cssClasses = RowContainerCtrl.getRowContainerCssClasses(name);\n var res;\n var template1 = name === exports.RowContainerName.CENTER;\n var template2 = name === exports.RowContainerName.TOP_CENTER || name === exports.RowContainerName.BOTTOM_CENTER;\n if (template1) {\n res = /* html */\n \"
\\n
\\n
\\n
\\n
\";\n }\n else if (template2) {\n res = /* html */\n \"
\\n
\\n
\";\n }\n else {\n res = /* html */\n \"
\";\n }\n return res;\n}\nvar RowContainerComp = /** @class */ (function (_super) {\n __extends$1f(RowContainerComp, _super);\n function RowContainerComp() {\n var _this = _super.call(this, templateFactory()) || this;\n _this.rowComps = {};\n _this.name = Component.elementGettingCreated.getAttribute('name');\n _this.type = getRowContainerTypeForName(_this.name);\n return _this;\n }\n RowContainerComp.prototype.postConstruct = function () {\n var _this = this;\n var compProxy = {\n setViewportHeight: function (height) { return _this.eViewport.style.height = height; },\n setRowCtrls: function (rowCtrls) { return _this.setRowCtrls(rowCtrls); },\n setDomOrder: function (domOrder) {\n _this.domOrder = domOrder;\n },\n setContainerWidth: function (width) { return _this.eContainer.style.width = width; }\n };\n var ctrl = this.createManagedBean(new RowContainerCtrl(this.name));\n ctrl.setComp(compProxy, this.eContainer, this.eViewport, this.eWrapper);\n };\n RowContainerComp.prototype.preDestroy = function () {\n // destroys all row comps\n this.setRowCtrls([]);\n };\n RowContainerComp.prototype.setRowCtrls = function (rowCtrls) {\n var _this = this;\n var oldRows = __assign$d({}, this.rowComps);\n this.rowComps = {};\n this.lastPlacedElement = null;\n var processRow = function (rowCon) {\n var instanceId = rowCon.getInstanceId();\n var existingRowComp = oldRows[instanceId];\n if (existingRowComp) {\n _this.rowComps[instanceId] = existingRowComp;\n delete oldRows[instanceId];\n _this.ensureDomOrder(existingRowComp.getGui());\n }\n else {\n var rowComp = _this.newRowComp(rowCon);\n _this.rowComps[instanceId] = rowComp;\n _this.appendRow(rowComp.getGui());\n }\n };\n rowCtrls.forEach(processRow);\n getAllValuesInObject(oldRows).forEach(function (oldRowComp) {\n _this.eContainer.removeChild(oldRowComp.getGui());\n oldRowComp.destroy();\n });\n setAriaRole(this.eContainer, rowCtrls.length ? \"rowgroup\" : \"presentation\");\n };\n RowContainerComp.prototype.appendRow = function (element) {\n if (this.domOrder) {\n insertWithDomOrder(this.eContainer, element, this.lastPlacedElement);\n }\n else {\n this.eContainer.appendChild(element);\n }\n this.lastPlacedElement = element;\n };\n RowContainerComp.prototype.ensureDomOrder = function (eRow) {\n if (this.domOrder) {\n ensureDomOrder(this.eContainer, eRow, this.lastPlacedElement);\n this.lastPlacedElement = eRow;\n }\n };\n RowContainerComp.prototype.newRowComp = function (rowCtrl) {\n var pinned = RowContainerCtrl.getPinned(this.name);\n var res = new RowComp(rowCtrl, this.beans, this.type);\n return res;\n };\n __decorate$10([\n Autowired('beans')\n ], RowContainerComp.prototype, \"beans\", void 0);\n __decorate$10([\n RefSelector('eViewport')\n ], RowContainerComp.prototype, \"eViewport\", void 0);\n __decorate$10([\n RefSelector('eContainer')\n ], RowContainerComp.prototype, \"eContainer\", void 0);\n __decorate$10([\n RefSelector('eWrapper')\n ], RowContainerComp.prototype, \"eWrapper\", void 0);\n __decorate$10([\n PostConstruct\n ], RowContainerComp.prototype, \"postConstruct\", null);\n __decorate$10([\n PreDestroy\n ], RowContainerComp.prototype, \"preDestroy\", null);\n return RowContainerComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$11 = (undefined && undefined.__decorate) || function (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};\nvar BodyDropPivotTarget = /** @class */ (function () {\n function BodyDropPivotTarget(pinned) {\n this.columnsToAggregate = [];\n this.columnsToGroup = [];\n this.columnsToPivot = [];\n this.pinned = pinned;\n }\n /** Callback for when drag enters */\n BodyDropPivotTarget.prototype.onDragEnter = function (draggingEvent) {\n var _this = this;\n this.clearColumnsList();\n // in pivot mode, we don't accept any drops if functions are read only\n if (this.gridOptionsWrapper.isFunctionsReadOnly()) {\n return;\n }\n var dragColumns = draggingEvent.dragItem.columns;\n if (!dragColumns) {\n return;\n }\n dragColumns.forEach(function (column) {\n // we don't allow adding secondary columns\n if (!column.isPrimary()) {\n return;\n }\n if (column.isAnyFunctionActive()) {\n return;\n }\n if (column.isAllowValue()) {\n _this.columnsToAggregate.push(column);\n }\n else if (column.isAllowRowGroup()) {\n _this.columnsToGroup.push(column);\n }\n else if (column.isAllowPivot()) {\n _this.columnsToPivot.push(column);\n }\n });\n };\n BodyDropPivotTarget.prototype.getIconName = function () {\n var totalColumns = this.columnsToAggregate.length + this.columnsToGroup.length + this.columnsToPivot.length;\n if (totalColumns > 0) {\n return this.pinned ? DragAndDropService.ICON_PINNED : DragAndDropService.ICON_MOVE;\n }\n return null;\n };\n /** Callback for when drag leaves */\n BodyDropPivotTarget.prototype.onDragLeave = function (draggingEvent) {\n // if we are taking columns out of the center, then we remove them from the report\n this.clearColumnsList();\n };\n BodyDropPivotTarget.prototype.clearColumnsList = function () {\n this.columnsToAggregate.length = 0;\n this.columnsToGroup.length = 0;\n this.columnsToPivot.length = 0;\n };\n /** Callback for when dragging */\n BodyDropPivotTarget.prototype.onDragging = function (draggingEvent) {\n };\n /** Callback for when drag stops */\n BodyDropPivotTarget.prototype.onDragStop = function (draggingEvent) {\n if (this.columnsToAggregate.length > 0) {\n this.columnModel.addValueColumns(this.columnsToAggregate, \"toolPanelDragAndDrop\");\n }\n if (this.columnsToGroup.length > 0) {\n this.columnModel.addRowGroupColumns(this.columnsToGroup, \"toolPanelDragAndDrop\");\n }\n if (this.columnsToPivot.length > 0) {\n this.columnModel.addPivotColumns(this.columnsToPivot, \"toolPanelDragAndDrop\");\n }\n };\n __decorate$11([\n Autowired('columnModel')\n ], BodyDropPivotTarget.prototype, \"columnModel\", void 0);\n __decorate$11([\n Autowired('gridOptionsWrapper')\n ], BodyDropPivotTarget.prototype, \"gridOptionsWrapper\", void 0);\n return BodyDropPivotTarget;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$12 = (undefined && undefined.__decorate) || function (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};\nvar MoveColumnFeature = /** @class */ (function () {\n function MoveColumnFeature(pinned, eContainer) {\n this.needToMoveLeft = false;\n this.needToMoveRight = false;\n this.pinned = pinned;\n this.eContainer = eContainer;\n this.centerContainer = !exists(pinned);\n }\n MoveColumnFeature.prototype.init = function () {\n var _this = this;\n this.ctrlsService.whenReady(function () {\n _this.gridBodyCon = _this.ctrlsService.getGridBodyCtrl();\n });\n };\n MoveColumnFeature.prototype.getIconName = function () {\n return this.pinned ? DragAndDropService.ICON_PINNED : DragAndDropService.ICON_MOVE;\n };\n MoveColumnFeature.prototype.onDragEnter = function (draggingEvent) {\n // we do dummy drag, so make sure column appears in the right location when first placed\n var columns = draggingEvent.dragItem.columns;\n var dragCameFromToolPanel = draggingEvent.dragSource.type === exports.DragSourceType.ToolPanel;\n if (dragCameFromToolPanel) {\n // the if statement doesn't work if drag leaves grid, then enters again\n this.setColumnsVisible(columns, true, \"uiColumnDragged\");\n }\n else {\n // restore previous state of visible columns upon re-entering. this means if the user drags\n // a group out, and then drags the group back in, only columns that were originally visible\n // will be visible again. otherwise a group with three columns (but only two visible) could\n // be dragged out, then when it's dragged in again, all three are visible. this stops that.\n var visibleState_1 = draggingEvent.dragItem.visibleState;\n var visibleColumns = (columns || []).filter(function (column) { return visibleState_1[column.getId()]; });\n this.setColumnsVisible(visibleColumns, true, \"uiColumnDragged\");\n }\n this.setColumnsPinned(columns, this.pinned, \"uiColumnDragged\");\n this.onDragging(draggingEvent, true);\n };\n MoveColumnFeature.prototype.onDragLeave = function (draggingEvent) {\n var hideColumnOnExit = !this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns() && !draggingEvent.fromNudge;\n if (hideColumnOnExit) {\n var dragItem = draggingEvent.dragSource.getDragItem();\n var columns = dragItem.columns;\n this.setColumnsVisible(columns, false, \"uiColumnDragged\");\n }\n this.ensureIntervalCleared();\n };\n MoveColumnFeature.prototype.setColumnsVisible = function (columns, visible, source) {\n if (source === void 0) { source = \"api\"; }\n if (columns) {\n var allowedCols = columns.filter(function (c) { return !c.getColDef().lockVisible; });\n this.columnModel.setColumnsVisible(allowedCols, visible, source);\n }\n };\n MoveColumnFeature.prototype.setColumnsPinned = function (columns, pinned, source) {\n if (source === void 0) { source = \"api\"; }\n if (columns) {\n var allowedCols = columns.filter(function (c) { return !c.getColDef().lockPinned; });\n this.columnModel.setColumnsPinned(allowedCols, pinned, source);\n }\n };\n MoveColumnFeature.prototype.onDragStop = function () {\n this.ensureIntervalCleared();\n };\n MoveColumnFeature.prototype.normaliseX = function (x) {\n // flip the coordinate if doing RTL\n if (this.gridOptionsWrapper.isEnableRtl()) {\n var clientWidth = this.eContainer.clientWidth;\n x = clientWidth - x;\n }\n // adjust for scroll only if centre container (the pinned containers don't scroll)\n if (this.centerContainer) {\n x += this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();\n }\n return x;\n };\n MoveColumnFeature.prototype.checkCenterForScrolling = function (xAdjustedForScroll) {\n if (this.centerContainer) {\n // scroll if the mouse has gone outside the grid (or just outside the scrollable part if pinning)\n // putting in 50 buffer, so even if user gets to edge of grid, a scroll will happen\n var firstVisiblePixel = this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();\n var lastVisiblePixel = firstVisiblePixel + this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();\n if (this.gridOptionsWrapper.isEnableRtl()) {\n this.needToMoveRight = xAdjustedForScroll < (firstVisiblePixel + 50);\n this.needToMoveLeft = xAdjustedForScroll > (lastVisiblePixel - 50);\n }\n else {\n this.needToMoveLeft = xAdjustedForScroll < (firstVisiblePixel + 50);\n this.needToMoveRight = xAdjustedForScroll > (lastVisiblePixel - 50);\n }\n if (this.needToMoveLeft || this.needToMoveRight) {\n this.ensureIntervalStarted();\n }\n else {\n this.ensureIntervalCleared();\n }\n }\n };\n MoveColumnFeature.prototype.onDragging = function (draggingEvent, fromEnter) {\n var _this = this;\n if (fromEnter === void 0) { fromEnter = false; }\n this.lastDraggingEvent = draggingEvent;\n // if moving up or down (ie not left or right) then do nothing\n if (missing(draggingEvent.hDirection)) {\n return;\n }\n var mouseXNormalised = this.normaliseX(draggingEvent.x);\n // if the user is dragging into the panel, ie coming from the side panel into the main grid,\n // we don't want to scroll the grid this time, it would appear like the table is jumping\n // each time a column is dragged in.\n if (!fromEnter) {\n this.checkCenterForScrolling(mouseXNormalised);\n }\n var hDirectionNormalised = this.normaliseDirection(draggingEvent.hDirection);\n var dragSourceType = draggingEvent.dragSource.type;\n var columnsToMove = draggingEvent.dragSource.getDragItem().columns;\n columnsToMove = columnsToMove.filter(function (col) {\n if (col.getColDef().lockPinned) {\n // if locked return true only if both col and container are same pin type.\n // double equals (==) here on purpose so that null==undefined is true (for not pinned options)\n return col.getPinned() == _this.pinned;\n }\n // if not pin locked, then always allowed to be in this container\n return true;\n });\n this.attemptMoveColumns(dragSourceType, columnsToMove, hDirectionNormalised, mouseXNormalised, fromEnter);\n };\n MoveColumnFeature.prototype.normaliseDirection = function (hDirection) {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n switch (hDirection) {\n case exports.HorizontalDirection.Left: return exports.HorizontalDirection.Right;\n case exports.HorizontalDirection.Right: return exports.HorizontalDirection.Left;\n default: console.error(\"AG Grid: Unknown direction \" + hDirection);\n }\n }\n else {\n return hDirection;\n }\n };\n // returns the index of the first column in the list ONLY if the cols are all beside\n // each other. if the cols are not beside each other, then returns null\n MoveColumnFeature.prototype.calculateOldIndex = function (movingCols) {\n var gridCols = this.columnModel.getAllGridColumns();\n var indexes = sortNumerically(movingCols.map(function (col) { return gridCols.indexOf(col); }));\n var firstIndex = indexes[0];\n var lastIndex = last(indexes);\n var spread = lastIndex - firstIndex;\n var gapsExist = spread !== indexes.length - 1;\n return gapsExist ? null : firstIndex;\n };\n MoveColumnFeature.prototype.attemptMoveColumns = function (dragSourceType, allMovingColumns, hDirection, mouseX, fromEnter) {\n var draggingLeft = hDirection === exports.HorizontalDirection.Left;\n var draggingRight = hDirection === exports.HorizontalDirection.Right;\n // it is important to sort the moving columns as they are in grid columns, as the list of moving columns\n // could themselves be part of 'married children' groups, which means we need to maintain the order within\n // the moving list.\n var allMovingColumnsOrdered = allMovingColumns.slice();\n this.columnModel.sortColumnsLikeGridColumns(allMovingColumnsOrdered);\n var validMoves = this.calculateValidMoves(allMovingColumnsOrdered, draggingRight, mouseX);\n // if cols are not adjacent, then this returns null. when moving, we constrain the direction of the move\n // (ie left or right) to the mouse direction. however\n var oldIndex = this.calculateOldIndex(allMovingColumnsOrdered);\n if (validMoves.length === 0) {\n return;\n }\n var firstValidMove = validMoves[0];\n // the two check below stop an error when the user grabs a group my a middle column, then\n // it is possible the mouse pointer is to the right of a column while been dragged left.\n // so we need to make sure that the mouse pointer is actually left of the left most column\n // if moving left, and right of the right most column if moving right\n // we check 'fromEnter' below so we move the column to the new spot if the mouse is coming from\n // outside the grid, eg if the column is moving from side panel, mouse is moving left, then we should\n // place the column to the RHS even if the mouse is moving left and the column is already on\n // the LHS. otherwise we stick to the rule described above.\n var constrainDirection = oldIndex !== null && !fromEnter;\n // don't consider 'fromEnter' when dragging header cells, otherwise group can jump to opposite direction of drag\n if (dragSourceType == exports.DragSourceType.HeaderCell) {\n constrainDirection = oldIndex !== null;\n }\n if (constrainDirection) {\n // only allow left drag if this column is moving left\n if (draggingLeft && firstValidMove >= oldIndex) {\n return;\n }\n // only allow right drag if this column is moving right\n if (draggingRight && firstValidMove <= oldIndex) {\n return;\n }\n }\n for (var i = 0; i < validMoves.length; i++) {\n var move = validMoves[i];\n if (!this.columnModel.doesMovePassRules(allMovingColumnsOrdered, move)) {\n continue;\n }\n this.columnModel.moveColumns(allMovingColumnsOrdered, move, \"uiColumnDragged\");\n // important to return here, so once we do the first valid move, we don't try do any more\n return;\n }\n };\n MoveColumnFeature.prototype.calculateValidMoves = function (movingCols, draggingRight, mouseX) {\n var isMoveBlocked = this.gridOptionsWrapper.isSuppressMovableColumns() || movingCols.some(function (col) { return col.getColDef().suppressMovable; });\n if (isMoveBlocked) {\n return [];\n }\n // this is the list of cols on the screen, so it's these we use when comparing the x mouse position\n var allDisplayedCols = this.columnModel.getDisplayedColumns(this.pinned);\n // but this list is the list of all cols, when we move a col it's the index within this list that gets used,\n // so the result we return has to be and index location for this list\n var allGridCols = this.columnModel.getAllGridColumns();\n var movingDisplayedCols = allDisplayedCols.filter(function (col) { return includes(movingCols, col); });\n var otherDisplayedCols = allDisplayedCols.filter(function (col) { return !includes(movingCols, col); });\n var otherGridCols = allGridCols.filter(function (col) { return !includes(movingCols, col); });\n // work out how many DISPLAYED columns fit before the 'x' position. this gives us the displayIndex.\n // for example, if cols are a,b,c,d and we find a,b fit before 'x', then we want to place the moving\n // col between b and c (so that it is under the mouse position).\n var displayIndex = 0;\n var availableWidth = mouseX;\n // if we are dragging right, then the columns will be to the left of the mouse, so we also want to\n // include the width of the moving columns\n if (draggingRight) {\n var widthOfMovingDisplayedCols_1 = 0;\n movingDisplayedCols.forEach(function (col) { return widthOfMovingDisplayedCols_1 += col.getActualWidth(); });\n availableWidth -= widthOfMovingDisplayedCols_1;\n }\n if (availableWidth > 0) {\n // now count how many of the displayed columns will fit to the left\n for (var i = 0; i < otherDisplayedCols.length; i++) {\n var col = otherDisplayedCols[i];\n availableWidth -= col.getActualWidth();\n if (availableWidth < 0) {\n break;\n }\n displayIndex++;\n }\n // trial and error, if going right, we adjust by one, i didn't manage to quantify why, but it works\n if (draggingRight) {\n displayIndex++;\n }\n }\n // the display index is with respect to all the showing columns, however when we move, it's with\n // respect to all grid columns, so we need to translate from display index to grid index\n var firstValidMove;\n if (displayIndex > 0) {\n var leftColumn = otherDisplayedCols[displayIndex - 1];\n firstValidMove = otherGridCols.indexOf(leftColumn) + 1;\n }\n else {\n firstValidMove = otherGridCols.indexOf(otherDisplayedCols[0]);\n if (firstValidMove === -1) {\n firstValidMove = 0;\n }\n }\n var validMoves = [firstValidMove];\n var numberComparator = function (a, b) { return a - b; };\n // add in other valid moves due to hidden columns and married children. for example, a particular\n // move might break a group that has married children (so move isn't valid), however there could\n // be hidden columns (not displayed) that we could jump over to make the move valid. because\n // they are hidden, user doesn't see any different, however it allows moves that would otherwise\n // not work. for example imagine a group with 9 columns and all columns are hidden except the\n // middle one (so 4 hidden to left, 4 hidden to right), then when moving 'firstValidMove' will\n // be relative to the not-shown column, however we need to consider the move jumping over all the\n // hidden children. if we didn't do this, then if the group just described was at the end (RHS) of the\n // grid, there would be no way to put a column after it (as the grid would only consider beside the\n // visible column, which would fail valid move rules).\n if (draggingRight) {\n // if dragging right, then we add all the additional moves to the right. so in other words\n // if the next move is not valid, find the next move to the right that is valid.\n var pointer = firstValidMove + 1;\n var lastIndex = allGridCols.length - 1;\n while (pointer <= lastIndex) {\n validMoves.push(pointer);\n pointer++;\n }\n // adding columns here means the order is now messed up\n validMoves.sort(numberComparator);\n }\n else {\n // if dragging left we do the reverse of dragging right, we add in all the valid moves to the\n // left. however we also have to consider moves to the right for all hidden columns first.\n // (this logic is hard to reason with, it was worked out with trial and error,\n // more observation rather than science).\n // add moves to the right\n var pointer = firstValidMove;\n var lastIndex = allGridCols.length - 1;\n var displacedCol = allGridCols[pointer];\n while (pointer <= lastIndex && this.isColumnHidden(allDisplayedCols, displacedCol)) {\n pointer++;\n validMoves.push(pointer);\n displacedCol = allGridCols[pointer];\n }\n // add moves to the left\n pointer = firstValidMove - 1;\n var firstDisplayIndex = 0;\n while (pointer >= firstDisplayIndex) {\n validMoves.push(pointer);\n pointer--;\n }\n // adding columns here means the order is now messed up\n validMoves.sort(numberComparator).reverse();\n }\n return validMoves;\n };\n // isHidden takes into account visible=false and group=closed, ie it is not displayed\n MoveColumnFeature.prototype.isColumnHidden = function (displayedColumns, col) {\n return displayedColumns.indexOf(col) < 0;\n };\n MoveColumnFeature.prototype.ensureIntervalStarted = function () {\n if (!this.movingIntervalId) {\n this.intervalCount = 0;\n this.failedMoveAttempts = 0;\n this.movingIntervalId = window.setInterval(this.moveInterval.bind(this), 100);\n if (this.needToMoveLeft) {\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_LEFT, true);\n }\n else {\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_RIGHT, true);\n }\n }\n };\n MoveColumnFeature.prototype.ensureIntervalCleared = function () {\n if (this.movingIntervalId) {\n window.clearInterval(this.movingIntervalId);\n this.movingIntervalId = null;\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_MOVE);\n }\n };\n MoveColumnFeature.prototype.moveInterval = function () {\n // the amounts we move get bigger at each interval, so the speed accelerates, starting a bit slow\n // and getting faster. this is to give smoother user experience. we max at 100px to limit the speed.\n var pixelsToMove;\n this.intervalCount++;\n pixelsToMove = 10 + (this.intervalCount * 5);\n if (pixelsToMove > 100) {\n pixelsToMove = 100;\n }\n var pixelsMoved = null;\n var scrollFeature = this.gridBodyCon.getScrollFeature();\n if (this.needToMoveLeft) {\n pixelsMoved = scrollFeature.scrollHorizontally(-pixelsToMove);\n }\n else if (this.needToMoveRight) {\n pixelsMoved = scrollFeature.scrollHorizontally(pixelsToMove);\n }\n if (pixelsMoved !== 0) {\n this.onDragging(this.lastDraggingEvent);\n this.failedMoveAttempts = 0;\n }\n else {\n // we count the failed move attempts. if we fail to move 7 times, then we pin the column.\n // this is how we achieve pining by dragging the column to the edge of the grid.\n this.failedMoveAttempts++;\n var columns = this.lastDraggingEvent.dragItem.columns;\n var columnsThatCanPin = columns.filter(function (c) { return !c.getColDef().lockPinned; });\n if (columnsThatCanPin.length > 0) {\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_PINNED);\n if (this.failedMoveAttempts > 7) {\n var pinType = this.needToMoveLeft ? Constants.PINNED_LEFT : Constants.PINNED_RIGHT;\n this.setColumnsPinned(columnsThatCanPin, pinType, \"uiColumnDragged\");\n this.dragAndDropService.nudge();\n }\n }\n }\n };\n __decorate$12([\n Autowired('columnModel')\n ], MoveColumnFeature.prototype, \"columnModel\", void 0);\n __decorate$12([\n Autowired('dragAndDropService')\n ], MoveColumnFeature.prototype, \"dragAndDropService\", void 0);\n __decorate$12([\n Autowired('gridOptionsWrapper')\n ], MoveColumnFeature.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$12([\n Autowired('ctrlsService')\n ], MoveColumnFeature.prototype, \"ctrlsService\", void 0);\n __decorate$12([\n PostConstruct\n ], MoveColumnFeature.prototype, \"init\", null);\n return MoveColumnFeature;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1g = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$13 = (undefined && undefined.__decorate) || function (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};\nvar BodyDropTarget = /** @class */ (function (_super) {\n __extends$1g(BodyDropTarget, _super);\n function BodyDropTarget(pinned, eContainer) {\n var _this = _super.call(this) || this;\n _this.pinned = pinned;\n _this.eContainer = eContainer;\n return _this;\n }\n BodyDropTarget.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function (p) {\n switch (_this.pinned) {\n case Constants.PINNED_LEFT:\n _this.eSecondaryContainers = [\n [p.gridBodyCtrl.getBodyViewportElement(), p.leftRowContainerCtrl.getContainerElement()],\n [p.bottomLeftRowContainerCtrl.getContainerElement()],\n [p.topLeftRowContainerCtrl.getContainerElement()]\n ];\n break;\n case Constants.PINNED_RIGHT:\n _this.eSecondaryContainers = [\n [p.gridBodyCtrl.getBodyViewportElement(), p.rightRowContainerCtrl.getContainerElement()],\n [p.bottomRightRowContainerCtrl.getContainerElement()],\n [p.topRightRowContainerCtrl.getContainerElement()]\n ];\n break;\n default:\n _this.eSecondaryContainers = [\n [p.gridBodyCtrl.getBodyViewportElement(), p.centerRowContainerCtrl.getViewportElement()],\n [p.bottomCenterRowContainerCtrl.getViewportElement()],\n [p.topCenterRowContainerCtrl.getViewportElement()]\n ];\n break;\n }\n });\n };\n BodyDropTarget.prototype.isInterestedIn = function (type) {\n return type === exports.DragSourceType.HeaderCell ||\n (type === exports.DragSourceType.ToolPanel && this.gridOptionsWrapper.isAllowDragFromColumnsToolPanel());\n };\n BodyDropTarget.prototype.getSecondaryContainers = function () {\n return this.eSecondaryContainers;\n };\n BodyDropTarget.prototype.getContainer = function () {\n return this.eContainer;\n };\n BodyDropTarget.prototype.init = function () {\n this.moveColumnFeature = this.createManagedBean(new MoveColumnFeature(this.pinned, this.eContainer));\n this.bodyDropPivotTarget = this.createManagedBean(new BodyDropPivotTarget(this.pinned));\n this.dragAndDropService.addDropTarget(this);\n };\n BodyDropTarget.prototype.getIconName = function () {\n return this.currentDropListener.getIconName();\n };\n // we want to use the bodyPivotTarget if the user is dragging columns in from the toolPanel\n // and we are in pivot mode, as it has to logic to set pivot/value/group on the columns when\n // dropped into the grid's body.\n BodyDropTarget.prototype.isDropColumnInPivotMode = function (draggingEvent) {\n // in pivot mode, then if moving a column (ie didn't come from toolpanel) then it's\n // a standard column move, however if it came from the toolpanel, then we are introducing\n // dimensions or values to the grid\n return this.columnModel.isPivotMode() && draggingEvent.dragSource.type === exports.DragSourceType.ToolPanel;\n };\n BodyDropTarget.prototype.onDragEnter = function (draggingEvent) {\n // we pick the drop listener depending on whether we are in pivot mode are not. if we are\n // in pivot mode, then dropping cols changes the row group, pivot, value stats. otherwise\n // we change visibility state and position.\n this.currentDropListener = this.isDropColumnInPivotMode(draggingEvent) ? this.bodyDropPivotTarget : this.moveColumnFeature;\n this.currentDropListener.onDragEnter(draggingEvent);\n };\n BodyDropTarget.prototype.onDragLeave = function (params) {\n this.currentDropListener.onDragLeave(params);\n };\n BodyDropTarget.prototype.onDragging = function (params) {\n this.currentDropListener.onDragging(params);\n };\n BodyDropTarget.prototype.onDragStop = function (params) {\n this.currentDropListener.onDragStop(params);\n };\n __decorate$13([\n Autowired('dragAndDropService')\n ], BodyDropTarget.prototype, \"dragAndDropService\", void 0);\n __decorate$13([\n Autowired('columnModel')\n ], BodyDropTarget.prototype, \"columnModel\", void 0);\n __decorate$13([\n Autowired('ctrlsService')\n ], BodyDropTarget.prototype, \"ctrlsService\", void 0);\n __decorate$13([\n PostConstruct\n ], BodyDropTarget.prototype, \"postConstruct\", null);\n __decorate$13([\n PostConstruct\n ], BodyDropTarget.prototype, \"init\", null);\n return BodyDropTarget;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __read$b = (undefined && undefined.__read) || function (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};\nvar __spread$8 = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$b(arguments[i]));\n return ar;\n};\nvar CssClassApplier = /** @class */ (function () {\n function CssClassApplier() {\n }\n CssClassApplier.getHeaderClassesFromColDef = function (abstractColDef, gridOptionsWrapper, column, columnGroup) {\n if (missing(abstractColDef)) {\n return [];\n }\n return this.getColumnClassesFromCollDef(abstractColDef.headerClass, abstractColDef, gridOptionsWrapper, column, columnGroup);\n };\n CssClassApplier.getToolPanelClassesFromColDef = function (abstractColDef, gridOptionsWrapper, column, columnGroup) {\n if (missing(abstractColDef)) {\n return [];\n }\n return this.getColumnClassesFromCollDef(abstractColDef.toolPanelClass, abstractColDef, gridOptionsWrapper, column, columnGroup);\n };\n CssClassApplier.getClassParams = function (abstractColDef, gridOptionsWrapper, column, columnGroup) {\n return {\n // bad naming, as colDef here can be a group or a column,\n // however most people won't appreciate the difference,\n // so keeping it as colDef to avoid confusion.\n colDef: abstractColDef,\n column: column,\n columnGroup: columnGroup,\n api: gridOptionsWrapper.getApi(),\n columnApi: gridOptionsWrapper.getColumnApi(),\n context: gridOptionsWrapper.getContext()\n };\n };\n CssClassApplier.getColumnClassesFromCollDef = function (classesOrFunc, abstractColDef, gridOptionsWrapper, column, columnGroup) {\n if (missing(classesOrFunc)) {\n return [];\n }\n var classToUse;\n if (typeof classesOrFunc === 'function') {\n var params = this.getClassParams(abstractColDef, gridOptionsWrapper, column, columnGroup);\n classToUse = classesOrFunc(params);\n }\n else {\n classToUse = classesOrFunc;\n }\n if (typeof classToUse === 'string') {\n return [classToUse];\n }\n if (Array.isArray(classToUse)) {\n return __spread$8(classToUse);\n }\n return [];\n };\n return CssClassApplier;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1h = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$14 = (undefined && undefined.__decorate) || function (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};\nvar HeaderCellComp = /** @class */ (function (_super) {\n __extends$1h(HeaderCellComp, _super);\n function HeaderCellComp(ctrl) {\n var _this = _super.call(this, HeaderCellComp.TEMPLATE, ctrl) || this;\n _this.headerCompVersion = 0;\n _this.column = ctrl.getColumnGroupChild();\n _this.pinned = ctrl.getPinned();\n return _this;\n }\n HeaderCellComp.prototype.postConstruct = function () {\n var _this = this;\n var eGui = this.getGui();\n var setAttribute = function (name, value, element) {\n var actualElement = element ? element : eGui;\n if (value != null && value != '') {\n actualElement.setAttribute(name, value);\n }\n else {\n actualElement.removeAttribute(name);\n }\n };\n var compProxy = {\n setWidth: function (width) { return eGui.style.width = width; },\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n setColId: function (id) { return setAttribute('col-id', id); },\n setTitle: function (title) { return setAttribute('title', title); },\n setAriaDescription: function (label) { return setAriaDescription(eGui, label); },\n setAriaSort: function (sort) { return sort ? setAriaSort(eGui, sort) : removeAriaSort(eGui); },\n setUserCompDetails: function (compDetails) { return _this.setUserCompDetails(compDetails); },\n getUserCompInstance: function () { return _this.headerComp; }\n };\n this.ctrl.setComp(compProxy, this.getGui(), this.eResize);\n var selectAllGui = this.ctrl.getSelectAllGui();\n this.eResize.insertAdjacentElement('afterend', selectAllGui);\n };\n HeaderCellComp.prototype.destroyHeaderComp = function () {\n if (this.headerComp) {\n this.getGui().removeChild(this.headerCompGui);\n this.headerComp = this.destroyBean(this.headerComp);\n this.headerCompGui = undefined;\n }\n };\n HeaderCellComp.prototype.setUserCompDetails = function (compDetails) {\n var _this = this;\n this.headerCompVersion++;\n var versionCopy = this.headerCompVersion;\n compDetails.newAgStackInstance().then(function (comp) { return _this.afterCompCreated(versionCopy, comp); });\n };\n HeaderCellComp.prototype.afterCompCreated = function (version, headerComp) {\n if (version != this.headerCompVersion || !this.isAlive()) {\n this.destroyBean(headerComp);\n return;\n }\n this.destroyHeaderComp();\n this.headerComp = headerComp;\n this.headerCompGui = headerComp.getGui();\n this.getGui().appendChild(this.headerCompGui);\n this.ctrl.setDragSource(this.headerCompGui);\n };\n HeaderCellComp.TEMPLATE = \"
\\n
\\n
\";\n __decorate$14([\n RefSelector('eResize')\n ], HeaderCellComp.prototype, \"eResize\", void 0);\n __decorate$14([\n PostConstruct\n ], HeaderCellComp.prototype, \"postConstruct\", null);\n __decorate$14([\n PreDestroy\n ], HeaderCellComp.prototype, \"destroyHeaderComp\", null);\n return HeaderCellComp;\n}(AbstractHeaderCellComp));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1i = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$15 = (undefined && undefined.__decorate) || function (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};\nvar HeaderGroupCellComp = /** @class */ (function (_super) {\n __extends$1i(HeaderGroupCellComp, _super);\n function HeaderGroupCellComp(ctrl) {\n return _super.call(this, HeaderGroupCellComp.TEMPLATE, ctrl) || this;\n }\n HeaderGroupCellComp.prototype.postConstruct = function () {\n var _this = this;\n var eGui = this.getGui();\n var setAttribute = function (key, value) {\n return value != undefined ? eGui.setAttribute(key, value) : eGui.removeAttribute(key);\n };\n var compProxy = {\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n addOrRemoveResizableCssClass: function (cssClassName, on) { return _this.eResize.classList.toggle(cssClassName, on); },\n setWidth: function (width) { return eGui.style.width = width; },\n setColId: function (id) { return eGui.setAttribute(\"col-id\", id); },\n setAriaExpanded: function (expanded) { return setAttribute('aria-expanded', expanded); },\n setTitle: function (title) { return setAttribute(\"title\", title); },\n setUserCompDetails: function (details) { return _this.setUserCompDetails(details); }\n };\n this.ctrl.setComp(compProxy, eGui, this.eResize);\n };\n HeaderGroupCellComp.prototype.setUserCompDetails = function (details) {\n var _this = this;\n details.newAgStackInstance().then(function (comp) { return _this.afterHeaderCompCreated(comp); });\n };\n HeaderGroupCellComp.prototype.afterHeaderCompCreated = function (headerGroupComp) {\n var _this = this;\n var destroyFunc = function () { return _this.destroyBean(headerGroupComp); };\n if (!this.isAlive()) {\n destroyFunc();\n return;\n }\n this.getGui().appendChild(headerGroupComp.getGui());\n this.addDestroyFunc(destroyFunc);\n this.ctrl.setDragSource(headerGroupComp.getGui());\n };\n HeaderGroupCellComp.TEMPLATE = \"
\\n
\\n
\";\n __decorate$15([\n Autowired('userComponentFactory')\n ], HeaderGroupCellComp.prototype, \"userComponentFactory\", void 0);\n __decorate$15([\n RefSelector('eResize')\n ], HeaderGroupCellComp.prototype, \"eResize\", void 0);\n __decorate$15([\n PostConstruct\n ], HeaderGroupCellComp.prototype, \"postConstruct\", null);\n return HeaderGroupCellComp;\n}(AbstractHeaderCellComp));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1j = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$16 = (undefined && undefined.__decorate) || function (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(function (HeaderRowType) {\n HeaderRowType[\"COLUMN_GROUP\"] = \"group\";\n HeaderRowType[\"COLUMN\"] = \"column\";\n HeaderRowType[\"FLOATING_FILTER\"] = \"filter\";\n})(exports.HeaderRowType || (exports.HeaderRowType = {}));\nvar HeaderRowComp = /** @class */ (function (_super) {\n __extends$1j(HeaderRowComp, _super);\n function HeaderRowComp(ctrl) {\n var _this = _super.call(this) || this;\n _this.headerComps = {};\n var extraClass = ctrl.getType() == exports.HeaderRowType.COLUMN_GROUP ? \"ag-header-row-column-group\" :\n ctrl.getType() == exports.HeaderRowType.FLOATING_FILTER ? \"ag-header-row-column-filter\" : \"ag-header-row-column\";\n _this.setTemplate(/* html */ \"
\");\n _this.ctrl = ctrl;\n return _this;\n }\n //noinspection JSUnusedLocalSymbols\n HeaderRowComp.prototype.init = function () {\n var _this = this;\n var compProxy = {\n setTransform: function (transform) { return _this.getGui().style.transform = transform; },\n setHeight: function (height) { return _this.getGui().style.height = height; },\n setTop: function (top) { return _this.getGui().style.top = top; },\n setHeaderCtrls: function (ctrls) { return _this.setHeaderCtrls(ctrls); },\n setWidth: function (width) { return _this.getGui().style.width = width; },\n setAriaRowIndex: function (rowIndex) { return setAriaRowIndex(_this.getGui(), rowIndex); }\n };\n this.ctrl.setComp(compProxy);\n };\n HeaderRowComp.prototype.destroyHeaderCtrls = function () {\n this.setHeaderCtrls([]);\n };\n HeaderRowComp.prototype.setHeaderCtrls = function (ctrls) {\n var _this = this;\n if (!this.isAlive()) {\n return;\n }\n var oldComps = this.headerComps;\n this.headerComps = {};\n ctrls.forEach(function (ctrl) {\n var id = ctrl.getInstanceId();\n var comp = oldComps[id];\n delete oldComps[id];\n if (comp == null) {\n comp = _this.createHeaderComp(ctrl);\n _this.getGui().appendChild(comp.getGui());\n }\n _this.headerComps[id] = comp;\n });\n iterateObject(oldComps, function (id, comp) {\n _this.getGui().removeChild(comp.getGui());\n _this.destroyBean(comp);\n });\n var ensureDomOrder = this.gridOptionsWrapper.isEnsureDomOrder();\n if (ensureDomOrder) {\n var comps = getAllValuesInObject(this.headerComps);\n // ordering the columns by left position orders them in the order they appear on the screen\n comps.sort(function (a, b) {\n var leftA = a.getCtrl().getColumnGroupChild().getLeft();\n var leftB = b.getCtrl().getColumnGroupChild().getLeft();\n return leftA - leftB;\n });\n var elementsInOrder = comps.map(function (c) { return c.getGui(); });\n setDomChildOrder(this.getGui(), elementsInOrder);\n }\n };\n HeaderRowComp.prototype.createHeaderComp = function (headerCtrl) {\n var result;\n switch (this.ctrl.getType()) {\n case exports.HeaderRowType.COLUMN_GROUP:\n result = new HeaderGroupCellComp(headerCtrl);\n break;\n case exports.HeaderRowType.FLOATING_FILTER:\n result = new HeaderFilterCellComp(headerCtrl);\n break;\n default:\n result = new HeaderCellComp(headerCtrl);\n break;\n }\n this.createBean(result);\n result.setParentComponent(this);\n return result;\n };\n __decorate$16([\n PostConstruct\n ], HeaderRowComp.prototype, \"init\", null);\n __decorate$16([\n PreDestroy\n ], HeaderRowComp.prototype, \"destroyHeaderCtrls\", null);\n return HeaderRowComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1k = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$17 = (undefined && undefined.__decorate) || function (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};\nvar instanceIdSequence$3 = 0;\nvar AbstractHeaderCellCtrl = /** @class */ (function (_super) {\n __extends$1k(AbstractHeaderCellCtrl, _super);\n function AbstractHeaderCellCtrl(columnGroupChild, parentRowCtrl) {\n var _this = _super.call(this) || this;\n _this.lastFocusEvent = null;\n _this.columnGroupChild = columnGroupChild;\n _this.parentRowCtrl = parentRowCtrl;\n // unique id to this instance, including the column ID to help with debugging in React as it's used in 'key'\n _this.instanceId = columnGroupChild.getUniqueId() + '-' + instanceIdSequence$3++;\n return _this;\n }\n AbstractHeaderCellCtrl.prototype.shouldStopEventPropagation = function (e) {\n var _a = this.focusService.getFocusedHeader(), headerRowIndex = _a.headerRowIndex, column = _a.column;\n return isUserSuppressingHeaderKeyboardEvent(this.gridOptionsWrapper, e, headerRowIndex, column);\n };\n AbstractHeaderCellCtrl.prototype.setGui = function (eGui) {\n this.eGui = eGui;\n this.addDomData();\n };\n AbstractHeaderCellCtrl.prototype.addDomData = function () {\n var _this = this;\n var key = AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL;\n this.gridOptionsWrapper.setDomData(this.eGui, key, this);\n this.addDestroyFunc(function () { return _this.gridOptionsWrapper.setDomData(_this.eGui, key, null); });\n };\n AbstractHeaderCellCtrl.prototype.getGui = function () {\n return this.eGui;\n };\n AbstractHeaderCellCtrl.prototype.focus = function (event) {\n if (!this.eGui) {\n return false;\n }\n this.lastFocusEvent = event || null;\n this.eGui.focus();\n return true;\n };\n AbstractHeaderCellCtrl.prototype.getRowIndex = function () {\n return this.parentRowCtrl.getRowIndex();\n };\n AbstractHeaderCellCtrl.prototype.getParentRowCtrl = function () {\n return this.parentRowCtrl;\n };\n AbstractHeaderCellCtrl.prototype.getPinned = function () {\n return this.parentRowCtrl.getPinned();\n };\n AbstractHeaderCellCtrl.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n AbstractHeaderCellCtrl.prototype.getColumnGroupChild = function () {\n return this.columnGroupChild;\n };\n AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL = 'headerCtrl';\n __decorate$17([\n Autowired('focusService')\n ], AbstractHeaderCellCtrl.prototype, \"focusService\", void 0);\n return AbstractHeaderCellCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n(function (ClientSideRowModelSteps) {\n ClientSideRowModelSteps[\"EVERYTHING\"] = \"group\";\n ClientSideRowModelSteps[\"FILTER\"] = \"filter\";\n ClientSideRowModelSteps[\"SORT\"] = \"sort\";\n ClientSideRowModelSteps[\"MAP\"] = \"map\";\n ClientSideRowModelSteps[\"AGGREGATE\"] = \"aggregate\";\n ClientSideRowModelSteps[\"FILTER_AGGREGATES\"] = \"filter_aggregates\";\n ClientSideRowModelSteps[\"PIVOT\"] = \"pivot\";\n ClientSideRowModelSteps[\"NOTHING\"] = \"nothing\";\n})(exports.ClientSideRowModelSteps || (exports.ClientSideRowModelSteps = {}));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$18 = (undefined && undefined.__decorate) || function (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};\nfunction unwrapUserComp(comp) {\n var compAsAny = comp;\n var isProxy = compAsAny != null && compAsAny.getFrameworkComponentInstance != null;\n return isProxy ? compAsAny.getFrameworkComponentInstance() : comp;\n}\nvar GridApi = /** @class */ (function () {\n function GridApi() {\n this.detailGridInfoMap = {};\n this.destroyCalled = false;\n }\n GridApi.prototype.registerOverlayWrapperComp = function (overlayWrapperComp) {\n this.overlayWrapperComp = overlayWrapperComp;\n };\n GridApi.prototype.registerSideBarComp = function (sideBarComp) {\n this.sideBarComp = sideBarComp;\n };\n GridApi.prototype.init = function () {\n var _this = this;\n switch (this.rowModel.getType()) {\n case Constants.ROW_MODEL_TYPE_CLIENT_SIDE:\n this.clientSideRowModel = this.rowModel;\n break;\n case Constants.ROW_MODEL_TYPE_INFINITE:\n this.infiniteRowModel = this.rowModel;\n break;\n case Constants.ROW_MODEL_TYPE_SERVER_SIDE:\n this.serverSideRowModel = this.rowModel;\n break;\n }\n this.ctrlsService.whenReady(function () {\n _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();\n });\n };\n /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */\n GridApi.prototype.__getAlignedGridService = function () {\n return this.alignedGridsService;\n };\n /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */\n GridApi.prototype.__getContext = function () {\n return this.context;\n };\n /** Register a detail grid with the master grid when it is created. */\n GridApi.prototype.addDetailGridInfo = function (id, gridInfo) {\n this.detailGridInfoMap[id] = gridInfo;\n };\n /** Unregister a detail grid from the master grid when it is destroyed. */\n GridApi.prototype.removeDetailGridInfo = function (id) {\n this.detailGridInfoMap[id] = undefined;\n };\n /** Returns the `DetailGridInfo` corresponding to the supplied `detailGridId`. */\n GridApi.prototype.getDetailGridInfo = function (id) {\n return this.detailGridInfoMap[id];\n };\n /** Iterates through each `DetailGridInfo` in the grid and calls the supplied callback on each. */\n GridApi.prototype.forEachDetailGridInfo = function (callback) {\n var index = 0;\n iterateObject(this.detailGridInfoMap, function (id, gridInfo) {\n // check for undefined, as old references will still be lying around\n if (exists(gridInfo)) {\n callback(gridInfo, index);\n index++;\n }\n });\n };\n /** Similar to `exportDataAsCsv`, except returns the result as a string rather than download it. */\n GridApi.prototype.getDataAsCsv = function (params) {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.CsvExportModule, 'api.getDataAsCsv')) {\n return this.csvCreator.getDataAsCsv(params);\n }\n };\n /** Downloads a CSV export of the grid's data. */\n GridApi.prototype.exportDataAsCsv = function (params) {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.CsvExportModule, 'api.exportDataAsCSv')) {\n this.csvCreator.exportDataAsCsv(params);\n }\n };\n GridApi.prototype.getExcelExportMode = function (params) {\n var baseParams = this.gridOptionsWrapper.getDefaultExportParams('excel');\n var mergedParams = Object.assign({ exportMode: 'xlsx' }, baseParams, params);\n return mergedParams.exportMode;\n };\n /** Similar to `exportDataAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. */\n GridApi.prototype.getDataAsExcel = function (params) {\n if (!ModuleRegistry.assertRegistered(exports.ModuleNames.ExcelExportModule, 'api.getDataAsExcel')) {\n return;\n }\n var exportMode = this.getExcelExportMode(params);\n if (this.excelCreator.getFactoryMode(exportMode) === exports.ExcelFactoryMode.MULTI_SHEET) {\n console.warn('AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`');\n return;\n }\n return this.excelCreator.getDataAsExcel(params);\n };\n /** Downloads an Excel export of the grid's data. */\n GridApi.prototype.exportDataAsExcel = function (params) {\n if (!ModuleRegistry.assertRegistered(exports.ModuleNames.ExcelExportModule, 'api.exportDataAsExcel')) {\n return;\n }\n var exportMode = this.getExcelExportMode(params);\n if (this.excelCreator.getFactoryMode(exportMode) === exports.ExcelFactoryMode.MULTI_SHEET) {\n console.warn('AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling `api.getMultipleSheetAsExcel()` or `api.exportMultipleSheetsAsExcel()`');\n return;\n }\n this.excelCreator.exportDataAsExcel(params);\n };\n /** This is method to be used to get the grid's data as a sheet, that will later be exported either by `getMultipleSheetsAsExcel()` or `exportMultipleSheetsAsExcel()`. */\n GridApi.prototype.getSheetDataForExcel = function (params) {\n if (!ModuleRegistry.assertRegistered(exports.ModuleNames.ExcelExportModule, 'api.getSheetDataForExcel')) {\n return;\n }\n var exportMode = this.getExcelExportMode(params);\n this.excelCreator.setFactoryMode(exports.ExcelFactoryMode.MULTI_SHEET, exportMode);\n return this.excelCreator.getSheetDataForExcel(params);\n };\n /** Similar to `exportMultipleSheetsAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. */\n GridApi.prototype.getMultipleSheetsAsExcel = function (params) {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.ExcelExportModule, 'api.getMultipleSheetsAsExcel')) {\n return this.excelCreator.getMultipleSheetsAsExcel(params);\n }\n };\n /** Downloads an Excel export of multiple sheets in one file. */\n GridApi.prototype.exportMultipleSheetsAsExcel = function (params) {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.ExcelExportModule, 'api.exportMultipleSheetsAsExcel')) {\n return this.excelCreator.exportMultipleSheetsAsExcel(params);\n }\n };\n /** @deprecated */\n GridApi.prototype.setEnterpriseDatasource = function (datasource) {\n console.warn(\"AG Grid: since version 18.x, api.setEnterpriseDatasource() should be replaced with api.setServerSideDatasource()\");\n this.setServerSideDatasource(datasource);\n };\n /**\n * Sets an ARIA property in the grid panel (element with `role=\\\"grid\\\"`), and removes an ARIA property when the value is null.\n *\n * Example: `api.setGridAriaProperty('label', 'my grid')` will set `aria-label=\\\"my grid\\\"`.\n *\n * `api.setGridAriaProperty('label', null)` will remove the `aria-label` attribute from the grid element.\n */\n GridApi.prototype.setGridAriaProperty = function (property, value) {\n if (!property) {\n return;\n }\n var eGrid = this.ctrlsService.getGridBodyCtrl().getGui();\n var ariaProperty = \"aria-\" + property;\n if (value === null) {\n eGrid.removeAttribute(ariaProperty);\n }\n else {\n eGrid.setAttribute(ariaProperty, value);\n }\n };\n /** Set new datasource for Server-Side Row Model. */\n GridApi.prototype.setServerSideDatasource = function (datasource) {\n if (this.serverSideRowModel) {\n // should really have an IEnterpriseRowModel interface, so we are not casting to any\n this.serverSideRowModel.setDatasource(datasource);\n }\n else {\n console.warn(\"AG Grid: you can only use an enterprise datasource when gridOptions.rowModelType is '\" + Constants.ROW_MODEL_TYPE_SERVER_SIDE + \"'\");\n }\n };\n /** Set new datasource for Infinite Row Model. */\n GridApi.prototype.setDatasource = function (datasource) {\n if (this.gridOptionsWrapper.isRowModelInfinite()) {\n this.rowModel.setDatasource(datasource);\n }\n else {\n console.warn(\"AG Grid: you can only use a datasource when gridOptions.rowModelType is '\" + Constants.ROW_MODEL_TYPE_INFINITE + \"'\");\n }\n };\n /** Set new datasource for Viewport Row Model. */\n GridApi.prototype.setViewportDatasource = function (viewportDatasource) {\n if (this.gridOptionsWrapper.isRowModelViewport()) {\n // this is bad coding, because it's using an interface that's exposed in the enterprise.\n // really we should create an interface in the core for viewportDatasource and let\n // the enterprise implement it, rather than casting to 'any' here\n this.rowModel.setViewportDatasource(viewportDatasource);\n }\n else {\n console.warn(\"AG Grid: you can only use a viewport datasource when gridOptions.rowModelType is '\" + Constants.ROW_MODEL_TYPE_VIEWPORT + \"'\");\n }\n };\n /** Set the row data. */\n GridApi.prototype.setRowData = function (rowData) {\n // immutable service is part of the CSRM module, if missing, no CSRM\n var missingImmutableService = this.immutableService == null;\n if (missingImmutableService) {\n console.warn('AG Grid: you can only set rowData when using the Client Side Row Model');\n return;\n }\n // if no keys provided provided for rows, then we can tread the operation as Immutable\n if (this.immutableService.isActive()) {\n this.immutableService.setRowData(rowData);\n }\n else {\n this.selectionService.reset();\n this.clientSideRowModel.setRowData(rowData);\n }\n };\n /** @deprecated */\n GridApi.prototype.setFloatingTopRowData = function (rows) {\n console.warn('AG Grid: since v12, api.setFloatingTopRowData() is now api.setPinnedTopRowData()');\n this.setPinnedTopRowData(rows);\n };\n /** @deprecated */\n GridApi.prototype.setFloatingBottomRowData = function (rows) {\n console.warn('AG Grid: since v12, api.setFloatingBottomRowData() is now api.setPinnedBottomRowData()');\n this.setPinnedBottomRowData(rows);\n };\n /** @deprecated */\n GridApi.prototype.getFloatingTopRowCount = function () {\n console.warn('AG Grid: since v12, api.getFloatingTopRowCount() is now api.getPinnedTopRowCount()');\n return this.getPinnedTopRowCount();\n };\n /** @deprecated */\n GridApi.prototype.getFloatingBottomRowCount = function () {\n console.warn('AG Grid: since v12, api.getFloatingBottomRowCount() is now api.getPinnedBottomRowCount()');\n return this.getPinnedBottomRowCount();\n };\n /** @deprecated */\n GridApi.prototype.getFloatingTopRow = function (index) {\n console.warn('AG Grid: since v12, api.getFloatingTopRow() is now api.getPinnedTopRow()');\n return this.getPinnedTopRow(index);\n };\n /** @deprecated */\n GridApi.prototype.getFloatingBottomRow = function (index) {\n console.warn('AG Grid: since v12, api.getFloatingBottomRow() is now api.getPinnedBottomRow()');\n return this.getPinnedBottomRow(index);\n };\n /** Set the top pinned rows. Call with no rows / undefined to clear top pinned rows. */\n GridApi.prototype.setPinnedTopRowData = function (rows) {\n this.pinnedRowModel.setPinnedTopRowData(rows);\n };\n /** Set the bottom pinned rows. Call with no rows / undefined to clear bottom pinned rows. */\n GridApi.prototype.setPinnedBottomRowData = function (rows) {\n this.pinnedRowModel.setPinnedBottomRowData(rows);\n };\n /** Gets the number of top pinned rows. */\n GridApi.prototype.getPinnedTopRowCount = function () {\n return this.pinnedRowModel.getPinnedTopRowCount();\n };\n /** Gets the number of bottom pinned rows. */\n GridApi.prototype.getPinnedBottomRowCount = function () {\n return this.pinnedRowModel.getPinnedBottomRowCount();\n };\n /** Gets the top pinned row with the specified index. */\n GridApi.prototype.getPinnedTopRow = function (index) {\n return this.pinnedRowModel.getPinnedTopRow(index);\n };\n /** Gets the top pinned row with the specified index. */\n GridApi.prototype.getPinnedBottomRow = function (index) {\n return this.pinnedRowModel.getPinnedBottomRow(index);\n };\n /**\n * Call to set new column definitions. The grid will redraw all the column headers, and then redraw all of the rows.\n */\n GridApi.prototype.setColumnDefs = function (colDefs, source) {\n if (source === void 0) { source = \"api\"; }\n this.columnModel.setColumnDefs(colDefs, source);\n };\n /** Call to set new auto group column definition. The grid will recreate any auto-group columns if present. */\n GridApi.prototype.setAutoGroupColumnDef = function (colDef, source) {\n this.gridOptionsWrapper.setProperty('autoGroupColumnDef', colDef, true);\n };\n /** Call to set new Default Column Definition. */\n GridApi.prototype.setDefaultColDef = function (colDef, source) {\n this.gridOptionsWrapper.setProperty('defaultColDef', colDef, true);\n };\n GridApi.prototype.expireValueCache = function () {\n this.valueCache.expire();\n };\n /**\n * Returns an object with two properties:\n * - `top`: The top pixel position of the current scroll in the grid\n * - `bottom`: The bottom pixel position of the current scroll in the grid\n */\n GridApi.prototype.getVerticalPixelRange = function () {\n return this.gridBodyCtrl.getScrollFeature().getVScrollPosition();\n };\n /**\n * Returns an object with two properties:\n * - `left`: The left pixel position of the current scroll in the grid\n * - `right`: The right pixel position of the current scroll in the grid\n */\n GridApi.prototype.getHorizontalPixelRange = function () {\n return this.gridBodyCtrl.getScrollFeature().getHScrollPosition();\n };\n /** If `true`, the horizontal scrollbar will always be present, even if not required. Otherwise, it will only be displayed when necessary. */\n GridApi.prototype.setAlwaysShowHorizontalScroll = function (show) {\n this.gridOptionsWrapper.setProperty('alwaysShowHorizontalScroll', show);\n };\n /** If `true`, the vertical scrollbar will always be present, even if not required. Otherwise it will only be displayed when necessary. */\n GridApi.prototype.setAlwaysShowVerticalScroll = function (show) {\n this.gridOptionsWrapper.setProperty('alwaysShowVerticalScroll', show);\n };\n /** Force refresh all tool panels by calling their `refresh` method. */\n GridApi.prototype.refreshToolPanel = function () {\n if (!this.sideBarComp) {\n return;\n }\n this.sideBarComp.refresh();\n };\n /** Performs change detection on all cells, refreshing cells where required. */\n GridApi.prototype.refreshCells = function (params) {\n if (params === void 0) { params = {}; }\n if (Array.isArray(params)) {\n // the old version of refreshCells() took an array of rowNodes for the first argument\n console.warn('since AG Grid v11.1, refreshCells() now takes parameters, please see the documentation.');\n return;\n }\n this.rowRenderer.refreshCells(params);\n };\n /** Flash rows, columns or individual cells. */\n GridApi.prototype.flashCells = function (params) {\n if (params === void 0) { params = {}; }\n this.rowRenderer.flashCells(params);\n };\n /** Remove row(s) from the DOM and recreate them again from scratch. */\n GridApi.prototype.redrawRows = function (params) {\n if (params === void 0) { params = {}; }\n var rowNodes = params ? params.rowNodes : undefined;\n this.rowRenderer.redrawRows(rowNodes);\n };\n GridApi.prototype.setFunctionsReadOnly = function (readOnly) {\n this.gridOptionsWrapper.setProperty('functionsReadOnly', readOnly);\n };\n /** Redraws the header. Useful if a column name changes, or something else that changes how the column header is displayed. */\n GridApi.prototype.refreshHeader = function () {\n this.ctrlsService.getHeaderRowContainerCtrls().forEach(function (c) { return c.refresh(); });\n };\n /** Returns `true` if any filter is set. This includes quick filter, advanced filter or external filter. */\n GridApi.prototype.isAnyFilterPresent = function () {\n return this.filterManager.isAnyFilterPresent();\n };\n /** Returns `true` if any column filter is set, otherwise `false`. */\n GridApi.prototype.isColumnFilterPresent = function () {\n return this.filterManager.isColumnFilterPresent() || this.filterManager.isAggregateFilterPresent();\n };\n /** Returns `true` if the quick filter is set, otherwise `false`. */\n GridApi.prototype.isQuickFilterPresent = function () {\n return this.filterManager.isQuickFilterPresent();\n };\n /**\n * Returns the row model inside the table.\n * From here you can see the original rows, rows after filter has been applied,\n * rows after aggregation has been applied, and the final set of 'to be displayed' rows.\n */\n GridApi.prototype.getModel = function () {\n return this.rowModel;\n };\n /** Expand or collapse a specific row node. */\n GridApi.prototype.setRowNodeExpanded = function (rowNode, expanded) {\n if (rowNode) {\n rowNode.setExpanded(expanded);\n }\n };\n /**\n * If after getting the model, you expand or collapse a group, call this method to inform the grid.\n * It will work out the final set of 'to be displayed' rows again (i.e. expand or collapse the group visually).\n */\n GridApi.prototype.onGroupExpandedOrCollapsed = function (deprecated_refreshFromIndex) {\n if (missing(this.clientSideRowModel)) {\n console.warn('AG Grid: cannot call onGroupExpandedOrCollapsed unless using normal row model');\n }\n if (exists(deprecated_refreshFromIndex)) {\n console.warn('AG Grid: api.onGroupExpandedOrCollapsed - refreshFromIndex parameter is no longer used, the grid will refresh all rows');\n }\n // we don't really want the user calling this if only one rowNode was expanded, instead they should be\n // calling rowNode.setExpanded(boolean) - this way we do a 'keepRenderedRows=false' so that the whole\n // grid gets refreshed again - otherwise the row with the rowNodes that were changed won't get updated,\n // and thus the expand icon in the group cell won't get 'opened' or 'closed'.\n this.clientSideRowModel.refreshModel({ step: exports.ClientSideRowModelSteps.MAP });\n };\n GridApi.prototype.refreshInMemoryRowModel = function (step) {\n console.warn(\"ag-grid: since version 18.x, api.refreshInMemoryRowModel() should be replaced with api.refreshClientSideRowModel()\");\n this.refreshClientSideRowModel(step);\n };\n /** Gets the Client-Side Row Model to refresh, executing the grouping, filtering and sorting again. */\n GridApi.prototype.refreshClientSideRowModel = function (step) {\n if (missing(this.clientSideRowModel)) {\n console.warn('cannot call refreshClientSideRowModel unless using normal row model');\n }\n var paramsStep = exports.ClientSideRowModelSteps.EVERYTHING;\n var stepsMapped = {\n group: exports.ClientSideRowModelSteps.EVERYTHING,\n filter: exports.ClientSideRowModelSteps.FILTER,\n map: exports.ClientSideRowModelSteps.MAP,\n aggregate: exports.ClientSideRowModelSteps.AGGREGATE,\n sort: exports.ClientSideRowModelSteps.SORT,\n pivot: exports.ClientSideRowModelSteps.PIVOT\n };\n if (exists(step)) {\n paramsStep = stepsMapped[step];\n }\n if (missing(paramsStep)) {\n console.error(\"AG Grid: invalid step \" + step + \", available steps are \" + Object.keys(stepsMapped).join(', '));\n return;\n }\n var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();\n var modelParams = {\n step: paramsStep,\n keepRenderedRows: true,\n keepEditingRows: true,\n animate: animate\n };\n this.clientSideRowModel.refreshModel(modelParams);\n };\n /** Returns `true` when there are no more animation frames left to process. */\n GridApi.prototype.isAnimationFrameQueueEmpty = function () {\n return this.animationFrameService.isQueueEmpty();\n };\n GridApi.prototype.flushAllAnimationFrames = function () {\n this.animationFrameService.flushAllFrames();\n };\n /**\n * Returns the row node with the given ID.\n * The row node ID is the one you provide from the callback `getRowId(params)`,\n * otherwise the ID is a number (cast as string) auto-generated by the grid when\n * the row data is set.\n */\n GridApi.prototype.getRowNode = function (id) {\n return this.rowModel.getRowNode(id);\n };\n /**\n * Gets the sizes that various UI elements will be rendered at with the current theme.\n * If you override the row or header height using `gridOptions`, the override value you provided will be returned.\n */\n GridApi.prototype.getSizesForCurrentTheme = function () {\n return {\n rowHeight: this.gridOptionsWrapper.getRowHeightAsNumber(),\n headerHeight: this.gridOptionsWrapper.getHeaderHeight()\n };\n };\n /** Expand all groups. */\n GridApi.prototype.expandAll = function () {\n if (this.clientSideRowModel) {\n this.clientSideRowModel.expandOrCollapseAll(true);\n }\n else if (this.serverSideRowModel) {\n this.serverSideRowModel.expandAll(true);\n }\n else {\n console.warn('AG Grid: expandAll only works with Client Side Row Model and Server Side Row Model');\n }\n };\n /** Collapse all groups. */\n GridApi.prototype.collapseAll = function () {\n if (this.clientSideRowModel) {\n this.clientSideRowModel.expandOrCollapseAll(false);\n }\n else if (this.serverSideRowModel) {\n this.serverSideRowModel.expandAll(false);\n }\n else {\n console.warn('AG Grid: collapseAll only works with Client Side Row Model and Server Side Row Model');\n }\n };\n /** Gets the tool panel instance corresponding to the supplied `id`. */\n GridApi.prototype.getToolPanelInstance = function (id) {\n if (!this.sideBarComp) {\n console.warn('AG Grid: toolPanel is only available in AG Grid Enterprise');\n return;\n }\n var comp = this.sideBarComp.getToolPanelInstance(id);\n return unwrapUserComp(comp);\n };\n GridApi.prototype.addVirtualRowListener = function (eventName, rowIndex, callback) {\n if (typeof eventName !== 'string') {\n console.warn('AG Grid: addVirtualRowListener is deprecated, please use addRenderedRowListener.');\n }\n this.addRenderedRowListener(eventName, rowIndex, callback);\n };\n /**\n * Registers a callback to a virtual row.\n * A virtual row is a row that is visually rendered on the screen (rows that are not visible because of the scroll position are not rendered).\n * Unlike normal events, you do not need to unregister rendered row listeners.\n * When the rendered row is removed from the grid, all associated rendered row listeners will also be removed.\n * Currently supports only one event, `virtualRowRemoved`;\n * listen for this event if your `cellRenderer` needs to do cleanup when the row no longer exists.\n */\n GridApi.prototype.addRenderedRowListener = function (eventName, rowIndex, callback) {\n if (eventName === 'virtualRowSelected') {\n console.warn(\"AG Grid: event virtualRowSelected is deprecated, to register for individual row\\n selection events, add a listener directly to the row node.\");\n }\n this.rowRenderer.addRenderedRowListener(eventName, rowIndex, callback);\n };\n /** Pass a quick filter text into the grid for filtering. */\n GridApi.prototype.setQuickFilter = function (newFilter) {\n this.filterManager.setQuickFilter(newFilter);\n };\n GridApi.prototype.selectIndex = function (index, tryMulti, suppressEvents) {\n console.warn('AG Grid: do not use api for selection, call node.setSelected(value) instead');\n if (suppressEvents) {\n console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');\n }\n this.selectionService.selectIndex(index, tryMulti);\n };\n GridApi.prototype.deselectIndex = function (index, suppressEvents) {\n if (suppressEvents === void 0) { suppressEvents = false; }\n console.warn('AG Grid: do not use api for selection, call node.setSelected(value) instead');\n if (suppressEvents) {\n console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');\n }\n this.selectionService.deselectIndex(index);\n };\n GridApi.prototype.selectNode = function (node, tryMulti, suppressEvents) {\n if (tryMulti === void 0) { tryMulti = false; }\n if (suppressEvents === void 0) { suppressEvents = false; }\n console.warn('AG Grid: API for selection is deprecated, call node.setSelected(value) instead');\n if (suppressEvents) {\n console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');\n }\n node.setSelectedParams({ newValue: true, clearSelection: !tryMulti });\n };\n GridApi.prototype.deselectNode = function (node, suppressEvents) {\n if (suppressEvents === void 0) { suppressEvents = false; }\n console.warn('AG Grid: API for selection is deprecated, call node.setSelected(value) instead');\n if (suppressEvents) {\n console.warn('AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it');\n }\n node.setSelectedParams({ newValue: false });\n };\n /** Select all rows, regardless of filtering and rows that are not visible due to grouping being enabled and their groups not expanded. */\n GridApi.prototype.selectAll = function () {\n this.selectionService.selectAllRowNodes();\n };\n /** Clear all row selections, regardless of filtering. */\n GridApi.prototype.deselectAll = function () {\n this.selectionService.deselectAllRowNodes();\n };\n /** Select all filtered rows. */\n GridApi.prototype.selectAllFiltered = function () {\n this.selectionService.selectAllRowNodes(true);\n };\n /** Clear all filtered selections. */\n GridApi.prototype.deselectAllFiltered = function () {\n this.selectionService.deselectAllRowNodes(true);\n };\n GridApi.prototype.recomputeAggregates = function () {\n if (missing(this.clientSideRowModel)) {\n console.warn('cannot call recomputeAggregates unless using normal row model');\n }\n console.warn(\"recomputeAggregates is deprecated, please call api.refreshClientSideRowModel('aggregate') instead\");\n this.clientSideRowModel.refreshModel({ step: exports.ClientSideRowModelSteps.AGGREGATE });\n };\n /** Sets columns to adjust in size to fit the grid horizontally. */\n GridApi.prototype.sizeColumnsToFit = function () {\n this.gridBodyCtrl.sizeColumnsToFit();\n };\n /** Show the 'loading' overlay. */\n GridApi.prototype.showLoadingOverlay = function () {\n this.overlayWrapperComp.showLoadingOverlay();\n };\n /** Show the 'no rows' overlay. */\n GridApi.prototype.showNoRowsOverlay = function () {\n this.overlayWrapperComp.showNoRowsOverlay();\n };\n /** Hides the overlay if showing. */\n GridApi.prototype.hideOverlay = function () {\n this.overlayWrapperComp.hideOverlay();\n };\n GridApi.prototype.isNodeSelected = function (node) {\n console.warn('AG Grid: no need to call api.isNodeSelected(), just call node.isSelected() instead');\n return node.isSelected();\n };\n GridApi.prototype.getSelectedNodesById = function () {\n console.error('AG Grid: since version 3.4, getSelectedNodesById no longer exists, use getSelectedNodes() instead');\n return null;\n };\n /**\n * Returns a list of selected nodes.\n * Getting the underlying node (rather than the data) is useful when working with tree / aggregated data,\n * as the node can be traversed.\n */\n GridApi.prototype.getSelectedNodes = function () {\n return this.selectionService.getSelectedNodes();\n };\n /** Returns a list of selected rows (i.e. row data that you provided). */\n GridApi.prototype.getSelectedRows = function () {\n return this.selectionService.getSelectedRows();\n };\n /**\n * Returns a list of all selected nodes at 'best cost', a feature to be used with groups / trees.\n * If a group has all its children selected, then the group appears in the result, but not the children.\n * Designed for use with `'children'` as the group selection type, where groups don't actually appear in the selection normally.\n */\n GridApi.prototype.getBestCostNodeSelection = function () {\n return this.selectionService.getBestCostNodeSelection();\n };\n /** Retrieve rendered nodes. Due to virtualisation this will contain only the current visible rows and those in the buffer. */\n GridApi.prototype.getRenderedNodes = function () {\n return this.rowRenderer.getRenderedNodes();\n };\n GridApi.prototype.ensureColIndexVisible = function (index) {\n console.warn('AG Grid: ensureColIndexVisible(index) no longer supported, use ensureColumnVisible(colKey) instead.');\n };\n /**\n * Ensures the column is visible by scrolling the table if needed.\n * @param key - The column to ensure visible\n * @param position - Where the column will be positioned.\n * - `auto` - Scrolls the minimum amount to make sure the column is visible.\n * - `start` - Scrolls the column to the start of the viewport.\n * - `middle` - Scrolls the column to the middle of the viewport.\n * - `end` - Scrolls the column to the end of the viewport.\n */\n GridApi.prototype.ensureColumnVisible = function (key, position) {\n if (position === void 0) { position = 'auto'; }\n this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(key, position);\n };\n /**\n * Ensures the row index is visible by vertically scrolling the grid.\n * If a position of `'top'`, `'middle'` or `'bottom'` is supplied, the grid will scroll the grid to place the row at the top, middle or bottom respectively.\n * Otherwise, the grid will do the minimum scrolling possible to show the row.\n * i.e.\n * - if the grid needs to scroll up then it will scroll so that the row is at the top,\n * - if the grid needs to scroll down then it will scroll so that the row is at the bottom,\n * - if the row is already in view then the grid will do nothing.\n */\n GridApi.prototype.ensureIndexVisible = function (index, position) {\n this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(index, position);\n };\n /**\n * Ensures a row node is visible, scrolling the grid if needed.\n * Provide either:\n * - the node,\n * - the data object\n * - a comparator function (that takes the node as a parameter, and returns `true` for match or `false` for no match).\n */\n GridApi.prototype.ensureNodeVisible = function (comparator, position) {\n if (position === void 0) { position = null; }\n this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(comparator, position);\n };\n /**\n * Similar to `forEachNode`, except lists all the leaf nodes.\n * This effectively goes through all the data that you provided to the grid before the grid performed any grouping.\n * If using tree data, goes through all the nodes for the data you provided, including nodes that have children,\n * but excluding groups the grid created where gaps were missing in the hierarchy.\n */\n GridApi.prototype.forEachLeafNode = function (callback) {\n if (missing(this.clientSideRowModel)) {\n console.warn('cannot call forEachNode unless using normal row model');\n }\n this.clientSideRowModel.forEachLeafNode(callback);\n };\n /**\n * Iterates through each node (row) in the grid and calls the callback for each node.\n * This works similar to the `forEach` method on a JavaScript array.\n * This is called for every node, ignoring any filtering or sorting applied within the grid.\n * If using the Infinite Row Model, then this gets called for each page loaded in the page cache.\n */\n GridApi.prototype.forEachNode = function (callback) {\n this.rowModel.forEachNode(callback);\n };\n /** Similar to `forEachNode`, except skips any filtered out data. */\n GridApi.prototype.forEachNodeAfterFilter = function (callback) {\n if (missing(this.clientSideRowModel)) {\n console.warn('cannot call forEachNodeAfterFilter unless using normal row model');\n }\n this.clientSideRowModel.forEachNodeAfterFilter(callback);\n };\n /** Similar to `forEachNodeAfterFilter`, except the callbacks are called in the order the rows are displayed in the grid. */\n GridApi.prototype.forEachNodeAfterFilterAndSort = function (callback) {\n if (missing(this.clientSideRowModel)) {\n console.warn('cannot call forEachNodeAfterFilterAndSort unless using normal row model');\n }\n this.clientSideRowModel.forEachNodeAfterFilterAndSort(callback);\n };\n /**\n * Returns the filter component instance for a column.\n * `key` can be a string field name or a ColDef object (matches on object reference, useful if field names are not unique).\n * If your filter is created asynchronously, `getFilterInstance` will return `null` so you will need to use the `callback` to access the filter instance instead.\n */\n GridApi.prototype.getFilterInstance = function (key, callback) {\n var res = this.getFilterInstanceImpl(key, function (instance) {\n if (!callback) {\n return;\n }\n var unwrapped = unwrapUserComp(instance);\n callback(unwrapped);\n });\n var unwrapped = unwrapUserComp(res);\n return unwrapped;\n };\n GridApi.prototype.getFilterInstanceImpl = function (key, callback) {\n var column = this.columnModel.getPrimaryColumn(key);\n if (!column) {\n return undefined;\n }\n var filterPromise = this.filterManager.getFilterComponent(column, 'NO_UI');\n var currentValue = filterPromise && filterPromise.resolveNow(null, function (filterComp) { return filterComp; });\n if (currentValue) {\n setTimeout(callback, 0, currentValue);\n }\n else if (filterPromise) {\n filterPromise.then(function (comp) {\n callback(comp);\n });\n }\n return currentValue;\n };\n /** Destroys a filter. Useful to force a particular filter to be created from scratch again. */\n GridApi.prototype.destroyFilter = function (key) {\n var column = this.columnModel.getPrimaryColumn(key);\n if (column) {\n return this.filterManager.destroyFilter(column, \"filterDestroyed\");\n }\n };\n /** Gets the status panel instance corresponding to the supplied `id`. */\n GridApi.prototype.getStatusPanel = function (key) {\n if (!this.statusBarService) {\n return;\n }\n var comp = this.statusBarService.getStatusPanel(key);\n return unwrapUserComp(comp);\n };\n GridApi.prototype.getColumnDef = function (key) {\n var column = this.columnModel.getPrimaryColumn(key);\n if (column) {\n return column.getColDef();\n }\n return null;\n };\n /**\n * Returns the current column definitions.\n */\n GridApi.prototype.getColumnDefs = function () { return this.columnModel.getColumnDefs(); };\n /** Informs the grid that a filter has changed. This is typically called after a filter change through one of the filter APIs. */\n GridApi.prototype.onFilterChanged = function () {\n this.filterManager.onFilterChanged();\n };\n /**\n * Gets the grid to act as if the sort was changed.\n * Useful if you update some values and want to get the grid to reorder them according to the new values.\n */\n GridApi.prototype.onSortChanged = function () {\n this.sortController.onSortChanged('api');\n };\n /** Sets the state of all the advanced filters. Provide it with what you get from `getFilterModel()` to restore filter state. */\n GridApi.prototype.setFilterModel = function (model) {\n this.filterManager.setFilterModel(model);\n };\n /** Gets the current state of all the advanced filters. Used for saving filter state. */\n GridApi.prototype.getFilterModel = function () {\n return this.filterManager.getFilterModel();\n };\n /** Returns the focused cell (or the last focused cell if the grid lost focus). */\n GridApi.prototype.getFocusedCell = function () {\n return this.focusService.getFocusedCell();\n };\n /** Clears the focused cell. */\n GridApi.prototype.clearFocusedCell = function () {\n return this.focusService.clearFocusedCell();\n };\n /** Sets the focus to the specified cell. `rowPinned` can be either 'top', 'bottom' or null (for not pinned). */\n GridApi.prototype.setFocusedCell = function (rowIndex, colKey, rowPinned) {\n this.focusService.setFocusedCell(rowIndex, colKey, rowPinned, true);\n };\n /** Sets the `suppressRowDrag` property. */\n GridApi.prototype.setSuppressRowDrag = function (value) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_SUPPRESS_ROW_DRAG, value);\n };\n /** Sets the `suppressMoveWhenRowDragging` property. */\n GridApi.prototype.setSuppressMoveWhenRowDragging = function (value) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG, value);\n };\n /** Sets the `suppressRowClickSelection` property. */\n GridApi.prototype.setSuppressRowClickSelection = function (value) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_SUPPRESS_ROW_CLICK_SELECTION, value);\n };\n /** Adds a drop zone outside of the grid where rows can be dropped. */\n GridApi.prototype.addRowDropZone = function (params) {\n this.gridBodyCtrl.getRowDragFeature().addRowDropZone(params);\n };\n /** Removes an external drop zone added by `addRowDropZone`. */\n GridApi.prototype.removeRowDropZone = function (params) {\n var activeDropTarget = this.dragAndDropService.findExternalZone(params);\n if (activeDropTarget) {\n this.dragAndDropService.removeDropTarget(activeDropTarget);\n }\n };\n /** Returns the `RowDropZoneParams` to be used by another grid's `addRowDropZone` method. */\n GridApi.prototype.getRowDropZoneParams = function (events) {\n return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(events);\n };\n /** Sets the height in pixels for the row containing the column label header. */\n GridApi.prototype.setHeaderHeight = function (headerHeight) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_HEADER_HEIGHT, headerHeight);\n };\n /**\n * Switch between layout options: `normal`, `autoHeight`, `print`.\n * Defaults to `normal` if no domLayout provided.\n */\n GridApi.prototype.setDomLayout = function (domLayout) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_DOM_LAYOUT, domLayout);\n };\n /** Sets the `enableCellTextSelection` property. */\n GridApi.prototype.setEnableCellTextSelection = function (selectable) {\n this.gridBodyCtrl.setCellTextSelection(selectable);\n };\n /** Sets the preferred direction for the selection fill handle. */\n GridApi.prototype.setFillHandleDirection = function (direction) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_FILL_HANDLE_DIRECTION, direction);\n };\n /** Sets the height in pixels for the rows containing header column groups. */\n GridApi.prototype.setGroupHeaderHeight = function (headerHeight) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT, headerHeight);\n };\n /** Sets the height in pixels for the row containing the floating filters. */\n GridApi.prototype.setFloatingFiltersHeight = function (headerHeight) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT, headerHeight);\n };\n /** Sets the height in pixels for the row containing the columns when in pivot mode. */\n GridApi.prototype.setPivotHeaderHeight = function (headerHeight) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT, headerHeight);\n };\n /** Sets the height in pixels for the row containing header column groups when in pivot mode. */\n GridApi.prototype.setPivotGroupHeaderHeight = function (headerHeight) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT, headerHeight);\n };\n GridApi.prototype.setIsExternalFilterPresent = function (isExternalFilterPresentFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_EXTERNAL_FILTER_PRESENT, isExternalFilterPresentFunc);\n };\n GridApi.prototype.setDoesExternalFilterPass = function (doesExternalFilterPassFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_DOES_EXTERNAL_FILTER_PASS, doesExternalFilterPassFunc);\n };\n GridApi.prototype.setNavigateToNextCell = function (navigateToNextCellFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_NAVIGATE_TO_NEXT_CELL, navigateToNextCellFunc);\n };\n GridApi.prototype.setTabToNextCell = function (tabToNextCellFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_TAB_TO_NEXT_CELL, tabToNextCellFunc);\n };\n GridApi.prototype.setTabToNextHeader = function (tabToNextHeaderFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_TAB_TO_NEXT_HEADER, tabToNextHeaderFunc);\n };\n GridApi.prototype.setNavigateToNextHeader = function (navigateToNextHeaderFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_NAVIGATE_TO_NEXT_HEADER, navigateToNextHeaderFunc);\n };\n GridApi.prototype.setGroupRowAggNodes = function (groupRowAggNodesFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GROUP_ROW_AGG_NODES, groupRowAggNodesFunc);\n };\n GridApi.prototype.setGetGroupRowAgg = function (getGroupRowAggFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_GROUP_ROW_AGG, getGroupRowAggFunc);\n };\n GridApi.prototype.setGetBusinessKeyForNode = function (getBusinessKeyForNodeFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_BUSINESS_KEY_FOR_NODE, getBusinessKeyForNodeFunc);\n };\n GridApi.prototype.setGetChildCount = function (getChildCountFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_CHILD_COUNT, getChildCountFunc);\n };\n GridApi.prototype.setProcessRowPostCreate = function (processRowPostCreateFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PROCESS_ROW_POST_CREATE, processRowPostCreateFunc);\n };\n GridApi.prototype.setGetRowNodeId = function (getRowNodeIdFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_ROW_NODE_ID, getRowNodeIdFunc);\n };\n GridApi.prototype.setGetRowId = function (getRowIdFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_ROW_ID, getRowIdFunc);\n };\n GridApi.prototype.setGetRowClass = function (rowClassFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_ROW_CLASS, rowClassFunc);\n };\n GridApi.prototype.setIsFullWidthCell = function (isFullWidthCellFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_FULL_WIDTH_CELL, isFullWidthCellFunc);\n };\n GridApi.prototype.setIsFullWidthRow = function (isFullWidthRowFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_FULL_WIDTH_ROW, isFullWidthRowFunc);\n };\n GridApi.prototype.setIsRowSelectable = function (isRowSelectableFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_ROW_SELECTABLE, isRowSelectableFunc);\n };\n GridApi.prototype.setIsRowMaster = function (isRowMasterFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_ROW_MASTER, isRowMasterFunc);\n };\n GridApi.prototype.setPostSort = function (postSortFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_POST_SORT, postSortFunc);\n };\n GridApi.prototype.setPostSortRows = function (postSortRowsFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_POST_SORT_ROWS, postSortRowsFunc);\n };\n GridApi.prototype.setGetDocument = function (getDocumentFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_DOCUMENT, getDocumentFunc);\n };\n GridApi.prototype.setGetContextMenuItems = function (getContextMenuItemsFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_CONTEXT_MENU_ITEMS, getContextMenuItemsFunc);\n };\n GridApi.prototype.setGetMainMenuItems = function (getMainMenuItemsFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_MAIN_MENU_ITEMS, getMainMenuItemsFunc);\n };\n GridApi.prototype.setProcessCellForClipboard = function (processCellForClipboardFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PROCESS_CELL_FOR_CLIPBOARD, processCellForClipboardFunc);\n };\n GridApi.prototype.setSendToClipboard = function (sendToClipboardFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_SEND_TO_CLIPBOARD, sendToClipboardFunc);\n };\n GridApi.prototype.setProcessCellFromClipboard = function (processCellFromClipboardFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PROCESS_CELL_FROM_CLIPBOARD, processCellFromClipboardFunc);\n };\n GridApi.prototype.setProcessSecondaryColDef = function (processSecondaryColDefFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PROCESS_TO_SECONDARY_COLDEF, processSecondaryColDefFunc);\n };\n GridApi.prototype.setProcessSecondaryColGroupDef = function (processSecondaryColGroupDefFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PROCESS_SECONDARY_COL_GROUP_DEF, processSecondaryColGroupDefFunc);\n };\n GridApi.prototype.setPostProcessPopup = function (postProcessPopupFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_POST_PROCESS_POPUP, postProcessPopupFunc);\n };\n GridApi.prototype.setDefaultGroupOrderComparator = function (defaultGroupOrderComparatorFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_DEFAULT_GROUP_ORDER_COMPARATOR, defaultGroupOrderComparatorFunc);\n };\n GridApi.prototype.setInitialGroupOrderComparator = function (initialGroupOrderComparatorFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_INITIAL_GROUP_ORDER_COMPARATOR, initialGroupOrderComparatorFunc);\n };\n GridApi.prototype.setGetChartToolbarItems = function (getChartToolbarItemsFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_CHART_TOOLBAR_ITEMS, getChartToolbarItemsFunc);\n };\n GridApi.prototype.setPaginationNumberFormatter = function (paginationNumberFormatterFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_PAGINATION_NUMBER_FORMATTER, paginationNumberFormatterFunc);\n };\n GridApi.prototype.setGetServerSideStoreParams = function (getServerSideStoreParamsFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_SERVER_SIDE_STORE_PARAMS, getServerSideStoreParamsFunc);\n };\n GridApi.prototype.setIsServerSideGroupOpenByDefault = function (isServerSideGroupOpenByDefaultFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT, isServerSideGroupOpenByDefaultFunc);\n };\n GridApi.prototype.setIsApplyServerSideTransaction = function (isApplyServerSideTransactionFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_APPLY_SERVER_SIDE_TRANSACTION, isApplyServerSideTransactionFunc);\n };\n GridApi.prototype.setIsServerSideGroup = function (isServerSideGroupFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_IS_SERVER_SIDE_GROUP, isServerSideGroupFunc);\n };\n GridApi.prototype.setGetServerSideGroupKey = function (getServerSideGroupKeyFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_SERVER_SIDE_GROUP_KEY, getServerSideGroupKeyFunc);\n };\n GridApi.prototype.setGetRowStyle = function (rowStyleFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_ROW_STYLE, rowStyleFunc);\n };\n GridApi.prototype.setGetRowHeight = function (rowHeightFunc) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GET_ROW_HEIGHT, rowHeightFunc);\n };\n /** Returns `true` if the side bar is visible. */\n GridApi.prototype.isSideBarVisible = function () {\n return this.sideBarComp ? this.sideBarComp.isDisplayed() : false;\n };\n /** Show/hide the entire side bar, including any visible panel and the tab buttons. */\n GridApi.prototype.setSideBarVisible = function (show) {\n if (!this.sideBarComp) {\n if (show) {\n console.warn('AG Grid: sideBar is not loaded');\n }\n return;\n }\n this.sideBarComp.setDisplayed(show);\n };\n /** Sets the side bar position relative to the grid. Possible values are `'left'` or `'right'`. */\n GridApi.prototype.setSideBarPosition = function (position) {\n if (!this.sideBarComp) {\n console.warn('AG Grid: sideBar is not loaded');\n return;\n }\n this.sideBarComp.setSideBarPosition(position);\n };\n /** Opens a particular tool panel. Provide the ID of the tool panel to open. */\n GridApi.prototype.openToolPanel = function (key) {\n if (!this.sideBarComp) {\n console.warn('AG Grid: toolPanel is only available in AG Grid Enterprise');\n return;\n }\n this.sideBarComp.openToolPanel(key);\n };\n /** Closes the currently open tool panel (if any). */\n GridApi.prototype.closeToolPanel = function () {\n if (!this.sideBarComp) {\n console.warn('AG Grid: toolPanel is only available in AG Grid Enterprise');\n return;\n }\n this.sideBarComp.close();\n };\n /** Returns the ID of the currently shown tool panel if any, otherwise `null`. */\n GridApi.prototype.getOpenedToolPanel = function () {\n return this.sideBarComp ? this.sideBarComp.openedItem() : null;\n };\n /** Returns the current side bar configuration. If a shortcut was used, returns the detailed long form. */\n GridApi.prototype.getSideBar = function () {\n return this.gridOptionsWrapper.getSideBar();\n };\n /** Resets the side bar to the provided configuration. The parameter is the same as the sideBar grid property. The side bar is re-created from scratch with the new config. */\n GridApi.prototype.setSideBar = function (def) {\n this.gridOptionsWrapper.setProperty('sideBar', SideBarDefParser.parse(def));\n };\n GridApi.prototype.setSuppressClipboardPaste = function (value) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_SUPPRESS_CLIPBOARD_PASTE, value);\n };\n /** Returns `true` if the tool panel is showing, otherwise `false`. */\n GridApi.prototype.isToolPanelShowing = function () {\n return this.sideBarComp.isToolPanelShowing();\n };\n GridApi.prototype.doLayout = function () {\n var message = \"AG Grid - since version 25.1, doLayout was taken out, as it's not needed. The grid responds to grid size changes automatically\";\n doOnce(function () { return console.warn(message); }, 'doLayoutDeprecated');\n };\n /** Tells the grid to recalculate the row heights. */\n GridApi.prototype.resetRowHeights = function () {\n if (exists(this.clientSideRowModel)) {\n if (this.columnModel.isAutoRowHeightActive()) {\n console.warn('AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.');\n return;\n }\n this.clientSideRowModel.resetRowHeights();\n }\n };\n GridApi.prototype.setGroupRemoveSingleChildren = function (value) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN, value);\n };\n GridApi.prototype.setGroupRemoveLowestSingleChildren = function (value) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN, value);\n };\n /** Tells the grid a row height has changed. To be used after calling `rowNode.setRowHeight(newHeight)`. */\n GridApi.prototype.onRowHeightChanged = function () {\n if (this.clientSideRowModel) {\n this.clientSideRowModel.onRowHeightChanged();\n }\n else if (this.serverSideRowModel) {\n this.serverSideRowModel.onRowHeightChanged();\n }\n };\n /**\n * Gets the value for a column for a particular `rowNode` (row).\n * This is useful if you want the raw value of a cell e.g. if implementing your own CSV export.\n */\n GridApi.prototype.getValue = function (colKey, rowNode) {\n var column = this.columnModel.getPrimaryColumn(colKey);\n if (missing(column)) {\n column = this.columnModel.getGridColumn(colKey);\n }\n if (missing(column)) {\n return null;\n }\n return this.valueService.getValue(column, rowNode);\n };\n /** Add an event listener for the specified `eventType`. Works similar to `addEventListener` for a browser DOM element. */\n GridApi.prototype.addEventListener = function (eventType, listener) {\n var async = this.gridOptionsWrapper.useAsyncEvents();\n this.eventService.addEventListener(eventType, listener, async);\n };\n /** Add an event listener for all event types coming from the grid. */\n GridApi.prototype.addGlobalListener = function (listener) {\n var async = this.gridOptionsWrapper.useAsyncEvents();\n this.eventService.addGlobalListener(listener, async);\n };\n /** Remove an event listener. */\n GridApi.prototype.removeEventListener = function (eventType, listener) {\n var async = this.gridOptionsWrapper.useAsyncEvents();\n this.eventService.removeEventListener(eventType, listener, async);\n };\n /** Remove a global event listener. */\n GridApi.prototype.removeGlobalListener = function (listener) {\n var async = this.gridOptionsWrapper.useAsyncEvents();\n this.eventService.removeGlobalListener(listener, async);\n };\n GridApi.prototype.dispatchEvent = function (event) {\n this.eventService.dispatchEvent(event);\n };\n /** Will destroy the grid and release resources. If you are using a framework you do not need to call this, as the grid links in with the framework lifecycle. However if you are using Web Components or native JavaScript, you do need to call this, to avoid a memory leak in your application. */\n GridApi.prototype.destroy = function () {\n // this is needed as GridAPI is a bean, and GridAPI.destroy() is called as part\n // of context.destroy(). so we need to stop the infinite loop.\n if (this.destroyCalled) {\n return;\n }\n this.destroyCalled = true;\n // destroy the UI first (as they use the services)\n var gridCtrl = this.ctrlsService.getGridCtrl();\n if (gridCtrl) {\n gridCtrl.destroyGridUi();\n }\n // destroy the services\n this.context.destroy();\n };\n GridApi.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid = function () {\n // some users were raising support issues with regards memory leaks. the problem was the customers applications\n // were keeping references to the API. trying to educate them all would be difficult, easier to just remove\n // all references in the API so at least the core grid can be garbage collected.\n //\n // wait about 100ms before clearing down the references, in case user has some cleanup to do,\n // and needs to deference the API first\n setTimeout(removeAllReferences.bind(window, this, 'Grid API'), 100);\n };\n GridApi.prototype.warnIfDestroyed = function (methodName) {\n if (this.destroyCalled) {\n console.warn(\"AG Grid: Grid API method \" + methodName + \" was called on a grid that was destroyed.\");\n }\n return this.destroyCalled;\n };\n /** Reset the quick filter cache text on every rowNode. */\n GridApi.prototype.resetQuickFilter = function () {\n if (this.warnIfDestroyed('resetQuickFilter')) {\n return;\n }\n this.rowModel.forEachNode(function (node) { return node.quickFilterAggregateText = null; });\n };\n GridApi.prototype.getRangeSelections = function () {\n console.warn(\"AG Grid: in v20.1.x, api.getRangeSelections() is gone, please use getCellRanges() instead.\\n We had to change how cell selections works a small bit to allow charting to integrate. The return type of\\n getCellRanges() is a bit different, please check the AG Grid documentation.\");\n return null;\n };\n /** Returns the list of selected cell ranges. */\n GridApi.prototype.getCellRanges = function () {\n if (this.rangeService) {\n return this.rangeService.getCellRanges();\n }\n console.warn('AG Grid: cell range selection is only available in AG Grid Enterprise');\n return null;\n };\n GridApi.prototype.camelCaseToHumanReadable = function (camelCase) {\n return camelCaseToHumanText(camelCase);\n };\n GridApi.prototype.addRangeSelection = function (deprecatedNoLongerUsed) {\n console.warn('AG Grid: As of version 21.x, range selection changed slightly to allow charting integration. Please call api.addCellRange() instead of api.addRangeSelection()');\n };\n /** Adds the provided cell range to the selected ranges. */\n GridApi.prototype.addCellRange = function (params) {\n if (!this.rangeService) {\n console.warn('AG Grid: cell range selection is only available in AG Grid Enterprise');\n }\n this.rangeService.addCellRange(params);\n };\n /** Clears the selected ranges. */\n GridApi.prototype.clearRangeSelection = function () {\n if (!this.rangeService) {\n console.warn('AG Grid: cell range selection is only available in AG Grid Enterprise');\n }\n this.rangeService.removeAllCellRanges();\n };\n /** Reverts the last cell edit. */\n GridApi.prototype.undoCellEditing = function () {\n this.undoRedoService.undo();\n };\n /** Re-applies the most recently undone cell edit. */\n GridApi.prototype.redoCellEditing = function () {\n this.undoRedoService.redo();\n };\n /** Returns current number of available cell edit undo operations. */\n GridApi.prototype.getCurrentUndoSize = function () {\n return this.undoRedoService.getCurrentUndoStackSize();\n };\n /** Returns current number of available cell edit redo operations. */\n GridApi.prototype.getCurrentRedoSize = function () {\n return this.undoRedoService.getCurrentRedoStackSize();\n };\n /** Returns a list of models with information about the charts that are currently rendered from the grid. */\n GridApi.prototype.getChartModels = function () {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.RangeSelectionModule, 'api.getChartModels') &&\n ModuleRegistry.assertRegistered(exports.ModuleNames.GridChartsModule, 'api.getChartModels')) {\n return this.chartService.getChartModels();\n }\n };\n /** Returns the `ChartRef` using the supplied `chartId`. */\n GridApi.prototype.getChartRef = function (chartId) {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.RangeSelectionModule, 'api.getChartRef') &&\n ModuleRegistry.assertRegistered(exports.ModuleNames.GridChartsModule, 'api.getChartRef')) {\n return this.chartService.getChartRef(chartId);\n }\n };\n /** Returns a string containing the requested data URL which contains a representation of the chart image. */\n GridApi.prototype.getChartImageDataURL = function (params) {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.RangeSelectionModule, 'api.getChartImageDataURL') &&\n ModuleRegistry.assertRegistered(exports.ModuleNames.GridChartsModule, 'api.getChartImageDataURL')) {\n return this.chartService.getChartImageDataURL(params);\n }\n };\n /** Used to programmatically create charts from a range. */\n GridApi.prototype.createRangeChart = function (params) {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.RangeSelectionModule, 'api.createRangeChart') &&\n ModuleRegistry.assertRegistered(exports.ModuleNames.GridChartsModule, 'api.createRangeChart')) {\n return this.chartService.createRangeChart(params);\n }\n };\n /** Used to programmatically create cross filter charts from a range. */\n GridApi.prototype.createCrossFilterChart = function (params) {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.RangeSelectionModule, 'api.createCrossFilterChart') &&\n ModuleRegistry.assertRegistered(exports.ModuleNames.GridChartsModule, 'api.createCrossFilterChart')) {\n return this.chartService.createCrossFilterChart(params);\n }\n };\n /** Restores a chart using the `ChartModel` that was previously obtained from `getChartModels()`. */\n GridApi.prototype.restoreChart = function (chartModel, chartContainer) {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.RangeSelectionModule, 'api.restoreChart') &&\n ModuleRegistry.assertRegistered(exports.ModuleNames.GridChartsModule, 'api.restoreChart')) {\n return this.chartService.restoreChart(chartModel, chartContainer);\n }\n };\n /** Used to programmatically create pivot charts from a grid. */\n GridApi.prototype.createPivotChart = function (params) {\n if (ModuleRegistry.assertRegistered(exports.ModuleNames.RangeSelectionModule, 'api.createPivotChart') &&\n ModuleRegistry.assertRegistered(exports.ModuleNames.GridChartsModule, 'api.createPivotChart')) {\n return this.chartService.createPivotChart(params);\n }\n };\n /** Copies the selected rows to the clipboard. */\n GridApi.prototype.copySelectedRowsToClipboard = function (params) {\n if (!this.clipboardService) {\n console.warn('AG Grid: clipboard is only available in AG Grid Enterprise');\n }\n this.clipboardService.copySelectedRowsToClipboard(params);\n };\n /** Copies the selected ranges to the clipboard. */\n GridApi.prototype.copySelectedRangeToClipboard = function (params) {\n if (!this.clipboardService) {\n console.warn('AG Grid: clipboard is only available in AG Grid Enterprise');\n }\n this.clipboardService.copySelectedRangeToClipboard(params);\n };\n /** Copies the selected range down, similar to `Ctrl + D` in Excel. */\n GridApi.prototype.copySelectedRangeDown = function () {\n if (!this.clipboardService) {\n console.warn('AG Grid: clipboard is only available in AG Grid Enterprise');\n }\n this.clipboardService.copyRangeDown();\n };\n /** Shows the column menu after and positions it relative to the provided button element. Use in conjunction with your own header template. */\n GridApi.prototype.showColumnMenuAfterButtonClick = function (colKey, buttonElement) {\n // use grid column so works with pivot mode\n var column = this.columnModel.getGridColumn(colKey);\n this.menuFactory.showMenuAfterButtonClick(column, buttonElement, 'columnMenu');\n };\n /** Shows the column menu after and positions it relative to the mouse event. Use in conjunction with your own header template. */\n GridApi.prototype.showColumnMenuAfterMouseClick = function (colKey, mouseEvent) {\n // use grid column so works with pivot mode\n var column = this.columnModel.getGridColumn(colKey);\n if (!column) {\n column = this.columnModel.getPrimaryColumn(colKey);\n }\n if (!column) {\n console.error(\"AG Grid: column '\" + colKey + \"' not found\");\n return;\n }\n this.menuFactory.showMenuAfterMouseEvent(column, mouseEvent);\n };\n /** Hides any visible context menu or column menu. */\n GridApi.prototype.hidePopupMenu = function () {\n // hide the context menu if in enterprise\n if (this.contextMenuFactory) {\n this.contextMenuFactory.hideActiveMenu();\n }\n // and hide the column menu always\n this.menuFactory.hideActiveMenu();\n };\n /** DOM element to use as the popup parent for grid popups (context menu, column menu etc). */\n GridApi.prototype.setPopupParent = function (ePopupParent) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_POPUP_PARENT, ePopupParent);\n };\n /** Navigates the grid focus to the next cell, as if tabbing. */\n GridApi.prototype.tabToNextCell = function (event) {\n return this.navigationService.tabToNextCell(false, event);\n };\n /** Navigates the grid focus to the previous cell, as if shift-tabbing. */\n GridApi.prototype.tabToPreviousCell = function (event) {\n return this.navigationService.tabToNextCell(true, event);\n };\n /** Returns the list of active cell renderer instances. */\n GridApi.prototype.getCellRendererInstances = function (params) {\n if (params === void 0) { params = {}; }\n var res = this.rowRenderer.getCellRendererInstances(params);\n var unwrapped = res.map(unwrapUserComp);\n return unwrapped;\n };\n /** Returns the list of active cell editor instances. Optionally provide parameters to restrict to certain columns / row nodes. */\n GridApi.prototype.getCellEditorInstances = function (params) {\n if (params === void 0) { params = {}; }\n var res = this.rowRenderer.getCellEditorInstances(params);\n var unwrapped = res.map(unwrapUserComp);\n return unwrapped;\n };\n /** If the grid is editing, returns back details of the editing cell(s). */\n GridApi.prototype.getEditingCells = function () {\n return this.rowRenderer.getEditingCells();\n };\n /** If a cell is editing, it stops the editing. Pass `true` if you want to cancel the editing (i.e. don't accept changes). */\n GridApi.prototype.stopEditing = function (cancel) {\n if (cancel === void 0) { cancel = false; }\n this.rowRenderer.stopEditing(cancel);\n };\n /** Start editing the provided cell. If another cell is editing, the editing will be stopped in that other cell. */\n GridApi.prototype.startEditingCell = function (params) {\n var column = this.columnModel.getGridColumn(params.colKey);\n if (!column) {\n console.warn(\"AG Grid: no column found for \" + params.colKey);\n return;\n }\n var cellPosition = {\n rowIndex: params.rowIndex,\n rowPinned: params.rowPinned || null,\n column: column\n };\n var notPinned = params.rowPinned == null;\n if (notPinned) {\n this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(params.rowIndex);\n }\n var cell = this.navigationService.getCellByPosition(cellPosition);\n if (!cell) {\n return;\n }\n cell.startRowOrCellEdit(params.key, params.charPress);\n };\n /** Add an aggregation function with the specified key. */\n GridApi.prototype.addAggFunc = function (key, aggFunc) {\n if (this.aggFuncService) {\n this.aggFuncService.addAggFunc(key, aggFunc);\n }\n };\n /** Add aggregations function with the specified keys. */\n GridApi.prototype.addAggFuncs = function (aggFuncs) {\n if (this.aggFuncService) {\n this.aggFuncService.addAggFuncs(aggFuncs);\n }\n };\n /** Clears all aggregation functions (including those provided by the grid). */\n GridApi.prototype.clearAggFuncs = function () {\n if (this.aggFuncService) {\n this.aggFuncService.clear();\n }\n };\n /** Apply transactions to the server side row model. */\n GridApi.prototype.applyServerSideTransaction = function (transaction) {\n if (!this.serverSideTransactionManager) {\n console.warn('AG Grid: Cannot apply Server Side Transaction if not using the Server Side Row Model.');\n return;\n }\n return this.serverSideTransactionManager.applyTransaction(transaction);\n };\n GridApi.prototype.applyServerSideTransactionAsync = function (transaction, callback) {\n if (!this.serverSideTransactionManager) {\n console.warn('AG Grid: Cannot apply Server Side Transaction if not using the Server Side Row Model.');\n return;\n }\n return this.serverSideTransactionManager.applyTransactionAsync(transaction, callback);\n };\n /** Gets all failed server side loads to retry. */\n GridApi.prototype.retryServerSideLoads = function () {\n if (!this.serverSideRowModel) {\n console.warn('AG Grid: API retryServerSideLoads() can only be used when using Server-Side Row Model.');\n return;\n }\n this.serverSideRowModel.retryLoads();\n };\n GridApi.prototype.flushServerSideAsyncTransactions = function () {\n if (!this.serverSideTransactionManager) {\n console.warn('AG Grid: Cannot flush Server Side Transaction if not using the Server Side Row Model.');\n return;\n }\n return this.serverSideTransactionManager.flushAsyncTransactions();\n };\n /** Update row data. Pass a transaction object with lists for `add`, `remove` and `update`. */\n GridApi.prototype.applyTransaction = function (rowDataTransaction) {\n if (!this.clientSideRowModel) {\n console.error('AG Grid: updateRowData() only works with ClientSideRowModel. Working with InfiniteRowModel was deprecated in v23.1 and removed in v24.1');\n return;\n }\n var res = this.clientSideRowModel.updateRowData(rowDataTransaction);\n // refresh all the full width rows\n this.rowRenderer.refreshFullWidthRows(res.update);\n // do change detection for all present cells\n if (!this.gridOptionsWrapper.isSuppressChangeDetection()) {\n this.rowRenderer.refreshCells();\n }\n return res;\n };\n /** Sets the `deltaSort` property */\n GridApi.prototype.setDeltaSort = function (enable) {\n this.gridOptionsWrapper.setProperty('deltaSort', enable);\n };\n /** @deprecated */\n GridApi.prototype.updateRowData = function (rowDataTransaction) {\n var message = 'AG Grid: as of v23.1, grid API updateRowData(transaction) is now called applyTransaction(transaction). updateRowData is deprecated and will be removed in a future major release.';\n doOnce(function () { return console.warn(message); }, 'updateRowData deprecated');\n return this.applyTransaction(rowDataTransaction);\n };\n /** Same as `applyTransaction` except executes asynchronously for efficiency. */\n GridApi.prototype.applyTransactionAsync = function (rowDataTransaction, callback) {\n if (!this.clientSideRowModel) {\n console.error('AG Grid: api.applyTransactionAsync() only works with ClientSideRowModel.');\n return;\n }\n this.clientSideRowModel.batchUpdateRowData(rowDataTransaction, callback);\n };\n /** Executes any remaining asynchronous grid transactions, if any are waiting to be executed. */\n GridApi.prototype.flushAsyncTransactions = function () {\n if (!this.clientSideRowModel) {\n console.error('AG Grid: api.applyTransactionAsync() only works with ClientSideRowModel.');\n return;\n }\n this.clientSideRowModel.flushAsyncTransactions();\n };\n /** @deprecated */\n GridApi.prototype.batchUpdateRowData = function (rowDataTransaction, callback) {\n var message = 'AG Grid: as of v23.1, grid API batchUpdateRowData(transaction, callback) is now called applyTransactionAsync(transaction, callback). batchUpdateRowData is deprecated and will be removed in a future major release.';\n doOnce(function () { return console.warn(message); }, 'batchUpdateRowData deprecated');\n this.applyTransactionAsync(rowDataTransaction, callback);\n };\n GridApi.prototype.insertItemsAtIndex = function (index, items, skipRefresh) {\n console.warn('AG Grid: insertItemsAtIndex() is deprecated, use updateRowData(transaction) instead.');\n this.updateRowData({ add: items, addIndex: index, update: null, remove: null });\n };\n GridApi.prototype.removeItems = function (rowNodes, skipRefresh) {\n console.warn('AG Grid: removeItems() is deprecated, use updateRowData(transaction) instead.');\n var dataToRemove = rowNodes.map(function (rowNode) { return rowNode.data; });\n this.updateRowData({ add: null, addIndex: null, update: null, remove: dataToRemove });\n };\n GridApi.prototype.addItems = function (items, skipRefresh) {\n console.warn('AG Grid: addItems() is deprecated, use updateRowData(transaction) instead.');\n this.updateRowData({ add: items, addIndex: null, update: null, remove: null });\n };\n GridApi.prototype.refreshVirtualPageCache = function () {\n console.warn('AG Grid: refreshVirtualPageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead');\n this.refreshInfiniteCache();\n };\n GridApi.prototype.refreshInfinitePageCache = function () {\n console.warn('AG Grid: refreshInfinitePageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead');\n this.refreshInfiniteCache();\n };\n /**\n * Marks all the currently loaded blocks in the cache for reload.\n * If you have 10 blocks in the cache, all 10 will be marked for reload.\n * The old data will continue to be displayed until the new data is loaded.\n */\n GridApi.prototype.refreshInfiniteCache = function () {\n if (this.infiniteRowModel) {\n this.infiniteRowModel.refreshCache();\n }\n else {\n console.warn(\"AG Grid: api.refreshInfiniteCache is only available when rowModelType='infinite'.\");\n }\n };\n GridApi.prototype.purgeVirtualPageCache = function () {\n console.warn('AG Grid: purgeVirtualPageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead');\n this.purgeInfinitePageCache();\n };\n GridApi.prototype.purgeInfinitePageCache = function () {\n console.warn('AG Grid: purgeInfinitePageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead');\n this.purgeInfiniteCache();\n };\n /**\n * Purges the cache.\n * The grid is then told to refresh. Only the blocks required to display the current data on screen are fetched (typically no more than 2).\n * The grid will display nothing while the new blocks are loaded.\n * Use this to immediately remove the old data from the user.\n */\n GridApi.prototype.purgeInfiniteCache = function () {\n if (this.infiniteRowModel) {\n this.infiniteRowModel.purgeCache();\n }\n else {\n console.warn(\"AG Grid: api.purgeInfiniteCache is only available when rowModelType='infinite'.\");\n }\n };\n /** @deprecated */\n GridApi.prototype.purgeEnterpriseCache = function (route) {\n console.warn(\"ag-grid: since version 18.x, api.purgeEnterpriseCache() should be replaced with api.purgeServerSideCache()\");\n this.purgeServerSideCache(route);\n };\n /** @deprecated */\n GridApi.prototype.purgeServerSideCache = function (route) {\n if (route === void 0) { route = []; }\n if (this.serverSideRowModel) {\n console.warn(\"AG Grid: since v25.0, api.purgeServerSideCache is deprecated. Please use api.refreshServerSideStore({purge: true}) instead.\");\n this.refreshServerSideStore({\n route: route,\n purge: true\n });\n }\n else {\n console.warn(\"AG Grid: api.purgeServerSideCache is only available when rowModelType='serverSide'.\");\n }\n };\n /**\n * Refresh a server-side store.\n * If you pass no parameters, then the top level cache is purged.\n * To purge a child cache, pass in the string of keys to get to the child cache.\n */\n GridApi.prototype.refreshServerSideStore = function (params) {\n if (this.serverSideRowModel) {\n this.serverSideRowModel.refreshStore(params);\n }\n else {\n console.warn(\"AG Grid: api.refreshServerSideStore is only available when rowModelType='serverSide'.\");\n }\n };\n /** Returns info on all server side stores. */\n GridApi.prototype.getServerSideStoreState = function () {\n if (this.serverSideRowModel) {\n return this.serverSideRowModel.getStoreState();\n }\n else {\n console.warn(\"AG Grid: api.getServerSideStoreState is only available when rowModelType='serverSide'.\");\n return [];\n }\n };\n GridApi.prototype.getVirtualRowCount = function () {\n console.warn('AG Grid: getVirtualRowCount() is now called getInfiniteRowCount(), please call getInfiniteRowCount() instead');\n return this.getInfiniteRowCount();\n };\n /** The row count defines how many rows the grid allows scrolling to. */\n GridApi.prototype.getInfiniteRowCount = function () {\n if (this.infiniteRowModel) {\n return this.infiniteRowModel.getRowCount();\n }\n else {\n console.warn(\"AG Grid: api.getVirtualRowCount is only available when rowModelType='virtual'.\");\n }\n };\n GridApi.prototype.isMaxRowFound = function () {\n console.warn(\"AG Grid: api.isLastRowIndexKnown is deprecated, please use api.isLastRowIndexKnown()\");\n return this.isLastRowIndexKnown();\n };\n /** Returns `true` if grid allows for scrolling past the last row to load more rows, thus providing infinite scroll. */\n GridApi.prototype.isLastRowIndexKnown = function () {\n if (this.infiniteRowModel) {\n return this.infiniteRowModel.isLastRowIndexKnown();\n }\n else {\n console.warn(\"AG Grid: api.isMaxRowFound is only available when rowModelType='virtual'.\");\n }\n };\n GridApi.prototype.setVirtualRowCount = function (rowCount, maxRowFound) {\n console.warn('AG Grid: setVirtualRowCount() is now called setInfiniteRowCount(), please call setInfiniteRowCount() instead');\n this.setRowCount(rowCount, maxRowFound);\n };\n GridApi.prototype.setInfiniteRowCount = function (rowCount, maxRowFound) {\n console.warn('AG Grid: setInfiniteRowCount() is now called setRowCount(), please call setRowCount() instead');\n this.setRowCount(rowCount, maxRowFound);\n };\n /**\n * Sets the `rowCount` and `lastRowIndexKnown` properties.\n * The second parameter, `lastRowIndexKnown`, is optional and if left out, only `rowCount` is set.\n * Set `rowCount` to adjust the height of the vertical scroll.\n * Set `lastRowIndexKnown` to enable / disable searching for more rows.\n * Use this method if you add or remove rows into the dataset and need to reset the number of rows or put the data back into 'look for data' mode.\n */\n GridApi.prototype.setRowCount = function (rowCount, maxRowFound) {\n if (this.infiniteRowModel) {\n this.infiniteRowModel.setRowCount(rowCount, maxRowFound);\n }\n else {\n console.warn(\"AG Grid: api.setRowCount is only available for Infinite Row Model.\");\n }\n };\n GridApi.prototype.getVirtualPageState = function () {\n console.warn('AG Grid: getVirtualPageState() is now called getCacheBlockState(), please call getCacheBlockState() instead');\n return this.getCacheBlockState();\n };\n GridApi.prototype.getInfinitePageState = function () {\n console.warn('AG Grid: getInfinitePageState() is now called getCacheBlockState(), please call getCacheBlockState() instead');\n return this.getCacheBlockState();\n };\n /**\n * Returns an object representing the state of the cache. This is useful for debugging and understanding how the cache is working.\n */\n GridApi.prototype.getCacheBlockState = function () {\n return this.rowNodeBlockLoader.getBlockState();\n };\n GridApi.prototype.checkGridSize = function () {\n console.warn(\"in AG Grid v25.2.0, checkGridSize() was removed, as it was legacy and didn't do anything uesful.\");\n };\n GridApi.prototype.getFirstRenderedRow = function () {\n console.warn('in AG Grid v12, getFirstRenderedRow() was renamed to getFirstDisplayedRow()');\n return this.getFirstDisplayedRow();\n };\n /** Get the index of the first displayed row due to scrolling (includes invisible rendered rows in the buffer). */\n GridApi.prototype.getFirstDisplayedRow = function () {\n return this.rowRenderer.getFirstVirtualRenderedRow();\n };\n GridApi.prototype.getLastRenderedRow = function () {\n console.warn('in AG Grid v12, getLastRenderedRow() was renamed to getLastDisplayedRow()');\n return this.getLastDisplayedRow();\n };\n /** Get the index of the last displayed row due to scrolling (includes invisible rendered rows in the buffer). */\n GridApi.prototype.getLastDisplayedRow = function () {\n return this.rowRenderer.getLastVirtualRenderedRow();\n };\n /** Returns the displayed `RowNode` at the given `index`. */\n GridApi.prototype.getDisplayedRowAtIndex = function (index) {\n return this.rowModel.getRow(index);\n };\n /** Returns the total number of displayed rows. */\n GridApi.prototype.getDisplayedRowCount = function () {\n return this.rowModel.getRowCount();\n };\n /**\n * Returns `true` when the last page is known.\n * This will always be `true` if you are using the Client-Side Row Model for pagination.\n * Returns `false` when the last page is not known; this only happens when using Infinite Row Model.\n */\n GridApi.prototype.paginationIsLastPageFound = function () {\n return this.paginationProxy.isLastPageFound();\n };\n /** Returns how many rows are being shown per page. */\n GridApi.prototype.paginationGetPageSize = function () {\n return this.paginationProxy.getPageSize();\n };\n /** Sets the `paginationPageSize`, then re-paginates the grid so the changes are applied immediately. */\n GridApi.prototype.paginationSetPageSize = function (size) {\n this.gridOptionsWrapper.setProperty('paginationPageSize', size);\n };\n /** Returns the 0-based index of the page which is showing. */\n GridApi.prototype.paginationGetCurrentPage = function () {\n return this.paginationProxy.getCurrentPage();\n };\n /** Returns the total number of pages. Returns `null` if `paginationIsLastPageFound() === false`. */\n GridApi.prototype.paginationGetTotalPages = function () {\n return this.paginationProxy.getTotalPages();\n };\n /** The total number of rows. Returns `null` if `paginationIsLastPageFound() === false`. */\n GridApi.prototype.paginationGetRowCount = function () {\n return this.paginationProxy.getMasterRowCount();\n };\n /** Navigates to the next page. */\n GridApi.prototype.paginationGoToNextPage = function () {\n this.paginationProxy.goToNextPage();\n };\n /** Navigates to the previous page. */\n GridApi.prototype.paginationGoToPreviousPage = function () {\n this.paginationProxy.goToPreviousPage();\n };\n /** Navigates to the first page. */\n GridApi.prototype.paginationGoToFirstPage = function () {\n this.paginationProxy.goToFirstPage();\n };\n /** Navigates to the last page. */\n GridApi.prototype.paginationGoToLastPage = function () {\n this.paginationProxy.goToLastPage();\n };\n /** Goes to the specified page. If the page requested doesn't exist, it will go to the last page. */\n GridApi.prototype.paginationGoToPage = function (page) {\n this.paginationProxy.goToPage(page);\n };\n GridApi.prototype.setRowClass = function (className) {\n this.gridOptionsWrapper.setProperty(GridOptionsWrapper.PROP_ROW_CLASS, className);\n };\n __decorate$18([\n Optional('immutableService')\n ], GridApi.prototype, \"immutableService\", void 0);\n __decorate$18([\n Optional('csvCreator')\n ], GridApi.prototype, \"csvCreator\", void 0);\n __decorate$18([\n Optional('excelCreator')\n ], GridApi.prototype, \"excelCreator\", void 0);\n __decorate$18([\n Autowired('rowRenderer')\n ], GridApi.prototype, \"rowRenderer\", void 0);\n __decorate$18([\n Autowired('navigationService')\n ], GridApi.prototype, \"navigationService\", void 0);\n __decorate$18([\n Autowired('filterManager')\n ], GridApi.prototype, \"filterManager\", void 0);\n __decorate$18([\n Autowired('columnModel')\n ], GridApi.prototype, \"columnModel\", void 0);\n __decorate$18([\n Autowired('selectionService')\n ], GridApi.prototype, \"selectionService\", void 0);\n __decorate$18([\n Autowired('gridOptionsWrapper')\n ], GridApi.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$18([\n Autowired('valueService')\n ], GridApi.prototype, \"valueService\", void 0);\n __decorate$18([\n Autowired('alignedGridsService')\n ], GridApi.prototype, \"alignedGridsService\", void 0);\n __decorate$18([\n Autowired('eventService')\n ], GridApi.prototype, \"eventService\", void 0);\n __decorate$18([\n Autowired('pinnedRowModel')\n ], GridApi.prototype, \"pinnedRowModel\", void 0);\n __decorate$18([\n Autowired('context')\n ], GridApi.prototype, \"context\", void 0);\n __decorate$18([\n Autowired('rowModel')\n ], GridApi.prototype, \"rowModel\", void 0);\n __decorate$18([\n Autowired('sortController')\n ], GridApi.prototype, \"sortController\", void 0);\n __decorate$18([\n Autowired('paginationProxy')\n ], GridApi.prototype, \"paginationProxy\", void 0);\n __decorate$18([\n Autowired('focusService')\n ], GridApi.prototype, \"focusService\", void 0);\n __decorate$18([\n Autowired('dragAndDropService')\n ], GridApi.prototype, \"dragAndDropService\", void 0);\n __decorate$18([\n Optional('rangeService')\n ], GridApi.prototype, \"rangeService\", void 0);\n __decorate$18([\n Optional('clipboardService')\n ], GridApi.prototype, \"clipboardService\", void 0);\n __decorate$18([\n Optional('aggFuncService')\n ], GridApi.prototype, \"aggFuncService\", void 0);\n __decorate$18([\n Autowired('menuFactory')\n ], GridApi.prototype, \"menuFactory\", void 0);\n __decorate$18([\n Optional('contextMenuFactory')\n ], GridApi.prototype, \"contextMenuFactory\", void 0);\n __decorate$18([\n Autowired('valueCache')\n ], GridApi.prototype, \"valueCache\", void 0);\n __decorate$18([\n Autowired('animationFrameService')\n ], GridApi.prototype, \"animationFrameService\", void 0);\n __decorate$18([\n Optional('statusBarService')\n ], GridApi.prototype, \"statusBarService\", void 0);\n __decorate$18([\n Optional('chartService')\n ], GridApi.prototype, \"chartService\", void 0);\n __decorate$18([\n Optional('undoRedoService')\n ], GridApi.prototype, \"undoRedoService\", void 0);\n __decorate$18([\n Optional('rowNodeBlockLoader')\n ], GridApi.prototype, \"rowNodeBlockLoader\", void 0);\n __decorate$18([\n Optional('ssrmTransactionManager')\n ], GridApi.prototype, \"serverSideTransactionManager\", void 0);\n __decorate$18([\n Autowired('ctrlsService')\n ], GridApi.prototype, \"ctrlsService\", void 0);\n __decorate$18([\n Optional('frameworkComponentWrapper')\n ], GridApi.prototype, \"frameworkComponentWrapper\", void 0);\n __decorate$18([\n PostConstruct\n ], GridApi.prototype, \"init\", null);\n __decorate$18([\n PreDestroy\n ], GridApi.prototype, \"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid\", null);\n GridApi = __decorate$18([\n Bean('gridApi')\n ], GridApi);\n return GridApi;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1l = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$19 = (undefined && undefined.__decorate) || function (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};\nvar SetLeftFeature = /** @class */ (function (_super) {\n __extends$1l(SetLeftFeature, _super);\n function SetLeftFeature(columnOrGroup, eCell, beans, colsSpanning) {\n var _this = _super.call(this) || this;\n _this.columnOrGroup = columnOrGroup;\n _this.eCell = eCell;\n _this.ariaEl = _this.eCell.querySelector('[role=columnheader]') || _this.eCell;\n _this.colsSpanning = colsSpanning;\n _this.beans = beans;\n return _this;\n }\n SetLeftFeature.prototype.setColsSpanning = function (colsSpanning) {\n this.colsSpanning = colsSpanning;\n this.onLeftChanged();\n };\n SetLeftFeature.prototype.getColumnOrGroup = function () {\n if (this.beans.gridOptionsWrapper.isEnableRtl() && this.colsSpanning) {\n return last(this.colsSpanning);\n }\n return this.columnOrGroup;\n };\n SetLeftFeature.prototype.postConstruct = function () {\n this.addManagedListener(this.columnOrGroup, Column.EVENT_LEFT_CHANGED, this.onLeftChanged.bind(this));\n this.setLeftFirstTime();\n // when in print layout, the left position is also dependent on the width of the pinned sections.\n // so additionally update left if any column width changes.\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onLeftChanged.bind(this));\n // setting left has a dependency on print layout\n this.addManagedListener(this.beans.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.onLeftChanged.bind(this));\n };\n SetLeftFeature.prototype.setLeftFirstTime = function () {\n var suppressMoveAnimation = this.beans.gridOptionsWrapper.isSuppressColumnMoveAnimation();\n var oldLeftExists = exists(this.columnOrGroup.getOldLeft());\n var animateColumnMove = this.beans.columnAnimationService.isActive() && oldLeftExists && !suppressMoveAnimation;\n if (animateColumnMove) {\n this.animateInLeft();\n }\n else {\n this.onLeftChanged();\n }\n };\n SetLeftFeature.prototype.animateInLeft = function () {\n var _this = this;\n var colOrGroup = this.getColumnOrGroup();\n var left = colOrGroup.getLeft();\n var oldLeft = colOrGroup.getOldLeft();\n var oldActualLeft = this.modifyLeftForPrintLayout(colOrGroup, oldLeft);\n var actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left);\n this.setLeft(oldActualLeft);\n // we must keep track of the left we want to set to, as this would otherwise lead to a race\n // condition, if the user changed the left value many times in one VM turn, then we want to make\n // make sure the actualLeft we set in the timeout below (in the next VM turn) is the correct left\n // position. eg if user changes column position twice, then setLeft() below executes twice in next\n // VM turn, but only one (the correct one) should get applied.\n this.actualLeft = actualLeft;\n this.beans.columnAnimationService.executeNextVMTurn(function () {\n // test this left value is the latest one to be applied, and if not, do nothing\n if (_this.actualLeft === actualLeft) {\n _this.setLeft(actualLeft);\n }\n });\n };\n SetLeftFeature.prototype.onLeftChanged = function () {\n var colOrGroup = this.getColumnOrGroup();\n var left = colOrGroup.getLeft();\n this.actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left);\n this.setLeft(this.actualLeft);\n };\n SetLeftFeature.prototype.modifyLeftForPrintLayout = function (colOrGroup, leftPosition) {\n var printLayout = this.beans.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n if (!printLayout) {\n return leftPosition;\n }\n if (colOrGroup.getPinned() === Constants.PINNED_LEFT) {\n return leftPosition;\n }\n var leftWidth = this.beans.columnModel.getDisplayedColumnsLeftWidth();\n if (colOrGroup.getPinned() === Constants.PINNED_RIGHT) {\n var bodyWidth = this.beans.columnModel.getBodyContainerWidth();\n return leftWidth + bodyWidth + leftPosition;\n }\n // is in body\n return leftWidth + leftPosition;\n };\n SetLeftFeature.prototype.setLeft = function (value) {\n // if the value is null, then that means the column is no longer\n // displayed. there is logic in the rendering to fade these columns\n // out, so we don't try and change their left positions.\n if (exists(value)) {\n this.eCell.style.left = value + \"px\";\n }\n var indexColumn;\n if (this.columnOrGroup instanceof Column) {\n indexColumn = this.columnOrGroup;\n }\n else {\n var columnGroup = this.columnOrGroup;\n var children = columnGroup.getLeafColumns();\n if (!children.length) {\n return;\n }\n if (children.length > 1) {\n setAriaColSpan(this.ariaEl, children.length);\n }\n indexColumn = children[0];\n }\n var index = this.beans.columnModel.getAriaColumnIndex(indexColumn);\n setAriaColIndex(this.ariaEl, index);\n };\n __decorate$19([\n PostConstruct\n ], SetLeftFeature.prototype, \"postConstruct\", null);\n return SetLeftFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1m = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1a = (undefined && undefined.__decorate) || function (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};\nvar HoverFeature = /** @class */ (function (_super) {\n __extends$1m(HoverFeature, _super);\n function HoverFeature(columns, element) {\n var _this = _super.call(this) || this;\n _this.columns = columns;\n _this.element = element;\n return _this;\n }\n HoverFeature.prototype.postConstruct = function () {\n if (this.gridOptionsWrapper.isColumnHoverHighlight()) {\n this.addMouseHoverListeners();\n }\n };\n HoverFeature.prototype.addMouseHoverListeners = function () {\n this.addManagedListener(this.element, 'mouseout', this.onMouseOut.bind(this));\n this.addManagedListener(this.element, 'mouseover', this.onMouseOver.bind(this));\n };\n HoverFeature.prototype.onMouseOut = function () {\n this.columnHoverService.clearMouseOver();\n };\n HoverFeature.prototype.onMouseOver = function () {\n this.columnHoverService.setMouseOver(this.columns);\n };\n __decorate$1a([\n Autowired('columnHoverService')\n ], HoverFeature.prototype, \"columnHoverService\", void 0);\n __decorate$1a([\n PostConstruct\n ], HoverFeature.prototype, \"postConstruct\", null);\n return HoverFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1n = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1b = (undefined && undefined.__decorate) || function (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};\nvar HeaderFilterCellCtrl = /** @class */ (function (_super) {\n __extends$1n(HeaderFilterCellCtrl, _super);\n function HeaderFilterCellCtrl(column, parentRowCtrl) {\n var _this = _super.call(this, column, parentRowCtrl) || this;\n _this.column = column;\n return _this;\n }\n HeaderFilterCellCtrl.prototype.setComp = function (comp, eGui, eButtonShowMainFilter, eFloatingFilterBody) {\n _super.prototype.setGui.call(this, eGui);\n this.comp = comp;\n this.eButtonShowMainFilter = eButtonShowMainFilter;\n this.eFloatingFilterBody = eFloatingFilterBody;\n var colDef = this.column.getColDef();\n var filterExists = !!colDef.filter || !!colDef.filterFramework;\n var floatingFilterExists = !!colDef.floatingFilter;\n this.active = filterExists && floatingFilterExists;\n this.setupWidth();\n this.setupLeft();\n this.setupHover();\n this.setupFocus();\n this.setupUserComp();\n this.setupSyncWithFilter();\n this.setupUi();\n this.addManagedListener(this.eButtonShowMainFilter, 'click', this.showParentFilter.bind(this));\n };\n HeaderFilterCellCtrl.prototype.setupUi = function () {\n this.comp.addOrRemoveButtonWrapperCssClass('ag-hidden', !this.active || this.suppressFilterButton);\n if (!this.active) {\n return;\n }\n this.comp.addOrRemoveBodyCssClass('ag-floating-filter-full-body', this.suppressFilterButton);\n this.comp.addOrRemoveBodyCssClass('ag-floating-filter-body', !this.suppressFilterButton);\n var eMenuIcon = createIconNoSpan('filter', this.gridOptionsWrapper, this.column);\n if (eMenuIcon) {\n this.eButtonShowMainFilter.appendChild(eMenuIcon);\n }\n };\n HeaderFilterCellCtrl.prototype.setupFocus = function () {\n this.createManagedBean(new ManagedFocusFeature(this.eGui, {\n shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),\n onTabKeyDown: this.onTabKeyDown.bind(this),\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusIn: this.onFocusIn.bind(this)\n }));\n };\n HeaderFilterCellCtrl.prototype.onTabKeyDown = function (e) {\n var eDocument = this.gridOptionsWrapper.getDocument();\n var activeEl = eDocument.activeElement;\n var wrapperHasFocus = activeEl === this.eGui;\n if (wrapperHasFocus) {\n return;\n }\n var nextFocusableEl = this.focusService.findNextFocusableElement(this.eGui, null, e.shiftKey);\n if (nextFocusableEl) {\n this.beans.headerNavigationService.scrollToColumn(this.column);\n e.preventDefault();\n nextFocusableEl.focus();\n return;\n }\n var nextFocusableColumn = this.findNextColumnWithFloatingFilter(e.shiftKey);\n if (!nextFocusableColumn) {\n return;\n }\n if (this.focusService.focusHeaderPosition({\n headerPosition: {\n headerRowIndex: this.getParentRowCtrl().getRowIndex(),\n column: nextFocusableColumn\n },\n event: e\n })) {\n e.preventDefault();\n }\n };\n HeaderFilterCellCtrl.prototype.findNextColumnWithFloatingFilter = function (backwards) {\n var columModel = this.beans.columnModel;\n var nextCol = this.column;\n do {\n nextCol = backwards\n ? columModel.getDisplayedColBefore(nextCol)\n : columModel.getDisplayedColAfter(nextCol);\n if (!nextCol) {\n break;\n }\n } while (!nextCol.getColDef().filter || !nextCol.getColDef().floatingFilter);\n return nextCol;\n };\n HeaderFilterCellCtrl.prototype.handleKeyDown = function (e) {\n var eDocument = this.gridOptionsWrapper.getDocument();\n var activeEl = eDocument.activeElement;\n var wrapperHasFocus = activeEl === this.eGui;\n switch (e.key) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n if (!wrapperHasFocus) {\n e.preventDefault();\n }\n case KeyCode.LEFT:\n case KeyCode.RIGHT:\n if (wrapperHasFocus) {\n return;\n }\n e.stopPropagation();\n case KeyCode.ENTER:\n if (wrapperHasFocus) {\n if (this.focusService.focusInto(this.eGui)) {\n e.preventDefault();\n }\n }\n break;\n case KeyCode.ESCAPE:\n if (!wrapperHasFocus) {\n this.eGui.focus();\n }\n }\n };\n HeaderFilterCellCtrl.prototype.onFocusIn = function (e) {\n var isRelatedWithin = this.eGui.contains(e.relatedTarget);\n // when the focus is already within the component,\n // we default to the browser's behavior\n if (isRelatedWithin) {\n return;\n }\n var notFromHeaderWrapper = !!e.relatedTarget && !e.relatedTarget.classList.contains('ag-floating-filter');\n var fromWithinHeader = !!e.relatedTarget && isElementChildOfClass(e.relatedTarget, 'ag-floating-filter');\n if (notFromHeaderWrapper && fromWithinHeader && e.target === this.eGui) {\n var lastFocusEvent = this.lastFocusEvent;\n var fromTab = !!(lastFocusEvent && lastFocusEvent.key === KeyCode.TAB);\n if (lastFocusEvent && fromTab) {\n var shouldFocusLast = lastFocusEvent.shiftKey;\n this.focusService.focusInto(this.eGui, shouldFocusLast);\n }\n }\n var rowIndex = this.getRowIndex();\n this.beans.focusService.setFocusedHeader(rowIndex, this.column);\n };\n HeaderFilterCellCtrl.prototype.setupHover = function () {\n var _this = this;\n this.createManagedBean(new HoverFeature([this.column], this.eGui));\n var listener = function () {\n if (!_this.gridOptionsWrapper.isColumnHoverHighlight()) {\n return;\n }\n var hovered = _this.columnHoverService.isHovered(_this.column);\n _this.comp.addOrRemoveCssClass('ag-column-hover', hovered);\n };\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_HOVER_CHANGED, listener);\n listener();\n };\n HeaderFilterCellCtrl.prototype.setupLeft = function () {\n var setLeftFeature = new SetLeftFeature(this.column, this.eGui, this.beans);\n this.createManagedBean(setLeftFeature);\n };\n HeaderFilterCellCtrl.prototype.setupUserComp = function () {\n var _this = this;\n if (!this.active) {\n return;\n }\n var colDef = this.column.getColDef();\n var filterParams = this.filterManager.createFilterParams(this.column, colDef);\n var finalFilterParams = this.userComponentFactory.mergeParamsWithApplicationProvidedParams(colDef, FilterComponent, filterParams);\n var defaultFloatingFilterType = this.userComponentFactory.getDefaultFloatingFilterType(colDef);\n if (defaultFloatingFilterType == null) {\n defaultFloatingFilterType = 'agReadOnlyFloatingFilter';\n }\n var params = {\n column: this.column,\n filterParams: finalFilterParams,\n currentParentModel: function () { return _this.currentParentModel(); },\n parentFilterInstance: function (cb) { return _this.parentFilterInstance(cb); },\n showParentFilter: function () { return _this.showParentFilter(); },\n suppressFilterButton: false // This one might be overridden from the colDef\n };\n // this is unusual - we need a params value OUTSIDE the component the params are for.\n // the params are for the floating filter component, but this property is actually for the wrapper.\n this.suppressFilterButton = colDef.floatingFilterComponentParams ? !!colDef.floatingFilterComponentParams.suppressFilterButton : false;\n var compDetails = this.userComponentFactory.getFloatingFilterCompDetails(colDef, params, defaultFloatingFilterType);\n if (compDetails) {\n this.comp.setCompDetails(compDetails);\n }\n };\n HeaderFilterCellCtrl.prototype.currentParentModel = function () {\n var filterComponent = this.getFilterComponent(false);\n return filterComponent ? filterComponent.resolveNow(null, function (filter) { return filter && filter.getModel(); }) : null;\n };\n HeaderFilterCellCtrl.prototype.getFilterComponent = function (createIfDoesNotExist) {\n if (createIfDoesNotExist === void 0) { createIfDoesNotExist = true; }\n return this.filterManager.getFilterComponent(this.column, 'NO_UI', createIfDoesNotExist);\n };\n HeaderFilterCellCtrl.prototype.parentFilterInstance = function (callback) {\n var filterComponent = this.getFilterComponent();\n if (filterComponent == null) {\n return;\n }\n filterComponent.then(function (instance) {\n callback(unwrapUserComp(instance));\n });\n };\n HeaderFilterCellCtrl.prototype.showParentFilter = function () {\n var eventSource = this.suppressFilterButton ? this.eFloatingFilterBody : this.eButtonShowMainFilter;\n this.menuFactory.showMenuAfterButtonClick(this.column, eventSource, 'floatingFilter', 'filterMenuTab', ['filterMenuTab']);\n };\n HeaderFilterCellCtrl.prototype.setupSyncWithFilter = function () {\n var _this = this;\n if (!this.active) {\n return;\n }\n var syncWithFilter = function (filterChangedEvent) {\n var compPromise = _this.comp.getFloatingFilterComp();\n if (!compPromise) {\n return;\n }\n var parentModel = _this.currentParentModel();\n compPromise.then(function (comp) {\n if (comp) {\n comp.onParentModelChanged(parentModel, filterChangedEvent);\n }\n });\n };\n this.addManagedListener(this.column, Column.EVENT_FILTER_CHANGED, syncWithFilter);\n if (this.filterManager.isFilterActive(this.column)) {\n syncWithFilter(null);\n }\n };\n HeaderFilterCellCtrl.prototype.setupWidth = function () {\n var _this = this;\n var listener = function () {\n var width = _this.column.getActualWidth() + \"px\";\n _this.comp.setWidth(width);\n };\n this.addManagedListener(this.column, Column.EVENT_WIDTH_CHANGED, listener);\n listener();\n };\n __decorate$1b([\n Autowired('userComponentFactory')\n ], HeaderFilterCellCtrl.prototype, \"userComponentFactory\", void 0);\n __decorate$1b([\n Autowired('filterManager')\n ], HeaderFilterCellCtrl.prototype, \"filterManager\", void 0);\n __decorate$1b([\n Autowired('columnHoverService')\n ], HeaderFilterCellCtrl.prototype, \"columnHoverService\", void 0);\n __decorate$1b([\n Autowired('gridApi')\n ], HeaderFilterCellCtrl.prototype, \"gridApi\", void 0);\n __decorate$1b([\n Autowired('menuFactory')\n ], HeaderFilterCellCtrl.prototype, \"menuFactory\", void 0);\n __decorate$1b([\n Autowired('beans')\n ], HeaderFilterCellCtrl.prototype, \"beans\", void 0);\n return HeaderFilterCellCtrl;\n}(AbstractHeaderCellCtrl));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1o = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1c = (undefined && undefined.__decorate) || function (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};\nvar ResizeFeature = /** @class */ (function (_super) {\n __extends$1o(ResizeFeature, _super);\n function ResizeFeature(pinned, column, eResize, comp, ctrl) {\n var _this = _super.call(this) || this;\n _this.pinned = pinned;\n _this.column = column;\n _this.eResize = eResize;\n _this.comp = comp;\n _this.ctrl = ctrl;\n return _this;\n }\n ResizeFeature.prototype.postConstruct = function () {\n var _this = this;\n var colDef = this.column.getColDef();\n var destroyResizeFuncs = [];\n var canResize;\n var canAutosize;\n var addResize = function () {\n setDisplayed(_this.eResize, canResize);\n if (!canResize) {\n return;\n }\n var finishedWithResizeFunc = _this.horizontalResizeService.addResizeBar({\n eResizeBar: _this.eResize,\n onResizeStart: _this.onResizeStart.bind(_this),\n onResizing: _this.onResizing.bind(_this, false),\n onResizeEnd: _this.onResizing.bind(_this, true)\n });\n destroyResizeFuncs.push(finishedWithResizeFunc);\n if (canAutosize) {\n var skipHeaderOnAutoSize_1 = _this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n var autoSizeColListener_1 = function () {\n _this.columnModel.autoSizeColumn(_this.column, skipHeaderOnAutoSize_1, \"uiColumnResized\");\n };\n _this.eResize.addEventListener('dblclick', autoSizeColListener_1);\n var touchListener_1 = new TouchListener(_this.eResize);\n touchListener_1.addEventListener(TouchListener.EVENT_DOUBLE_TAP, autoSizeColListener_1);\n _this.addDestroyFunc(function () {\n _this.eResize.removeEventListener('dblclick', autoSizeColListener_1);\n touchListener_1.removeEventListener(TouchListener.EVENT_DOUBLE_TAP, autoSizeColListener_1);\n touchListener_1.destroy();\n });\n }\n };\n var removeResize = function () {\n destroyResizeFuncs.forEach(function (f) { return f(); });\n destroyResizeFuncs.length = 0;\n };\n var refresh = function () {\n var resize = _this.column.isResizable();\n var autoSize = !_this.gridOptionsWrapper.isSuppressAutoSize() && !colDef.suppressAutoSize;\n var propertyChange = resize !== canResize || autoSize !== canAutosize;\n if (propertyChange) {\n canResize = resize;\n canAutosize = autoSize;\n removeResize();\n addResize();\n }\n };\n refresh();\n this.addDestroyFunc(removeResize);\n this.ctrl.addRefreshFunction(refresh);\n };\n ResizeFeature.prototype.onResizing = function (finished, resizeAmount) {\n var resizeAmountNormalised = this.normaliseResizeAmount(resizeAmount);\n var columnWidths = [{ key: this.column, newWidth: this.resizeStartWidth + resizeAmountNormalised }];\n this.columnModel.setColumnWidths(columnWidths, this.resizeWithShiftKey, finished, \"uiColumnDragged\");\n if (finished) {\n this.comp.addOrRemoveCssClass('ag-column-resizing', false);\n }\n };\n ResizeFeature.prototype.onResizeStart = function (shiftKey) {\n this.resizeStartWidth = this.column.getActualWidth();\n this.resizeWithShiftKey = shiftKey;\n this.comp.addOrRemoveCssClass('ag-column-resizing', true);\n };\n // optionally inverts the drag, depending on pinned and RTL\n // note - this method is duplicated in RenderedHeaderGroupCell - should refactor out?\n ResizeFeature.prototype.normaliseResizeAmount = function (dragChange) {\n var result = dragChange;\n var notPinningLeft = this.pinned !== Constants.PINNED_LEFT;\n var pinningRight = this.pinned === Constants.PINNED_RIGHT;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n // for RTL, dragging left makes the col bigger, except when pinning left\n if (notPinningLeft) {\n result *= -1;\n }\n }\n else {\n // for LTR (ie normal), dragging left makes the col smaller, except when pinning right\n if (pinningRight) {\n result *= -1;\n }\n }\n return result;\n };\n __decorate$1c([\n Autowired('horizontalResizeService')\n ], ResizeFeature.prototype, \"horizontalResizeService\", void 0);\n __decorate$1c([\n Autowired('columnModel')\n ], ResizeFeature.prototype, \"columnModel\", void 0);\n __decorate$1c([\n PostConstruct\n ], ResizeFeature.prototype, \"postConstruct\", null);\n return ResizeFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1p = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgCheckbox = /** @class */ (function (_super) {\n __extends$1p(AgCheckbox, _super);\n function AgCheckbox(config, className, inputType) {\n if (className === void 0) { className = 'ag-checkbox'; }\n if (inputType === void 0) { inputType = 'checkbox'; }\n var _this = _super.call(this, config, className, inputType) || this;\n _this.labelAlignment = 'right';\n _this.selected = false;\n _this.readOnly = false;\n _this.passive = false;\n return _this;\n }\n AgCheckbox.prototype.addInputListeners = function () {\n this.addManagedListener(this.eInput, 'click', this.onCheckboxClick.bind(this));\n this.addManagedListener(this.eLabel, 'click', this.toggle.bind(this));\n };\n AgCheckbox.prototype.getNextValue = function () {\n return this.selected === undefined ? true : !this.selected;\n };\n AgCheckbox.prototype.setPassive = function (passive) {\n this.passive = passive;\n };\n AgCheckbox.prototype.isReadOnly = function () {\n return this.readOnly;\n };\n AgCheckbox.prototype.setReadOnly = function (readOnly) {\n this.eWrapper.classList.toggle('ag-disabled', readOnly);\n this.eInput.disabled = readOnly;\n this.readOnly = readOnly;\n };\n AgCheckbox.prototype.setDisabled = function (disabled) {\n this.eWrapper.classList.toggle('ag-disabled', disabled);\n return _super.prototype.setDisabled.call(this, disabled);\n };\n AgCheckbox.prototype.toggle = function () {\n if (this.eInput.disabled) {\n return;\n }\n var previousValue = this.isSelected();\n var nextValue = this.getNextValue();\n if (this.passive) {\n this.dispatchChange(nextValue, previousValue);\n }\n else {\n this.setValue(nextValue);\n }\n };\n AgCheckbox.prototype.getValue = function () {\n return this.isSelected();\n };\n AgCheckbox.prototype.setValue = function (value, silent) {\n this.refreshSelectedClass(value);\n this.setSelected(value, silent);\n return this;\n };\n AgCheckbox.prototype.setName = function (name) {\n var input = this.getInputElement();\n input.name = name;\n return this;\n };\n AgCheckbox.prototype.isSelected = function () {\n return this.selected;\n };\n AgCheckbox.prototype.setSelected = function (selected, silent) {\n if (this.isSelected() === selected) {\n return;\n }\n this.previousValue = this.isSelected();\n selected = this.selected = typeof selected === 'boolean' ? selected : undefined;\n this.eInput.checked = selected;\n this.eInput.indeterminate = selected === undefined;\n if (!silent) {\n this.dispatchChange(this.selected, this.previousValue);\n }\n };\n AgCheckbox.prototype.dispatchChange = function (selected, previousValue, event) {\n this.dispatchEvent({ type: AgCheckbox.EVENT_CHANGED, selected: selected, previousValue: previousValue, event: event });\n var input = this.getInputElement();\n var checkboxChangedEvent = {\n type: Events.EVENT_CHECKBOX_CHANGED,\n id: input.id,\n name: input.name,\n selected: selected,\n previousValue: previousValue\n };\n this.eventService.dispatchEvent(checkboxChangedEvent);\n };\n AgCheckbox.prototype.onCheckboxClick = function (e) {\n if (this.passive || this.eInput.disabled) {\n return;\n }\n var previousValue = this.isSelected();\n var selected = this.selected = e.target.checked;\n this.refreshSelectedClass(selected);\n this.dispatchChange(selected, previousValue, e);\n };\n AgCheckbox.prototype.refreshSelectedClass = function (value) {\n this.eWrapper.classList.toggle('ag-checked', value === true);\n this.eWrapper.classList.toggle('ag-indeterminate', value == null);\n };\n return AgCheckbox;\n}(AgAbstractInputField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1q = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1d = (undefined && undefined.__decorate) || function (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};\nvar SelectAllFeature = /** @class */ (function (_super) {\n __extends$1q(SelectAllFeature, _super);\n function SelectAllFeature(column) {\n var _this = _super.call(this) || this;\n _this.cbSelectAllVisible = false;\n _this.processingEventFromCheckbox = false;\n _this.column = column;\n var colDef = column.getColDef();\n _this.filteredOnly = colDef ? !!colDef.headerCheckboxSelectionFilteredOnly : false;\n return _this;\n }\n SelectAllFeature.prototype.onSpaceKeyPressed = function (e) {\n var checkbox = this.cbSelectAll;\n var eDocument = this.gridOptionsWrapper.getDocument();\n if (checkbox.isDisplayed() && !checkbox.getGui().contains(eDocument.activeElement)) {\n e.preventDefault();\n checkbox.setValue(!checkbox.getValue());\n }\n };\n SelectAllFeature.prototype.getCheckboxGui = function () {\n return this.cbSelectAll.getGui();\n };\n SelectAllFeature.prototype.setComp = function (ctrl) {\n this.headerCellCtrl = ctrl;\n this.cbSelectAll = this.createManagedBean(new AgCheckbox());\n this.cbSelectAll.addCssClass('ag-header-select-all');\n setAriaRole(this.cbSelectAll.getGui(), 'presentation');\n this.showOrHideSelectAll();\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.showOrHideSelectAll.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.showOrHideSelectAll.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_SELECTION_CHANGED, this.onSelectionChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.onModelChanged.bind(this));\n this.addManagedListener(this.cbSelectAll, AgCheckbox.EVENT_CHANGED, this.onCbSelectAll.bind(this));\n this.cbSelectAll.getInputElement().setAttribute('tabindex', '-1');\n this.refreshSelectAllLabel();\n };\n SelectAllFeature.prototype.showOrHideSelectAll = function () {\n this.cbSelectAllVisible = this.isCheckboxSelection();\n this.cbSelectAll.setDisplayed(this.cbSelectAllVisible);\n if (this.cbSelectAllVisible) {\n // in case user is trying this feature with the wrong model type\n this.checkRightRowModelType();\n // make sure checkbox is showing the right state\n this.updateStateOfCheckbox();\n }\n this.refreshSelectAllLabel();\n };\n SelectAllFeature.prototype.onModelChanged = function () {\n if (!this.cbSelectAllVisible) {\n return;\n }\n this.updateStateOfCheckbox();\n };\n SelectAllFeature.prototype.onSelectionChanged = function () {\n if (!this.cbSelectAllVisible) {\n return;\n }\n this.updateStateOfCheckbox();\n };\n SelectAllFeature.prototype.getNextCheckboxState = function (selectionCount) {\n // if no rows, always have it unselected\n if (selectionCount.selected === 0 && selectionCount.notSelected === 0) {\n return false;\n }\n // if mix of selected and unselected, this is the tri-state\n if (selectionCount.selected > 0 && selectionCount.notSelected > 0) {\n return null;\n }\n // only selected\n if (selectionCount.selected > 0) {\n return true;\n }\n // nothing selected\n return false;\n };\n SelectAllFeature.prototype.updateStateOfCheckbox = function () {\n if (this.processingEventFromCheckbox) {\n return;\n }\n this.processingEventFromCheckbox = true;\n var selectionCount = this.getSelectionCount();\n var allSelected = this.getNextCheckboxState(selectionCount);\n this.cbSelectAll.setValue(allSelected);\n this.refreshSelectAllLabel();\n this.processingEventFromCheckbox = false;\n };\n SelectAllFeature.prototype.refreshSelectAllLabel = function () {\n if (!this.cbSelectAllVisible) {\n this.headerCellCtrl.setAriaDescriptionProperty('selectAll', null);\n }\n else {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var checked = this.cbSelectAll.getValue();\n var ariaStatus = checked ? translate('ariaChecked', 'checked') : translate('ariaUnchecked', 'unchecked');\n var ariaLabel = translate('ariaRowSelectAll', 'Press Space to toggle all rows selection');\n this.headerCellCtrl.setAriaDescriptionProperty('selectAll', ariaLabel + \" (\" + ariaStatus + \")\");\n }\n this.headerCellCtrl.refreshAriaDescription();\n };\n SelectAllFeature.prototype.getSelectionCount = function () {\n var _this = this;\n var selectedCount = 0;\n var notSelectedCount = 0;\n var callback = function (node) {\n if (_this.gridOptionsWrapper.isGroupSelectsChildren() && node.group) {\n return;\n }\n if (node.isSelected()) {\n selectedCount++;\n }\n else if (!node.selectable) ;\n else {\n notSelectedCount++;\n }\n };\n if (this.filteredOnly) {\n this.gridApi.forEachNodeAfterFilter(callback);\n }\n else {\n this.gridApi.forEachNode(callback);\n }\n return {\n notSelected: notSelectedCount,\n selected: selectedCount\n };\n };\n SelectAllFeature.prototype.checkRightRowModelType = function () {\n var rowModelType = this.rowModel.getType();\n var rowModelMatches = rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n if (!rowModelMatches) {\n console.warn(\"AG Grid: selectAllCheckbox is only available if using normal row model, you are using \" + rowModelType);\n }\n };\n SelectAllFeature.prototype.onCbSelectAll = function () {\n if (this.processingEventFromCheckbox) {\n return;\n }\n if (!this.cbSelectAllVisible) {\n return;\n }\n var value = this.cbSelectAll.getValue();\n if (value) {\n this.selectionService.selectAllRowNodes(this.filteredOnly);\n }\n else {\n this.selectionService.deselectAllRowNodes(this.filteredOnly);\n }\n };\n SelectAllFeature.prototype.isCheckboxSelection = function () {\n var result = this.column.getColDef().headerCheckboxSelection;\n if (typeof result === 'function') {\n var func = result;\n var params = {\n column: this.column,\n colDef: this.column.getColDef(),\n columnApi: this.columnApi,\n api: this.gridApi,\n context: this.gridOptionsWrapper.getContext()\n };\n result = func(params);\n }\n if (result) {\n if (this.gridOptionsWrapper.isRowModelServerSide()) {\n console.warn('AG Grid: headerCheckboxSelection is not supported for Server Side Row Model');\n return false;\n }\n if (this.gridOptionsWrapper.isRowModelInfinite()) {\n console.warn('AG Grid: headerCheckboxSelection is not supported for Infinite Row Model');\n return false;\n }\n if (this.gridOptionsWrapper.isRowModelViewport()) {\n console.warn('AG Grid: headerCheckboxSelection is not supported for Viewport Row Model');\n return false;\n }\n // otherwise the row model is compatible, so return true\n return true;\n }\n return false;\n };\n __decorate$1d([\n Autowired('gridApi')\n ], SelectAllFeature.prototype, \"gridApi\", void 0);\n __decorate$1d([\n Autowired('columnApi')\n ], SelectAllFeature.prototype, \"columnApi\", void 0);\n __decorate$1d([\n Autowired('rowModel')\n ], SelectAllFeature.prototype, \"rowModel\", void 0);\n __decorate$1d([\n Autowired('selectionService')\n ], SelectAllFeature.prototype, \"selectionService\", void 0);\n return SelectAllFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1r = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1e = (undefined && undefined.__decorate) || function (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};\nvar HeaderCellCtrl = /** @class */ (function (_super) {\n __extends$1r(HeaderCellCtrl, _super);\n function HeaderCellCtrl(column, parentRowCtrl) {\n var _this = _super.call(this, column, parentRowCtrl) || this;\n _this.refreshFunctions = [];\n _this.userHeaderClasses = new Set();\n _this.ariaDescriptionProperties = new Map();\n _this.column = column;\n return _this;\n }\n HeaderCellCtrl.prototype.setComp = function (comp, eGui, eResize) {\n var _this = this;\n _super.prototype.setGui.call(this, eGui);\n this.comp = comp;\n this.colDefVersion = this.columnModel.getColDefVersion();\n this.updateState();\n this.setupWidth();\n this.setupMovingCss();\n this.setupMenuClass();\n this.setupSortableClass();\n this.addColumnHoverListener();\n this.setupFilterCss();\n this.setupColId();\n this.setupClassesFromColDef();\n this.setupTooltip();\n this.addActiveHeaderMouseListeners();\n this.setupSelectAll();\n this.setupUserComp();\n this.refreshAria();\n this.createManagedBean(new ResizeFeature(this.getPinned(), this.column, eResize, comp, this));\n this.createManagedBean(new HoverFeature([this.column], eGui));\n this.createManagedBean(new SetLeftFeature(this.column, eGui, this.beans));\n this.createManagedBean(new ManagedFocusFeature(eGui, {\n shouldStopEventPropagation: function (e) { return _this.shouldStopEventPropagation(e); },\n onTabKeyDown: function () { return null; },\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusIn: this.onFocusIn.bind(this),\n onFocusOut: this.onFocusOut.bind(this)\n }));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VALUE_CHANGED, this.onColumnValueChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.onColumnRowGroupChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, this.onColumnPivotChanged.bind(this));\n };\n HeaderCellCtrl.prototype.setupUserComp = function () {\n var compDetails = this.lookupUserCompDetails();\n this.setCompDetails(compDetails);\n };\n HeaderCellCtrl.prototype.setCompDetails = function (compDetails) {\n this.userCompDetails = compDetails;\n this.comp.setUserCompDetails(compDetails);\n };\n HeaderCellCtrl.prototype.lookupUserCompDetails = function () {\n var params = this.createParams();\n var colDef = this.column.getColDef();\n return this.userComponentFactory.getHeaderCompDetails(colDef, params);\n };\n HeaderCellCtrl.prototype.createParams = function () {\n var _this = this;\n var colDef = this.column.getColDef();\n var params = {\n column: this.column,\n displayName: this.displayName,\n enableSorting: colDef.sortable,\n enableMenu: this.menuEnabled,\n showColumnMenu: function (source) {\n _this.gridApi.showColumnMenuAfterButtonClick(_this.column, source);\n },\n progressSort: function (multiSort) {\n _this.sortController.progressSort(_this.column, !!multiSort, \"uiColumnSorted\");\n },\n setSort: function (sort, multiSort) {\n _this.sortController.setSortForColumn(_this.column, sort, !!multiSort, \"uiColumnSorted\");\n },\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext(),\n eGridHeader: this.getGui()\n };\n return params;\n };\n HeaderCellCtrl.prototype.setupSelectAll = function () {\n this.selectAllFeature = this.createManagedBean(new SelectAllFeature(this.column));\n this.selectAllFeature.setComp(this);\n };\n HeaderCellCtrl.prototype.getSelectAllGui = function () {\n return this.selectAllFeature.getCheckboxGui();\n };\n HeaderCellCtrl.prototype.handleKeyDown = function (e) {\n if (e.key === KeyCode.SPACE) {\n this.selectAllFeature.onSpaceKeyPressed(e);\n }\n if (e.key === KeyCode.ENTER) {\n this.onEnterKeyPressed(e);\n }\n };\n HeaderCellCtrl.prototype.onEnterKeyPressed = function (e) {\n /// THIS IS BAD - we are assuming the header is not a user provided comp\n var headerComp = this.comp.getUserCompInstance();\n if (!headerComp) {\n return;\n }\n if (e.ctrlKey || e.metaKey) {\n if (this.menuEnabled && headerComp.showMenu) {\n e.preventDefault();\n headerComp.showMenu();\n }\n }\n else if (this.sortable) {\n var multiSort = e.shiftKey;\n this.sortController.progressSort(this.column, multiSort, \"uiColumnSorted\");\n }\n };\n HeaderCellCtrl.prototype.isMenuEnabled = function () {\n return this.menuEnabled;\n };\n HeaderCellCtrl.prototype.onFocusIn = function (e) {\n if (!this.getGui().contains(e.relatedTarget)) {\n var rowIndex = this.getRowIndex();\n this.focusService.setFocusedHeader(rowIndex, this.column);\n }\n this.setActiveHeader(true);\n };\n HeaderCellCtrl.prototype.onFocusOut = function (e) {\n if (this.getGui().contains(e.relatedTarget)) {\n return;\n }\n this.setActiveHeader(false);\n };\n HeaderCellCtrl.prototype.setupTooltip = function () {\n var _this = this;\n var tooltipCtrl = {\n getColumn: function () { return _this.column; },\n getColDef: function () { return _this.column.getColDef(); },\n getGui: function () { return _this.eGui; },\n getLocation: function () { return 'header'; },\n getTooltipValue: function () {\n var res = _this.column.getColDef().headerTooltip;\n return res;\n },\n };\n var tooltipFeature = this.createManagedBean(new TooltipFeature(tooltipCtrl, this.beans));\n tooltipFeature.setComp(this.comp);\n this.refreshFunctions.push(function () { return tooltipFeature.refreshToolTip(); });\n };\n HeaderCellCtrl.prototype.setupClassesFromColDef = function () {\n var _this = this;\n var refreshHeaderClasses = function () {\n var colDef = _this.column.getColDef();\n var goa = _this.gridOptionsWrapper;\n var classes = CssClassApplier.getHeaderClassesFromColDef(colDef, goa, _this.column, null);\n var oldClasses = _this.userHeaderClasses;\n _this.userHeaderClasses = new Set(classes);\n classes.forEach(function (c) {\n if (oldClasses.has(c)) {\n // class already added, no need to apply it, but remove from old set\n oldClasses.delete(c);\n }\n else {\n // class new since last time, so apply it\n _this.comp.addOrRemoveCssClass(c, true);\n }\n });\n // now old set only has classes that were applied last time, but not this time, so remove them\n oldClasses.forEach(function (c) { return _this.comp.addOrRemoveCssClass(c, false); });\n };\n this.refreshFunctions.push(refreshHeaderClasses);\n refreshHeaderClasses();\n };\n HeaderCellCtrl.prototype.setDragSource = function (eSource) {\n var _this = this;\n this.dragSourceElement = eSource;\n this.removeDragSource();\n if (!eSource) {\n return;\n }\n if (!this.draggable) {\n return;\n }\n this.moveDragSource = {\n type: exports.DragSourceType.HeaderCell,\n eElement: eSource,\n defaultIconName: DragAndDropService.ICON_HIDE,\n getDragItem: function () { return _this.createDragItem(); },\n dragItemName: this.displayName,\n onDragStarted: function () { return _this.column.setMoving(true, \"uiColumnMoved\"); },\n onDragStopped: function () { return _this.column.setMoving(false, \"uiColumnMoved\"); }\n };\n this.dragAndDropService.addDragSource(this.moveDragSource, true);\n };\n HeaderCellCtrl.prototype.createDragItem = function () {\n var visibleState = {};\n visibleState[this.column.getId()] = this.column.isVisible();\n return {\n columns: [this.column],\n visibleState: visibleState\n };\n };\n HeaderCellCtrl.prototype.removeDragSource = function () {\n if (this.moveDragSource) {\n this.dragAndDropService.removeDragSource(this.moveDragSource);\n this.moveDragSource = undefined;\n }\n };\n HeaderCellCtrl.prototype.onNewColumnsLoaded = function () {\n var colDefVersionNow = this.columnModel.getColDefVersion();\n if (colDefVersionNow != this.colDefVersion) {\n this.colDefVersion = colDefVersionNow;\n this.refresh();\n }\n };\n HeaderCellCtrl.prototype.updateState = function () {\n var colDef = this.column.getColDef();\n this.menuEnabled = this.menuFactory.isMenuEnabled(this.column) && !colDef.suppressMenu;\n this.sortable = colDef.sortable;\n this.displayName = this.calculateDisplayName();\n this.draggable = this.workOutDraggable();\n };\n HeaderCellCtrl.prototype.addRefreshFunction = function (func) {\n this.refreshFunctions.push(func);\n };\n HeaderCellCtrl.prototype.refresh = function () {\n this.updateState();\n this.refreshHeaderComp();\n this.refreshAria();\n this.refreshFunctions.forEach(function (f) { return f(); });\n };\n HeaderCellCtrl.prototype.refreshHeaderComp = function () {\n var newCompDetails = this.lookupUserCompDetails();\n var compInstance = this.comp.getUserCompInstance();\n // only try refresh if old comp exists adn it is the correct type\n var attemptRefresh = compInstance != null && this.userCompDetails.componentClass == newCompDetails.componentClass;\n var headerCompRefreshed = attemptRefresh ? this.attemptHeaderCompRefresh(newCompDetails.params) : false;\n if (headerCompRefreshed) {\n // we do this as a refresh happens after colDefs change, and it's possible the column has had it's\n // draggable property toggled. no need to call this if not refreshing, as setDragSource is done\n // as part of appendHeaderComp\n this.setDragSource(this.dragSourceElement);\n }\n else {\n this.setCompDetails(newCompDetails);\n }\n };\n HeaderCellCtrl.prototype.attemptHeaderCompRefresh = function (params) {\n var headerComp = this.comp.getUserCompInstance();\n if (!headerComp) {\n return false;\n }\n // if no refresh method, then we want to replace the headerComp\n if (!headerComp.refresh) {\n return false;\n }\n var res = headerComp.refresh(params);\n return res;\n };\n HeaderCellCtrl.prototype.calculateDisplayName = function () {\n return this.columnModel.getDisplayNameForColumn(this.column, 'header', true);\n };\n HeaderCellCtrl.prototype.checkDisplayName = function () {\n // display name can change if aggFunc different, eg sum(Gold) is now max(Gold)\n if (this.displayName !== this.calculateDisplayName()) {\n this.refresh();\n }\n };\n HeaderCellCtrl.prototype.workOutDraggable = function () {\n var colDef = this.column.getColDef();\n var isSuppressMovableColumns = this.gridOptionsWrapper.isSuppressMovableColumns();\n var colCanMove = !isSuppressMovableColumns && !colDef.suppressMovable && !colDef.lockPosition;\n // we should still be allowed drag the column, even if it can't be moved, if the column\n // can be dragged to a rowGroup or pivot drop zone\n return !!colCanMove || !!colDef.enableRowGroup || !!colDef.enablePivot;\n };\n HeaderCellCtrl.prototype.onColumnRowGroupChanged = function () {\n this.checkDisplayName();\n };\n HeaderCellCtrl.prototype.onColumnPivotChanged = function () {\n this.checkDisplayName();\n };\n HeaderCellCtrl.prototype.onColumnValueChanged = function () {\n this.checkDisplayName();\n };\n HeaderCellCtrl.prototype.setupWidth = function () {\n var _this = this;\n var listener = function () {\n _this.comp.setWidth(_this.column.getActualWidth() + 'px');\n };\n this.addManagedListener(this.column, Column.EVENT_WIDTH_CHANGED, listener);\n listener();\n };\n HeaderCellCtrl.prototype.setupMovingCss = function () {\n var _this = this;\n var listener = function () {\n // this is what makes the header go dark when it is been moved (gives impression to\n // user that the column was picked up).\n _this.comp.addOrRemoveCssClass('ag-header-cell-moving', _this.column.isMoving());\n };\n this.addManagedListener(this.column, Column.EVENT_MOVING_CHANGED, listener);\n listener();\n };\n HeaderCellCtrl.prototype.setupMenuClass = function () {\n var _this = this;\n var listener = function () {\n _this.comp.addOrRemoveCssClass('ag-column-menu-visible', _this.column.isMenuVisible());\n };\n this.addManagedListener(this.column, Column.EVENT_MENU_VISIBLE_CHANGED, listener);\n listener();\n };\n HeaderCellCtrl.prototype.setupSortableClass = function () {\n var _this = this;\n var updateSortableCssClass = function () {\n _this.comp.addOrRemoveCssClass('ag-header-cell-sortable', !!_this.sortable);\n };\n updateSortableCssClass();\n this.addRefreshFunction(updateSortableCssClass);\n this.addManagedListener(this.column, Column.EVENT_SORT_CHANGED, this.refreshAriaSort.bind(this));\n };\n HeaderCellCtrl.prototype.refreshAriaSort = function () {\n if (this.sortable) {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.comp.setAriaSort(getAriaSortState(this.column));\n this.setAriaDescriptionProperty('sort', translate('ariaSortableColumn', 'Press ENTER to sort.'));\n }\n else {\n this.comp.setAriaSort();\n this.setAriaDescriptionProperty('sort', null);\n }\n };\n HeaderCellCtrl.prototype.refreshAriaMenu = function () {\n if (this.menuEnabled) {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.setAriaDescriptionProperty('menu', translate('ariaMenuColumn', 'Press CTRL ENTER to open column menu.'));\n }\n else {\n this.setAriaDescriptionProperty('menu', null);\n }\n };\n HeaderCellCtrl.prototype.setAriaDescriptionProperty = function (property, value) {\n if (value != null) {\n this.ariaDescriptionProperties.set(property, value);\n }\n else {\n this.ariaDescriptionProperties.delete(property);\n }\n };\n HeaderCellCtrl.prototype.refreshAriaDescription = function () {\n var descriptionArray = Array.from(this.ariaDescriptionProperties.values());\n this.comp.setAriaDescription(descriptionArray.length ? descriptionArray.join(' ') : undefined);\n };\n HeaderCellCtrl.prototype.refreshAria = function () {\n this.refreshAriaSort();\n this.refreshAriaMenu();\n this.refreshAriaDescription();\n };\n HeaderCellCtrl.prototype.addColumnHoverListener = function () {\n var _this = this;\n var listener = function () {\n if (!_this.gridOptionsWrapper.isColumnHoverHighlight()) {\n return;\n }\n var isHovered = _this.columnHoverService.isHovered(_this.column);\n _this.comp.addOrRemoveCssClass('ag-column-hover', isHovered);\n };\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_HOVER_CHANGED, listener);\n listener();\n };\n HeaderCellCtrl.prototype.setupFilterCss = function () {\n var _this = this;\n var listener = function () {\n _this.comp.addOrRemoveCssClass('ag-header-cell-filtered', _this.column.isFilterActive());\n };\n this.addManagedListener(this.column, Column.EVENT_FILTER_ACTIVE_CHANGED, listener);\n listener();\n };\n HeaderCellCtrl.prototype.setupColId = function () {\n this.comp.setColId(this.column.getColId());\n };\n HeaderCellCtrl.prototype.addActiveHeaderMouseListeners = function () {\n var _this = this;\n var listener = function (e) { return _this.setActiveHeader(e.type === 'mouseenter'); };\n this.addManagedListener(this.getGui(), 'mouseenter', listener);\n this.addManagedListener(this.getGui(), 'mouseleave', listener);\n };\n HeaderCellCtrl.prototype.setActiveHeader = function (active) {\n this.comp.addOrRemoveCssClass('ag-header-active', active);\n };\n __decorate$1e([\n Autowired('columnModel')\n ], HeaderCellCtrl.prototype, \"columnModel\", void 0);\n __decorate$1e([\n Autowired('columnHoverService')\n ], HeaderCellCtrl.prototype, \"columnHoverService\", void 0);\n __decorate$1e([\n Autowired('beans')\n ], HeaderCellCtrl.prototype, \"beans\", void 0);\n __decorate$1e([\n Autowired('sortController')\n ], HeaderCellCtrl.prototype, \"sortController\", void 0);\n __decorate$1e([\n Autowired('menuFactory')\n ], HeaderCellCtrl.prototype, \"menuFactory\", void 0);\n __decorate$1e([\n Autowired('dragAndDropService')\n ], HeaderCellCtrl.prototype, \"dragAndDropService\", void 0);\n __decorate$1e([\n Autowired('gridApi')\n ], HeaderCellCtrl.prototype, \"gridApi\", void 0);\n __decorate$1e([\n Autowired('columnApi')\n ], HeaderCellCtrl.prototype, \"columnApi\", void 0);\n __decorate$1e([\n Autowired('userComponentFactory')\n ], HeaderCellCtrl.prototype, \"userComponentFactory\", void 0);\n __decorate$1e([\n PreDestroy\n ], HeaderCellCtrl.prototype, \"removeDragSource\", null);\n return HeaderCellCtrl;\n}(AbstractHeaderCellCtrl));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1s = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1f = (undefined && undefined.__decorate) || function (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};\nvar GroupResizeFeature = /** @class */ (function (_super) {\n __extends$1s(GroupResizeFeature, _super);\n function GroupResizeFeature(comp, eResize, pinned, columnGroup) {\n var _this = _super.call(this) || this;\n _this.eResize = eResize;\n _this.comp = comp;\n _this.pinned = pinned;\n _this.columnGroup = columnGroup;\n return _this;\n }\n GroupResizeFeature.prototype.postConstruct = function () {\n var _this = this;\n if (!this.columnGroup.isResizable()) {\n this.comp.addOrRemoveResizableCssClass('ag-hidden', true);\n return;\n }\n var finishedWithResizeFunc = this.horizontalResizeService.addResizeBar({\n eResizeBar: this.eResize,\n onResizeStart: this.onResizeStart.bind(this),\n onResizing: this.onResizing.bind(this, false),\n onResizeEnd: this.onResizing.bind(this, true)\n });\n this.addDestroyFunc(finishedWithResizeFunc);\n if (!this.gridOptionsWrapper.isSuppressAutoSize()) {\n var skipHeaderOnAutoSize_1 = this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n this.eResize.addEventListener('dblclick', function () {\n // get list of all the column keys we are responsible for\n var keys = [];\n var leafCols = _this.columnGroup.getDisplayedLeafColumns();\n leafCols.forEach(function (column) {\n // not all cols in the group may be participating with auto-resize\n if (!column.getColDef().suppressAutoSize) {\n keys.push(column.getColId());\n }\n });\n if (keys.length > 0) {\n _this.columnModel.autoSizeColumns({\n columns: keys,\n skipHeader: skipHeaderOnAutoSize_1,\n stopAtGroup: _this.columnGroup,\n source: 'uiColumnResized'\n });\n }\n _this.resizeLeafColumnsToFit();\n });\n }\n };\n GroupResizeFeature.prototype.onResizeStart = function (shiftKey) {\n var _this = this;\n this.calculateInitialValues();\n var takeFromGroup = null;\n if (shiftKey) {\n takeFromGroup = this.columnModel.getDisplayedGroupAfter(this.columnGroup);\n }\n if (takeFromGroup) {\n var takeFromLeafCols = takeFromGroup.getDisplayedLeafColumns();\n this.resizeTakeFromCols = takeFromLeafCols.filter(function (col) { return col.isResizable(); });\n this.resizeTakeFromStartWidth = 0;\n this.resizeTakeFromCols.forEach(function (col) { return _this.resizeTakeFromStartWidth += col.getActualWidth(); });\n this.resizeTakeFromRatios = [];\n this.resizeTakeFromCols.forEach(function (col) { return _this.resizeTakeFromRatios.push(col.getActualWidth() / _this.resizeTakeFromStartWidth); });\n }\n else {\n this.resizeTakeFromCols = null;\n this.resizeTakeFromStartWidth = null;\n this.resizeTakeFromRatios = null;\n }\n this.comp.addOrRemoveCssClass('ag-column-resizing', true);\n };\n GroupResizeFeature.prototype.onResizing = function (finished, resizeAmount) {\n var resizeAmountNormalised = this.normaliseDragChange(resizeAmount);\n var width = this.resizeStartWidth + resizeAmountNormalised;\n this.resizeColumns(width, finished);\n };\n GroupResizeFeature.prototype.resizeLeafColumnsToFit = function () {\n var preferredSize = this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup);\n this.calculateInitialValues();\n if (preferredSize > this.resizeStartWidth) {\n this.resizeColumns(preferredSize, true);\n }\n };\n GroupResizeFeature.prototype.resizeColumns = function (totalWidth, finished) {\n if (finished === void 0) { finished = true; }\n var resizeSets = [];\n resizeSets.push({\n columns: this.resizeCols,\n ratios: this.resizeRatios,\n width: totalWidth\n });\n if (this.resizeTakeFromCols) {\n var diff = totalWidth - this.resizeStartWidth;\n resizeSets.push({\n columns: this.resizeTakeFromCols,\n ratios: this.resizeTakeFromRatios,\n width: this.resizeTakeFromStartWidth - diff\n });\n }\n this.columnModel.resizeColumnSets({\n resizeSets: resizeSets,\n finished: finished,\n source: 'uiColumnDragged'\n });\n if (finished) {\n this.comp.addOrRemoveCssClass('ag-column-resizing', false);\n }\n };\n GroupResizeFeature.prototype.calculateInitialValues = function () {\n var _this = this;\n var leafCols = this.columnGroup.getDisplayedLeafColumns();\n this.resizeCols = leafCols.filter(function (col) { return col.isResizable(); });\n this.resizeStartWidth = 0;\n this.resizeCols.forEach(function (col) { return _this.resizeStartWidth += col.getActualWidth(); });\n this.resizeRatios = [];\n this.resizeCols.forEach(function (col) { return _this.resizeRatios.push(col.getActualWidth() / _this.resizeStartWidth); });\n };\n // optionally inverts the drag, depending on pinned and RTL\n // note - this method is duplicated in RenderedHeaderCell - should refactor out?\n GroupResizeFeature.prototype.normaliseDragChange = function (dragChange) {\n var result = dragChange;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n // for RTL, dragging left makes the col bigger, except when pinning left\n if (this.pinned !== Constants.PINNED_LEFT) {\n result *= -1;\n }\n }\n else if (this.pinned === Constants.PINNED_RIGHT) {\n // for LTR (ie normal), dragging left makes the col smaller, except when pinning right\n result *= -1;\n }\n return result;\n };\n __decorate$1f([\n Autowired('horizontalResizeService')\n ], GroupResizeFeature.prototype, \"horizontalResizeService\", void 0);\n __decorate$1f([\n Autowired('autoWidthCalculator')\n ], GroupResizeFeature.prototype, \"autoWidthCalculator\", void 0);\n __decorate$1f([\n Autowired('columnModel')\n ], GroupResizeFeature.prototype, \"columnModel\", void 0);\n __decorate$1f([\n PostConstruct\n ], GroupResizeFeature.prototype, \"postConstruct\", null);\n return GroupResizeFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1t = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1g = (undefined && undefined.__decorate) || function (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};\nvar GroupWidthFeature = /** @class */ (function (_super) {\n __extends$1t(GroupWidthFeature, _super);\n function GroupWidthFeature(comp, columnGroup) {\n var _this = _super.call(this) || this;\n // the children can change, we keep destroy functions related to listening to the children here\n _this.removeChildListenersFuncs = [];\n _this.columnGroup = columnGroup;\n _this.comp = comp;\n return _this;\n }\n GroupWidthFeature.prototype.postConstruct = function () {\n // we need to listen to changes in child columns, as they impact our width\n this.addListenersToChildrenColumns();\n // the children belonging to this group can change, so we need to add and remove listeners as they change\n this.addManagedListener(this.columnGroup, ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED, this.onDisplayedChildrenChanged.bind(this));\n this.onWidthChanged();\n // the child listeners are not tied to this components life-cycle, as children can get added and removed\n // to the group - hence they are on a different life-cycle. so we must make sure the existing children\n // listeners are removed when we finally get destroyed\n this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this));\n };\n GroupWidthFeature.prototype.addListenersToChildrenColumns = function () {\n var _this = this;\n // first destroy any old listeners\n this.removeListenersOnChildrenColumns();\n // now add new listeners to the new set of children\n var widthChangedListener = this.onWidthChanged.bind(this);\n this.columnGroup.getLeafColumns().forEach(function (column) {\n column.addEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n column.addEventListener(Column.EVENT_VISIBLE_CHANGED, widthChangedListener);\n _this.removeChildListenersFuncs.push(function () {\n column.removeEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n column.removeEventListener(Column.EVENT_VISIBLE_CHANGED, widthChangedListener);\n });\n });\n };\n GroupWidthFeature.prototype.removeListenersOnChildrenColumns = function () {\n this.removeChildListenersFuncs.forEach(function (func) { return func(); });\n this.removeChildListenersFuncs = [];\n };\n GroupWidthFeature.prototype.onDisplayedChildrenChanged = function () {\n this.addListenersToChildrenColumns();\n this.onWidthChanged();\n };\n GroupWidthFeature.prototype.onWidthChanged = function () {\n this.comp.setWidth(this.columnGroup.getActualWidth() + 'px');\n };\n __decorate$1g([\n PostConstruct\n ], GroupWidthFeature.prototype, \"postConstruct\", null);\n return GroupWidthFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1u = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1h = (undefined && undefined.__decorate) || function (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};\nvar HeaderGroupCellCtrl = /** @class */ (function (_super) {\n __extends$1u(HeaderGroupCellCtrl, _super);\n function HeaderGroupCellCtrl(columnGroup, parentRowCtrl) {\n var _this = _super.call(this, columnGroup, parentRowCtrl) || this;\n _this.columnGroup = columnGroup;\n return _this;\n }\n HeaderGroupCellCtrl.prototype.setComp = function (comp, eGui, eResize) {\n _super.prototype.setGui.call(this, eGui);\n this.comp = comp;\n this.displayName = this.columnModel.getDisplayNameForColumnGroup(this.columnGroup, 'header');\n this.addClasses();\n this.addAttributes();\n this.setupMovingCss();\n this.setupExpandable();\n this.setupTooltip();\n this.setupUserComp();\n var pinned = this.getParentRowCtrl().getPinned();\n var leafCols = this.columnGroup.getProvidedColumnGroup().getLeafColumns();\n this.createManagedBean(new HoverFeature(leafCols, eGui));\n this.createManagedBean(new SetLeftFeature(this.columnGroup, eGui, this.beans));\n this.createManagedBean(new GroupWidthFeature(comp, this.columnGroup));\n this.groupResizeFeature = this.createManagedBean(new GroupResizeFeature(comp, eResize, pinned, this.columnGroup));\n this.createManagedBean(new ManagedFocusFeature(eGui, {\n shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),\n onTabKeyDown: function () { return undefined; },\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusIn: this.onFocusIn.bind(this)\n }));\n };\n HeaderGroupCellCtrl.prototype.resizeLeafColumnsToFit = function () {\n this.groupResizeFeature.onResizeStart(false);\n this.groupResizeFeature.resizeLeafColumnsToFit();\n };\n HeaderGroupCellCtrl.prototype.setupUserComp = function () {\n var _this = this;\n var displayName = this.displayName;\n var params = {\n displayName: this.displayName,\n columnGroup: this.columnGroup,\n setExpanded: function (expanded) {\n _this.columnModel.setColumnGroupOpened(_this.columnGroup.getProvidedColumnGroup(), expanded, \"gridInitializing\");\n },\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext()\n };\n if (!displayName) {\n var columnGroup = this.columnGroup;\n var leafCols = columnGroup.getLeafColumns();\n // find the top most column group that represents the same columns. so if we are dragging a group, we also\n // want to visually show the parent groups dragging for the same column set. for example imaging 5 levels\n // of grouping, with each group only containing the next group, and the last group containing three columns,\n // then when you move any group (even the lowest level group) you are in-fact moving all the groups, as all\n // the groups represent the same column set.\n while (columnGroup.getParent() && columnGroup.getParent().getLeafColumns().length === leafCols.length) {\n columnGroup = columnGroup.getParent();\n }\n var colGroupDef = columnGroup.getColGroupDef();\n if (colGroupDef) {\n displayName = colGroupDef.headerName;\n }\n if (!displayName) {\n displayName = leafCols ? this.columnModel.getDisplayNameForColumn(leafCols[0], 'header', true) : '';\n }\n }\n var compDetails = this.userComponentFactory.getHeaderGroupCompDetails(params);\n this.comp.setUserCompDetails(compDetails);\n };\n HeaderGroupCellCtrl.prototype.setupTooltip = function () {\n var _this = this;\n var colGroupDef = this.columnGroup.getColGroupDef();\n var tooltipCtrl = {\n getColumn: function () { return _this.columnGroup; },\n getGui: function () { return _this.eGui; },\n getLocation: function () { return 'headerGroup'; },\n getTooltipValue: function () { return colGroupDef && colGroupDef.headerTooltip; }\n };\n if (colGroupDef) {\n tooltipCtrl.getColDef = function () { return colGroupDef; };\n }\n var tooltipFeature = this.createManagedBean(new TooltipFeature(tooltipCtrl, this.beans));\n tooltipFeature.setComp(this.comp);\n };\n HeaderGroupCellCtrl.prototype.setupExpandable = function () {\n var providedColGroup = this.columnGroup.getProvidedColumnGroup();\n this.refreshExpanded();\n this.addManagedListener(providedColGroup, ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED, this.refreshExpanded.bind(this));\n this.addManagedListener(providedColGroup, ProvidedColumnGroup.EVENT_EXPANDED_CHANGED, this.refreshExpanded.bind(this));\n };\n HeaderGroupCellCtrl.prototype.refreshExpanded = function () {\n var column = this.columnGroup;\n this.expandable = column.isExpandable();\n var expanded = column.isExpanded();\n if (this.expandable) {\n this.comp.setAriaExpanded(expanded ? 'true' : 'false');\n }\n else {\n this.comp.setAriaExpanded(undefined);\n }\n };\n HeaderGroupCellCtrl.prototype.addAttributes = function () {\n this.comp.setColId(this.columnGroup.getUniqueId());\n };\n HeaderGroupCellCtrl.prototype.addClasses = function () {\n var _this = this;\n var colGroupDef = this.columnGroup.getColGroupDef();\n var classes = CssClassApplier.getHeaderClassesFromColDef(colGroupDef, this.gridOptionsWrapper, null, this.columnGroup);\n // having different classes below allows the style to not have a bottom border\n // on the group header, if no group is specified\n classes.push(this.columnGroup.isPadding() ? \"ag-header-group-cell-no-group\" : \"ag-header-group-cell-with-group\");\n classes.forEach(function (c) { return _this.comp.addOrRemoveCssClass(c, true); });\n };\n HeaderGroupCellCtrl.prototype.setupMovingCss = function () {\n var _this = this;\n var providedColumnGroup = this.columnGroup.getProvidedColumnGroup();\n var leafColumns = providedColumnGroup.getLeafColumns();\n // this function adds or removes the moving css, based on if the col is moving.\n // this is what makes the header go dark when it is been moved (gives impression to\n // user that the column was picked up).\n var listener = function () { return _this.comp.addOrRemoveCssClass('ag-header-cell-moving', _this.columnGroup.isMoving()); };\n leafColumns.forEach(function (col) {\n _this.addManagedListener(col, Column.EVENT_MOVING_CHANGED, listener);\n });\n listener();\n };\n HeaderGroupCellCtrl.prototype.onFocusIn = function (e) {\n if (!this.eGui.contains(e.relatedTarget)) {\n var rowIndex = this.getRowIndex();\n this.beans.focusService.setFocusedHeader(rowIndex, this.columnGroup);\n }\n };\n HeaderGroupCellCtrl.prototype.handleKeyDown = function (e) {\n var eDocument = this.gridOptionsWrapper.getDocument();\n var activeEl = eDocument.activeElement;\n var wrapperHasFocus = activeEl === this.eGui;\n if (!this.expandable || !wrapperHasFocus) {\n return;\n }\n if (e.key === KeyCode.ENTER) {\n var column = this.columnGroup;\n var newExpandedValue = !column.isExpanded();\n this.columnModel.setColumnGroupOpened(column.getProvidedColumnGroup(), newExpandedValue, \"uiColumnExpanded\");\n }\n };\n // unlike columns, this will only get called once, as we don't react on props on column groups\n // (we will always destroy and recreate this comp if something changes)\n HeaderGroupCellCtrl.prototype.setDragSource = function (eHeaderGroup) {\n var _this = this;\n if (this.isSuppressMoving()) {\n return;\n }\n var allLeafColumns = this.columnGroup.getProvidedColumnGroup().getLeafColumns();\n var dragSource = {\n type: exports.DragSourceType.HeaderCell,\n eElement: eHeaderGroup,\n defaultIconName: DragAndDropService.ICON_HIDE,\n dragItemName: this.displayName,\n // we add in the original group leaf columns, so we move both visible and non-visible items\n getDragItem: this.getDragItemForGroup.bind(this),\n onDragStarted: function () { return allLeafColumns.forEach(function (col) { return col.setMoving(true, \"uiColumnDragged\"); }); },\n onDragStopped: function () { return allLeafColumns.forEach(function (col) { return col.setMoving(false, \"uiColumnDragged\"); }); }\n };\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(function () { return _this.dragAndDropService.removeDragSource(dragSource); });\n };\n // when moving the columns, we want to move all the columns (contained within the DragItem) in this group in one go,\n // and in the order they are currently in the screen.\n HeaderGroupCellCtrl.prototype.getDragItemForGroup = function () {\n var allColumnsOriginalOrder = this.columnGroup.getProvidedColumnGroup().getLeafColumns();\n // capture visible state, used when re-entering grid to dictate which columns should be visible\n var visibleState = {};\n allColumnsOriginalOrder.forEach(function (column) { return visibleState[column.getId()] = column.isVisible(); });\n var allColumnsCurrentOrder = [];\n this.columnModel.getAllDisplayedColumns().forEach(function (column) {\n if (allColumnsOriginalOrder.indexOf(column) >= 0) {\n allColumnsCurrentOrder.push(column);\n removeFromArray(allColumnsOriginalOrder, column);\n }\n });\n // we are left with non-visible columns, stick these in at the end\n allColumnsOriginalOrder.forEach(function (column) { return allColumnsCurrentOrder.push(column); });\n // create and return dragItem\n return {\n columns: allColumnsCurrentOrder,\n visibleState: visibleState\n };\n };\n HeaderGroupCellCtrl.prototype.isSuppressMoving = function () {\n // if any child is fixed, then don't allow moving\n var childSuppressesMoving = false;\n this.columnGroup.getLeafColumns().forEach(function (column) {\n if (column.getColDef().suppressMovable || column.getColDef().lockPosition) {\n childSuppressesMoving = true;\n }\n });\n var result = childSuppressesMoving || this.gridOptionsWrapper.isSuppressMovableColumns();\n return result;\n };\n __decorate$1h([\n Autowired('beans')\n ], HeaderGroupCellCtrl.prototype, \"beans\", void 0);\n __decorate$1h([\n Autowired('columnModel')\n ], HeaderGroupCellCtrl.prototype, \"columnModel\", void 0);\n __decorate$1h([\n Autowired('dragAndDropService')\n ], HeaderGroupCellCtrl.prototype, \"dragAndDropService\", void 0);\n __decorate$1h([\n Autowired('userComponentFactory')\n ], HeaderGroupCellCtrl.prototype, \"userComponentFactory\", void 0);\n __decorate$1h([\n Autowired('gridApi')\n ], HeaderGroupCellCtrl.prototype, \"gridApi\", void 0);\n __decorate$1h([\n Autowired('columnApi')\n ], HeaderGroupCellCtrl.prototype, \"columnApi\", void 0);\n return HeaderGroupCellCtrl;\n}(AbstractHeaderCellCtrl));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1v = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1i = (undefined && undefined.__decorate) || function (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};\nvar instanceIdSequence$4 = 0;\nvar HeaderRowCtrl = /** @class */ (function (_super) {\n __extends$1v(HeaderRowCtrl, _super);\n function HeaderRowCtrl(rowIndex, pinned, type) {\n var _this = _super.call(this) || this;\n _this.instanceId = instanceIdSequence$4++;\n _this.headerCellCtrls = {};\n _this.rowIndex = rowIndex;\n _this.pinned = pinned;\n _this.type = type;\n return _this;\n }\n HeaderRowCtrl.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n HeaderRowCtrl.prototype.setComp = function (comp) {\n this.comp = comp;\n this.onRowHeightChanged();\n this.onVirtualColumnsChanged();\n this.setWidth();\n this.addEventListeners();\n if (isBrowserSafari()) {\n // fix for a Safari rendering bug that caused the header to flicker above chart panels\n // as you move the mouse over the header\n this.comp.setTransform('translateZ(0)');\n }\n comp.setAriaRowIndex(this.rowIndex + 1);\n };\n HeaderRowCtrl.prototype.addEventListeners = function () {\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_RESIZED, this.onColumnResized.bind(this));\n // when print layout changes, it changes what columns are in what section\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_VIRTUAL_COLUMNS_CHANGED, this.onVirtualColumnsChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT, this.onRowHeightChanged.bind(this));\n };\n HeaderRowCtrl.prototype.getHeaderCellCtrl = function (column) {\n return values(this.headerCellCtrls).find(function (cellCtrl) { return cellCtrl.getColumnGroupChild() === column; });\n };\n HeaderRowCtrl.prototype.onDisplayedColumnsChanged = function () {\n this.onVirtualColumnsChanged();\n this.setWidth();\n };\n HeaderRowCtrl.prototype.getType = function () {\n return this.type;\n };\n HeaderRowCtrl.prototype.onColumnResized = function () {\n this.setWidth();\n };\n HeaderRowCtrl.prototype.setWidth = function () {\n var width = this.getWidthForRow();\n this.comp.setWidth(width + \"px\");\n };\n HeaderRowCtrl.prototype.getWidthForRow = function () {\n var printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n if (printLayout) {\n var pinned = this.pinned != null;\n if (pinned) {\n return 0;\n }\n return this.columnModel.getContainerWidth(Constants.PINNED_RIGHT)\n + this.columnModel.getContainerWidth(Constants.PINNED_LEFT)\n + this.columnModel.getContainerWidth(null);\n }\n // if not printing, just return the width as normal\n return this.columnModel.getContainerWidth(this.pinned);\n };\n HeaderRowCtrl.prototype.onRowHeightChanged = function () {\n var headerRowCount = this.columnModel.getHeaderRowCount();\n var sizes = [];\n var numberOfFloating = 0;\n var groupHeight;\n var headerHeight;\n if (this.columnModel.hasFloatingFilters()) {\n headerRowCount++;\n numberOfFloating = 1;\n }\n if (this.columnModel.isPivotMode()) {\n groupHeight = this.gridOptionsWrapper.getPivotGroupHeaderHeight();\n headerHeight = this.gridOptionsWrapper.getPivotHeaderHeight();\n }\n else {\n groupHeight = this.gridOptionsWrapper.getGroupHeaderHeight();\n headerHeight = this.gridOptionsWrapper.getHeaderHeight();\n }\n var numberOfNonGroups = 1 + numberOfFloating;\n var numberOfGroups = headerRowCount - numberOfNonGroups;\n for (var i = 0; i < numberOfGroups; i++) {\n sizes.push(groupHeight);\n }\n sizes.push(headerHeight);\n for (var i = 0; i < numberOfFloating; i++) {\n sizes.push(this.gridOptionsWrapper.getFloatingFiltersHeight());\n }\n var rowHeight = 0;\n for (var i = 0; i < this.rowIndex; i++) {\n rowHeight += sizes[i];\n }\n this.comp.setTop(rowHeight + 'px');\n this.comp.setHeight(sizes[this.rowIndex] + 'px');\n };\n HeaderRowCtrl.prototype.getPinned = function () {\n return this.pinned;\n };\n HeaderRowCtrl.prototype.getRowIndex = function () {\n return this.rowIndex;\n };\n HeaderRowCtrl.prototype.onVirtualColumnsChanged = function () {\n var _this = this;\n var oldCtrls = this.headerCellCtrls;\n this.headerCellCtrls = {};\n var columns = this.getColumnsInViewport();\n columns.forEach(function (child) {\n // skip groups that have no displayed children. this can happen when the group is broken,\n // and this section happens to have nothing to display for the open / closed state.\n // (a broken group is one that is split, ie columns in the group have a non-group column\n // in between them)\n if (child.isEmptyGroup()) {\n return;\n }\n var idOfChild = child.getUniqueId();\n // if we already have this cell rendered, do nothing\n var headerCtrl = oldCtrls[idOfChild];\n delete oldCtrls[idOfChild];\n // it's possible there is a new Column with the same ID, but it's for a different Column.\n // this is common with pivoting, where the pivot cols change, but the id's are still pivot_0,\n // pivot_1 etc. so if new col but same ID, need to remove the old col here first as we are\n // about to replace it in the this.headerComps map.\n var forOldColumn = headerCtrl && headerCtrl.getColumnGroupChild() != child;\n if (forOldColumn) {\n _this.destroyBean(headerCtrl);\n headerCtrl = undefined;\n }\n if (headerCtrl == null) {\n switch (_this.type) {\n case exports.HeaderRowType.FLOATING_FILTER:\n headerCtrl = _this.createBean(new HeaderFilterCellCtrl(child, _this));\n break;\n case exports.HeaderRowType.COLUMN_GROUP:\n headerCtrl = _this.createBean(new HeaderGroupCellCtrl(child, _this));\n break;\n default:\n headerCtrl = _this.createBean(new HeaderCellCtrl(child, _this));\n break;\n }\n }\n _this.headerCellCtrls[idOfChild] = headerCtrl;\n });\n // we want to keep columns that are focused, otherwise keyboard navigation breaks\n var isFocusedAndDisplayed = function (ctrl) {\n var isFocused = _this.focusService.isHeaderWrapperFocused(ctrl);\n if (!isFocused) {\n return false;\n }\n var isDisplayed = _this.columnModel.isDisplayed(ctrl.getColumnGroupChild());\n return isDisplayed;\n };\n iterateObject(oldCtrls, function (id, oldCtrl) {\n var keepCtrl = isFocusedAndDisplayed(oldCtrl);\n if (keepCtrl) {\n _this.headerCellCtrls[id] = oldCtrl;\n }\n else {\n _this.destroyBean(oldCtrl);\n }\n });\n var ctrlsToDisplay = getAllValuesInObject(this.headerCellCtrls);\n this.comp.setHeaderCtrls(ctrlsToDisplay);\n };\n HeaderRowCtrl.prototype.destroyCtrls = function () {\n var _this = this;\n iterateObject(this.headerCellCtrls, function (key, ctrl) {\n _this.destroyBean(ctrl);\n });\n this.headerCellCtrls = {};\n };\n HeaderRowCtrl.prototype.getColumnsInViewport = function () {\n var printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n return printLayout ? this.getColumnsInViewportPrintLayout() : this.getColumnsInViewportNormalLayout();\n };\n HeaderRowCtrl.prototype.getColumnsInViewportPrintLayout = function () {\n var _this = this;\n // for print layout, we add all columns into the center\n if (this.pinned != null) {\n return [];\n }\n var viewportColumns = [];\n var actualDepth = this.getActualDepth();\n [Constants.PINNED_LEFT, null, Constants.PINNED_RIGHT].forEach(function (pinned) {\n var items = _this.columnModel.getVirtualHeaderGroupRow(pinned, actualDepth);\n viewportColumns = viewportColumns.concat(items);\n });\n return viewportColumns;\n };\n HeaderRowCtrl.prototype.getActualDepth = function () {\n return this.type == exports.HeaderRowType.FLOATING_FILTER ? this.rowIndex - 1 : this.rowIndex;\n };\n HeaderRowCtrl.prototype.getColumnsInViewportNormalLayout = function () {\n // when in normal layout, we add the columns for that container only\n return this.columnModel.getVirtualHeaderGroupRow(this.pinned, this.getActualDepth());\n };\n HeaderRowCtrl.prototype.focusHeader = function (column, event) {\n var allCtrls = getAllValuesInObject(this.headerCellCtrls);\n var ctrl = allCtrls.find(function (ctrl) { return ctrl.getColumnGroupChild() == column; });\n if (!ctrl) {\n return false;\n }\n ctrl.focus(event);\n return true;\n };\n __decorate$1i([\n Autowired('columnModel')\n ], HeaderRowCtrl.prototype, \"columnModel\", void 0);\n __decorate$1i([\n Autowired('focusService')\n ], HeaderRowCtrl.prototype, \"focusService\", void 0);\n __decorate$1i([\n PreDestroy\n ], HeaderRowCtrl.prototype, \"destroyCtrls\", null);\n return HeaderRowCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1w = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1j = (undefined && undefined.__decorate) || function (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};\nvar __read$c = (undefined && undefined.__read) || function (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};\nvar __spread$9 = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$c(arguments[i]));\n return ar;\n};\nvar HeaderRowContainerCtrl = /** @class */ (function (_super) {\n __extends$1w(HeaderRowContainerCtrl, _super);\n function HeaderRowContainerCtrl(pinned) {\n var _this = _super.call(this) || this;\n _this.groupsRowCtrls = [];\n _this.pinned = pinned;\n return _this;\n }\n HeaderRowContainerCtrl.prototype.setComp = function (comp, eGui) {\n this.comp = comp;\n this.setupCenterWidth();\n this.setupPinnedWidth();\n this.setupDragAndDrop(eGui);\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, this.onGridColumnsChanged.bind(this));\n this.ctrlsService.registerHeaderContainer(this, this.pinned);\n if (this.columnModel.isReady()) {\n this.refresh();\n }\n };\n HeaderRowContainerCtrl.prototype.setupDragAndDrop = function (dropContainer) {\n var bodyDropTarget = new BodyDropTarget(this.pinned, dropContainer);\n this.createManagedBean(bodyDropTarget);\n };\n HeaderRowContainerCtrl.prototype.refresh = function (keepColumns) {\n var _this = this;\n if (keepColumns === void 0) { keepColumns = false; }\n var sequence = new NumberSequence();\n var focusedHeaderPosition = this.focusService.getFocusHeaderToUseAfterRefresh();\n var refreshColumnGroups = function () {\n var groupRowCount = _this.columnModel.getHeaderRowCount() - 1;\n _this.groupsRowCtrls = _this.destroyBeans(_this.groupsRowCtrls);\n for (var i = 0; i < groupRowCount; i++) {\n var ctrl = _this.createBean(new HeaderRowCtrl(sequence.next(), _this.pinned, exports.HeaderRowType.COLUMN_GROUP));\n _this.groupsRowCtrls.push(ctrl);\n }\n };\n var refreshColumns = function () {\n var rowIndex = sequence.next();\n var needNewInstance = _this.columnsRowCtrl == null || !keepColumns || _this.columnsRowCtrl.getRowIndex() !== rowIndex;\n if (needNewInstance) {\n _this.destroyBean(_this.columnsRowCtrl);\n _this.columnsRowCtrl = _this.createBean(new HeaderRowCtrl(rowIndex, _this.pinned, exports.HeaderRowType.COLUMN));\n }\n };\n var refreshFilters = function () {\n var includeFloatingFilter = _this.columnModel.hasFloatingFilters();\n var destroyPreviousComp = function () {\n _this.filtersRowCtrl = _this.destroyBean(_this.filtersRowCtrl);\n };\n if (!includeFloatingFilter) {\n destroyPreviousComp();\n return;\n }\n var rowIndex = sequence.next();\n if (_this.filtersRowCtrl) {\n var rowIndexMismatch = _this.filtersRowCtrl.getRowIndex() !== rowIndex;\n if (!keepColumns || rowIndexMismatch) {\n destroyPreviousComp();\n }\n }\n if (!_this.filtersRowCtrl) {\n _this.filtersRowCtrl = _this.createBean(new HeaderRowCtrl(rowIndex, _this.pinned, exports.HeaderRowType.FLOATING_FILTER));\n }\n };\n refreshColumnGroups();\n refreshColumns();\n refreshFilters();\n var allCtrls = this.getAllCtrls();\n this.comp.setCtrls(allCtrls);\n this.restoreFocusOnHeader(focusedHeaderPosition);\n };\n HeaderRowContainerCtrl.prototype.restoreFocusOnHeader = function (position) {\n if (position == null || position.column.getPinned() != this.pinned) {\n return;\n }\n this.focusService.focusHeaderPosition({ headerPosition: position });\n };\n HeaderRowContainerCtrl.prototype.getAllCtrls = function () {\n var res = __spread$9(this.groupsRowCtrls, [this.columnsRowCtrl]);\n if (this.filtersRowCtrl) {\n res.push(this.filtersRowCtrl);\n }\n return res;\n };\n // grid cols have changed - this also means the number of rows in the header can have\n // changed. so we remove all the old rows and insert new ones for a complete refresh\n HeaderRowContainerCtrl.prototype.onGridColumnsChanged = function () {\n this.refresh(true);\n };\n HeaderRowContainerCtrl.prototype.setupCenterWidth = function () {\n var _this = this;\n if (this.pinned != null) {\n return;\n }\n this.createManagedBean(new CenterWidthFeature(function (width) { return _this.comp.setCenterWidth(width + \"px\"); }));\n };\n HeaderRowContainerCtrl.prototype.setHorizontalScroll = function (offset) {\n this.comp.setContainerTransform(\"translateX(\" + offset + \"px)\");\n };\n HeaderRowContainerCtrl.prototype.setupPinnedWidth = function () {\n var _this = this;\n if (this.pinned == null) {\n return;\n }\n var pinningLeft = this.pinned === Constants.PINNED_LEFT;\n var pinningRight = this.pinned === Constants.PINNED_RIGHT;\n var listener = function () {\n var width = pinningLeft ? _this.pinnedWidthService.getPinnedLeftWidth() : _this.pinnedWidthService.getPinnedRightWidth();\n if (width == null) {\n return;\n } // can happen at initialisation, width not yet set\n var hidden = width == 0;\n var isRtl = _this.gridOptionsWrapper.isEnableRtl();\n var scrollbarWidth = _this.gridOptionsWrapper.getScrollbarWidth();\n // if there is a scroll showing (and taking up space, so Windows, and not iOS)\n // in the body, then we add extra space to keep header aligned with the body,\n // as body width fits the cols and the scrollbar\n var addPaddingForScrollbar = _this.scrollVisibleService.isVerticalScrollShowing() && ((isRtl && pinningLeft) || (!isRtl && pinningRight));\n var widthWithPadding = addPaddingForScrollbar ? width + scrollbarWidth : width;\n _this.comp.setPinnedContainerWidth(widthWithPadding + 'px');\n _this.comp.addOrRemoveCssClass('ag-hidden', hidden);\n };\n this.addManagedListener(this.eventService, Events.EVENT_LEFT_PINNED_WIDTH_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_SCROLLBAR_WIDTH_CHANGED, listener);\n };\n HeaderRowContainerCtrl.prototype.getHeaderCtrlForColumn = function (column) {\n if (column instanceof Column) {\n if (!this.columnsRowCtrl) {\n return;\n }\n return this.columnsRowCtrl.getHeaderCellCtrl(column);\n }\n if (this.groupsRowCtrls.length === 0) {\n return;\n }\n for (var i = 0; i < this.groupsRowCtrls.length; i++) {\n var ctrl = this.groupsRowCtrls[i].getHeaderCellCtrl(column);\n if (ctrl) {\n return ctrl;\n }\n }\n };\n HeaderRowContainerCtrl.prototype.getHtmlElementForColumnHeader = function (column) {\n /* tslint:enable */\n var cellCtrl = this.getHeaderCtrlForColumn(column);\n if (!cellCtrl) {\n return null;\n }\n return cellCtrl.getGui();\n };\n HeaderRowContainerCtrl.prototype.getRowType = function (rowIndex) {\n var allCtrls = this.getAllCtrls();\n var ctrl = allCtrls[rowIndex];\n return ctrl ? ctrl.getType() : undefined;\n };\n HeaderRowContainerCtrl.prototype.focusHeader = function (rowIndex, column, event) {\n var allCtrls = this.getAllCtrls();\n var ctrl = allCtrls[rowIndex];\n if (!ctrl) {\n return false;\n }\n return ctrl.focusHeader(column, event);\n };\n HeaderRowContainerCtrl.prototype.getRowCount = function () {\n return this.getAllCtrls().length;\n };\n __decorate$1j([\n Autowired('ctrlsService')\n ], HeaderRowContainerCtrl.prototype, \"ctrlsService\", void 0);\n __decorate$1j([\n Autowired('scrollVisibleService')\n ], HeaderRowContainerCtrl.prototype, \"scrollVisibleService\", void 0);\n __decorate$1j([\n Autowired('pinnedWidthService')\n ], HeaderRowContainerCtrl.prototype, \"pinnedWidthService\", void 0);\n __decorate$1j([\n Autowired('columnModel')\n ], HeaderRowContainerCtrl.prototype, \"columnModel\", void 0);\n __decorate$1j([\n Autowired('focusService')\n ], HeaderRowContainerCtrl.prototype, \"focusService\", void 0);\n return HeaderRowContainerCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1x = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1k = (undefined && undefined.__decorate) || function (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};\nvar HeaderRowContainerComp = /** @class */ (function (_super) {\n __extends$1x(HeaderRowContainerComp, _super);\n function HeaderRowContainerComp(pinned) {\n var _this = _super.call(this) || this;\n _this.headerRowComps = {};\n _this.rowCompsList = [];\n _this.pinned = pinned;\n return _this;\n }\n HeaderRowContainerComp.prototype.init = function () {\n var _this = this;\n this.selectAndSetTemplate();\n var compProxy = {\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n setCtrls: function (ctrls) { return _this.setCtrls(ctrls); },\n // only gets called for center section\n setCenterWidth: function (width) { return _this.eCenterContainer.style.width = width; },\n setContainerTransform: function (transform) { return _this.eCenterContainer.style.transform = transform; },\n // only gets called for pinned sections\n setPinnedContainerWidth: function (width) {\n var eGui = _this.getGui();\n eGui.style.width = width;\n eGui.style.maxWidth = width;\n eGui.style.minWidth = width;\n }\n };\n var ctrl = this.createManagedBean(new HeaderRowContainerCtrl(this.pinned));\n ctrl.setComp(compProxy, this.getGui());\n };\n HeaderRowContainerComp.prototype.selectAndSetTemplate = function () {\n var pinnedLeft = this.pinned == Constants.PINNED_LEFT;\n var pinnedRight = this.pinned == Constants.PINNED_RIGHT;\n var template = pinnedLeft ? HeaderRowContainerComp.PINNED_LEFT_TEMPLATE :\n pinnedRight ? HeaderRowContainerComp.PINNED_RIGHT_TEMPLATE : HeaderRowContainerComp.CENTER_TEMPLATE;\n this.setTemplate(template);\n // for left and right, we add rows directly to the root element,\n // but for center container we add elements to the child container.\n this.eRowContainer = this.eCenterContainer ? this.eCenterContainer : this.getGui();\n };\n HeaderRowContainerComp.prototype.destroyRowComps = function () {\n this.setCtrls([]);\n };\n HeaderRowContainerComp.prototype.destroyRowComp = function (rowComp) {\n this.destroyBean(rowComp);\n this.eRowContainer.removeChild(rowComp.getGui());\n };\n HeaderRowContainerComp.prototype.setCtrls = function (ctrls) {\n var _this = this;\n var oldRowComps = this.headerRowComps;\n this.headerRowComps = {};\n this.rowCompsList = [];\n var prevGui;\n var appendEnsuringDomOrder = function (rowComp) {\n var eGui = rowComp.getGui();\n var notAlreadyIn = eGui.parentElement != _this.eRowContainer;\n if (notAlreadyIn) {\n _this.eRowContainer.appendChild(eGui);\n }\n if (prevGui) {\n ensureDomOrder(_this.eRowContainer, eGui, prevGui);\n }\n prevGui = eGui;\n };\n ctrls.forEach(function (ctrl) {\n var ctrlId = ctrl.getInstanceId();\n var existingComp = oldRowComps[ctrlId];\n delete oldRowComps[ctrlId];\n var rowComp = existingComp ? existingComp : _this.createBean(new HeaderRowComp(ctrl));\n _this.headerRowComps[ctrlId] = rowComp;\n _this.rowCompsList.push(rowComp);\n appendEnsuringDomOrder(rowComp);\n });\n getAllValuesInObject(oldRowComps).forEach(function (c) { return _this.destroyRowComp(c); });\n };\n HeaderRowContainerComp.PINNED_LEFT_TEMPLATE = \"
\";\n HeaderRowContainerComp.PINNED_RIGHT_TEMPLATE = \"
\";\n HeaderRowContainerComp.CENTER_TEMPLATE = \"
\\n
\\n
\";\n __decorate$1k([\n RefSelector('eCenterContainer')\n ], HeaderRowContainerComp.prototype, \"eCenterContainer\", void 0);\n __decorate$1k([\n PostConstruct\n ], HeaderRowContainerComp.prototype, \"init\", null);\n __decorate$1k([\n PreDestroy\n ], HeaderRowContainerComp.prototype, \"destroyRowComps\", null);\n return HeaderRowContainerComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1y = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1l = (undefined && undefined.__decorate) || function (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(function (HeaderNavigationDirection) {\n HeaderNavigationDirection[HeaderNavigationDirection[\"UP\"] = 0] = \"UP\";\n HeaderNavigationDirection[HeaderNavigationDirection[\"DOWN\"] = 1] = \"DOWN\";\n HeaderNavigationDirection[HeaderNavigationDirection[\"LEFT\"] = 2] = \"LEFT\";\n HeaderNavigationDirection[HeaderNavigationDirection[\"RIGHT\"] = 3] = \"RIGHT\";\n})(exports.HeaderNavigationDirection || (exports.HeaderNavigationDirection = {}));\nvar HeaderNavigationService = /** @class */ (function (_super) {\n __extends$1y(HeaderNavigationService, _super);\n function HeaderNavigationService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HeaderNavigationService.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function (p) {\n _this.gridBodyCon = p.gridBodyCtrl;\n });\n };\n HeaderNavigationService.prototype.getHeaderRowCount = function () {\n var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();\n return centerHeaderContainer ? centerHeaderContainer.getRowCount() : 0;\n };\n HeaderNavigationService.prototype.getHeaderRowType = function (rowIndex) {\n var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();\n if (centerHeaderContainer) {\n return centerHeaderContainer.getRowType(rowIndex);\n }\n };\n /*\n * This method navigates grid header vertically\n * @return {boolean} true to preventDefault on the event that caused this navigation.\n */\n HeaderNavigationService.prototype.navigateVertically = function (direction, fromHeader, event) {\n if (!fromHeader) {\n fromHeader = this.focusService.getFocusedHeader();\n }\n if (!fromHeader) {\n return false;\n }\n var headerRowIndex = fromHeader.headerRowIndex, column = fromHeader.column;\n var rowLen = this.getHeaderRowCount();\n var isUp = direction === exports.HeaderNavigationDirection.UP;\n var nextRow = isUp ? headerRowIndex - 1 : headerRowIndex + 1;\n var nextFocusColumn = null;\n var skipColumn = false;\n if (nextRow < 0) {\n nextRow = 0;\n nextFocusColumn = column;\n skipColumn = true;\n }\n if (nextRow >= rowLen) {\n nextRow = -1; // -1 indicates the focus should move to grid rows.\n }\n var currentRowType = this.getHeaderRowType(headerRowIndex);\n if (!skipColumn) {\n if (currentRowType === exports.HeaderRowType.COLUMN_GROUP) {\n var currentColumn = column;\n nextFocusColumn = isUp ? column.getParent() : currentColumn.getDisplayedChildren()[0];\n }\n else if (currentRowType === exports.HeaderRowType.FLOATING_FILTER) {\n nextFocusColumn = column;\n }\n else {\n var currentColumn = column;\n nextFocusColumn = isUp ? currentColumn.getParent() : currentColumn;\n }\n if (!nextFocusColumn) {\n return false;\n }\n }\n return this.focusService.focusHeaderPosition({\n headerPosition: { headerRowIndex: nextRow, column: nextFocusColumn },\n allowUserOverride: true,\n event: event\n });\n };\n /*\n * This method navigates grid header horizontally\n * @return {boolean} true to preventDefault on the event that caused this navigation.\n */\n HeaderNavigationService.prototype.navigateHorizontally = function (direction, fromTab, event) {\n if (fromTab === void 0) { fromTab = false; }\n var focusedHeader = this.focusService.getFocusedHeader();\n var isLeft = direction === exports.HeaderNavigationDirection.LEFT;\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n var nextHeader;\n var normalisedDirection;\n // either navigating to the left or isRtl (cannot be both)\n if (isLeft !== isRtl) {\n normalisedDirection = 'Before';\n nextHeader = this.headerPositionUtils.findHeader(focusedHeader, normalisedDirection);\n }\n else {\n normalisedDirection = 'After';\n nextHeader = this.headerPositionUtils.findHeader(focusedHeader, normalisedDirection);\n }\n if (nextHeader) {\n return this.focusService.focusHeaderPosition({\n headerPosition: nextHeader,\n direction: normalisedDirection,\n fromTab: fromTab,\n allowUserOverride: true,\n event: event\n });\n }\n if (!fromTab) {\n return true;\n }\n return this.focusNextHeaderRow(focusedHeader, normalisedDirection, event);\n };\n HeaderNavigationService.prototype.focusNextHeaderRow = function (focusedHeader, direction, event) {\n var currentIndex = focusedHeader.headerRowIndex;\n var nextPosition = null;\n var nextRowIndex;\n if (direction === 'Before') {\n if (currentIndex > 0) {\n nextRowIndex = currentIndex - 1;\n nextPosition = this.headerPositionUtils.findColAtEdgeForHeaderRow(nextRowIndex, 'end');\n }\n }\n else {\n nextRowIndex = currentIndex + 1;\n nextPosition = this.headerPositionUtils.findColAtEdgeForHeaderRow(nextRowIndex, 'start');\n }\n return this.focusService.focusHeaderPosition({\n headerPosition: nextPosition,\n direction: direction,\n fromTab: true,\n allowUserOverride: true,\n event: event\n });\n };\n HeaderNavigationService.prototype.scrollToColumn = function (column, direction) {\n if (direction === void 0) { direction = 'After'; }\n if (column.getPinned()) {\n return;\n }\n var columnToScrollTo;\n if (column instanceof ColumnGroup) {\n var columns = column.getDisplayedLeafColumns();\n columnToScrollTo = direction === 'Before' ? last(columns) : columns[0];\n }\n else {\n columnToScrollTo = column;\n }\n this.gridBodyCon.getScrollFeature().ensureColumnVisible(columnToScrollTo);\n // need to nudge the scrolls for the floating items. otherwise when we set focus on a non-visible\n // floating cell, the scrolls get out of sync\n this.gridBodyCon.getScrollFeature().horizontallyScrollHeaderCenterAndFloatingCenter();\n // need to flush frames, to make sure the correct cells are rendered\n this.animationFrameService.flushAllFrames();\n };\n __decorate$1l([\n Autowired('focusService')\n ], HeaderNavigationService.prototype, \"focusService\", void 0);\n __decorate$1l([\n Autowired('headerPositionUtils')\n ], HeaderNavigationService.prototype, \"headerPositionUtils\", void 0);\n __decorate$1l([\n Autowired('animationFrameService')\n ], HeaderNavigationService.prototype, \"animationFrameService\", void 0);\n __decorate$1l([\n Autowired('ctrlsService')\n ], HeaderNavigationService.prototype, \"ctrlsService\", void 0);\n __decorate$1l([\n PostConstruct\n ], HeaderNavigationService.prototype, \"postConstruct\", null);\n HeaderNavigationService = __decorate$1l([\n Bean('headerNavigationService')\n ], HeaderNavigationService);\n return HeaderNavigationService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1z = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1m = (undefined && undefined.__decorate) || function (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};\nvar GridHeaderCtrl = /** @class */ (function (_super) {\n __extends$1z(GridHeaderCtrl, _super);\n function GridHeaderCtrl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridHeaderCtrl.prototype.setComp = function (comp, eGui, eFocusableElement) {\n this.comp = comp;\n this.eGui = eGui;\n this.createManagedBean(new ManagedFocusFeature(eFocusableElement, {\n onTabKeyDown: this.onTabKeyDown.bind(this),\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusOut: this.onFocusOut.bind(this)\n }));\n // for setting ag-pivot-on / ag-pivot-off CSS classes\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onPivotModeChanged.bind(this));\n this.onPivotModeChanged();\n this.setupHeaderHeight();\n this.ctrlsService.registerGridHeaderCtrl(this);\n };\n GridHeaderCtrl.prototype.setupHeaderHeight = function () {\n var listener = this.setHeaderHeight.bind(this);\n listener();\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT, listener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, listener);\n };\n GridHeaderCtrl.prototype.setHeaderHeight = function () {\n var _a = this, columnModel = _a.columnModel, gridOptionsWrapper = _a.gridOptionsWrapper;\n var numberOfFloating = 0;\n var headerRowCount = columnModel.getHeaderRowCount();\n var totalHeaderHeight;\n var groupHeight;\n var headerHeight;\n var hasFloatingFilters = columnModel.hasFloatingFilters();\n if (hasFloatingFilters) {\n headerRowCount++;\n numberOfFloating = 1;\n }\n if (columnModel.isPivotMode()) {\n groupHeight = gridOptionsWrapper.getPivotGroupHeaderHeight();\n headerHeight = gridOptionsWrapper.getPivotHeaderHeight();\n }\n else {\n groupHeight = gridOptionsWrapper.getGroupHeaderHeight();\n headerHeight = gridOptionsWrapper.getHeaderHeight();\n }\n var numberOfNonGroups = 1 + numberOfFloating;\n var numberOfGroups = headerRowCount - numberOfNonGroups;\n totalHeaderHeight = numberOfFloating * gridOptionsWrapper.getFloatingFiltersHeight();\n totalHeaderHeight += numberOfGroups * groupHeight;\n totalHeaderHeight += headerHeight;\n // one extra pixel is needed here to account for the\n // height of the border\n var px = totalHeaderHeight + 1 + \"px\";\n this.comp.setHeightAndMinHeight(px);\n };\n GridHeaderCtrl.prototype.onPivotModeChanged = function () {\n var pivotMode = this.columnModel.isPivotMode();\n this.comp.addOrRemoveCssClass('ag-pivot-on', pivotMode);\n this.comp.addOrRemoveCssClass('ag-pivot-off', !pivotMode);\n };\n GridHeaderCtrl.prototype.onTabKeyDown = function (e) {\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n var direction = e.shiftKey !== isRtl\n ? exports.HeaderNavigationDirection.LEFT\n : exports.HeaderNavigationDirection.RIGHT;\n if (this.headerNavigationService.navigateHorizontally(direction, true, e) ||\n this.focusService.focusNextGridCoreContainer(e.shiftKey)) {\n e.preventDefault();\n }\n };\n GridHeaderCtrl.prototype.handleKeyDown = function (e) {\n var direction = null;\n switch (e.key) {\n case KeyCode.LEFT:\n direction = exports.HeaderNavigationDirection.LEFT;\n case KeyCode.RIGHT:\n if (!exists(direction)) {\n direction = exports.HeaderNavigationDirection.RIGHT;\n }\n this.headerNavigationService.navigateHorizontally(direction, false, e);\n break;\n case KeyCode.UP:\n direction = exports.HeaderNavigationDirection.UP;\n case KeyCode.DOWN:\n if (!exists(direction)) {\n direction = exports.HeaderNavigationDirection.DOWN;\n }\n if (this.headerNavigationService.navigateVertically(direction, null, e)) {\n e.preventDefault();\n }\n break;\n default:\n return;\n }\n };\n GridHeaderCtrl.prototype.onFocusOut = function (e) {\n var eDocument = this.gridOptionsWrapper.getDocument();\n var relatedTarget = e.relatedTarget;\n if (!relatedTarget && this.eGui.contains(eDocument.activeElement)) {\n return;\n }\n if (!this.eGui.contains(relatedTarget)) {\n this.focusService.clearFocusedHeader();\n }\n };\n __decorate$1m([\n Autowired('headerNavigationService')\n ], GridHeaderCtrl.prototype, \"headerNavigationService\", void 0);\n __decorate$1m([\n Autowired('focusService')\n ], GridHeaderCtrl.prototype, \"focusService\", void 0);\n __decorate$1m([\n Autowired('columnModel')\n ], GridHeaderCtrl.prototype, \"columnModel\", void 0);\n __decorate$1m([\n Autowired('ctrlsService')\n ], GridHeaderCtrl.prototype, \"ctrlsService\", void 0);\n return GridHeaderCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1A = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1n = (undefined && undefined.__decorate) || function (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};\nvar GridHeaderComp = /** @class */ (function (_super) {\n __extends$1A(GridHeaderComp, _super);\n function GridHeaderComp() {\n return _super.call(this, GridHeaderComp.TEMPLATE) || this;\n }\n GridHeaderComp.prototype.postConstruct = function () {\n var _this = this;\n var compProxy = {\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n setHeightAndMinHeight: function (height) {\n _this.getGui().style.height = height;\n _this.getGui().style.minHeight = height;\n }\n };\n var ctrl = this.createManagedBean(new GridHeaderCtrl());\n ctrl.setComp(compProxy, this.getGui(), this.getFocusableElement());\n var addContainer = function (container) {\n _this.createManagedBean(container);\n _this.appendChild(container);\n };\n addContainer(new HeaderRowContainerComp(Constants.PINNED_LEFT));\n addContainer(new HeaderRowContainerComp(null));\n addContainer(new HeaderRowContainerComp(Constants.PINNED_RIGHT));\n };\n GridHeaderComp.TEMPLATE = \"
\";\n __decorate$1n([\n PostConstruct\n ], GridHeaderComp.prototype, \"postConstruct\", null);\n return GridHeaderComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1B = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1o = (undefined && undefined.__decorate) || function (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};\nvar HorizontalResizeService = /** @class */ (function (_super) {\n __extends$1B(HorizontalResizeService, _super);\n function HorizontalResizeService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HorizontalResizeService.prototype.addResizeBar = function (params) {\n var _this = this;\n var dragSource = {\n dragStartPixels: params.dragStartPixels || 0,\n eElement: params.eResizeBar,\n onDragStart: this.onDragStart.bind(this, params),\n onDragStop: this.onDragStop.bind(this, params),\n onDragging: this.onDragging.bind(this, params)\n };\n this.dragService.addDragSource(dragSource, true);\n // we pass remove func back to the caller, so call can tell us when they\n // are finished, and then we remove the listener from the drag source\n var finishedWithResizeFunc = function () { return _this.dragService.removeDragSource(dragSource); };\n return finishedWithResizeFunc;\n };\n HorizontalResizeService.prototype.onDragStart = function (params, mouseEvent) {\n this.dragStartX = mouseEvent.clientX;\n this.setResizeIcons();\n var shiftKey = mouseEvent instanceof MouseEvent && mouseEvent.shiftKey === true;\n params.onResizeStart(shiftKey);\n };\n HorizontalResizeService.prototype.setResizeIcons = function () {\n var ctrl = this.ctrlsService.getGridCtrl();\n // change the body cursor, so when drag moves out of the drag bar, the cursor is still 'resize' (or 'move'\n ctrl.setResizeCursor(true);\n // we don't want text selection outside the grid (otherwise it looks weird as text highlights when we move)\n ctrl.disableUserSelect(true);\n };\n HorizontalResizeService.prototype.onDragStop = function (params, mouseEvent) {\n params.onResizeEnd(this.resizeAmount);\n this.resetIcons();\n };\n HorizontalResizeService.prototype.resetIcons = function () {\n var ctrl = this.ctrlsService.getGridCtrl();\n ctrl.setResizeCursor(false);\n ctrl.disableUserSelect(false);\n };\n HorizontalResizeService.prototype.onDragging = function (params, mouseEvent) {\n this.resizeAmount = mouseEvent.clientX - this.dragStartX;\n params.onResizing(this.resizeAmount);\n };\n __decorate$1o([\n Autowired('dragService')\n ], HorizontalResizeService.prototype, \"dragService\", void 0);\n __decorate$1o([\n Autowired('ctrlsService')\n ], HorizontalResizeService.prototype, \"ctrlsService\", void 0);\n HorizontalResizeService = __decorate$1o([\n Bean('horizontalResizeService')\n ], HorizontalResizeService);\n return HorizontalResizeService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1C = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1p = (undefined && undefined.__decorate) || function (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};\nvar StandardMenuFactory = /** @class */ (function (_super) {\n __extends$1C(StandardMenuFactory, _super);\n function StandardMenuFactory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StandardMenuFactory.prototype.hideActiveMenu = function () {\n if (this.hidePopup) {\n this.hidePopup();\n }\n };\n StandardMenuFactory.prototype.showMenuAfterMouseEvent = function (column, mouseEvent) {\n var _this = this;\n this.showPopup(column, function (eMenu) {\n _this.popupService.positionPopupUnderMouseEvent({\n column: column,\n type: 'columnMenu',\n mouseEvent: mouseEvent,\n ePopup: eMenu\n });\n }, mouseEvent.target);\n };\n StandardMenuFactory.prototype.showMenuAfterButtonClick = function (column, eventSource, containerType) {\n var _this = this;\n this.showPopup(column, function (eMenu) {\n _this.popupService.positionPopupUnderComponent({\n type: containerType,\n eventSource: eventSource,\n ePopup: eMenu,\n keepWithinBounds: true,\n column: column\n });\n }, eventSource);\n };\n StandardMenuFactory.prototype.showPopup = function (column, positionCallback, eventSource) {\n var _this = this;\n var filterWrapper = this.filterManager.getOrCreateFilterWrapper(column, 'COLUMN_MENU');\n if (!filterWrapper) {\n throw new Error('AG Grid - unable to show popup filter, filter instantiation failed');\n }\n var eMenu = document.createElement('div');\n setAriaRole(eMenu, 'presentation');\n eMenu.classList.add('ag-menu');\n this.tabListener = this.addManagedListener(eMenu, 'keydown', function (e) { return _this.trapFocusWithin(e, eMenu); });\n filterWrapper.guiPromise.then(function (gui) { return eMenu.appendChild(gui); });\n var hidePopup;\n var anchorToElement = eventSource || this.ctrlsService.getGridBodyCtrl().getGui();\n var closedCallback = function (e) {\n column.setMenuVisible(false, 'contextMenu');\n var isKeyboardEvent = e instanceof KeyboardEvent;\n if (_this.tabListener) {\n _this.tabListener = _this.tabListener();\n }\n if (isKeyboardEvent && eventSource && isVisible(eventSource)) {\n var focusableEl = _this.focusService.findTabbableParent(eventSource);\n if (focusableEl) {\n focusableEl.focus();\n }\n }\n };\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: eMenu,\n closeOnEsc: true,\n closedCallback: closedCallback,\n positionCallback: function () { return positionCallback(eMenu); },\n anchorToElement: anchorToElement,\n ariaLabel: translate('ariaLabelColumnMenu', 'Column Menu')\n });\n if (addPopupRes) {\n this.hidePopup = hidePopup = addPopupRes.hideFunc;\n }\n filterWrapper.filterPromise.then(function (filter) {\n // need to make sure the filter is present before positioning, as only\n // after filter it is visible can we find out what the width of it is\n positionCallback(eMenu);\n if (filter.afterGuiAttached) {\n filter.afterGuiAttached({ container: 'columnMenu', hidePopup: hidePopup });\n }\n });\n column.setMenuVisible(true, 'contextMenu');\n };\n StandardMenuFactory.prototype.trapFocusWithin = function (e, menu) {\n if (e.key !== KeyCode.TAB ||\n e.defaultPrevented ||\n this.focusService.findNextFocusableElement(menu, false, e.shiftKey)) {\n return;\n }\n e.preventDefault();\n this.focusService.focusInto(menu, e.shiftKey);\n };\n StandardMenuFactory.prototype.isMenuEnabled = function (column) {\n // for standard, we show menu if filter is enabled, and the menu is not suppressed\n return column.isFilterAllowed();\n };\n __decorate$1p([\n Autowired('filterManager')\n ], StandardMenuFactory.prototype, \"filterManager\", void 0);\n __decorate$1p([\n Autowired('popupService')\n ], StandardMenuFactory.prototype, \"popupService\", void 0);\n __decorate$1p([\n Autowired('focusService')\n ], StandardMenuFactory.prototype, \"focusService\", void 0);\n __decorate$1p([\n Autowired('ctrlsService')\n ], StandardMenuFactory.prototype, \"ctrlsService\", void 0);\n StandardMenuFactory = __decorate$1p([\n Bean('menuFactory')\n ], StandardMenuFactory);\n return StandardMenuFactory;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1D = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1q = (undefined && undefined.__decorate) || function (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};\nvar TabbedLayout = /** @class */ (function (_super) {\n __extends$1D(TabbedLayout, _super);\n function TabbedLayout(params) {\n var _this = _super.call(this, TabbedLayout.getTemplate(params.cssClass)) || this;\n _this.items = [];\n _this.tabbedItemScrollMap = new Map();\n _this.params = params;\n if (params.items) {\n params.items.forEach(function (item) { return _this.addItem(item); });\n }\n return _this;\n }\n TabbedLayout.prototype.postConstruct = function () {\n this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(), {\n onTabKeyDown: this.onTabKeyDown.bind(this),\n handleKeyDown: this.handleKeyDown.bind(this)\n }));\n };\n TabbedLayout.getTemplate = function (cssClass) {\n return /* html */ \"
\\n
\\n
\\n
\";\n };\n TabbedLayout.prototype.handleKeyDown = function (e) {\n var eDocument = this.gridOptionsWrapper.getDocument();\n switch (e.key) {\n case KeyCode.RIGHT:\n case KeyCode.LEFT:\n if (!this.eHeader.contains(eDocument.activeElement)) {\n return;\n }\n var currentPosition = this.items.indexOf(this.activeItem);\n var nextPosition = e.key === KeyCode.RIGHT ? Math.min(currentPosition + 1, this.items.length - 1) : Math.max(currentPosition - 1, 0);\n if (currentPosition === nextPosition) {\n return;\n }\n e.preventDefault();\n var nextItem = this.items[nextPosition];\n this.showItemWrapper(nextItem);\n nextItem.eHeaderButton.focus();\n break;\n case KeyCode.UP:\n case KeyCode.DOWN:\n e.stopPropagation();\n break;\n }\n };\n TabbedLayout.prototype.onTabKeyDown = function (e) {\n if (e.defaultPrevented) {\n return;\n }\n var _a = this, focusService = _a.focusService, eHeader = _a.eHeader, eBody = _a.eBody, activeItem = _a.activeItem;\n var eDocument = this.gridOptionsWrapper.getDocument();\n var activeElement = eDocument.activeElement;\n e.preventDefault();\n if (eHeader.contains(activeElement)) {\n // focus is in header, move into body of popup\n focusService.focusInto(eBody, e.shiftKey);\n }\n else {\n // focus is in body, establish if it should return to header\n if (focusService.isFocusUnderManagedComponent(eBody)) {\n // focus was in a managed focus component and has now left, so we can return to the header\n activeItem.eHeaderButton.focus();\n }\n else {\n var nextEl = focusService.findNextFocusableElement(eBody, false, e.shiftKey);\n if (nextEl) {\n // if another element exists in the body that can be focussed, go to that\n nextEl.focus();\n }\n else {\n // otherwise return to the header\n activeItem.eHeaderButton.focus();\n }\n }\n }\n };\n TabbedLayout.prototype.setAfterAttachedParams = function (params) {\n this.afterAttachedParams = params;\n };\n TabbedLayout.prototype.showFirstItem = function () {\n if (this.items.length > 0) {\n this.showItemWrapper(this.items[0]);\n }\n };\n TabbedLayout.prototype.addItem = function (item) {\n var eHeaderButton = document.createElement('span');\n setAriaRole(eHeaderButton, 'tab');\n eHeaderButton.setAttribute('tabIndex', '-1');\n eHeaderButton.appendChild(item.title);\n eHeaderButton.classList.add('ag-tab');\n this.eHeader.appendChild(eHeaderButton);\n setAriaLabel(eHeaderButton, item.titleLabel);\n var wrapper = {\n tabbedItem: item,\n eHeaderButton: eHeaderButton\n };\n this.items.push(wrapper);\n eHeaderButton.addEventListener('click', this.showItemWrapper.bind(this, wrapper));\n };\n TabbedLayout.prototype.showItem = function (tabbedItem) {\n var itemWrapper = this.items.find(function (wrapper) { return wrapper.tabbedItem === tabbedItem; });\n if (itemWrapper) {\n this.showItemWrapper(itemWrapper);\n }\n };\n TabbedLayout.prototype.showItemWrapper = function (wrapper) {\n var _this = this;\n var tabbedItem = wrapper.tabbedItem, eHeaderButton = wrapper.eHeaderButton;\n if (this.params.onItemClicked) {\n this.params.onItemClicked({ item: tabbedItem });\n }\n if (this.activeItem === wrapper) {\n callIfPresent(this.params.onActiveItemClicked);\n return;\n }\n if (this.lastScrollListener) {\n this.lastScrollListener = this.lastScrollListener();\n }\n clearElement(this.eBody);\n tabbedItem.bodyPromise.then(function (body) {\n _this.eBody.appendChild(body);\n var onlyUnmanaged = !_this.focusService.isKeyboardMode();\n _this.focusService.focusInto(_this.eBody, false, onlyUnmanaged);\n if (tabbedItem.afterAttachedCallback) {\n tabbedItem.afterAttachedCallback(_this.afterAttachedParams);\n }\n if (_this.params.keepScrollPosition) {\n var scrollableContainer_1 = (tabbedItem.getScrollableContainer && tabbedItem.getScrollableContainer()) || body;\n _this.lastScrollListener = _this.addManagedListener(scrollableContainer_1, 'scroll', function () {\n _this.tabbedItemScrollMap.set(tabbedItem.name, scrollableContainer_1.scrollTop);\n });\n var scrollPosition_1 = _this.tabbedItemScrollMap.get(tabbedItem.name);\n if (scrollPosition_1 !== undefined) {\n // Safari needs a small timeout or it will fire a scroll event to position 0\n setTimeout(function () {\n scrollableContainer_1.scrollTop = scrollPosition_1;\n }, 0);\n }\n }\n });\n if (this.activeItem) {\n this.activeItem.eHeaderButton.classList.remove('ag-tab-selected');\n }\n eHeaderButton.classList.add('ag-tab-selected');\n this.activeItem = wrapper;\n };\n __decorate$1q([\n Autowired('focusService')\n ], TabbedLayout.prototype, \"focusService\", void 0);\n __decorate$1q([\n RefSelector('eHeader')\n ], TabbedLayout.prototype, \"eHeader\", void 0);\n __decorate$1q([\n RefSelector('eBody')\n ], TabbedLayout.prototype, \"eBody\", void 0);\n __decorate$1q([\n PostConstruct\n ], TabbedLayout.prototype, \"postConstruct\", null);\n return TabbedLayout;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n/**\n * @deprecated\n */\nfunction simpleHttpRequest(params) {\n return new AgPromise(function (resolve) {\n var httpRequest = new XMLHttpRequest();\n httpRequest.open('GET', params.url);\n httpRequest.send();\n httpRequest.onreadystatechange = function () {\n if (httpRequest.readyState === 4 && httpRequest.status === 200) {\n resolve(JSON.parse(httpRequest.responseText));\n }\n };\n });\n}\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1E = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1r = (undefined && undefined.__decorate) || function (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};\nvar DEBOUNCE_DELAY = 50;\nvar ResizeObserverService = /** @class */ (function (_super) {\n __extends$1E(ResizeObserverService, _super);\n function ResizeObserverService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.polyfillFunctions = [];\n return _this;\n }\n ResizeObserverService.prototype.observeResize = function (element, callback) {\n var _this = this;\n var eDocument = this.gridOptionsWrapper.getDocument();\n var win = (eDocument.defaultView || window);\n // this gets fired too often and might cause some relayout issues\n // so we add a debounce to the callback here to avoid the flashing effect.\n var debouncedCallback = debounce(callback, DEBOUNCE_DELAY);\n var useBrowserResizeObserver = function () {\n var resizeObserver = new win.ResizeObserver(debouncedCallback);\n resizeObserver.observe(element);\n return function () { return resizeObserver.disconnect(); };\n };\n var usePolyfill = function () {\n // initialise to the current width and height, so first call will have no changes\n var widthLastTime = offsetWidth(element);\n var heightLastTime = offsetHeight(element);\n // when finished, this gets turned to false.\n var running = true;\n var periodicallyCheckWidthAndHeight = function () {\n if (running) {\n var newWidth = offsetWidth(element);\n var newHeight = offsetHeight(element);\n var changed = newWidth !== widthLastTime || newHeight !== heightLastTime;\n if (changed) {\n widthLastTime = newWidth;\n heightLastTime = newHeight;\n callback();\n }\n _this.doNextPolyfillTurn(periodicallyCheckWidthAndHeight);\n }\n };\n periodicallyCheckWidthAndHeight();\n // the callback function we return sets running to false\n return function () { return running = false; };\n };\n var suppressResize = this.gridOptionsWrapper.isSuppressBrowserResizeObserver();\n var resizeObserverExists = !!win.ResizeObserver;\n if (resizeObserverExists && !suppressResize) {\n return useBrowserResizeObserver();\n }\n return usePolyfill();\n };\n ResizeObserverService.prototype.doNextPolyfillTurn = function (func) {\n this.polyfillFunctions.push(func);\n this.schedulePolyfill();\n };\n ResizeObserverService.prototype.schedulePolyfill = function () {\n var _this = this;\n if (this.polyfillScheduled) {\n return;\n }\n var executeAllFuncs = function () {\n var funcs = _this.polyfillFunctions;\n // make sure set scheduled to false and clear clear array\n // before executing the funcs, as the funcs could add more funcs\n _this.polyfillScheduled = false;\n _this.polyfillFunctions = [];\n funcs.forEach(function (f) { return f(); });\n };\n this.polyfillScheduled = true;\n this.getFrameworkOverrides().setTimeout(executeAllFuncs, DEBOUNCE_DELAY);\n };\n ResizeObserverService = __decorate$1r([\n Bean('resizeObserverService')\n ], ResizeObserverService);\n return ResizeObserverService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1F = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1s = (undefined && undefined.__decorate) || function (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};\nvar AnimationFrameService = /** @class */ (function (_super) {\n __extends$1F(AnimationFrameService, _super);\n function AnimationFrameService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // p1 and p2 are create tasks are to do with row and cell creation.\n // for them we want to execute according to row order, so we use\n // TaskItem so we know what index the item is for.\n _this.createTasksP1 = { list: [], sorted: false }; // eg drawing back-ground of rows\n _this.createTasksP2 = { list: [], sorted: false }; // eg cell renderers, adding hover functionality\n // destroy tasks are to do with row removal. they are done after row creation as the user will need to see new\n // rows first (as blank is scrolled into view), when we remove the old rows (no longer in view) is not as\n // important.\n _this.destroyTasks = [];\n _this.ticking = false;\n // we need to know direction of scroll, to build up rows in the direction of\n // the scroll. eg if user scrolls down, we extend the rows by building down.\n _this.scrollGoingDown = true;\n _this.lastScrollTop = 0;\n _this.taskCount = 0;\n _this.cancelledTasks = new Set();\n return _this;\n }\n AnimationFrameService.prototype.setScrollTop = function (scrollTop) {\n this.scrollGoingDown = scrollTop > this.lastScrollTop;\n this.lastScrollTop = scrollTop;\n };\n AnimationFrameService.prototype.init = function () {\n this.useAnimationFrame = !this.gridOptionsWrapper.isSuppressAnimationFrame();\n };\n AnimationFrameService.prototype.isOn = function () {\n return this.useAnimationFrame;\n };\n // this method is for our AG Grid sanity only - if animation frames are turned off,\n // then no place in the code should be looking to add any work to be done in animation\n // frames. this stops bugs - where some code is asking for a frame to be executed\n // when it should not.\n AnimationFrameService.prototype.verifyAnimationFrameOn = function (methodName) {\n if (this.useAnimationFrame === false) {\n console.warn(\"AG Grid: AnimationFrameService.\" + methodName + \" called but animation frames are off\");\n }\n };\n AnimationFrameService.prototype.createTask = function (task, index, list) {\n this.verifyAnimationFrameOn(list);\n var taskItem = { task: task, index: index, createOrder: ++this.taskCount };\n this.addTaskToList(this[list], taskItem);\n this.schedule();\n };\n AnimationFrameService.prototype.cancelTask = function (task) {\n this.cancelledTasks.add(task);\n };\n AnimationFrameService.prototype.addTaskToList = function (taskList, task) {\n taskList.list.push(task);\n taskList.sorted = false;\n };\n AnimationFrameService.prototype.sortTaskList = function (taskList) {\n if (taskList.sorted) {\n return;\n }\n var sortDirection = this.scrollGoingDown ? 1 : -1;\n // sort first by row index (taking into account scroll direction), then by\n // order of task creation (always ascending, so cells will render left-to-right)\n taskList.list.sort(function (a, b) { return a.index !== b.index ? sortDirection * (b.index - a.index) : b.createOrder - a.createOrder; });\n taskList.sorted = true;\n };\n AnimationFrameService.prototype.addDestroyTask = function (task) {\n this.verifyAnimationFrameOn('createTasksP3');\n this.destroyTasks.push(task);\n this.schedule();\n };\n AnimationFrameService.prototype.executeFrame = function (millis) {\n this.verifyAnimationFrameOn('executeFrame');\n var p1TaskList = this.createTasksP1;\n var p1Tasks = p1TaskList.list;\n var p2TaskList = this.createTasksP2;\n var p2Tasks = p2TaskList.list;\n var destroyTasks = this.destroyTasks;\n var frameStart = new Date().getTime();\n var duration = (new Date().getTime()) - frameStart;\n // 16ms is 60 fps\n var noMaxMillis = millis <= 0;\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n while (noMaxMillis || duration < millis) {\n var gridBodyDidSomething = gridBodyCon.getScrollFeature().executeAnimationFrameScroll();\n if (!gridBodyDidSomething) {\n var task = void 0;\n if (p1Tasks.length) {\n this.sortTaskList(p1TaskList);\n task = p1Tasks.pop().task;\n }\n else if (p2Tasks.length) {\n this.sortTaskList(p2TaskList);\n task = p2Tasks.pop().task;\n }\n else if (destroyTasks.length) {\n task = destroyTasks.pop();\n }\n else {\n this.cancelledTasks.clear();\n break;\n }\n if (!this.cancelledTasks.has(task)) {\n task();\n }\n }\n duration = (new Date().getTime()) - frameStart;\n }\n if (p1Tasks.length || p2Tasks.length || destroyTasks.length) {\n this.requestFrame();\n }\n else {\n this.stopTicking();\n }\n };\n AnimationFrameService.prototype.stopTicking = function () {\n this.ticking = false;\n };\n AnimationFrameService.prototype.flushAllFrames = function () {\n if (!this.useAnimationFrame) {\n return;\n }\n this.executeFrame(-1);\n };\n AnimationFrameService.prototype.schedule = function () {\n if (!this.useAnimationFrame) {\n return;\n }\n if (!this.ticking) {\n this.ticking = true;\n this.requestFrame();\n }\n };\n AnimationFrameService.prototype.requestFrame = function () {\n // check for the existence of requestAnimationFrame, and if\n // it's missing, then we polyfill it with setTimeout()\n var callback = this.executeFrame.bind(this, 60);\n var eDocument = this.gridOptionsWrapper.getDocument();\n var win = (eDocument.defaultView || window);\n if (win.requestAnimationFrame) {\n win.requestAnimationFrame(callback);\n }\n else if (win.webkitRequestAnimationFrame) {\n win.webkitRequestAnimationFrame(callback);\n }\n else {\n win.setTimeout(callback, 0);\n }\n };\n AnimationFrameService.prototype.isQueueEmpty = function () {\n return !this.ticking;\n };\n // a debounce utility used for parts of the app involved with rendering.\n // the advantage over normal debounce is the client can call flushAllFrames()\n // to make sure all rendering is complete. we don't wait any milliseconds,\n // as this is intended to batch calls in one VM turn.\n AnimationFrameService.prototype.debounce = function (func) {\n var _this = this;\n var pending = false;\n return function () {\n if (!_this.isOn()) {\n _this.getFrameworkOverrides().setTimeout(func, 0);\n return;\n }\n if (pending) {\n return;\n }\n pending = true;\n _this.addDestroyTask(function () {\n pending = false;\n func();\n });\n };\n };\n __decorate$1s([\n Autowired('ctrlsService')\n ], AnimationFrameService.prototype, \"ctrlsService\", void 0);\n __decorate$1s([\n PostConstruct\n ], AnimationFrameService.prototype, \"init\", null);\n AnimationFrameService = __decorate$1s([\n Bean('animationFrameService')\n ], AnimationFrameService);\n return AnimationFrameService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1G = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1t = (undefined && undefined.__decorate) || function (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};\nvar RESIZE_CONTAINER_STYLE = 'ag-resizer-wrapper';\nvar RESIZE_TEMPLATE = /* html */ \"
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\";\nvar PositionableFeature = /** @class */ (function (_super) {\n __extends$1G(PositionableFeature, _super);\n function PositionableFeature(element, config) {\n var _this = _super.call(this) || this;\n _this.element = element;\n _this.dragStartPosition = {\n x: 0,\n y: 0\n };\n _this.position = {\n x: 0,\n y: 0\n };\n _this.lastSize = {\n width: -1,\n height: -1\n };\n _this.positioned = false;\n _this.resizersAdded = false;\n _this.resizeListeners = [];\n _this.boundaryEl = null;\n _this.isResizing = false;\n _this.isMoving = false;\n _this.resizable = {};\n _this.movable = false;\n _this.currentResizer = null;\n _this.config = Object.assign({}, { popup: false }, config);\n return _this;\n }\n PositionableFeature.prototype.center = function () {\n var _a = this.offsetParent, clientHeight = _a.clientHeight, clientWidth = _a.clientWidth;\n var x = (clientWidth / 2) - (this.getWidth() / 2);\n var y = (clientHeight / 2) - (this.getHeight() / 2);\n this.offsetElement(x, y);\n };\n PositionableFeature.prototype.initialisePosition = function () {\n var _a = this.config, centered = _a.centered, forcePopupParentAsOffsetParent = _a.forcePopupParentAsOffsetParent, minWidth = _a.minWidth, width = _a.width, minHeight = _a.minHeight, height = _a.height, x = _a.x, y = _a.y;\n if (!this.offsetParent) {\n this.setOffsetParent();\n }\n var computedMinHeight = 0;\n var computedMinWidth = 0;\n // here we don't use the main offset parent but the element's offsetParent\n // in order to calculated the minWidth and minHeight correctly\n var isVisible = !!this.element.offsetParent;\n if (isVisible) {\n var boundaryEl = this.findBoundaryElement();\n var offsetParentComputedStyles = window.getComputedStyle(boundaryEl);\n if (offsetParentComputedStyles.minWidth != null) {\n var paddingWidth = boundaryEl.offsetWidth - this.element.offsetWidth;\n computedMinWidth = parseInt(offsetParentComputedStyles.minWidth, 10) - paddingWidth;\n }\n if (offsetParentComputedStyles.minHeight != null) {\n var paddingHeight = boundaryEl.offsetHeight - this.element.offsetHeight;\n computedMinHeight = parseInt(offsetParentComputedStyles.minHeight, 10) - paddingHeight;\n }\n }\n this.minHeight = minHeight || computedMinHeight;\n this.minWidth = minWidth || computedMinWidth;\n if (width) {\n this.setWidth(width);\n }\n if (height) {\n this.setHeight(height);\n }\n if (!width || !height) {\n this.refreshSize();\n }\n if (centered) {\n this.center();\n }\n else if (x || y) {\n this.offsetElement(x, y);\n }\n else if (isVisible && forcePopupParentAsOffsetParent && this.boundaryEl) {\n var top_1 = parseFloat(this.boundaryEl.style.top);\n var left = parseFloat(this.boundaryEl.style.left);\n this.offsetElement(isNaN(left) ? 0 : left, isNaN(top_1) ? 0 : top_1);\n }\n this.positioned = !!this.offsetParent;\n };\n PositionableFeature.prototype.isPositioned = function () {\n return this.positioned;\n };\n PositionableFeature.prototype.getPosition = function () {\n return this.position;\n };\n PositionableFeature.prototype.setMovable = function (movable, moveElement) {\n if (!this.config.popup || movable === this.movable) {\n return;\n }\n this.movable = movable;\n var params = this.moveElementDragListener || {\n eElement: moveElement,\n onDragStart: this.onMoveStart.bind(this),\n onDragging: this.onMove.bind(this),\n onDragStop: this.onMoveEnd.bind(this)\n };\n if (movable) {\n this.dragService.addDragSource(params);\n this.moveElementDragListener = params;\n }\n else {\n this.dragService.removeDragSource(params);\n this.moveElementDragListener = undefined;\n }\n };\n PositionableFeature.prototype.setResizable = function (resizable) {\n var _this = this;\n this.clearResizeListeners();\n if (resizable) {\n this.addResizers();\n }\n else {\n this.removeResizers();\n }\n if (typeof resizable === 'boolean') {\n if (resizable === false) {\n return;\n }\n resizable = {\n topLeft: resizable,\n top: resizable,\n topRight: resizable,\n right: resizable,\n bottomRight: resizable,\n bottom: resizable,\n bottomLeft: resizable,\n left: resizable\n };\n }\n Object.keys(resizable).forEach(function (side) {\n var resizableStructure = resizable;\n var val = !!resizableStructure[side];\n var resizerEl = _this.getResizerElement(side);\n var params = {\n dragStartPixels: 0,\n eElement: resizerEl,\n onDragStart: function (e) { return _this.onResizeStart(e, side); },\n onDragging: _this.onResize.bind(_this),\n onDragStop: function (e) { return _this.onResizeEnd(e, side); },\n };\n if (!!_this.resizable[side] !== val || (!_this.isAlive() && !val)) {\n if (val) {\n _this.dragService.addDragSource(params);\n _this.resizeListeners.push(params);\n resizerEl.style.pointerEvents = 'all';\n }\n else {\n resizerEl.style.pointerEvents = 'none';\n }\n }\n });\n };\n PositionableFeature.prototype.removeSizeFromEl = function () {\n this.element.style.removeProperty('height');\n this.element.style.removeProperty('width');\n this.element.style.removeProperty('flex');\n };\n PositionableFeature.prototype.restoreLastSize = function () {\n this.element.style.flex = '0 0 auto';\n var _a = this.lastSize, height = _a.height, width = _a.width;\n if (width !== -1) {\n this.element.style.width = width + \"px\";\n }\n if (height !== -1) {\n this.element.style.height = height + \"px\";\n }\n };\n PositionableFeature.prototype.getHeight = function () {\n return this.element.offsetHeight;\n };\n PositionableFeature.prototype.setHeight = function (height) {\n var popup = this.config.popup;\n var eGui = this.element;\n var isPercent = false;\n if (typeof height === 'string' && height.indexOf('%') !== -1) {\n setFixedHeight(eGui, height);\n height = getAbsoluteHeight(eGui);\n isPercent = true;\n }\n else if (this.positioned) {\n var elRect = this.element.getBoundingClientRect();\n var parentRect = this.offsetParent.getBoundingClientRect();\n height = Math.max(this.minHeight, height);\n var clientHeight = this.offsetParent.clientHeight;\n var yPosition = popup ? this.position.y : elRect.top;\n var parentTop = popup ? 0 : parentRect.top;\n if (clientHeight && (height + yPosition > clientHeight + parentTop)) {\n height = clientHeight - yPosition;\n }\n }\n if (this.getHeight() === height) {\n return;\n }\n if (!isPercent) {\n if (popup) {\n setFixedHeight(eGui, height);\n }\n else {\n eGui.style.height = height + \"px\";\n eGui.style.flex = '0 0 auto';\n this.lastSize.height = typeof height === 'number' ? height : parseFloat(height);\n }\n }\n else {\n eGui.style.maxHeight = 'unset';\n eGui.style.minHeight = 'unset';\n }\n };\n PositionableFeature.prototype.getWidth = function () {\n return this.element.offsetWidth;\n };\n PositionableFeature.prototype.setWidth = function (width) {\n var eGui = this.element;\n var popup = this.config.popup;\n var isPercent = false;\n if (typeof width === 'string' && width.indexOf('%') !== -1) {\n setFixedWidth(eGui, width);\n width = getAbsoluteWidth(eGui);\n isPercent = true;\n }\n else if (this.positioned) {\n width = Math.max(this.minWidth, width);\n var clientWidth = this.offsetParent.clientWidth;\n var xPosition = popup ? this.position.x : this.element.getBoundingClientRect().left;\n if (clientWidth && (width + xPosition > clientWidth)) {\n width = clientWidth - xPosition;\n }\n }\n if (this.getWidth() === width) {\n return;\n }\n if (!isPercent) {\n if (this.config.popup) {\n setFixedWidth(eGui, width);\n }\n else {\n eGui.style.width = width + \"px\";\n eGui.style.flex = ' unset';\n this.lastSize.width = typeof width === 'number' ? width : parseFloat(width);\n }\n }\n else {\n eGui.style.maxWidth = 'unset';\n eGui.style.minWidth = 'unset';\n }\n };\n PositionableFeature.prototype.offsetElement = function (x, y) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n var ePopup = this.config.forcePopupParentAsOffsetParent ? this.boundaryEl : this.element;\n this.popupService.positionPopup({\n ePopup: ePopup,\n x: x,\n y: y,\n keepWithinBounds: true\n });\n this.setPosition(parseFloat(ePopup.style.left), parseFloat(ePopup.style.top));\n };\n PositionableFeature.prototype.setPosition = function (x, y) {\n this.position.x = x;\n this.position.y = y;\n };\n PositionableFeature.prototype.updateDragStartPosition = function (x, y) {\n this.dragStartPosition = { x: x, y: y };\n };\n PositionableFeature.prototype.calculateMouseMovement = function (params) {\n var e = params.e, isLeft = params.isLeft, isTop = params.isTop, anywhereWithin = params.anywhereWithin, topBuffer = params.topBuffer;\n var xDiff = e.clientX - this.dragStartPosition.x;\n var yDiff = e.clientY - this.dragStartPosition.y;\n var movementX = this.shouldSkipX(e, !!isLeft, !!anywhereWithin, xDiff) ? 0 : xDiff;\n var movementY = this.shouldSkipY(e, !!isTop, topBuffer, yDiff) ? 0 : yDiff;\n return { movementX: movementX, movementY: movementY };\n };\n PositionableFeature.prototype.shouldSkipX = function (e, isLeft, anywhereWithin, diff) {\n var elRect = this.element.getBoundingClientRect();\n var parentRect = this.offsetParent.getBoundingClientRect();\n var boundaryElRect = this.boundaryEl.getBoundingClientRect();\n var xPosition = this.config.popup ? this.position.x : elRect.left;\n // skip if cursor is outside of popupParent horizontally\n var skipX = ((xPosition <= 0 && parentRect.left >= e.clientX) ||\n (parentRect.right <= e.clientX && parentRect.right <= boundaryElRect.right));\n if (skipX) {\n return true;\n }\n if (isLeft) {\n skipX = (\n // skip if we are moving to the left and the cursor\n // is positioned to the right of the left side anchor\n (diff < 0 && e.clientX > xPosition + parentRect.left) ||\n // skip if we are moving to the right and the cursor\n // is positioned to the left of the dialog\n (diff > 0 && e.clientX < xPosition + parentRect.left));\n }\n else {\n if (anywhereWithin) {\n // if anywhereWithin is true, we allow to move\n // as long as the cursor is within the dialog\n skipX = ((diff < 0 && e.clientX > boundaryElRect.right) ||\n (diff > 0 && e.clientX < xPosition + parentRect.left));\n }\n else {\n skipX = (\n // if the movement is bound to the right side of the dialog\n // we skip if we are moving to the left and the cursor\n // is to the right of the dialog\n (diff < 0 && e.clientX > boundaryElRect.right) ||\n // or skip if we are moving to the right and the cursor\n // is to the left of the right side anchor\n (diff > 0 && e.clientX < boundaryElRect.right));\n }\n }\n return skipX;\n };\n PositionableFeature.prototype.shouldSkipY = function (e, isTop, topBuffer, diff) {\n if (topBuffer === void 0) { topBuffer = 0; }\n var elRect = this.element.getBoundingClientRect();\n var parentRect = this.offsetParent.getBoundingClientRect();\n var boundaryElRect = this.boundaryEl.getBoundingClientRect();\n var yPosition = this.config.popup ? this.position.y : elRect.top;\n // skip if cursor is outside of popupParent vertically\n var skipY = ((yPosition <= 0 && parentRect.top >= e.clientY) ||\n (parentRect.bottom <= e.clientY && parentRect.bottom <= boundaryElRect.bottom));\n if (skipY) {\n return true;\n }\n if (isTop) {\n skipY = (\n // skip if we are moving to towards top and the cursor is\n // below the top anchor + topBuffer\n // note: topBuffer is used when moving the dialog using the title bar\n (diff < 0 && e.clientY > yPosition + parentRect.top + topBuffer) ||\n // skip if we are moving to the bottom and the cursor is\n // above the top anchor\n (diff > 0 && e.clientY < yPosition + parentRect.top));\n }\n else {\n skipY = (\n // skip if we are moving towards the top and the cursor\n // is below the bottom anchor\n (diff < 0 && e.clientY > boundaryElRect.bottom) ||\n // skip if we are moving towards the bottom and the cursor\n // is above the bottom anchor\n (diff > 0 && e.clientY < boundaryElRect.bottom));\n }\n return skipY;\n };\n PositionableFeature.prototype.createResizeMap = function () {\n var eGui = this.element;\n this.resizerMap = {\n topLeft: { element: eGui.querySelector('[ref=eTopLeftResizer]') },\n top: { element: eGui.querySelector('[ref=eTopResizer]') },\n topRight: { element: eGui.querySelector('[ref=eTopRightResizer]') },\n right: { element: eGui.querySelector('[ref=eRightResizer]') },\n bottomRight: { element: eGui.querySelector('[ref=eBottomRightResizer]') },\n bottom: { element: eGui.querySelector('[ref=eBottomResizer]') },\n bottomLeft: { element: eGui.querySelector('[ref=eBottomLeftResizer]') },\n left: { element: eGui.querySelector('[ref=eLeftResizer]') }\n };\n };\n PositionableFeature.prototype.addResizers = function () {\n if (this.resizersAdded) {\n return;\n }\n var eGui = this.element;\n if (!eGui) {\n return;\n }\n var parser = new DOMParser();\n var resizers = parser.parseFromString(RESIZE_TEMPLATE, 'text/html').body;\n eGui.appendChild(resizers.firstChild);\n this.createResizeMap();\n this.resizersAdded = true;\n };\n PositionableFeature.prototype.removeResizers = function () {\n this.resizerMap = undefined;\n var resizerEl = this.element.querySelector(\".\" + RESIZE_CONTAINER_STYLE);\n if (resizerEl) {\n this.element.removeChild(resizerEl);\n }\n this.resizersAdded = false;\n };\n PositionableFeature.prototype.getResizerElement = function (side) {\n return this.resizerMap[side].element;\n };\n PositionableFeature.prototype.onResizeStart = function (e, side) {\n this.boundaryEl = this.findBoundaryElement();\n if (!this.positioned) {\n this.initialisePosition();\n }\n this.currentResizer = {\n isTop: !!side.match(/top/i),\n isRight: !!side.match(/right/i),\n isBottom: !!side.match(/bottom/i),\n isLeft: !!side.match(/left/i),\n };\n this.element.classList.add('ag-resizing');\n this.resizerMap[side].element.classList.add('ag-active');\n var _a = this.config, popup = _a.popup, forcePopupParentAsOffsetParent = _a.forcePopupParentAsOffsetParent;\n if (!popup && !forcePopupParentAsOffsetParent) {\n this.applySizeToSiblings(this.currentResizer.isBottom || this.currentResizer.isTop);\n }\n this.isResizing = true;\n this.updateDragStartPosition(e.clientX, e.clientY);\n };\n PositionableFeature.prototype.getSiblings = function () {\n var element = this.element;\n var parent = element.parentElement;\n if (!parent) {\n return null;\n }\n return Array.prototype.slice.call(parent.children).filter(function (el) { return !el.classList.contains('ag-hidden'); });\n };\n PositionableFeature.prototype.getMinSizeOfSiblings = function () {\n var siblings = this.getSiblings() || [];\n var height = 0;\n var width = 0;\n for (var i = 0; i < siblings.length; i++) {\n var currentEl = siblings[i];\n var isFlex = !!currentEl.style.flex && currentEl.style.flex !== '0 0 auto';\n if (currentEl === this.element) {\n continue;\n }\n var nextHeight = this.minHeight || 0;\n var nextWidth = this.minWidth || 0;\n if (isFlex) {\n var computedStyle = window.getComputedStyle(currentEl);\n if (computedStyle.minHeight) {\n nextHeight = parseInt(computedStyle.minHeight, 10);\n }\n if (computedStyle.minWidth) {\n nextWidth = parseInt(computedStyle.minWidth, 10);\n }\n }\n else {\n nextHeight = currentEl.offsetHeight;\n nextWidth = currentEl.offsetWidth;\n }\n height += nextHeight;\n width += nextWidth;\n }\n return { height: height, width: width };\n };\n PositionableFeature.prototype.applySizeToSiblings = function (vertical) {\n var containerToFlex = null;\n var siblings = this.getSiblings();\n if (!siblings) {\n return;\n }\n for (var i = 0; i < siblings.length; i++) {\n var el = siblings[i];\n if (el === containerToFlex) {\n continue;\n }\n if (vertical) {\n el.style.height = el.offsetHeight + \"px\";\n }\n else {\n el.style.width = el.offsetWidth + \"px\";\n }\n el.style.flex = '0 0 auto';\n if (el === this.element) {\n containerToFlex = siblings[i + 1];\n }\n }\n if (containerToFlex) {\n containerToFlex.style.removeProperty('height');\n containerToFlex.style.removeProperty('min-height');\n containerToFlex.style.removeProperty('max-height');\n containerToFlex.style.flex = '1 1 auto';\n }\n };\n PositionableFeature.prototype.onResize = function (e) {\n if (!this.isResizing || !this.currentResizer) {\n return;\n }\n var _a = this.config, popup = _a.popup, forcePopupParentAsOffsetParent = _a.forcePopupParentAsOffsetParent;\n var _b = this.currentResizer, isTop = _b.isTop, isRight = _b.isRight, isBottom = _b.isBottom, isLeft = _b.isLeft;\n var isHorizontal = isRight || isLeft;\n var isVertical = isBottom || isTop;\n var _c = this.calculateMouseMovement({ e: e, isLeft: isLeft, isTop: isTop }), movementX = _c.movementX, movementY = _c.movementY;\n var xPosition = this.position.x;\n var yPosition = this.position.y;\n var offsetLeft = 0;\n var offsetTop = 0;\n if (isHorizontal && movementX) {\n var direction = isLeft ? -1 : 1;\n var oldWidth = this.getWidth();\n var newWidth = oldWidth + (movementX * direction);\n var skipWidth = false;\n if (isLeft) {\n offsetLeft = oldWidth - newWidth;\n if (xPosition + offsetLeft <= 0 || newWidth <= this.minWidth) {\n skipWidth = true;\n offsetLeft = 0;\n }\n }\n if (!skipWidth) {\n this.setWidth(newWidth);\n }\n }\n if (isVertical && movementY) {\n var direction = isTop ? -1 : 1;\n var oldHeight = this.getHeight();\n var newHeight = oldHeight + (movementY * direction);\n var skipHeight = false;\n if (isTop) {\n offsetTop = oldHeight - newHeight;\n if (yPosition + offsetTop <= 0 || newHeight <= this.minHeight) {\n skipHeight = true;\n offsetTop = 0;\n }\n }\n else {\n // do not let the size of all siblings be higher than the parent container\n if (!this.config.popup &&\n !this.config.forcePopupParentAsOffsetParent &&\n oldHeight < newHeight &&\n (this.getMinSizeOfSiblings().height + newHeight) > this.element.parentElement.offsetHeight) {\n skipHeight = true;\n }\n }\n if (!skipHeight) {\n this.setHeight(newHeight);\n }\n }\n this.updateDragStartPosition(e.clientX, e.clientY);\n if ((popup || forcePopupParentAsOffsetParent) && offsetLeft || offsetTop) {\n this.offsetElement(xPosition + offsetLeft, yPosition + offsetTop);\n }\n };\n PositionableFeature.prototype.onResizeEnd = function (e, side) {\n this.isResizing = false;\n this.currentResizer = null;\n this.boundaryEl = null;\n var params = {\n type: 'resize',\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi()\n };\n this.element.classList.remove('ag-resizing');\n this.resizerMap[side].element.classList.remove('ag-active');\n this.dispatchEvent(params);\n };\n PositionableFeature.prototype.refreshSize = function () {\n var eGui = this.element;\n if (this.config.popup) {\n if (!this.config.width) {\n this.setWidth(eGui.offsetWidth);\n }\n if (!this.config.height) {\n this.setHeight(eGui.offsetHeight);\n }\n }\n };\n PositionableFeature.prototype.onMoveStart = function (e) {\n this.boundaryEl = this.findBoundaryElement();\n if (!this.positioned) {\n this.initialisePosition();\n }\n this.isMoving = true;\n this.element.classList.add('ag-moving');\n this.updateDragStartPosition(e.clientX, e.clientY);\n };\n PositionableFeature.prototype.onMove = function (e) {\n if (!this.isMoving) {\n return;\n }\n var _a = this.position, x = _a.x, y = _a.y;\n var topBuffer;\n if (this.config.calculateTopBuffer) {\n topBuffer = this.config.calculateTopBuffer();\n }\n var _b = this.calculateMouseMovement({\n e: e,\n isTop: true,\n anywhereWithin: true,\n topBuffer: topBuffer\n }), movementX = _b.movementX, movementY = _b.movementY;\n this.offsetElement(x + movementX, y + movementY);\n this.updateDragStartPosition(e.clientX, e.clientY);\n };\n PositionableFeature.prototype.onMoveEnd = function () {\n this.isMoving = false;\n this.boundaryEl = null;\n this.element.classList.remove('ag-moving');\n };\n PositionableFeature.prototype.setOffsetParent = function () {\n if (this.config.forcePopupParentAsOffsetParent) {\n this.offsetParent = this.popupService.getPopupParent();\n }\n else {\n this.offsetParent = this.element.offsetParent;\n }\n };\n PositionableFeature.prototype.findBoundaryElement = function () {\n var el = this.element;\n while (el) {\n if (window.getComputedStyle(el).position !== 'static') {\n return el;\n }\n el = el.parentElement;\n }\n return this.element;\n };\n PositionableFeature.prototype.clearResizeListeners = function () {\n while (this.resizeListeners.length) {\n var params = this.resizeListeners.pop();\n this.dragService.removeDragSource(params);\n }\n };\n PositionableFeature.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n if (this.moveElementDragListener) {\n this.dragService.removeDragSource(this.moveElementDragListener);\n }\n this.clearResizeListeners();\n this.removeResizers();\n };\n __decorate$1t([\n Autowired('popupService')\n ], PositionableFeature.prototype, \"popupService\", void 0);\n __decorate$1t([\n Autowired('dragService')\n ], PositionableFeature.prototype, \"dragService\", void 0);\n return PositionableFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1H = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1u = (undefined && undefined.__decorate) || function (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};\nvar AutoWidthCalculator = /** @class */ (function (_super) {\n __extends$1H(AutoWidthCalculator, _super);\n function AutoWidthCalculator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AutoWidthCalculator.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function (p) {\n _this.centerRowContainerCtrl = p.centerRowContainerCtrl;\n });\n };\n // this is the trick: we create a dummy container and clone all the cells\n // into the dummy, then check the dummy's width. then destroy the dummy\n // as we don't need it any more.\n // drawback: only the cells visible on the screen are considered\n AutoWidthCalculator.prototype.getPreferredWidthForColumn = function (column, skipHeader) {\n var eHeaderCell = this.getHeaderCellForColumn(column);\n // cell isn't visible\n if (!eHeaderCell) {\n return -1;\n }\n var elements = this.rowRenderer.getAllCellsForColumn(column);\n if (!skipHeader) {\n // we only consider the lowest level cell, not the group cell. in 99% of the time, this\n // will be enough. if we consider groups, then it gets too complicated for what it's worth,\n // as the groups can span columns and this class only considers one column at a time.\n elements.push(eHeaderCell);\n }\n return this.addElementsToContainerAndGetWidth(elements);\n };\n AutoWidthCalculator.prototype.getPreferredWidthForColumnGroup = function (columnGroup) {\n var eHeaderCell = this.getHeaderCellForColumn(columnGroup);\n if (!eHeaderCell) {\n return -1;\n }\n return this.addElementsToContainerAndGetWidth([eHeaderCell]);\n };\n AutoWidthCalculator.prototype.addElementsToContainerAndGetWidth = function (elements) {\n var _this = this;\n var eDummyContainer = document.createElement('span');\n // position fixed, so it isn't restricted to the boundaries of the parent\n eDummyContainer.style.position = 'fixed';\n // we put the dummy into the body container, so it will inherit all the\n // css styles that the real cells are inheriting\n var eBodyContainer = this.centerRowContainerCtrl.getContainerElement();\n eBodyContainer.appendChild(eDummyContainer);\n elements.forEach(function (el) { return _this.cloneItemIntoDummy(el, eDummyContainer); });\n // at this point, all the clones are lined up vertically with natural widths. the dummy\n // container will have a width wide enough just to fit the largest.\n var dummyContainerWidth = eDummyContainer.offsetWidth;\n // we are finished with the dummy container, so get rid of it\n eBodyContainer.removeChild(eDummyContainer);\n // we add padding as I found sometimes the gui still put '...' after some of the texts. so the\n // user can configure the grid to add a few more pixels after the calculated width\n var autoSizePadding = this.gridOptionsWrapper.getAutoSizePadding();\n return dummyContainerWidth + autoSizePadding;\n };\n AutoWidthCalculator.prototype.getHeaderCellForColumn = function (column) {\n /* tslint:enable */\n var element = null;\n this.ctrlsService.getHeaderRowContainerCtrls().forEach(function (container) {\n var res = container.getHtmlElementForColumnHeader(column);\n if (res != null) {\n element = res;\n }\n });\n return element;\n };\n AutoWidthCalculator.prototype.cloneItemIntoDummy = function (eCell, eDummyContainer) {\n // make a deep clone of the cell\n var eCellClone = eCell.cloneNode(true);\n // the original has a fixed width, we remove this to allow the natural width based on content\n eCellClone.style.width = '';\n // the original has position = absolute, we need to remove this so it's positioned normally\n eCellClone.style.position = 'static';\n eCellClone.style.left = '';\n // we put the cell into a containing div, as otherwise the cells would just line up\n // on the same line, standard flow layout, by putting them into divs, they are laid\n // out one per line\n var eCloneParent = document.createElement('div');\n var eCloneParentClassList = eCloneParent.classList;\n var isHeader = ['ag-header-cell', 'ag-header-group-cell'].some(function (cls) { return eCellClone.classList.contains(cls); });\n if (isHeader) {\n eCloneParentClassList.add('ag-header', 'ag-header-row');\n eCloneParent.style.position = 'static';\n }\n else {\n eCloneParentClassList.add('ag-row');\n }\n // find parent using classes (headers have ag-header-cell, rows have ag-row), and copy classes from it.\n // if we didn't do this, things like ag-row-level-2 would be missing if present, which sets indents\n // onto group items.\n var pointer = eCell.parentElement;\n while (pointer) {\n var isRow = ['ag-header-row', 'ag-row'].some(function (cls) { return pointer.classList.contains(cls); });\n if (isRow) {\n for (var i = 0; i < pointer.classList.length; i++) {\n var item = pointer.classList[i];\n // we skip ag-row-position-absolute, as this has structural CSS applied that stops the\n // element from fitting into it's parent, and we need the element to stretch the parent\n // as we are measuring the parents width\n if (item != 'ag-row-position-absolute') {\n eCloneParentClassList.add(item);\n }\n }\n break;\n }\n pointer = pointer.parentElement;\n }\n // the twig on the branch, the branch on the tree, the tree in the hole,\n // the hole in the bog, the bog in the clone, the clone in the parent,\n // the parent in the dummy, and the dummy down in the vall-e-ooo, OOOOOOOOO! Oh row the rattling bog....\n eCloneParent.appendChild(eCellClone);\n eDummyContainer.appendChild(eCloneParent);\n };\n __decorate$1u([\n Autowired('rowRenderer')\n ], AutoWidthCalculator.prototype, \"rowRenderer\", void 0);\n __decorate$1u([\n Autowired('ctrlsService')\n ], AutoWidthCalculator.prototype, \"ctrlsService\", void 0);\n __decorate$1u([\n Autowired('rowCssClassCalculator')\n ], AutoWidthCalculator.prototype, \"rowCssClassCalculator\", void 0);\n __decorate$1u([\n PostConstruct\n ], AutoWidthCalculator.prototype, \"postConstruct\", null);\n AutoWidthCalculator = __decorate$1u([\n Bean('autoWidthCalculator')\n ], AutoWidthCalculator);\n return AutoWidthCalculator;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1I = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1v = (undefined && undefined.__decorate) || function (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};\nvar __read$d = (undefined && undefined.__read) || function (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};\nvar __spread$a = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$d(arguments[i]));\n return ar;\n};\nvar RowRenderer = /** @class */ (function (_super) {\n __extends$1I(RowRenderer, _super);\n function RowRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.destroyFuncsForColumnListeners = [];\n // map of row ids to row objects. keeps track of which elements\n // are rendered for which rows in the dom.\n _this.rowCtrlsByRowIndex = {};\n _this.zombieRowCtrls = {};\n _this.allRowCtrls = [];\n _this.topRowCtrls = [];\n _this.bottomRowCtrls = [];\n // we only allow one refresh at a time, otherwise the internal memory structure here\n // will get messed up. this can happen if the user has a cellRenderer, and inside the\n // renderer they call an API method that results in another pass of the refresh,\n // then it will be trying to draw rows in the middle of a refresh.\n _this.refreshInProgress = false;\n return _this;\n }\n RowRenderer.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function () {\n _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();\n _this.initialise();\n });\n };\n RowRenderer.prototype.initialise = function () {\n this.addManagedListener(this.eventService, Events.EVENT_PAGINATION_CHANGED, this.onPageLoaded.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_PINNED_ROW_DATA_CHANGED, this.onPinnedRowDataChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_BODY_SCROLL, this.redrawAfterScroll.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_BODY_HEIGHT_CHANGED, this.redrawAfterScroll.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.onDomLayoutChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_ROW_CLASS, this.redrawRows.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));\n this.registerCellEventListeners();\n this.initialiseCache();\n this.printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n this.embedFullWidthRows = this.printLayout || this.gridOptionsWrapper.isEmbedFullWidthRows();\n this.redrawAfterModelUpdate();\n };\n RowRenderer.prototype.initialiseCache = function () {\n if (this.gridOptionsWrapper.isKeepDetailRows()) {\n var countProp = this.gridOptionsWrapper.getKeepDetailRowsCount();\n var count = countProp != null ? countProp : 3;\n this.cachedRowCtrls = new RowCtrlCache(count);\n }\n };\n RowRenderer.prototype.getRowCtrls = function () {\n return this.allRowCtrls;\n };\n RowRenderer.prototype.updateAllRowCtrls = function () {\n var liveList = getAllValuesInObject(this.rowCtrlsByRowIndex);\n if (this.gridOptionsWrapper.isEnsureDomOrder()) {\n liveList.sort(function (a, b) { return a.getRowNode().rowIndex - b.getRowNode.rowIndex; });\n }\n var zombieList = getAllValuesInObject(this.zombieRowCtrls);\n var cachedList = this.cachedRowCtrls ? this.cachedRowCtrls.getEntries() : [];\n this.allRowCtrls = __spread$a(liveList, zombieList, cachedList);\n };\n // in a clean design, each cell would register for each of these events. however when scrolling, all the cells\n // registering and de-registering for events is a performance bottleneck. so we register here once and inform\n // all active cells.\n RowRenderer.prototype.registerCellEventListeners = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_CELL_FOCUSED, function (event) {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onCellFocused(event); });\n _this.getFullWidthRowCtrls().forEach(function (rowCtrl) {\n rowCtrl.onFullWidthRowFocused(event);\n });\n });\n this.addManagedListener(this.eventService, Events.EVENT_FLASH_CELLS, function (event) {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onFlashCells(event); });\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_HOVER_CHANGED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onColumnHover(); });\n });\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onDisplayedColumnsChanged(); });\n });\n // only for printLayout - because we are rendering all the cells in the same row, regardless of pinned state,\n // then changing the width of the containers will impact left position. eg the center cols all have their\n // left position adjusted by the width of the left pinned column, so if the pinned left column width changes,\n // all the center cols need to be shifted to accommodate this. when in normal layout, the pinned cols are\n // in different containers so doesn't impact.\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, function () {\n if (_this.printLayout) {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onLeftChanged(); });\n }\n });\n var rangeSelectionEnabled = this.gridOptionsWrapper.isEnableRangeSelection();\n if (rangeSelectionEnabled) {\n this.addManagedListener(this.eventService, Events.EVENT_RANGE_SELECTION_CHANGED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onRangeSelectionChanged(); });\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PINNED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VISIBLE, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });\n });\n }\n // add listeners to the grid columns\n this.refreshListenersToColumnsForCellComps();\n // if the grid columns change, then refresh the listeners again\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, this.refreshListenersToColumnsForCellComps.bind(this));\n this.addDestroyFunc(this.removeGridColumnListeners.bind(this));\n };\n // executes all functions in destroyFuncsForColumnListeners and then clears the list\n RowRenderer.prototype.removeGridColumnListeners = function () {\n this.destroyFuncsForColumnListeners.forEach(function (func) { return func(); });\n this.destroyFuncsForColumnListeners.length = 0;\n };\n // this function adds listeners onto all the grid columns, which are the column that we could have cellComps for.\n // when the grid columns change, we add listeners again. in an ideal design, each CellComp would just register to\n // the column it belongs to on creation, however this was a bottleneck with the number of cells, so do it here\n // once instead.\n RowRenderer.prototype.refreshListenersToColumnsForCellComps = function () {\n var _this = this;\n this.removeGridColumnListeners();\n var cols = this.columnModel.getAllGridColumns();\n if (!cols) {\n return;\n }\n cols.forEach(function (col) {\n var forEachCellWithThisCol = function (callback) {\n _this.getAllCellCtrls().forEach(function (cellCtrl) {\n if (cellCtrl.getColumn() === col) {\n callback(cellCtrl);\n }\n });\n };\n var leftChangedListener = function () {\n forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onLeftChanged(); });\n };\n var widthChangedListener = function () {\n forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onWidthChanged(); });\n };\n var firstRightPinnedChangedListener = function () {\n forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onFirstRightPinnedChanged(); });\n };\n var lastLeftPinnedChangedListener = function () {\n forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onLastLeftPinnedChanged(); });\n };\n col.addEventListener(Column.EVENT_LEFT_CHANGED, leftChangedListener);\n col.addEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n col.addEventListener(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, firstRightPinnedChangedListener);\n col.addEventListener(Column.EVENT_LAST_LEFT_PINNED_CHANGED, lastLeftPinnedChangedListener);\n _this.destroyFuncsForColumnListeners.push(function () {\n col.removeEventListener(Column.EVENT_LEFT_CHANGED, leftChangedListener);\n col.removeEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n col.removeEventListener(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, firstRightPinnedChangedListener);\n col.removeEventListener(Column.EVENT_LAST_LEFT_PINNED_CHANGED, lastLeftPinnedChangedListener);\n });\n });\n };\n RowRenderer.prototype.onDomLayoutChanged = function () {\n var printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n var embedFullWidthRows = printLayout || this.gridOptionsWrapper.isEmbedFullWidthRows();\n // if moving towards or away from print layout, means we need to destroy all rows, as rows are not laid\n // out using absolute positioning when doing print layout\n var destroyRows = embedFullWidthRows !== this.embedFullWidthRows || this.printLayout !== printLayout;\n this.printLayout = printLayout;\n this.embedFullWidthRows = embedFullWidthRows;\n if (destroyRows) {\n this.redrawAfterModelUpdate();\n }\n };\n // for row models that have datasources, when we update the datasource, we need to force the rowRenderer\n // to redraw all rows. otherwise the old rows from the old datasource will stay displayed.\n RowRenderer.prototype.datasourceChanged = function () {\n this.firstRenderedRow = 0;\n this.lastRenderedRow = -1;\n var rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);\n this.removeRowCtrls(rowIndexesToRemove);\n };\n RowRenderer.prototype.onPageLoaded = function (event) {\n var params = {\n recycleRows: event.keepRenderedRows,\n animate: event.animate,\n newData: event.newData,\n newPage: event.newPage,\n // because this is a model updated event (not pinned rows), we\n // can skip updating the pinned rows. this is needed so that if user\n // is doing transaction updates, the pinned rows are not getting constantly\n // trashed - or editing cells in pinned rows are not refreshed and put into read mode\n onlyBody: true\n };\n this.redrawAfterModelUpdate(params);\n };\n RowRenderer.prototype.getAllCellsForColumn = function (column) {\n var res = [];\n this.getAllRowCtrls().forEach(function (rowCtrl) {\n var eCell = rowCtrl.getCellElement(column);\n if (eCell) {\n res.push(eCell);\n }\n });\n return res;\n };\n RowRenderer.prototype.refreshFloatingRowComps = function () {\n this.refreshFloatingRows(this.topRowCtrls, this.pinnedRowModel.getPinnedTopRowData());\n this.refreshFloatingRows(this.bottomRowCtrls, this.pinnedRowModel.getPinnedBottomRowData());\n };\n RowRenderer.prototype.getTopRowCtrls = function () {\n return this.topRowCtrls;\n };\n RowRenderer.prototype.getBottomRowCtrls = function () {\n return this.bottomRowCtrls;\n };\n RowRenderer.prototype.refreshFloatingRows = function (rowComps, rowNodes) {\n var _this = this;\n rowComps.forEach(function (row) {\n row.destroyFirstPass();\n row.destroySecondPass();\n });\n rowComps.length = 0;\n if (!rowNodes) {\n return;\n }\n rowNodes.forEach(function (rowNode) {\n var rowCtrl = new RowCtrl(rowNode, _this.beans, false, false, _this.printLayout);\n rowComps.push(rowCtrl);\n });\n };\n RowRenderer.prototype.onPinnedRowDataChanged = function () {\n // recycling rows in order to ensure cell editing is not cancelled\n var params = {\n recycleRows: true\n };\n this.redrawAfterModelUpdate(params);\n };\n // if the row nodes are not rendered, no index is returned\n RowRenderer.prototype.getRenderedIndexesForRowNodes = function (rowNodes) {\n var result = [];\n if (missing(rowNodes)) {\n return result;\n }\n iterateObject(this.rowCtrlsByRowIndex, function (index, renderedRow) {\n var rowNode = renderedRow.getRowNode();\n if (rowNodes.indexOf(rowNode) >= 0) {\n result.push(index);\n }\n });\n return result;\n };\n RowRenderer.prototype.redrawRows = function (rowNodes) {\n // if no row nodes provided, then refresh everything\n var partialRefresh = rowNodes != null && rowNodes.length > 0;\n if (partialRefresh) {\n var indexesToRemove = this.getRenderedIndexesForRowNodes(rowNodes);\n // remove the rows\n this.removeRowCtrls(indexesToRemove);\n }\n // add draw them again\n this.redrawAfterModelUpdate({\n recycleRows: partialRefresh\n });\n };\n RowRenderer.prototype.getCellToRestoreFocusToAfterRefresh = function (params) {\n var focusedCell = params.suppressKeepFocus ? null : this.focusService.getFocusCellToUseAfterRefresh();\n if (focusedCell == null) {\n return null;\n }\n // if the dom is not actually focused on a cell, then we don't try to refocus. the problem this\n // solves is with editing - if the user is editing, eg focus is on a text field, and not on the\n // cell itself, then the cell can be registered as having focus, however it's the text field that\n // has the focus and not the cell div. therefore, when the refresh is finished, the grid will focus\n // the cell, and not the textfield. that means if the user is in a text field, and the grid refreshes,\n // the focus is lost from the text field. we do not want this.\n var eDocument = this.gridOptionsWrapper.getDocument();\n var activeElement = eDocument.activeElement;\n var cellDomData = this.gridOptionsWrapper.getDomData(activeElement, CellCtrl.DOM_DATA_KEY_CELL_CTRL);\n var rowDomData = this.gridOptionsWrapper.getDomData(activeElement, RowCtrl.DOM_DATA_KEY_ROW_CTRL);\n var gridElementFocused = cellDomData || rowDomData;\n return gridElementFocused ? focusedCell : null;\n };\n // gets called from:\n // +) initialisation (in registerGridComp) params = null\n // +) onDomLayoutChanged, params = null\n // +) onPageLoaded, recycleRows, animate, newData, newPage from event, onlyBody=true\n // +) onPinnedRowDataChanged, recycleRows = true\n // +) redrawRows (from Grid API), recycleRows = true/false\n RowRenderer.prototype.redrawAfterModelUpdate = function (params) {\n if (params === void 0) { params = {}; }\n this.getLockOnRefresh();\n var focusedCell = this.getCellToRestoreFocusToAfterRefresh(params);\n this.updateContainerHeights();\n this.scrollToTopIfNewData(params);\n // never recycle rows when print layout, we draw each row again from scratch. this is because print layout\n // uses normal dom layout to put cells into dom - it doesn't allow reordering rows.\n var recycleRows = !this.printLayout && !!params.recycleRows;\n var animate = params.animate && this.gridOptionsWrapper.isAnimateRows();\n // after modelUpdate, row indexes can change, so we clear out the rowsByIndex map,\n // however we can reuse the rows, so we keep them but index by rowNode.id\n var rowsToRecycle = recycleRows ? this.recycleRows() : null;\n if (!recycleRows) {\n this.removeAllRowComps();\n }\n var isFocusedCellGettingRecycled = function () {\n if (focusedCell == null || rowsToRecycle == null) {\n return false;\n }\n var res = false;\n iterateObject(rowsToRecycle, function (key, rowComp) {\n var rowNode = rowComp.getRowNode();\n var rowIndexEqual = rowNode.rowIndex == focusedCell.rowIndex;\n var pinnedEqual = rowNode.rowPinned == focusedCell.rowPinned;\n if (rowIndexEqual && pinnedEqual) {\n res = true;\n }\n });\n return res;\n };\n var focusedCellRecycled = isFocusedCellGettingRecycled();\n this.redraw(rowsToRecycle, animate);\n if (!params.onlyBody) {\n this.refreshFloatingRowComps();\n }\n this.dispatchDisplayedRowsChanged();\n // if we focus a cell that's already focused, then we get an unnecessary 'cellFocused' event fired.\n // this was happening when user clicked 'expand' on a rowGroup, then cellFocused was getting fired twice.\n if (!focusedCellRecycled) {\n this.restoreFocusedCell(focusedCell);\n }\n this.releaseLockOnRefresh();\n };\n RowRenderer.prototype.scrollToTopIfNewData = function (params) {\n var scrollToTop = params.newData || params.newPage;\n var suppressScrollToTop = this.gridOptionsWrapper.isSuppressScrollOnNewData();\n if (scrollToTop && !suppressScrollToTop) {\n this.gridBodyCtrl.getScrollFeature().scrollToTop();\n }\n };\n RowRenderer.prototype.updateContainerHeights = function () {\n // when doing print layout, we don't explicitly set height on the containers\n if (this.printLayout) {\n this.rowContainerHeightService.setModelHeight(null);\n return;\n }\n var containerHeight = this.paginationProxy.getCurrentPageHeight();\n // we need at least 1 pixel for the horizontal scroll to work. so if there are now rows,\n // we still want the scroll to be present, otherwise there would be no way to scroll the header\n // which might be needed us user wants to access columns\n // on the RHS - and if that was where the filter was that cause no rows to be presented, there\n // is no way to remove the filter.\n if (containerHeight === 0) {\n containerHeight = 1;\n }\n this.rowContainerHeightService.setModelHeight(containerHeight);\n };\n RowRenderer.prototype.getLockOnRefresh = function () {\n if (this.refreshInProgress) {\n throw new Error(\"AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. \" +\n \"Your code probably called a grid API method while the grid was in the render stage. To overcome \" +\n \"this, put the API call into a timeout, e.g. instead of api.redrawRows(), \" +\n \"call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code \" +\n \"that caused the refresh check this stacktrace.\");\n }\n this.refreshInProgress = true;\n };\n RowRenderer.prototype.releaseLockOnRefresh = function () {\n this.refreshInProgress = false;\n };\n RowRenderer.prototype.isRefreshInProgress = function () {\n return this.refreshInProgress;\n };\n // sets the focus to the provided cell, if the cell is provided. this way, the user can call refresh without\n // worry about the focus been lost. this is important when the user is using keyboard navigation to do edits\n // and the cellEditor is calling 'refresh' to get other cells to update (as other cells might depend on the\n // edited cell).\n RowRenderer.prototype.restoreFocusedCell = function (cellPosition) {\n if (cellPosition) {\n this.focusService.setFocusedCell(cellPosition.rowIndex, cellPosition.column, cellPosition.rowPinned, true);\n }\n };\n RowRenderer.prototype.stopEditing = function (cancel) {\n if (cancel === void 0) { cancel = false; }\n this.getAllRowCtrls().forEach(function (rowCtrl) {\n rowCtrl.stopEditing(cancel);\n });\n };\n RowRenderer.prototype.onNewColumnsLoaded = function () {\n // we don't want each cellComp to register for events, as would increase rendering time.\n // so for newColumnsLoaded, we register once here (in rowRenderer) and then inform\n // each cell if / when event was fired.\n this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onNewColumnsLoaded(); });\n };\n RowRenderer.prototype.getAllCellCtrls = function () {\n var res = [];\n this.getAllRowCtrls().forEach(function (rowCtrl) { return res = res.concat(rowCtrl.getAllCellCtrls()); });\n return res;\n };\n RowRenderer.prototype.getAllRowCtrls = function () {\n var _this = this;\n var res = __spread$a(this.topRowCtrls, this.bottomRowCtrls);\n Object.keys(this.rowCtrlsByRowIndex).forEach(function (key) { return res.push(_this.rowCtrlsByRowIndex[key]); });\n return res;\n };\n RowRenderer.prototype.addRenderedRowListener = function (eventName, rowIndex, callback) {\n var rowComp = this.rowCtrlsByRowIndex[rowIndex];\n if (rowComp) {\n rowComp.addEventListener(eventName, callback);\n }\n };\n RowRenderer.prototype.flashCells = function (params) {\n if (params === void 0) { params = {}; }\n var flashDelay = params.flashDelay, fadeDelay = params.fadeDelay;\n this.getCellCtrls(params.rowNodes, params.columns)\n .forEach(function (cellCtrl) { return cellCtrl.flashCell({ flashDelay: flashDelay, fadeDelay: fadeDelay }); });\n };\n RowRenderer.prototype.refreshCells = function (params) {\n if (params === void 0) { params = {}; }\n var refreshCellParams = {\n forceRefresh: params.force,\n newData: false,\n suppressFlash: params.suppressFlash\n };\n this.getCellCtrls(params.rowNodes, params.columns)\n .forEach(function (cellCtrl) {\n if (cellCtrl.refreshShouldDestroy()) {\n var rowCtrl = cellCtrl.getRowCtrl();\n if (rowCtrl) {\n rowCtrl.refreshCell(cellCtrl);\n }\n }\n else {\n cellCtrl.refreshCell(refreshCellParams);\n }\n });\n this.getFullWidthRowCtrls(params.rowNodes).forEach(function (fullWidthRowCtrl) {\n fullWidthRowCtrl.refreshFullWidth();\n });\n };\n RowRenderer.prototype.getCellRendererInstances = function (params) {\n var res = this.getCellCtrls(params.rowNodes, params.columns)\n .map(function (cellCtrl) { return cellCtrl.getCellRenderer(); })\n .filter(function (renderer) { return renderer != null; });\n return res;\n };\n RowRenderer.prototype.getCellEditorInstances = function (params) {\n var res = [];\n this.getCellCtrls(params.rowNodes, params.columns).forEach(function (cellCtrl) {\n var cellEditor = cellCtrl.getCellEditor();\n if (cellEditor) {\n res.push(cellEditor);\n }\n });\n return res;\n };\n RowRenderer.prototype.getEditingCells = function () {\n var res = [];\n this.getAllCellCtrls().forEach(function (cellCtrl) {\n if (cellCtrl.isEditing()) {\n var cellPosition = cellCtrl.getCellPosition();\n res.push(cellPosition);\n }\n });\n return res;\n };\n RowRenderer.prototype.mapRowNodes = function (rowNodes) {\n if (!rowNodes) {\n return;\n }\n var res = {\n top: {},\n bottom: {},\n normal: {}\n };\n rowNodes.forEach(function (rowNode) {\n var id = rowNode.id;\n if (rowNode.rowPinned === Constants.PINNED_TOP) {\n res.top[id] = rowNode;\n }\n else if (rowNode.rowPinned === Constants.PINNED_BOTTOM) {\n res.bottom[id] = rowNode;\n }\n else {\n res.normal[id] = rowNode;\n }\n });\n return res;\n };\n RowRenderer.prototype.isRowInMap = function (rowNode, rowIdsMap) {\n // skip this row if it is missing from the provided list\n var id = rowNode.id;\n var floating = rowNode.rowPinned;\n if (floating === Constants.PINNED_BOTTOM) {\n return rowIdsMap.bottom[id] != null;\n }\n else if (floating === Constants.PINNED_TOP) {\n return rowIdsMap.top[id] != null;\n }\n else {\n return rowIdsMap.normal[id] != null;\n }\n };\n // returns CellCtrl's that match the provided rowNodes and columns. eg if one row node\n // and two columns provided, that identifies 4 cells, so 4 CellCtrl's returned.\n RowRenderer.prototype.getCellCtrls = function (rowNodes, columns) {\n var _this = this;\n var rowIdsMap = this.mapRowNodes(rowNodes);\n var res = [];\n var colIdsMap;\n if (exists(columns)) {\n colIdsMap = {};\n columns.forEach(function (colKey) {\n var column = _this.columnModel.getGridColumn(colKey);\n if (exists(column)) {\n colIdsMap[column.getId()] = true;\n }\n });\n }\n var processRow = function (rowComp) {\n var rowNode = rowComp.getRowNode();\n // skip this row if it is missing from the provided list\n if (rowIdsMap != null && !_this.isRowInMap(rowNode, rowIdsMap)) {\n return;\n }\n rowComp.getAllCellCtrls().forEach(function (cellCtrl) {\n var colId = cellCtrl.getColumn().getId();\n var excludeColFromRefresh = colIdsMap && !colIdsMap[colId];\n if (excludeColFromRefresh) {\n return;\n }\n res.push(cellCtrl);\n });\n };\n iterateObject(this.rowCtrlsByRowIndex, function (index, rowComp) {\n processRow(rowComp);\n });\n if (this.topRowCtrls) {\n this.topRowCtrls.forEach(processRow);\n }\n if (this.bottomRowCtrls) {\n this.bottomRowCtrls.forEach(processRow);\n }\n return res;\n };\n RowRenderer.prototype.destroy = function () {\n this.removeAllRowComps();\n _super.prototype.destroy.call(this);\n };\n RowRenderer.prototype.removeAllRowComps = function () {\n var rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);\n this.removeRowCtrls(rowIndexesToRemove);\n };\n RowRenderer.prototype.recycleRows = function () {\n // remove all stub nodes, they can't be reused, as no rowNode id\n var stubNodeIndexes = [];\n iterateObject(this.rowCtrlsByRowIndex, function (index, rowComp) {\n var stubNode = rowComp.getRowNode().id == null;\n if (stubNode) {\n stubNodeIndexes.push(index);\n }\n });\n this.removeRowCtrls(stubNodeIndexes);\n // then clear out rowCompsByIndex, but before that take a copy, but index by id, not rowIndex\n var nodesByIdMap = {};\n iterateObject(this.rowCtrlsByRowIndex, function (index, rowComp) {\n var rowNode = rowComp.getRowNode();\n nodesByIdMap[rowNode.id] = rowComp;\n });\n this.rowCtrlsByRowIndex = {};\n return nodesByIdMap;\n };\n // takes array of row indexes\n RowRenderer.prototype.removeRowCtrls = function (rowsToRemove) {\n var _this = this;\n // if no fromIndex then set to -1, which will refresh everything\n // let realFromIndex = -1;\n rowsToRemove.forEach(function (indexToRemove) {\n var rowCtrl = _this.rowCtrlsByRowIndex[indexToRemove];\n if (rowCtrl) {\n rowCtrl.destroyFirstPass();\n rowCtrl.destroySecondPass();\n }\n delete _this.rowCtrlsByRowIndex[indexToRemove];\n });\n };\n // gets called when rows don't change, but viewport does, so after:\n // 1) height of grid body changes, ie number of displayed rows has changed\n // 2) grid scrolled to new position\n // 3) ensure index visible (which is a scroll)\n RowRenderer.prototype.redrawAfterScroll = function () {\n this.getLockOnRefresh();\n this.redraw(null, false, true);\n this.releaseLockOnRefresh();\n this.dispatchDisplayedRowsChanged();\n };\n RowRenderer.prototype.removeRowCompsNotToDraw = function (indexesToDraw) {\n // for speedy lookup, dump into map\n var indexesToDrawMap = {};\n indexesToDraw.forEach(function (index) { return (indexesToDrawMap[index] = true); });\n var existingIndexes = Object.keys(this.rowCtrlsByRowIndex);\n var indexesNotToDraw = existingIndexes.filter(function (index) { return !indexesToDrawMap[index]; });\n this.removeRowCtrls(indexesNotToDraw);\n };\n RowRenderer.prototype.calculateIndexesToDraw = function (rowsToRecycle) {\n var _this = this;\n // all in all indexes in the viewport\n var indexesToDraw = createArrayOfNumbers(this.firstRenderedRow, this.lastRenderedRow);\n var checkRowToDraw = function (indexStr, rowComp) {\n var index = rowComp.getRowNode().rowIndex;\n if (index == null) {\n return;\n }\n if (index < _this.firstRenderedRow || index > _this.lastRenderedRow) {\n if (_this.doNotUnVirtualiseRow(rowComp)) {\n indexesToDraw.push(index);\n }\n }\n };\n // if we are redrawing due to scrolling change, then old rows are in this.rowCompsByIndex\n iterateObject(this.rowCtrlsByRowIndex, checkRowToDraw);\n // if we are redrawing due to model update, then old rows are in rowsToRecycle\n iterateObject(rowsToRecycle, checkRowToDraw);\n indexesToDraw.sort(function (a, b) { return a - b; });\n return indexesToDraw;\n };\n RowRenderer.prototype.redraw = function (rowsToRecycle, animate, afterScroll) {\n var _this = this;\n if (animate === void 0) { animate = false; }\n if (afterScroll === void 0) { afterScroll = false; }\n this.rowContainerHeightService.updateOffset();\n this.workOutFirstAndLastRowsToRender();\n // the row can already exist and be in the following:\n // rowsToRecycle -> if model change, then the index may be different, however row may\n // exist here from previous time (mapped by id).\n // this.rowCompsByIndex -> if just a scroll, then this will contain what is currently in the viewport\n // this is all the indexes we want, including those that already exist, so this method\n // will end up going through each index and drawing only if the row doesn't already exist\n var indexesToDraw = this.calculateIndexesToDraw(rowsToRecycle);\n this.removeRowCompsNotToDraw(indexesToDraw);\n // never animate when doing print layout - as we want to get things ready to print as quickly as possible,\n // otherwise we risk the printer printing a row that's half faded (half way through fading in)\n if (this.printLayout) {\n animate = false;\n }\n indexesToDraw.forEach(function (rowIndex) {\n var rowCtrl = _this.createOrUpdateRowCtrl(rowIndex, rowsToRecycle, animate, afterScroll);\n if (exists(rowCtrl)) ;\n });\n if (rowsToRecycle) {\n var useAnimationFrame = afterScroll && !this.gridOptionsWrapper.isSuppressAnimationFrame() && !this.printLayout;\n if (useAnimationFrame) {\n this.beans.animationFrameService.addDestroyTask(function () {\n _this.destroyRowCtrls(rowsToRecycle, animate);\n _this.updateAllRowCtrls();\n _this.dispatchDisplayedRowsChanged();\n });\n }\n else {\n this.destroyRowCtrls(rowsToRecycle, animate);\n }\n }\n this.updateAllRowCtrls();\n this.gridBodyCtrl.updateRowCount();\n };\n RowRenderer.prototype.dispatchDisplayedRowsChanged = function () {\n var event = { type: Events.EVENT_DISPLAYED_ROWS_CHANGED };\n this.eventService.dispatchEvent(event);\n };\n RowRenderer.prototype.onDisplayedColumnsChanged = function () {\n var pinningLeft = this.columnModel.isPinningLeft();\n var pinningRight = this.columnModel.isPinningRight();\n var atLeastOneChanged = this.pinningLeft !== pinningLeft || pinningRight !== this.pinningRight;\n if (atLeastOneChanged) {\n this.pinningLeft = pinningLeft;\n this.pinningRight = pinningRight;\n if (this.embedFullWidthRows) {\n this.redrawFullWidthEmbeddedRows();\n }\n }\n };\n // when embedding, what gets showed in each section depends on what is pinned. eg if embedding group expand / collapse,\n // then it should go into the pinned left area if pinning left, or the center area if not pinning.\n RowRenderer.prototype.redrawFullWidthEmbeddedRows = function () {\n // if either of the pinned panels has shown / hidden, then need to redraw the fullWidth bits when\n // embedded, as what appears in each section depends on whether we are pinned or not\n var rowsToRemove = [];\n this.getFullWidthRowCtrls().forEach(function (fullWidthCtrl) {\n var rowIndex = fullWidthCtrl.getRowNode().rowIndex;\n rowsToRemove.push(rowIndex.toString());\n });\n this.refreshFloatingRowComps();\n this.removeRowCtrls(rowsToRemove);\n this.redrawAfterScroll();\n };\n RowRenderer.prototype.getFullWidthRowCtrls = function (rowNodes) {\n var _this = this;\n var rowNodesMap = this.mapRowNodes(rowNodes);\n return getAllValuesInObject(this.rowCtrlsByRowIndex).filter(function (rowCtrl) {\n // include just full width\n if (!rowCtrl.isFullWidth()) {\n return false;\n }\n // if Row Nodes provided, we exclude where Row Node is missing\n var rowNode = rowCtrl.getRowNode();\n if (rowNodesMap != null && !_this.isRowInMap(rowNode, rowNodesMap)) {\n return false;\n }\n return true;\n });\n };\n RowRenderer.prototype.refreshFullWidthRows = function (rowNodesToRefresh) {\n var rowsToRemove = [];\n var selectivelyRefreshing = !!rowNodesToRefresh;\n var idsToRefresh = selectivelyRefreshing ? {} : undefined;\n if (selectivelyRefreshing && idsToRefresh) {\n rowNodesToRefresh.forEach(function (r) { return idsToRefresh[r.id] = true; });\n }\n this.getFullWidthRowCtrls().forEach(function (fullWidthRowCtrl) {\n var rowNode = fullWidthRowCtrl.getRowNode();\n if (selectivelyRefreshing && idsToRefresh) {\n // we refresh if a) this node is present or b) this parents nodes is present. checking parent\n // node is important for master/detail, as we want detail to refresh on changes to parent node.\n // it's also possible, if user is provider their own fullWidth, that details panels contain\n // some info on the parent, eg if in tree data and child row shows some data from parent row also.\n var parentId = (rowNode.level > 0 && rowNode.parent) ? rowNode.parent.id : undefined;\n var skipThisNode = !idsToRefresh[rowNode.id] && !idsToRefresh[parentId];\n if (skipThisNode) {\n return;\n }\n }\n var fullWidthRowsRefreshed = fullWidthRowCtrl.refreshFullWidth();\n if (!fullWidthRowsRefreshed) {\n var rowIndex = fullWidthRowCtrl.getRowNode().rowIndex;\n rowsToRemove.push(rowIndex.toString());\n }\n });\n this.removeRowCtrls(rowsToRemove);\n this.redrawAfterScroll();\n };\n RowRenderer.prototype.createOrUpdateRowCtrl = function (rowIndex, rowsToRecycle, animate, afterScroll) {\n var rowNode;\n var rowCtrl = this.rowCtrlsByRowIndex[rowIndex];\n // if no row comp, see if we can get it from the previous rowComps\n if (!rowCtrl) {\n rowNode = this.paginationProxy.getRow(rowIndex);\n if (exists(rowNode) && exists(rowsToRecycle) && rowsToRecycle[rowNode.id] && rowNode.alreadyRendered) {\n rowCtrl = rowsToRecycle[rowNode.id];\n rowsToRecycle[rowNode.id] = null;\n }\n }\n var creatingNewRowCtrl = !rowCtrl;\n if (creatingNewRowCtrl) {\n // create a new one\n if (!rowNode) {\n rowNode = this.paginationProxy.getRow(rowIndex);\n }\n if (exists(rowNode)) {\n rowCtrl = this.createRowCon(rowNode, animate, afterScroll);\n }\n else {\n // this should never happen - if somehow we are trying to create\n // a row for a rowNode that does not exist.\n return;\n }\n }\n if (rowNode) {\n // set node as 'alreadyRendered' to ensure we only recycle rowComps that have been rendered, this ensures\n // we don't reuse rowComps that have been removed and then re-added in the same batch transaction.\n rowNode.alreadyRendered = true;\n }\n this.rowCtrlsByRowIndex[rowIndex] = rowCtrl;\n return rowCtrl;\n };\n RowRenderer.prototype.destroyRowCtrls = function (rowCtrlsMap, animate) {\n var _this = this;\n var executeInAWhileFuncs = [];\n iterateObject(rowCtrlsMap, function (nodeId, rowCtrl) {\n // if row was used, then it's null\n if (!rowCtrl) {\n return;\n }\n if (_this.cachedRowCtrls && rowCtrl.isCacheable()) {\n _this.cachedRowCtrls.addRow(rowCtrl);\n return;\n }\n rowCtrl.destroyFirstPass();\n if (animate) {\n _this.zombieRowCtrls[rowCtrl.getInstanceId()] = rowCtrl;\n executeInAWhileFuncs.push(function () {\n rowCtrl.destroySecondPass();\n delete _this.zombieRowCtrls[rowCtrl.getInstanceId()];\n });\n }\n else {\n rowCtrl.destroySecondPass();\n }\n });\n if (animate) {\n // this ensures we fire displayedRowsChanged AFTER all the 'executeInAWhileFuncs' get\n // executed, as we added it to the end of the list.\n executeInAWhileFuncs.push(function () {\n _this.updateAllRowCtrls();\n _this.dispatchDisplayedRowsChanged();\n });\n executeInAWhile(executeInAWhileFuncs);\n }\n };\n RowRenderer.prototype.workOutFirstAndLastRowsToRender = function () {\n var _this = this;\n var newFirst;\n var newLast;\n if (!this.paginationProxy.isRowsToRender()) {\n newFirst = 0;\n newLast = -1; // setting to -1 means nothing in range\n }\n else if (this.printLayout) {\n newFirst = this.paginationProxy.getPageFirstRow();\n newLast = this.paginationProxy.getPageLastRow();\n }\n else {\n var bufferPixels = this.gridOptionsWrapper.getRowBufferInPixels();\n var gridBodyCtrl = this.ctrlsService.getGridBodyCtrl();\n var suppressRowVirtualisation = this.gridOptionsWrapper.isSuppressRowVirtualisation();\n var rowHeightsChanged = false;\n var firstPixel = void 0;\n var lastPixel = void 0;\n do {\n var paginationOffset = this.paginationProxy.getPixelOffset();\n var _a = this.paginationProxy.getCurrentPagePixelRange(), pageFirstPixel = _a.pageFirstPixel, pageLastPixel = _a.pageLastPixel;\n var divStretchOffset = this.rowContainerHeightService.getDivStretchOffset();\n if (suppressRowVirtualisation) {\n firstPixel = pageFirstPixel + divStretchOffset;\n lastPixel = pageLastPixel + divStretchOffset;\n }\n else {\n var bodyVRange = gridBodyCtrl.getScrollFeature().getVScrollPosition();\n var bodyTopPixel = bodyVRange.top;\n var bodyBottomPixel = bodyVRange.bottom;\n firstPixel = Math.max(bodyTopPixel + paginationOffset - bufferPixels, pageFirstPixel) + divStretchOffset;\n lastPixel = Math.min(bodyBottomPixel + paginationOffset + bufferPixels, pageLastPixel) + divStretchOffset;\n }\n // if the rows we are about to display get their heights changed, then that upsets the calcs from above.\n rowHeightsChanged = this.ensureAllRowsInRangeHaveHeightsCalculated(firstPixel, lastPixel);\n } while (rowHeightsChanged);\n var firstRowIndex = this.paginationProxy.getRowIndexAtPixel(firstPixel);\n var lastRowIndex = this.paginationProxy.getRowIndexAtPixel(lastPixel);\n var pageFirstRow = this.paginationProxy.getPageFirstRow();\n var pageLastRow = this.paginationProxy.getPageLastRow();\n // adjust, in case buffer extended actual size\n if (firstRowIndex < pageFirstRow) {\n firstRowIndex = pageFirstRow;\n }\n if (lastRowIndex > pageLastRow) {\n lastRowIndex = pageLastRow;\n }\n newFirst = firstRowIndex;\n newLast = lastRowIndex;\n }\n // sometimes user doesn't set CSS right and ends up with grid with no height and grid ends up\n // trying to render all the rows, eg 10,000+ rows. this will kill the browser. so instead of\n // killing the browser, we limit the number of rows. just in case some use case we didn't think\n // of, we also have a property to not do this operation.\n var rowLayoutNormal = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_NORMAL;\n var suppressRowCountRestriction = this.gridOptionsWrapper.isSuppressMaxRenderedRowRestriction();\n var rowBufferMaxSize = Math.max(this.gridOptionsWrapper.getRowBuffer(), 500);\n if (rowLayoutNormal && !suppressRowCountRestriction) {\n if (newLast - newFirst > rowBufferMaxSize) {\n newLast = newFirst + rowBufferMaxSize;\n }\n }\n var firstDiffers = newFirst !== this.firstRenderedRow;\n var lastDiffers = newLast !== this.lastRenderedRow;\n if (firstDiffers || lastDiffers) {\n this.firstRenderedRow = newFirst;\n this.lastRenderedRow = newLast;\n var event_1 = {\n type: Events.EVENT_VIEWPORT_CHANGED,\n firstRow: newFirst,\n lastRow: newLast,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n // only dispatch firstDataRendered if we have actually rendered some data\n if (this.paginationProxy.isRowsToRender()) {\n var event_2 = {\n type: Events.EVENT_FIRST_DATA_RENDERED,\n firstRow: newFirst,\n lastRow: newLast,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n // added a small delay here because in some scenarios this can be fired\n // before the grid is actually rendered, causing component creation\n // on EVENT_FIRST_DATA_RENDERED to fail.\n window.setTimeout(function () { return _this.eventService.dispatchEventOnce(event_2); }, 50);\n }\n };\n RowRenderer.prototype.ensureAllRowsInRangeHaveHeightsCalculated = function (topPixel, bottomPixel) {\n // ensureRowHeightsVisible only works with CSRM, as it's the only row model that allows lazy row height calcs.\n // all the other row models just hard code so the method just returns back false\n var res = this.paginationProxy.ensureRowHeightsValid(topPixel, bottomPixel, -1, -1);\n if (res) {\n this.updateContainerHeights();\n }\n return res;\n };\n RowRenderer.prototype.getFirstVirtualRenderedRow = function () {\n return this.firstRenderedRow;\n };\n RowRenderer.prototype.getLastVirtualRenderedRow = function () {\n return this.lastRenderedRow;\n };\n // check that none of the rows to remove are editing or focused as:\n // a) if editing, we want to keep them, otherwise the user will loose the context of the edit,\n // eg user starts editing, enters some text, then scrolls down and then up, next time row rendered\n // the edit is reset - so we want to keep it rendered.\n // b) if focused, we want ot keep keyboard focus, so if user ctrl+c, it goes to clipboard,\n // otherwise the user can range select and drag (with focus cell going out of the viewport)\n // and then ctrl+c, nothing will happen if cell is removed from dom.\n // c) if detail record of master detail, as users complained that the context of detail rows\n // was getting lost when detail row out of view. eg user expands to show detail row,\n // then manipulates the detail panel (eg sorts the detail grid), then context is lost\n // after detail panel is scrolled out of / into view.\n RowRenderer.prototype.doNotUnVirtualiseRow = function (rowComp) {\n var REMOVE_ROW = false;\n var KEEP_ROW = true;\n var rowNode = rowComp.getRowNode();\n var rowHasFocus = this.focusService.isRowNodeFocused(rowNode);\n var rowIsEditing = rowComp.isEditing();\n var rowIsDetail = rowNode.detail;\n var mightWantToKeepRow = rowHasFocus || rowIsEditing || rowIsDetail;\n // if we deffo don't want to keep it,\n if (!mightWantToKeepRow) {\n return REMOVE_ROW;\n }\n // editing row, only remove if it is no longer rendered, eg filtered out or new data set.\n // the reason we want to keep is if user is scrolling up and down, we don't want to loose\n // the context of the editing in process.\n var rowNodePresent = this.paginationProxy.isRowPresent(rowNode);\n return rowNodePresent ? KEEP_ROW : REMOVE_ROW;\n };\n RowRenderer.prototype.createRowCon = function (rowNode, animate, afterScroll) {\n var rowCtrlFromCache = this.cachedRowCtrls ? this.cachedRowCtrls.getRow(rowNode) : null;\n if (rowCtrlFromCache) {\n return rowCtrlFromCache;\n }\n // we don't use animations frames for printing, so the user can put the grid into print mode\n // and immediately print - otherwise the user would have to wait for the rows to draw in the background\n // (via the animation frames) which is awkward to do from code.\n // we only do the animation frames after scrolling, as this is where we want the smooth user experience.\n // having animation frames for other times makes the grid look 'jumpy'.\n var suppressAnimationFrame = this.gridOptionsWrapper.isSuppressAnimationFrame();\n var useAnimationFrameForCreate = afterScroll && !suppressAnimationFrame && !this.printLayout;\n var res = new RowCtrl(rowNode, this.beans, animate, useAnimationFrameForCreate, this.printLayout);\n return res;\n };\n RowRenderer.prototype.getRenderedNodes = function () {\n var renderedRows = this.rowCtrlsByRowIndex;\n return Object.keys(renderedRows).map(function (key) { return renderedRows[key].getRowNode(); });\n };\n RowRenderer.prototype.getRowByPosition = function (rowPosition) {\n var rowComponent;\n switch (rowPosition.rowPinned) {\n case Constants.PINNED_TOP:\n rowComponent = this.topRowCtrls[rowPosition.rowIndex];\n break;\n case Constants.PINNED_BOTTOM:\n rowComponent = this.bottomRowCtrls[rowPosition.rowIndex];\n break;\n default:\n rowComponent = this.rowCtrlsByRowIndex[rowPosition.rowIndex];\n break;\n }\n return rowComponent;\n };\n RowRenderer.prototype.getRowNode = function (gridRow) {\n switch (gridRow.rowPinned) {\n case Constants.PINNED_TOP:\n return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];\n case Constants.PINNED_BOTTOM:\n return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];\n default:\n return this.rowModel.getRow(gridRow.rowIndex);\n }\n };\n // returns true if any row between startIndex and endIndex is rendered. used by\n // SSRM or IRM, as they don't want to purge visible blocks from cache.\n RowRenderer.prototype.isRangeInRenderedViewport = function (startIndex, endIndex) {\n // parent closed means the parent node is not expanded, thus these blocks are not visible\n var parentClosed = startIndex == null || endIndex == null;\n if (parentClosed) {\n return false;\n }\n var blockAfterViewport = startIndex > this.lastRenderedRow;\n var blockBeforeViewport = endIndex < this.firstRenderedRow;\n var blockInsideViewport = !blockBeforeViewport && !blockAfterViewport;\n return blockInsideViewport;\n };\n __decorate$1v([\n Autowired(\"paginationProxy\")\n ], RowRenderer.prototype, \"paginationProxy\", void 0);\n __decorate$1v([\n Autowired(\"columnModel\")\n ], RowRenderer.prototype, \"columnModel\", void 0);\n __decorate$1v([\n Autowired(\"pinnedRowModel\")\n ], RowRenderer.prototype, \"pinnedRowModel\", void 0);\n __decorate$1v([\n Autowired(\"rowModel\")\n ], RowRenderer.prototype, \"rowModel\", void 0);\n __decorate$1v([\n Autowired(\"focusService\")\n ], RowRenderer.prototype, \"focusService\", void 0);\n __decorate$1v([\n Autowired(\"columnApi\")\n ], RowRenderer.prototype, \"columnApi\", void 0);\n __decorate$1v([\n Autowired(\"gridApi\")\n ], RowRenderer.prototype, \"gridApi\", void 0);\n __decorate$1v([\n Autowired(\"beans\")\n ], RowRenderer.prototype, \"beans\", void 0);\n __decorate$1v([\n Autowired(\"rowContainerHeightService\")\n ], RowRenderer.prototype, \"rowContainerHeightService\", void 0);\n __decorate$1v([\n Optional(\"ctrlsService\")\n ], RowRenderer.prototype, \"ctrlsService\", void 0);\n __decorate$1v([\n PostConstruct\n ], RowRenderer.prototype, \"postConstruct\", null);\n RowRenderer = __decorate$1v([\n Bean(\"rowRenderer\")\n ], RowRenderer);\n return RowRenderer;\n}(BeanStub));\nvar RowCtrlCache = /** @class */ (function () {\n function RowCtrlCache(maxCount) {\n // map for fast access\n this.entriesMap = {};\n // list for keeping order\n this.entriesList = [];\n this.maxCount = maxCount;\n }\n RowCtrlCache.prototype.addRow = function (rowCtrl) {\n this.entriesMap[rowCtrl.getRowNode().id] = rowCtrl;\n this.entriesList.push(rowCtrl);\n rowCtrl.setCached(true);\n if (this.entriesList.length > this.maxCount) {\n var rowCtrlToDestroy = this.entriesList[0];\n rowCtrlToDestroy.destroyFirstPass();\n rowCtrlToDestroy.destroySecondPass();\n this.removeFromCache(rowCtrlToDestroy);\n }\n };\n RowCtrlCache.prototype.getRow = function (rowNode) {\n if (rowNode == null || rowNode.id == null) {\n return null;\n }\n var res = this.entriesMap[rowNode.id];\n if (!res) {\n return null;\n }\n this.removeFromCache(res);\n res.setCached(false);\n // this can happen if user reloads data, and a new RowNode is reusing\n // the same ID as the old one\n var rowNodeMismatch = res.getRowNode() != rowNode;\n return rowNodeMismatch ? null : res;\n };\n RowCtrlCache.prototype.removeFromCache = function (rowCtrl) {\n var rowNodeId = rowCtrl.getRowNode().id;\n delete this.entriesMap[rowNodeId];\n removeFromArray(this.entriesList, rowCtrl);\n };\n RowCtrlCache.prototype.getEntries = function () {\n return this.entriesList;\n };\n return RowCtrlCache;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1J = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1w = (undefined && undefined.__decorate) || function (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};\nvar ValueFormatterService = /** @class */ (function (_super) {\n __extends$1J(ValueFormatterService, _super);\n function ValueFormatterService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ValueFormatterService.prototype.formatValue = function (column, node, value, suppliedFormatter, useFormatterFromColumn) {\n if (useFormatterFromColumn === void 0) { useFormatterFromColumn = true; }\n var result = null;\n var formatter;\n var colDef = column.getColDef();\n if (suppliedFormatter) {\n // use supplied formatter if provided, e.g. set filter items can have their own value formatters\n formatter = suppliedFormatter;\n }\n else if (useFormatterFromColumn) {\n // if row is pinned, give preference to the pinned formatter\n formatter = node && node.rowPinned && colDef.pinnedRowValueFormatter ?\n colDef.pinnedRowValueFormatter : colDef.valueFormatter;\n }\n if (formatter) {\n var params = {\n value: value,\n node: node,\n data: node ? node.data : null,\n colDef: colDef,\n column: column,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n result = this.expressionService.evaluate(formatter, params);\n }\n else if (colDef.refData) {\n return colDef.refData[value] || '';\n }\n // if we don't do this, then arrays get displayed as 1,2,3, but we want 1, 2, 3 (i.e. with spaces)\n if (result == null && Array.isArray(value)) {\n result = value.join(', ');\n }\n return result;\n };\n __decorate$1w([\n Autowired('expressionService')\n ], ValueFormatterService.prototype, \"expressionService\", void 0);\n ValueFormatterService = __decorate$1w([\n Bean('valueFormatterService')\n ], ValueFormatterService);\n return ValueFormatterService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1K = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1x = (undefined && undefined.__decorate) || function (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};\nvar PinnedRowModel = /** @class */ (function (_super) {\n __extends$1K(PinnedRowModel, _super);\n function PinnedRowModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PinnedRowModel.prototype.init = function () {\n this.setPinnedTopRowData(this.gridOptionsWrapper.getPinnedTopRowData());\n this.setPinnedBottomRowData(this.gridOptionsWrapper.getPinnedBottomRowData());\n };\n PinnedRowModel.prototype.isEmpty = function (floating) {\n var rows = floating === Constants.PINNED_TOP ? this.pinnedTopRows : this.pinnedBottomRows;\n return missingOrEmpty(rows);\n };\n PinnedRowModel.prototype.isRowsToRender = function (floating) {\n return !this.isEmpty(floating);\n };\n PinnedRowModel.prototype.getRowAtPixel = function (pixel, floating) {\n var rows = floating === Constants.PINNED_TOP ? this.pinnedTopRows : this.pinnedBottomRows;\n if (missingOrEmpty(rows)) {\n return 0; // this should never happen, just in case, 0 is graceful failure\n }\n for (var i = 0; i < rows.length; i++) {\n var rowNode = rows[i];\n var rowTopPixel = rowNode.rowTop + rowNode.rowHeight - 1;\n // only need to range check against the top pixel, as we are going through the list\n // in order, first row to hit the pixel wins\n if (rowTopPixel >= pixel) {\n return i;\n }\n }\n return rows.length - 1;\n };\n PinnedRowModel.prototype.setPinnedTopRowData = function (rowData) {\n this.pinnedTopRows = this.createNodesFromData(rowData, true);\n var event = {\n type: Events.EVENT_PINNED_ROW_DATA_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n PinnedRowModel.prototype.setPinnedBottomRowData = function (rowData) {\n this.pinnedBottomRows = this.createNodesFromData(rowData, false);\n var event = {\n type: Events.EVENT_PINNED_ROW_DATA_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n PinnedRowModel.prototype.createNodesFromData = function (allData, isTop) {\n var _this = this;\n var rowNodes = [];\n if (allData) {\n var nextRowTop_1 = 0;\n allData.forEach(function (dataItem, index) {\n var rowNode = new RowNode(_this.beans);\n rowNode.data = dataItem;\n var idPrefix = isTop ? RowNode.ID_PREFIX_TOP_PINNED : RowNode.ID_PREFIX_BOTTOM_PINNED;\n rowNode.id = idPrefix + index;\n rowNode.rowPinned = isTop ? Constants.PINNED_TOP : Constants.PINNED_BOTTOM;\n rowNode.setRowTop(nextRowTop_1);\n rowNode.setRowHeight(_this.gridOptionsWrapper.getRowHeightForNode(rowNode).height);\n rowNode.setRowIndex(index);\n nextRowTop_1 += rowNode.rowHeight;\n rowNodes.push(rowNode);\n });\n }\n return rowNodes;\n };\n PinnedRowModel.prototype.getPinnedTopRowData = function () {\n return this.pinnedTopRows;\n };\n PinnedRowModel.prototype.getPinnedBottomRowData = function () {\n return this.pinnedBottomRows;\n };\n PinnedRowModel.prototype.getPinnedTopTotalHeight = function () {\n return this.getTotalHeight(this.pinnedTopRows);\n };\n PinnedRowModel.prototype.getPinnedTopRowCount = function () {\n return this.pinnedTopRows ? this.pinnedTopRows.length : 0;\n };\n PinnedRowModel.prototype.getPinnedBottomRowCount = function () {\n return this.pinnedBottomRows ? this.pinnedBottomRows.length : 0;\n };\n PinnedRowModel.prototype.getPinnedTopRow = function (index) {\n return this.pinnedTopRows[index];\n };\n PinnedRowModel.prototype.getPinnedBottomRow = function (index) {\n return this.pinnedBottomRows[index];\n };\n PinnedRowModel.prototype.forEachPinnedTopRow = function (callback) {\n if (missingOrEmpty(this.pinnedTopRows)) {\n return;\n }\n this.pinnedTopRows.forEach(callback);\n };\n PinnedRowModel.prototype.forEachPinnedBottomRow = function (callback) {\n if (missingOrEmpty(this.pinnedBottomRows)) {\n return;\n }\n this.pinnedBottomRows.forEach(callback);\n };\n PinnedRowModel.prototype.getPinnedBottomTotalHeight = function () {\n return this.getTotalHeight(this.pinnedBottomRows);\n };\n PinnedRowModel.prototype.getTotalHeight = function (rowNodes) {\n if (!rowNodes || rowNodes.length === 0) {\n return 0;\n }\n var lastNode = last(rowNodes);\n return lastNode.rowTop + lastNode.rowHeight;\n };\n __decorate$1x([\n Autowired('columnApi')\n ], PinnedRowModel.prototype, \"columnApi\", void 0);\n __decorate$1x([\n Autowired('gridApi')\n ], PinnedRowModel.prototype, \"gridApi\", void 0);\n __decorate$1x([\n Autowired('beans')\n ], PinnedRowModel.prototype, \"beans\", void 0);\n __decorate$1x([\n PostConstruct\n ], PinnedRowModel.prototype, \"init\", null);\n PinnedRowModel = __decorate$1x([\n Bean('pinnedRowModel')\n ], PinnedRowModel);\n return PinnedRowModel;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n(function (ServerSideTransactionResultStatus) {\n /** Transaction was successfully applied */\n ServerSideTransactionResultStatus[\"Applied\"] = \"Applied\";\n /**\n * Store was not found, transaction not applied.\n * Either invalid route, or the parent row has not yet been expanded.\n */\n ServerSideTransactionResultStatus[\"StoreNotFound\"] = \"StoreNotFound\";\n /**\n * Store is loading, transaction not applied.\n */\n ServerSideTransactionResultStatus[\"StoreLoading\"] = \"StoreLoading\";\n /**\n * Store is loading (as max loads exceeded), transaction not applied.\n */\n ServerSideTransactionResultStatus[\"StoreWaitingToLoad\"] = \"StoreWaitingToLoad\";\n /**\n * Store load attempt failed, transaction not applied.\n */\n ServerSideTransactionResultStatus[\"StoreLoadingFailed\"] = \"StoreLoadingFailed\";\n /**\n * Store is type Partial, which doesn't accept transactions\n */\n ServerSideTransactionResultStatus[\"StoreWrongType\"] = \"StoreWrongType\";\n /**\n * Transaction was cancelled, due to grid.\n * Callback isApplyServerSideTransaction() returning false\n */\n ServerSideTransactionResultStatus[\"Cancelled\"] = \"Cancelled\";\n})(exports.ServerSideTransactionResultStatus || (exports.ServerSideTransactionResultStatus = {}));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n// when doing transactions, or change detection, and grouping is present\n// in the data, there is no need for the ClientSideRowModel to update each\n// group after an update, ony parts that were impacted by the change.\n// this class keeps track of all groups that were impacted by a transaction.\n// the the different CSRM operations (filter, sort etc) use the forEach method\n// to visit each group that was changed.\nvar ChangedPath = /** @class */ (function () {\n function ChangedPath(keepingColumns, rootNode) {\n // whether changed path is active of not. it is active when a) doing\n // a transaction update or b) doing change detection. if we are doing\n // a CSRM refresh for other reasons (after sort or filter, or user calling\n // setRowData() without delta mode) then we are not active. we are also\n // marked as not active if secondary columns change in pivot (as this impacts\n // aggregations)\n this.active = true;\n // for each node in the change path, we also store which columns need\n // to be re-aggregated.\n this.nodeIdsToColumns = {};\n // for quick lookup, all items in the change path are mapped by nodeId\n this.mapToItems = {};\n this.keepingColumns = keepingColumns;\n this.pathRoot = {\n rowNode: rootNode,\n children: null\n };\n this.mapToItems[rootNode.id] = this.pathRoot;\n }\n // can be set inactive by:\n // a) ClientSideRowModel, if no transactions or\n // b) PivotService, if secondary columns changed\n ChangedPath.prototype.setInactive = function () {\n this.active = false;\n };\n ChangedPath.prototype.isActive = function () {\n return this.active;\n };\n ChangedPath.prototype.depthFirstSearchChangedPath = function (pathItem, callback) {\n if (pathItem.children) {\n for (var i = 0; i < pathItem.children.length; i++) {\n this.depthFirstSearchChangedPath(pathItem.children[i], callback);\n }\n }\n callback(pathItem.rowNode);\n };\n ChangedPath.prototype.depthFirstSearchEverything = function (rowNode, callback, traverseEverything) {\n if (rowNode.childrenAfterGroup) {\n for (var i = 0; i < rowNode.childrenAfterGroup.length; i++) {\n var childNode = rowNode.childrenAfterGroup[i];\n if (childNode.childrenAfterGroup) {\n this.depthFirstSearchEverything(rowNode.childrenAfterGroup[i], callback, traverseEverything);\n }\n else if (traverseEverything) {\n callback(childNode);\n }\n }\n }\n callback(rowNode);\n };\n // traverseLeafNodes -> used when NOT doing changed path, ie traversing everything. the callback\n // will be called for child nodes in addition to parent nodes.\n ChangedPath.prototype.forEachChangedNodeDepthFirst = function (callback, traverseLeafNodes) {\n if (traverseLeafNodes === void 0) { traverseLeafNodes = false; }\n if (this.active) {\n // if we are active, then use the change path to callback\n // only for updated groups\n this.depthFirstSearchChangedPath(this.pathRoot, callback);\n }\n else {\n // we are not active, so callback for everything, walk the entire path\n this.depthFirstSearchEverything(this.pathRoot.rowNode, callback, traverseLeafNodes);\n }\n };\n ChangedPath.prototype.executeFromRootNode = function (callback) {\n callback(this.pathRoot.rowNode);\n };\n ChangedPath.prototype.createPathItems = function (rowNode) {\n var pointer = rowNode;\n var newEntryCount = 0;\n while (!this.mapToItems[pointer.id]) {\n var newEntry = {\n rowNode: pointer,\n children: null\n };\n this.mapToItems[pointer.id] = newEntry;\n newEntryCount++;\n pointer = pointer.parent;\n }\n return newEntryCount;\n };\n ChangedPath.prototype.populateColumnsMap = function (rowNode, columns) {\n var _this = this;\n if (!this.keepingColumns || !columns) {\n return;\n }\n var pointer = rowNode;\n while (pointer) {\n // if columns, add the columns in all the way to parent, merging\n // in any other columns that might be there already\n if (!this.nodeIdsToColumns[pointer.id]) {\n this.nodeIdsToColumns[pointer.id] = {};\n }\n columns.forEach(function (col) { return _this.nodeIdsToColumns[pointer.id][col.getId()] = true; });\n pointer = pointer.parent;\n }\n };\n ChangedPath.prototype.linkPathItems = function (rowNode, newEntryCount) {\n var pointer = rowNode;\n for (var i = 0; i < newEntryCount; i++) {\n var thisItem = this.mapToItems[pointer.id];\n var parentItem = this.mapToItems[pointer.parent.id];\n if (!parentItem.children) {\n parentItem.children = [];\n }\n parentItem.children.push(thisItem);\n pointer = pointer.parent;\n }\n };\n // called by\n // 1) change detection (provides cols) and\n // 2) groupStage if doing transaction update (doesn't provide cols)\n ChangedPath.prototype.addParentNode = function (rowNode, columns) {\n if (!rowNode || rowNode.isRowPinned()) {\n return;\n }\n // we cannot do both steps below in the same loop as\n // the second loop has a dependency on the first loop.\n // ie the hierarchy cannot be stitched up yet because\n // we don't have it built yet\n // create the new PathItem objects.\n var newEntryCount = this.createPathItems(rowNode);\n // link in the node items\n this.linkPathItems(rowNode, newEntryCount);\n // update columns\n this.populateColumnsMap(rowNode, columns);\n };\n ChangedPath.prototype.canSkip = function (rowNode) {\n return this.active && !this.mapToItems[rowNode.id];\n };\n ChangedPath.prototype.getValueColumnsForNode = function (rowNode, valueColumns) {\n if (!this.keepingColumns) {\n return valueColumns;\n }\n var colsForThisNode = this.nodeIdsToColumns[rowNode.id];\n var result = valueColumns.filter(function (col) { return colsForThisNode[col.getId()]; });\n return result;\n };\n ChangedPath.prototype.getNotValueColumnsForNode = function (rowNode, valueColumns) {\n if (!this.keepingColumns) {\n return null;\n }\n var colsForThisNode = this.nodeIdsToColumns[rowNode.id];\n var result = valueColumns.filter(function (col) { return !colsForThisNode[col.getId()]; });\n return result;\n };\n return ChangedPath;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1L = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar RowNodeBlock = /** @class */ (function (_super) {\n __extends$1L(RowNodeBlock, _super);\n function RowNodeBlock(id) {\n var _this = _super.call(this) || this;\n _this.state = RowNodeBlock.STATE_WAITING_TO_LOAD;\n _this.version = 0;\n _this.id = id;\n return _this;\n }\n RowNodeBlock.prototype.getId = function () {\n return this.id;\n };\n RowNodeBlock.prototype.load = function () {\n this.state = RowNodeBlock.STATE_LOADING;\n this.loadFromDatasource();\n };\n RowNodeBlock.prototype.getVersion = function () {\n return this.version;\n };\n RowNodeBlock.prototype.setStateWaitingToLoad = function () {\n // in case any current loads in progress, this will have their results ignored\n this.version++;\n this.state = RowNodeBlock.STATE_WAITING_TO_LOAD;\n };\n RowNodeBlock.prototype.getState = function () {\n return this.state;\n };\n RowNodeBlock.prototype.pageLoadFailed = function (version) {\n var requestMostRecentAndLive = this.isRequestMostRecentAndLive(version);\n if (requestMostRecentAndLive) {\n this.state = RowNodeBlock.STATE_FAILED;\n this.processServerFail();\n }\n this.dispatchLoadCompleted(false);\n };\n RowNodeBlock.prototype.success = function (version, params) {\n this.successCommon(version, params);\n };\n RowNodeBlock.prototype.pageLoaded = function (version, rows, lastRow) {\n this.successCommon(version, { rowData: rows, rowCount: lastRow });\n };\n RowNodeBlock.prototype.isRequestMostRecentAndLive = function (version) {\n // thisIsMostRecentRequest - if block was refreshed, then another request\n // could of been sent after this one.\n var thisIsMostRecentRequest = version === this.version;\n // weAreNotDestroyed - if InfiniteStore is purged, then blocks are destroyed\n // and new blocks created. so data loads of old blocks are discarded.\n var weAreNotDestroyed = this.isAlive();\n return thisIsMostRecentRequest && weAreNotDestroyed;\n };\n RowNodeBlock.prototype.successCommon = function (version, params) {\n // need to dispatch load complete before processing the data, as PaginationComp checks\n // RowNodeBlockLoader to see if it is still loading, so the RowNodeBlockLoader needs to\n // be updated first (via LoadComplete event) before PaginationComp updates (via processServerResult method)\n this.dispatchLoadCompleted();\n var requestMostRecentAndLive = this.isRequestMostRecentAndLive(version);\n if (requestMostRecentAndLive) {\n this.state = RowNodeBlock.STATE_LOADED;\n this.processServerResult(params);\n }\n };\n RowNodeBlock.prototype.dispatchLoadCompleted = function (success) {\n if (success === void 0) { success = true; }\n // we fire event regardless of processing data or now, as we want\n // the concurrentLoadRequests count to be reduced in BlockLoader\n var event = {\n type: RowNodeBlock.EVENT_LOAD_COMPLETE,\n success: success,\n block: this\n };\n this.dispatchEvent(event);\n };\n RowNodeBlock.EVENT_LOAD_COMPLETE = 'loadComplete';\n RowNodeBlock.STATE_WAITING_TO_LOAD = 'needsLoading';\n RowNodeBlock.STATE_LOADING = 'loading';\n RowNodeBlock.STATE_LOADED = 'loaded';\n RowNodeBlock.STATE_FAILED = 'failed';\n return RowNodeBlock;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1M = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1y = (undefined && undefined.__decorate) || function (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};\nvar __param$4 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar RowNodeBlockLoader = /** @class */ (function (_super) {\n __extends$1M(RowNodeBlockLoader, _super);\n function RowNodeBlockLoader() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.activeBlockLoadsCount = 0;\n _this.blocks = [];\n _this.active = true;\n return _this;\n }\n RowNodeBlockLoader_1 = RowNodeBlockLoader;\n RowNodeBlockLoader.prototype.postConstruct = function () {\n this.maxConcurrentRequests = this.gridOptionsWrapper.getMaxConcurrentDatasourceRequests();\n var blockLoadDebounceMillis = this.gridOptionsWrapper.getBlockLoadDebounceMillis();\n if (blockLoadDebounceMillis && blockLoadDebounceMillis > 0) {\n this.checkBlockToLoadDebounce = _.debounce(this.performCheckBlocksToLoad.bind(this), blockLoadDebounceMillis);\n }\n };\n RowNodeBlockLoader.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('RowNodeBlockLoader');\n };\n RowNodeBlockLoader.prototype.addBlock = function (block) {\n this.blocks.push(block);\n // note that we do not remove this listener when removing the block. this is because the\n // cache can get destroyed (and containing blocks) when a block is loading. however the loading block\n // is still counted as an active loading block and we must decrement activeBlockLoadsCount when it finishes.\n block.addEventListener(RowNodeBlock.EVENT_LOAD_COMPLETE, this.loadComplete.bind(this));\n this.checkBlockToLoad();\n };\n RowNodeBlockLoader.prototype.removeBlock = function (block) {\n _.removeFromArray(this.blocks, block);\n };\n RowNodeBlockLoader.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.active = false;\n };\n RowNodeBlockLoader.prototype.loadComplete = function () {\n this.activeBlockLoadsCount--;\n this.checkBlockToLoad();\n if (this.activeBlockLoadsCount == 0) {\n this.dispatchEvent({ type: RowNodeBlockLoader_1.BLOCK_LOADER_FINISHED_EVENT });\n }\n };\n RowNodeBlockLoader.prototype.checkBlockToLoad = function () {\n if (this.checkBlockToLoadDebounce) {\n this.checkBlockToLoadDebounce();\n }\n else {\n this.performCheckBlocksToLoad();\n }\n };\n RowNodeBlockLoader.prototype.performCheckBlocksToLoad = function () {\n if (!this.active) {\n return;\n }\n this.printCacheStatus();\n if (this.maxConcurrentRequests != null && this.activeBlockLoadsCount >= this.maxConcurrentRequests) {\n this.logger.log(\"checkBlockToLoad: max loads exceeded\");\n return;\n }\n var blockToLoad = null;\n this.blocks.forEach(function (block) {\n if (block.getState() === RowNodeBlock.STATE_WAITING_TO_LOAD) {\n blockToLoad = block;\n }\n });\n if (blockToLoad) {\n blockToLoad.load();\n this.activeBlockLoadsCount++;\n this.printCacheStatus();\n }\n };\n RowNodeBlockLoader.prototype.getBlockState = function () {\n var result = {};\n this.blocks.forEach(function (block) {\n var _a = block.getBlockStateJson(), id = _a.id, state = _a.state;\n result[id] = state;\n });\n return result;\n };\n RowNodeBlockLoader.prototype.printCacheStatus = function () {\n if (this.logger.isLogging()) {\n this.logger.log(\"printCacheStatus: activePageLoadsCount = \" + this.activeBlockLoadsCount + \",\"\n + (\" blocks = \" + JSON.stringify(this.getBlockState())));\n }\n };\n RowNodeBlockLoader.prototype.isLoading = function () {\n return this.activeBlockLoadsCount > 0;\n };\n var RowNodeBlockLoader_1;\n RowNodeBlockLoader.BLOCK_LOADER_FINISHED_EVENT = 'blockLoaderFinished';\n __decorate$1y([\n PostConstruct\n ], RowNodeBlockLoader.prototype, \"postConstruct\", null);\n __decorate$1y([\n __param$4(0, Qualifier('loggerFactory'))\n ], RowNodeBlockLoader.prototype, \"setBeans\", null);\n RowNodeBlockLoader = RowNodeBlockLoader_1 = __decorate$1y([\n Bean('rowNodeBlockLoader')\n ], RowNodeBlockLoader);\n return RowNodeBlockLoader;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1N = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1z = (undefined && undefined.__decorate) || function (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};\nvar PaginationProxy = /** @class */ (function (_super) {\n __extends$1N(PaginationProxy, _super);\n function PaginationProxy() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.currentPage = 0;\n _this.topDisplayedRowIndex = 0;\n _this.bottomDisplayedRowIndex = 0;\n _this.pixelOffset = 0;\n _this.masterRowCount = 0;\n return _this;\n }\n PaginationProxy.prototype.postConstruct = function () {\n this.active = this.gridOptionsWrapper.isPagination();\n this.paginateChildRows = this.gridOptionsWrapper.isPaginateChildRows();\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.onModelUpdated.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, 'paginationPageSize', this.onPaginationPageSizeChanged.bind(this));\n this.onModelUpdated();\n };\n PaginationProxy.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {\n var res = this.rowModel.ensureRowHeightsValid(startPixel, endPixel, this.getPageFirstRow(), this.getPageLastRow());\n if (res) {\n this.calculatePages();\n }\n return res;\n };\n PaginationProxy.prototype.onModelUpdated = function (modelUpdatedEvent) {\n this.calculatePages();\n var paginationChangedEvent = {\n type: Events.EVENT_PAGINATION_CHANGED,\n animate: modelUpdatedEvent ? modelUpdatedEvent.animate : false,\n newData: modelUpdatedEvent ? modelUpdatedEvent.newData : false,\n newPage: modelUpdatedEvent ? modelUpdatedEvent.newPage : false,\n keepRenderedRows: modelUpdatedEvent ? modelUpdatedEvent.keepRenderedRows : false,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(paginationChangedEvent);\n };\n PaginationProxy.prototype.onPaginationPageSizeChanged = function () {\n this.calculatePages();\n var paginationChangedEvent = {\n type: Events.EVENT_PAGINATION_CHANGED,\n animate: false,\n newData: false,\n newPage: false,\n // important to keep rendered rows, otherwise every time grid is resized,\n // we would destroy all the rows.\n keepRenderedRows: true,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(paginationChangedEvent);\n };\n PaginationProxy.prototype.goToPage = function (page) {\n if (!this.active || this.currentPage === page) {\n return;\n }\n this.currentPage = page;\n var event = {\n type: Events.EVENT_MODEL_UPDATED,\n animate: false,\n keepRenderedRows: false,\n newData: false,\n newPage: true,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.onModelUpdated(event);\n };\n PaginationProxy.prototype.getPixelOffset = function () {\n return this.pixelOffset;\n };\n PaginationProxy.prototype.getRow = function (index) {\n return this.rowModel.getRow(index);\n };\n PaginationProxy.prototype.getRowNode = function (id) {\n return this.rowModel.getRowNode(id);\n };\n PaginationProxy.prototype.getRowIndexAtPixel = function (pixel) {\n return this.rowModel.getRowIndexAtPixel(pixel);\n };\n PaginationProxy.prototype.getCurrentPageHeight = function () {\n if (missing(this.topRowBounds) || missing(this.bottomRowBounds)) {\n return 0;\n }\n return Math.max(this.bottomRowBounds.rowTop + this.bottomRowBounds.rowHeight - this.topRowBounds.rowTop, 0);\n };\n PaginationProxy.prototype.getCurrentPagePixelRange = function () {\n var pageFirstPixel = this.topRowBounds ? this.topRowBounds.rowTop : 0;\n var pageLastPixel = this.bottomRowBounds ? this.bottomRowBounds.rowTop + this.bottomRowBounds.rowHeight : 0;\n return { pageFirstPixel: pageFirstPixel, pageLastPixel: pageLastPixel };\n };\n PaginationProxy.prototype.isRowPresent = function (rowNode) {\n if (!this.rowModel.isRowPresent(rowNode)) {\n return false;\n }\n var nodeIsInPage = rowNode.rowIndex >= this.topDisplayedRowIndex && rowNode.rowIndex <= this.bottomDisplayedRowIndex;\n return nodeIsInPage;\n };\n PaginationProxy.prototype.isEmpty = function () {\n return this.rowModel.isEmpty();\n };\n PaginationProxy.prototype.isRowsToRender = function () {\n return this.rowModel.isRowsToRender();\n };\n PaginationProxy.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {\n return this.rowModel.getNodesInRangeForSelection(firstInRange, lastInRange);\n };\n PaginationProxy.prototype.forEachNode = function (callback) {\n return this.rowModel.forEachNode(callback);\n };\n PaginationProxy.prototype.getType = function () {\n return this.rowModel.getType();\n };\n PaginationProxy.prototype.getRowBounds = function (index) {\n var res = this.rowModel.getRowBounds(index);\n res.rowIndex = index;\n return res;\n };\n PaginationProxy.prototype.getPageFirstRow = function () {\n return this.topRowBounds ? this.topRowBounds.rowIndex : -1;\n };\n PaginationProxy.prototype.getPageLastRow = function () {\n return this.bottomRowBounds ? this.bottomRowBounds.rowIndex : -1;\n };\n PaginationProxy.prototype.getRowCount = function () {\n return this.rowModel.getRowCount();\n };\n PaginationProxy.prototype.getPageForIndex = function (index) {\n return Math.floor(index / this.pageSize);\n };\n PaginationProxy.prototype.goToPageWithIndex = function (index) {\n if (!this.active) {\n return;\n }\n var pageNumber = this.getPageForIndex(index);\n this.goToPage(pageNumber);\n };\n PaginationProxy.prototype.isRowInPage = function (row) {\n if (!this.active) {\n return true;\n }\n var rowPage = this.getPageForIndex(row.rowIndex);\n return rowPage === this.currentPage;\n };\n PaginationProxy.prototype.isLastPageFound = function () {\n return this.rowModel.isLastRowIndexKnown();\n };\n PaginationProxy.prototype.getCurrentPage = function () {\n return this.currentPage;\n };\n PaginationProxy.prototype.goToNextPage = function () {\n this.goToPage(this.currentPage + 1);\n };\n PaginationProxy.prototype.goToPreviousPage = function () {\n this.goToPage(this.currentPage - 1);\n };\n PaginationProxy.prototype.goToFirstPage = function () {\n this.goToPage(0);\n };\n PaginationProxy.prototype.goToLastPage = function () {\n var rowCount = this.rowModel.getRowCount();\n var lastPage = Math.floor(rowCount / this.pageSize);\n this.goToPage(lastPage);\n };\n PaginationProxy.prototype.getPageSize = function () {\n return this.pageSize;\n };\n PaginationProxy.prototype.getTotalPages = function () {\n return this.totalPages;\n };\n PaginationProxy.prototype.setPageSize = function () {\n // show put this into super class\n this.pageSize = this.gridOptionsWrapper.getPaginationPageSize();\n if (this.pageSize == null || this.pageSize < 1) {\n this.pageSize = 100;\n }\n };\n PaginationProxy.prototype.calculatePages = function () {\n if (this.active) {\n this.setPageSize();\n if (this.paginateChildRows) {\n this.calculatePagesAllRows();\n }\n else {\n this.calculatePagesMasterRowsOnly();\n }\n }\n else {\n this.calculatedPagesNotActive();\n }\n this.topRowBounds = this.rowModel.getRowBounds(this.topDisplayedRowIndex);\n if (this.topRowBounds) {\n this.topRowBounds.rowIndex = this.topDisplayedRowIndex;\n }\n this.bottomRowBounds = this.rowModel.getRowBounds(this.bottomDisplayedRowIndex);\n if (this.bottomRowBounds) {\n this.bottomRowBounds.rowIndex = this.bottomDisplayedRowIndex;\n }\n this.setPixelOffset(exists(this.topRowBounds) ? this.topRowBounds.rowTop : 0);\n };\n PaginationProxy.prototype.setPixelOffset = function (value) {\n if (this.pixelOffset === value) {\n return;\n }\n this.pixelOffset = value;\n this.eventService.dispatchEvent({ type: Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED });\n };\n PaginationProxy.prototype.setZeroRows = function () {\n this.masterRowCount = 0;\n this.topDisplayedRowIndex = 0;\n this.bottomDisplayedRowIndex = -1;\n this.currentPage = 0;\n this.totalPages = 0;\n };\n PaginationProxy.prototype.calculatePagesMasterRowsOnly = function () {\n // const csrm = this.rowModel;\n // const rootNode = csrm.getRootNode();\n // const masterRows = rootNode.childrenAfterSort;\n this.masterRowCount = this.rowModel.getTopLevelRowCount();\n // we say <=0 (rather than =0) as viewport returns -1 when no rows\n if (this.masterRowCount <= 0) {\n this.setZeroRows();\n return;\n }\n var masterLastRowIndex = this.masterRowCount - 1;\n this.totalPages = Math.floor((masterLastRowIndex) / this.pageSize) + 1;\n if (this.currentPage >= this.totalPages) {\n this.currentPage = this.totalPages - 1;\n }\n if (!isNumeric(this.currentPage) || this.currentPage < 0) {\n this.currentPage = 0;\n }\n var masterPageStartIndex = this.pageSize * this.currentPage;\n var masterPageEndIndex = (this.pageSize * (this.currentPage + 1)) - 1;\n if (masterPageEndIndex > masterLastRowIndex) {\n masterPageEndIndex = masterLastRowIndex;\n }\n this.topDisplayedRowIndex = this.rowModel.getTopLevelRowDisplayedIndex(masterPageStartIndex);\n // masterRows[masterPageStartIndex].rowIndex;\n if (masterPageEndIndex === masterLastRowIndex) {\n // if showing the last master row, then we want to show the very last row of the model\n this.bottomDisplayedRowIndex = this.rowModel.getRowCount() - 1;\n }\n else {\n var firstIndexNotToShow = this.rowModel.getTopLevelRowDisplayedIndex(masterPageEndIndex + 1);\n //masterRows[masterPageEndIndex + 1].rowIndex;\n // this gets the index of the last child - eg current row is open, we want to display all children,\n // the index of the last child is one less than the index of the next parent row.\n this.bottomDisplayedRowIndex = firstIndexNotToShow - 1;\n }\n };\n PaginationProxy.prototype.getMasterRowCount = function () {\n return this.masterRowCount;\n };\n PaginationProxy.prototype.calculatePagesAllRows = function () {\n this.masterRowCount = this.rowModel.getRowCount();\n if (this.masterRowCount === 0) {\n this.setZeroRows();\n return;\n }\n var maxRowIndex = this.masterRowCount - 1;\n this.totalPages = Math.floor((maxRowIndex) / this.pageSize) + 1;\n if (this.currentPage >= this.totalPages) {\n this.currentPage = this.totalPages - 1;\n }\n if (!isNumeric(this.currentPage) || this.currentPage < 0) {\n this.currentPage = 0;\n }\n this.topDisplayedRowIndex = this.pageSize * this.currentPage;\n this.bottomDisplayedRowIndex = (this.pageSize * (this.currentPage + 1)) - 1;\n if (this.bottomDisplayedRowIndex > maxRowIndex) {\n this.bottomDisplayedRowIndex = maxRowIndex;\n }\n };\n PaginationProxy.prototype.calculatedPagesNotActive = function () {\n this.pageSize = this.rowModel.getRowCount();\n this.totalPages = 1;\n this.currentPage = 0;\n this.topDisplayedRowIndex = 0;\n this.bottomDisplayedRowIndex = this.rowModel.getRowCount() - 1;\n };\n __decorate$1z([\n Autowired('rowModel')\n ], PaginationProxy.prototype, \"rowModel\", void 0);\n __decorate$1z([\n Autowired('columnApi')\n ], PaginationProxy.prototype, \"columnApi\", void 0);\n __decorate$1z([\n Autowired('gridApi')\n ], PaginationProxy.prototype, \"gridApi\", void 0);\n __decorate$1z([\n PostConstruct\n ], PaginationProxy.prototype, \"postConstruct\", null);\n PaginationProxy = __decorate$1z([\n Bean('paginationProxy')\n ], PaginationProxy);\n return PaginationProxy;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1O = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1A = (undefined && undefined.__decorate) || function (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};\nvar StylingService = /** @class */ (function (_super) {\n __extends$1O(StylingService, _super);\n function StylingService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StylingService.prototype.processAllCellClasses = function (colDef, params, onApplicableClass, onNotApplicableClass) {\n this.processClassRules(colDef.cellClassRules, params, onApplicableClass, onNotApplicableClass);\n this.processStaticCellClasses(colDef, params, onApplicableClass);\n };\n StylingService.prototype.processClassRules = function (classRules, params, onApplicableClass, onNotApplicableClass) {\n if (classRules == null) {\n return;\n }\n var classNames = Object.keys(classRules);\n var classesToApply = {};\n var classesToRemove = {};\n var _loop_1 = function (i) {\n var className = classNames[i];\n var rule = classRules[className];\n var resultOfRule;\n if (typeof rule === 'string') {\n resultOfRule = this_1.expressionService.evaluate(rule, params);\n }\n else if (typeof rule === 'function') {\n resultOfRule = rule(params);\n }\n // in case className = 'my-class1 my-class2', we need to split into individual class names\n className.split(' ').forEach(function (singleClass) {\n if (singleClass == null || singleClass.trim() == '') {\n return;\n }\n resultOfRule ? classesToApply[singleClass] = true : classesToRemove[singleClass] = true;\n });\n };\n var this_1 = this;\n for (var i = 0; i < classNames.length; i++) {\n _loop_1(i);\n }\n // we remove all classes first, then add all classes second,\n // in case a class appears in more than one rule, this means it will be added\n // if appears in at least one truthy rule\n if (onNotApplicableClass) {\n Object.keys(classesToRemove).forEach(onNotApplicableClass);\n }\n Object.keys(classesToApply).forEach(onApplicableClass);\n };\n StylingService.prototype.getStaticCellClasses = function (colDef, params) {\n var cellClass = colDef.cellClass;\n if (!cellClass) {\n return [];\n }\n var classOrClasses;\n if (typeof cellClass === 'function') {\n var cellClassFunc = cellClass;\n classOrClasses = cellClassFunc(params);\n }\n else {\n classOrClasses = cellClass;\n }\n if (typeof classOrClasses === 'string') {\n classOrClasses = [classOrClasses];\n }\n return classOrClasses || [];\n };\n StylingService.prototype.processStaticCellClasses = function (colDef, params, onApplicableClass) {\n var classOrClasses = this.getStaticCellClasses(colDef, params);\n classOrClasses.forEach(function (cssClassItem) {\n onApplicableClass(cssClassItem);\n });\n };\n __decorate$1A([\n Autowired('expressionService')\n ], StylingService.prototype, \"expressionService\", void 0);\n StylingService = __decorate$1A([\n Bean('stylingService')\n ], StylingService);\n return StylingService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1P = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgRadioButton = /** @class */ (function (_super) {\n __extends$1P(AgRadioButton, _super);\n function AgRadioButton(config) {\n return _super.call(this, config, 'ag-radio-button', 'radio') || this;\n }\n AgRadioButton.prototype.isSelected = function () {\n return this.eInput.checked;\n };\n AgRadioButton.prototype.toggle = function () {\n if (this.eInput.disabled) {\n return;\n }\n // do not allow an active radio button to be deselected\n if (!this.isSelected()) {\n this.setValue(true);\n }\n };\n AgRadioButton.prototype.addInputListeners = function () {\n _super.prototype.addInputListeners.call(this);\n this.addManagedListener(this.eventService, Events.EVENT_CHECKBOX_CHANGED, this.onChange.bind(this));\n };\n /**\n * This ensures that if another radio button in the same named group is selected, we deselect this radio button.\n * By default the browser does this for you, but we are managing classes ourselves in order to ensure input\n * elements are styled correctly in IE11, and the DOM 'changed' event is only fired when a button is selected,\n * not deselected, so we need to use our own event.\n */\n AgRadioButton.prototype.onChange = function (event) {\n if (event.selected &&\n event.name &&\n this.eInput.name &&\n this.eInput.name === event.name &&\n event.id &&\n this.eInput.id !== event.id) {\n this.setValue(false, true);\n }\n };\n return AgRadioButton;\n}(AgCheckbox));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1Q = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgToggleButton = /** @class */ (function (_super) {\n __extends$1Q(AgToggleButton, _super);\n function AgToggleButton(config) {\n return _super.call(this, config, 'ag-toggle-button') || this;\n }\n AgToggleButton.prototype.setValue = function (value, silent) {\n _super.prototype.setValue.call(this, value, silent);\n this.addOrRemoveCssClass('ag-selected', this.getValue());\n return this;\n };\n return AgToggleButton;\n}(AgCheckbox));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1R = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgInputTextField = /** @class */ (function (_super) {\n __extends$1R(AgInputTextField, _super);\n function AgInputTextField(config, className, inputType) {\n if (className === void 0) { className = 'ag-text-field'; }\n if (inputType === void 0) { inputType = 'text'; }\n return _super.call(this, config, className, inputType) || this;\n }\n AgInputTextField.prototype.postConstruct = function () {\n _super.prototype.postConstruct.call(this);\n if (this.config.allowedCharPattern) {\n this.preventDisallowedCharacters();\n }\n };\n AgInputTextField.prototype.setValue = function (value, silent) {\n var ret = _super.prototype.setValue.call(this, value, silent);\n if (this.eInput.value !== value) {\n this.eInput.value = exists(value) ? value : '';\n }\n return ret;\n };\n AgInputTextField.prototype.preventDisallowedCharacters = function () {\n var pattern = new RegExp(\"[\" + this.config.allowedCharPattern + \"]\");\n var preventDisallowedCharacters = function (event) {\n if (event.key && !pattern.test(event.key)) {\n event.preventDefault();\n }\n };\n this.addManagedListener(this.eInput, 'keypress', preventDisallowedCharacters);\n this.addManagedListener(this.eInput, 'paste', function (e) {\n var _a;\n var text = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');\n if (text && text.split('').some(function (c) { return !pattern.test(c); })) {\n e.preventDefault();\n }\n });\n };\n return AgInputTextField;\n}(AgAbstractInputField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1S = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgInputTextArea = /** @class */ (function (_super) {\n __extends$1S(AgInputTextArea, _super);\n function AgInputTextArea(config) {\n return _super.call(this, config, 'ag-text-area', null, 'textarea') || this;\n }\n AgInputTextArea.prototype.setValue = function (value, silent) {\n var ret = _super.prototype.setValue.call(this, value, silent);\n this.eInput.value = value;\n return ret;\n };\n AgInputTextArea.prototype.setCols = function (cols) {\n this.eInput.cols = cols;\n return this;\n };\n AgInputTextArea.prototype.setRows = function (rows) {\n this.eInput.rows = rows;\n return this;\n };\n return AgInputTextArea;\n}(AgAbstractInputField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1T = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgInputNumberField = /** @class */ (function (_super) {\n __extends$1T(AgInputNumberField, _super);\n function AgInputNumberField(config) {\n return _super.call(this, config, 'ag-number-field', 'number') || this;\n }\n AgInputNumberField.prototype.postConstruct = function () {\n var _this = this;\n _super.prototype.postConstruct.call(this);\n this.addManagedListener(this.eInput, 'blur', function () {\n var floatedValue = parseFloat(_this.eInput.value);\n var value = isNaN(floatedValue) ? '' : _this.normalizeValue(floatedValue.toString());\n if (_this.value !== value) {\n _this.setValue(value);\n }\n });\n this.eInput.step = 'any';\n };\n AgInputNumberField.prototype.normalizeValue = function (value) {\n if (value === '') {\n return '';\n }\n if (this.precision) {\n value = this.adjustPrecision(value);\n }\n var val = parseFloat(value);\n if (this.min != null && val < this.min) {\n value = this.min.toString();\n }\n else if (this.max != null && val > this.max) {\n value = this.max.toString();\n }\n return value;\n };\n AgInputNumberField.prototype.adjustPrecision = function (value) {\n if (this.precision) {\n var floatString = parseFloat(value).toFixed(this.precision);\n value = parseFloat(floatString).toString();\n }\n return value;\n };\n AgInputNumberField.prototype.setMin = function (min) {\n if (this.min === min) {\n return this;\n }\n this.min = min;\n addOrRemoveAttribute(this.eInput, 'min', min);\n return this;\n };\n AgInputNumberField.prototype.setMax = function (max) {\n if (this.max === max) {\n return this;\n }\n this.max = max;\n addOrRemoveAttribute(this.eInput, 'max', max);\n return this;\n };\n AgInputNumberField.prototype.setPrecision = function (precision) {\n this.precision = precision;\n return this;\n };\n AgInputNumberField.prototype.setStep = function (step) {\n if (this.step === step) {\n return this;\n }\n this.step = step;\n addOrRemoveAttribute(this.eInput, 'step', step);\n return this;\n };\n AgInputNumberField.prototype.setValue = function (value, silent) {\n value = this.adjustPrecision(value);\n var normalizedValue = this.normalizeValue(value);\n if (value != normalizedValue) {\n return this;\n }\n return _super.prototype.setValue.call(this, value, silent);\n };\n return AgInputNumberField;\n}(AgInputTextField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1U = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgInputRange = /** @class */ (function (_super) {\n __extends$1U(AgInputRange, _super);\n function AgInputRange(config) {\n return _super.call(this, config, 'ag-range-field', 'range') || this;\n }\n AgInputRange.prototype.postConstruct = function () {\n _super.prototype.postConstruct.call(this);\n var _a = this.config, min = _a.min, max = _a.max, step = _a.step;\n if (min != null) {\n this.setMinValue(min);\n }\n if (max != null) {\n this.setMaxValue(max);\n }\n this.setStep(step || 1);\n };\n AgInputRange.prototype.addInputListeners = function () {\n var _this = this;\n this.addManagedListener(this.eInput, 'input', function (e) {\n var value = e.target.value;\n _this.setValue(value);\n });\n };\n AgInputRange.prototype.setMinValue = function (value) {\n this.min = value;\n this.eInput.setAttribute('min', value.toString());\n return this;\n };\n AgInputRange.prototype.setMaxValue = function (value) {\n this.max = value;\n this.eInput.setAttribute('max', value.toString());\n return this;\n };\n AgInputRange.prototype.setStep = function (value) {\n this.eInput.setAttribute('step', value.toString());\n return this;\n };\n AgInputRange.prototype.setValue = function (value, silent) {\n if (this.min != null) {\n value = Math.max(parseFloat(value), this.min).toString();\n }\n if (this.max != null) {\n value = Math.min(parseFloat(value), this.max).toString();\n }\n var ret = _super.prototype.setValue.call(this, value, silent);\n this.eInput.value = value;\n return ret;\n };\n return AgInputRange;\n}(AgAbstractInputField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1V = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1B = (undefined && undefined.__decorate) || function (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};\nvar AgSlider = /** @class */ (function (_super) {\n __extends$1V(AgSlider, _super);\n function AgSlider(config) {\n var _this = _super.call(this, config, AgSlider.TEMPLATE) || this;\n _this.labelAlignment = 'top';\n return _this;\n }\n AgSlider.prototype.init = function () {\n this.eSlider.addCssClass('ag-slider-field');\n };\n AgSlider.prototype.onValueChange = function (callbackFn) {\n var _this = this;\n var eventChanged = AgAbstractField.EVENT_CHANGED;\n this.addManagedListener(this.eText, eventChanged, function () {\n var textValue = parseFloat(_this.eText.getValue());\n _this.eSlider.setValue(textValue.toString(), true);\n callbackFn(textValue || 0);\n });\n this.addManagedListener(this.eSlider, eventChanged, function () {\n var sliderValue = _this.eSlider.getValue();\n _this.eText.setValue(sliderValue, true);\n callbackFn(parseFloat(sliderValue));\n });\n return this;\n };\n AgSlider.prototype.setSliderWidth = function (width) {\n this.eSlider.setWidth(width);\n return this;\n };\n AgSlider.prototype.setTextFieldWidth = function (width) {\n this.eText.setWidth(width);\n return this;\n };\n AgSlider.prototype.setMinValue = function (minValue) {\n this.eSlider.setMinValue(minValue);\n this.eText.setMin(minValue);\n return this;\n };\n AgSlider.prototype.setMaxValue = function (maxValue) {\n this.eSlider.setMaxValue(maxValue);\n this.eText.setMax(maxValue);\n return this;\n };\n AgSlider.prototype.getValue = function () {\n return this.eText.getValue();\n };\n AgSlider.prototype.setValue = function (value) {\n if (this.getValue() === value) {\n return this;\n }\n this.eText.setValue(value, true);\n this.eSlider.setValue(value, true);\n this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });\n return this;\n };\n AgSlider.prototype.setStep = function (step) {\n this.eSlider.setStep(step);\n this.eText.setStep(step);\n return this;\n };\n AgSlider.TEMPLATE = \"
\\n \\n
\\n \\n \\n
\\n
\";\n __decorate$1B([\n RefSelector('eLabel')\n ], AgSlider.prototype, \"eLabel\", void 0);\n __decorate$1B([\n RefSelector('eSlider')\n ], AgSlider.prototype, \"eSlider\", void 0);\n __decorate$1B([\n RefSelector('eText')\n ], AgSlider.prototype, \"eText\", void 0);\n __decorate$1B([\n PostConstruct\n ], AgSlider.prototype, \"init\", null);\n return AgSlider;\n}(AgAbstractLabel));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1W = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1C = (undefined && undefined.__decorate) || function (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};\nvar AgAngleSelect = /** @class */ (function (_super) {\n __extends$1W(AgAngleSelect, _super);\n function AgAngleSelect(config) {\n var _this = _super.call(this, config, AgAngleSelect.TEMPLATE) || this;\n _this.radius = 0;\n _this.offsetX = 0;\n _this.offsetY = 0;\n return _this;\n }\n AgAngleSelect.prototype.postConstruct = function () {\n var _this = this;\n _super.prototype.postConstruct.call(this);\n this.dragListener = {\n eElement: this.eParentCircle,\n dragStartPixels: 0,\n onDragStart: function (e) {\n _this.parentCircleRect = _this.eParentCircle.getBoundingClientRect();\n },\n onDragging: function (e) { return _this.calculateAngleDrag(e); },\n onDragStop: function () { }\n };\n this.dragService.addDragSource(this.dragListener);\n this.eAngleValue\n .setLabel('')\n .setLabelWidth(5)\n .setInputWidth(45)\n .setMin(0)\n .setMax(360)\n .setValue(\"\" + this.degrees)\n .onValueChange(function (value) {\n if (value == null || value === '') {\n value = '0';\n }\n value = _this.eAngleValue.normalizeValue(value);\n var floatValue = parseFloat(value);\n if (floatValue > 180) {\n floatValue = floatValue - 360;\n }\n _this.setValue(floatValue);\n });\n this.updateNumberInput();\n if (exists(this.getValue())) {\n this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString());\n }\n this.addManagedListener(this, AgAbstractField.EVENT_CHANGED, function () {\n var eDocument = _this.gridOptionsWrapper.getDocument();\n if (_this.eAngleValue.getInputElement().contains(eDocument.activeElement)) {\n return;\n }\n _this.updateNumberInput();\n });\n };\n AgAngleSelect.prototype.updateNumberInput = function () {\n var normalizedValue = this.normalizeNegativeValue(this.getValue());\n this.eAngleValue.setValue(normalizedValue.toString());\n };\n AgAngleSelect.prototype.positionChildCircle = function (radians) {\n var rect = this.parentCircleRect || { width: 24, height: 24 };\n var eChildCircle = this.eChildCircle;\n var centerX = rect.width / 2;\n var centerY = rect.height / 2;\n eChildCircle.style.left = centerX + Math.cos(radians) * 8 + \"px\";\n eChildCircle.style.top = centerY + Math.sin(radians) * 8 + \"px\";\n };\n AgAngleSelect.prototype.calculatePolar = function () {\n var x = this.offsetX;\n var y = this.offsetY;\n var radians = Math.atan2(y, x);\n this.degrees = this.toDegrees(radians);\n this.radius = Math.sqrt((x * x) + (y * y));\n this.positionChildCircle(radians);\n };\n AgAngleSelect.prototype.calculateCartesian = function () {\n var radians = this.toRadians(this.getValue());\n var radius = this.getRadius();\n this\n .setOffsetX(Math.cos(radians) * radius)\n .setOffsetY(Math.sin(radians) * radius);\n };\n AgAngleSelect.prototype.setOffsetX = function (offset) {\n if (this.offsetX !== offset) {\n this.offsetX = offset;\n this.calculatePolar();\n }\n return this;\n };\n AgAngleSelect.prototype.setOffsetY = function (offset) {\n if (this.offsetY !== offset) {\n this.offsetY = offset;\n this.calculatePolar();\n }\n return this;\n };\n AgAngleSelect.prototype.calculateAngleDrag = function (e) {\n var rect = this.parentCircleRect;\n var centerX = rect.width / 2;\n var centerY = rect.height / 2;\n var x = e.clientX - rect.left;\n var y = e.clientY - rect.top;\n var dx = x - centerX;\n var dy = y - centerY;\n var radians = Math.atan2(dy, dx);\n this.setValue(radians, true);\n };\n AgAngleSelect.prototype.toDegrees = function (radians) {\n return radians / Math.PI * 180;\n };\n AgAngleSelect.prototype.toRadians = function (degrees) {\n return degrees / 180 * Math.PI;\n };\n AgAngleSelect.prototype.normalizeNegativeValue = function (degrees) {\n return degrees < 0 ? 360 + degrees : degrees;\n };\n AgAngleSelect.prototype.normalizeAngle180 = function (radians) {\n radians %= Math.PI * 2;\n if (radians < -Math.PI) {\n radians += Math.PI * 2;\n }\n else if (radians >= Math.PI) {\n radians -= Math.PI * 2;\n }\n return radians;\n };\n AgAngleSelect.prototype.getRadius = function () {\n return this.radius;\n };\n AgAngleSelect.prototype.setRadius = function (r) {\n if (this.radius === r) {\n return this;\n }\n this.radius = r;\n this.calculateCartesian();\n return this;\n };\n AgAngleSelect.prototype.onValueChange = function (callbackFn) {\n var _this = this;\n this.addManagedListener(this, AgAbstractField.EVENT_CHANGED, function () {\n callbackFn(_this.degrees);\n });\n return this;\n };\n AgAngleSelect.prototype.getValue = function (radians) {\n return radians ? this.toRadians(this.degrees) : this.degrees;\n };\n AgAngleSelect.prototype.setValue = function (degrees, radians) {\n var radiansValue;\n if (!radians) {\n radiansValue = this.normalizeAngle180(this.toRadians(degrees));\n }\n else {\n radiansValue = degrees;\n }\n degrees = this.toDegrees(radiansValue);\n if (this.degrees !== degrees) {\n this.degrees = Math.floor(degrees);\n this.calculateCartesian();\n this.positionChildCircle(radiansValue);\n this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });\n }\n return this;\n };\n AgAngleSelect.prototype.setWidth = function (width) {\n setFixedWidth(this.getGui(), width);\n return this;\n };\n AgAngleSelect.prototype.destroy = function () {\n this.dragService.removeDragSource(this.dragListener);\n _super.prototype.destroy.call(this);\n };\n AgAngleSelect.TEMPLATE = \"
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n
\\n
\";\n __decorate$1C([\n RefSelector('eLabel')\n ], AgAngleSelect.prototype, \"eLabel\", void 0);\n __decorate$1C([\n RefSelector('eParentCircle')\n ], AgAngleSelect.prototype, \"eParentCircle\", void 0);\n __decorate$1C([\n RefSelector('eChildCircle')\n ], AgAngleSelect.prototype, \"eChildCircle\", void 0);\n __decorate$1C([\n RefSelector('eAngleValue')\n ], AgAngleSelect.prototype, \"eAngleValue\", void 0);\n __decorate$1C([\n Autowired('dragService')\n ], AgAngleSelect.prototype, \"dragService\", void 0);\n return AgAngleSelect;\n}(AgAbstractLabel));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1X = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1D = (undefined && undefined.__decorate) || function (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};\nvar __read$e = (undefined && undefined.__read) || function (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};\nvar AgColorPanel = /** @class */ (function (_super) {\n __extends$1X(AgColorPanel, _super);\n function AgColorPanel(config) {\n var _this = _super.call(this, AgColorPanel.TEMPLATE) || this;\n _this.H = 1; // in the [0, 1] range\n _this.S = 1; // in the [0, 1] range\n _this.B = 1; // in the [0, 1] range\n _this.A = 1; // in the [0, 1] range\n _this.isSpectrumDragging = false;\n _this.isSpectrumHueDragging = false;\n _this.isSpectrumAlphaDragging = false;\n _this.colorChanged = false;\n _this.picker = config.picker;\n return _this;\n }\n AgColorPanel.prototype.postConstruct = function () {\n var eGui = this.getGui();\n this.initRecentColors();\n this.addManagedListener(this.spectrumVal, 'mousedown', this.onSpectrumDraggerDown.bind(this));\n this.addManagedListener(eGui, 'mousemove', this.onSpectrumDraggerMove.bind(this));\n this.addManagedListener(this.spectrumHue, 'mousedown', this.onSpectrumHueDown.bind(this));\n this.addManagedListener(eGui, 'mousemove', this.onSpectrumHueMove.bind(this));\n this.addManagedListener(this.spectrumAlpha, 'mousedown', this.onSpectrumAlphaDown.bind(this));\n this.addManagedListener(eGui, 'mousemove', this.onSpectrumAlphaMove.bind(this));\n // Listening to `mouseup` on the document on purpose. The user might release the mouse button\n // outside the UI control. When the mouse returns back to the control's area, the dragging\n // of the thumb is not expected and seen as a bug.\n this.addManagedListener(document, 'mouseup', this.onMouseUp.bind(this));\n this.addManagedListener(this.recentColors, 'click', this.onRecentColorClick.bind(this));\n };\n AgColorPanel.prototype.refreshSpectrumRect = function () {\n return this.spectrumValRect = this.spectrumVal.getBoundingClientRect();\n };\n AgColorPanel.prototype.refreshHueRect = function () {\n return this.spectrumHueRect = this.spectrumHue.getBoundingClientRect();\n };\n AgColorPanel.prototype.refreshAlphaRect = function () {\n return this.spectrumAlphaRect = this.spectrumAlpha.getBoundingClientRect();\n };\n AgColorPanel.prototype.onSpectrumDraggerDown = function (e) {\n this.refreshSpectrumRect();\n this.isSpectrumDragging = true;\n this.moveDragger(e);\n };\n AgColorPanel.prototype.onSpectrumDraggerMove = function (e) {\n if (this.isSpectrumDragging) {\n this.moveDragger(e);\n }\n };\n AgColorPanel.prototype.onSpectrumHueDown = function (e) {\n this.refreshHueRect();\n this.isSpectrumHueDragging = true;\n this.moveHueSlider(e);\n };\n AgColorPanel.prototype.onSpectrumHueMove = function (e) {\n if (this.isSpectrumHueDragging) {\n this.moveHueSlider(e);\n }\n };\n AgColorPanel.prototype.onSpectrumAlphaDown = function (e) {\n this.refreshAlphaRect();\n this.isSpectrumAlphaDragging = true;\n this.moveAlphaSlider(e);\n };\n AgColorPanel.prototype.onSpectrumAlphaMove = function (e) {\n if (this.isSpectrumAlphaDragging) {\n this.moveAlphaSlider(e);\n }\n };\n AgColorPanel.prototype.onMouseUp = function () {\n this.isSpectrumDragging = false;\n this.isSpectrumHueDragging = false;\n this.isSpectrumAlphaDragging = false;\n };\n AgColorPanel.prototype.moveDragger = function (e) {\n var valRect = this.spectrumValRect;\n if (valRect) {\n var x = e.clientX - valRect.left;\n var y = e.clientY - valRect.top;\n x = Math.max(x, 0);\n x = Math.min(x, valRect.width);\n y = Math.max(y, 0);\n y = Math.min(y, valRect.height);\n this.setSpectrumValue(x / valRect.width, 1 - y / valRect.height);\n }\n };\n AgColorPanel.prototype.moveHueSlider = function (e) {\n var hueRect = this.spectrumHueRect;\n if (hueRect) {\n var slider = this.spectrumHueSlider;\n var sliderRect = slider.getBoundingClientRect();\n var x = e.clientX - hueRect.left;\n x = Math.max(x, 0);\n x = Math.min(x, hueRect.width);\n this.H = 1 - x / hueRect.width;\n slider.style.left = (x + sliderRect.width / 2) + 'px';\n this.update();\n }\n };\n AgColorPanel.prototype.moveAlphaSlider = function (e) {\n var alphaRect = this.spectrumAlphaRect;\n if (alphaRect) {\n var slider = this.spectrumAlphaSlider;\n var sliderRect = slider.getBoundingClientRect();\n var x = e.clientX - alphaRect.left;\n x = Math.max(x, 0);\n x = Math.min(x, alphaRect.width);\n this.A = x / alphaRect.width;\n slider.style.left = (x + sliderRect.width / 2) + 'px';\n this.update();\n }\n };\n AgColorPanel.prototype.update = function () {\n var color = Color.fromHSB(this.H * 360, this.S, this.B, this.A);\n var spectrumColor = Color.fromHSB(this.H * 360, 1, 1);\n var rgbaColor = color.toRgbaString();\n // the recent color list needs to know color has actually changed\n var colorPicker = this.picker;\n var existingColor = Color.fromString(colorPicker.getValue());\n if (existingColor.toRgbaString() !== rgbaColor) {\n this.colorChanged = true;\n }\n colorPicker.setValue(rgbaColor);\n this.spectrumColor.style.backgroundColor = spectrumColor.toRgbaString();\n this.spectrumDragger.style.backgroundColor = rgbaColor;\n };\n /**\n * @param saturation In the [0, 1] interval.\n * @param brightness In the [0, 1] interval.\n */\n AgColorPanel.prototype.setSpectrumValue = function (saturation, brightness) {\n var valRect = this.spectrumValRect || this.refreshSpectrumRect();\n if (valRect) {\n var dragger = this.spectrumDragger;\n var draggerRect = dragger.getBoundingClientRect();\n saturation = Math.max(0, saturation);\n saturation = Math.min(1, saturation);\n brightness = Math.max(0, brightness);\n brightness = Math.min(1, brightness);\n this.S = saturation;\n this.B = brightness;\n dragger.style.left = (saturation * valRect.width - draggerRect.width / 2) + 'px';\n dragger.style.top = ((1 - brightness) * valRect.height - draggerRect.height / 2) + 'px';\n this.update();\n }\n };\n AgColorPanel.prototype.initRecentColors = function () {\n var recentColors = AgColorPanel.recentColors;\n var innerHtml = recentColors.map(function (color, index) {\n return \"
\";\n });\n this.recentColors.innerHTML = innerHtml.join('');\n };\n AgColorPanel.prototype.setValue = function (val) {\n var color = Color.fromString(val);\n var _a = __read$e(color.toHSB(), 3), h = _a[0], s = _a[1], b = _a[2];\n this.H = (isNaN(h) ? 0 : h) / 360;\n this.A = color.a;\n var spectrumHueRect = this.spectrumHueRect || this.refreshHueRect();\n var spectrumAlphaRect = this.spectrumAlphaRect || this.refreshAlphaRect();\n this.spectrumHueSlider.style.left = ((this.H - 1) * -spectrumHueRect.width) + \"px\";\n this.spectrumAlphaSlider.style.left = (this.A * spectrumAlphaRect.width) + \"px\";\n this.setSpectrumValue(s, b);\n };\n AgColorPanel.prototype.onRecentColorClick = function (e) {\n var target = e.target;\n if (!exists(target.id)) {\n return;\n }\n var id = parseInt(target.id, 10);\n this.setValue(AgColorPanel.recentColors[id]);\n this.destroy();\n };\n AgColorPanel.prototype.addRecentColor = function () {\n var color = Color.fromHSB(this.H * 360, this.S, this.B, this.A);\n var rgbaColor = color.toRgbaString();\n var recentColors = AgColorPanel.recentColors;\n if (!this.colorChanged || recentColors[0] === rgbaColor) {\n return;\n }\n // remove duplicate color\n recentColors = recentColors.filter(function (currentColor) { return currentColor != rgbaColor; });\n // add color to head\n recentColors = [rgbaColor].concat(recentColors);\n // ensure we don't exceed max number of recent colors\n if (recentColors.length > AgColorPanel.maxRecentColors) {\n recentColors = recentColors.slice(0, AgColorPanel.maxRecentColors);\n }\n AgColorPanel.recentColors = recentColors;\n };\n AgColorPanel.prototype.destroy = function () {\n this.addRecentColor();\n _super.prototype.destroy.call(this);\n };\n AgColorPanel.maxRecentColors = 8;\n AgColorPanel.recentColors = [];\n AgColorPanel.TEMPLATE = \"
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\";\n __decorate$1D([\n RefSelector('spectrumColor')\n ], AgColorPanel.prototype, \"spectrumColor\", void 0);\n __decorate$1D([\n RefSelector('spectrumVal')\n ], AgColorPanel.prototype, \"spectrumVal\", void 0);\n __decorate$1D([\n RefSelector('spectrumDragger')\n ], AgColorPanel.prototype, \"spectrumDragger\", void 0);\n __decorate$1D([\n RefSelector('spectrumHue')\n ], AgColorPanel.prototype, \"spectrumHue\", void 0);\n __decorate$1D([\n RefSelector('spectrumHueSlider')\n ], AgColorPanel.prototype, \"spectrumHueSlider\", void 0);\n __decorate$1D([\n RefSelector('spectrumAlpha')\n ], AgColorPanel.prototype, \"spectrumAlpha\", void 0);\n __decorate$1D([\n RefSelector('spectrumAlphaSlider')\n ], AgColorPanel.prototype, \"spectrumAlphaSlider\", void 0);\n __decorate$1D([\n RefSelector('recentColors')\n ], AgColorPanel.prototype, \"recentColors\", void 0);\n __decorate$1D([\n PostConstruct\n ], AgColorPanel.prototype, \"postConstruct\", null);\n return AgColorPanel;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1Y = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1E = (undefined && undefined.__decorate) || function (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};\nvar AgPanel = /** @class */ (function (_super) {\n __extends$1Y(AgPanel, _super);\n function AgPanel(config) {\n var _this = _super.call(this, AgPanel.getTemplate(config)) || this;\n _this.closable = true;\n _this.config = config;\n return _this;\n }\n AgPanel.getTemplate = function (config) {\n var cssIdentifier = (config && config.cssIdentifier) || 'default';\n return /* html */ \"
\\n
\\n \\n
\\n
\\n
\\n
\";\n };\n AgPanel.prototype.postConstruct = function () {\n var _this = this;\n var _a = this.config, component = _a.component, closable = _a.closable, hideTitleBar = _a.hideTitleBar, title = _a.title, _b = _a.minWidth, minWidth = _b === void 0 ? 250 : _b, width = _a.width, _c = _a.minHeight, minHeight = _c === void 0 ? 250 : _c, height = _a.height, centered = _a.centered, popup = _a.popup, x = _a.x, y = _a.y;\n this.positionableFeature = new PositionableFeature(this.getGui(), {\n minWidth: minWidth, width: width, minHeight: minHeight, height: height, centered: centered, x: x, y: y, popup: popup,\n calculateTopBuffer: function () { return _this.positionableFeature.getHeight() - _this.getBodyHeight(); }\n });\n this.createManagedBean(this.positionableFeature);\n var eGui = this.getGui();\n if (component) {\n this.setBodyComponent(component);\n }\n if (!hideTitleBar) {\n if (title) {\n this.setTitle(title);\n }\n this.setClosable(closable != null ? closable : this.closable);\n }\n else {\n this.eTitleBar.classList.add('ag-hidden');\n }\n this.addManagedListener(this.eTitleBar, 'mousedown', function (e) {\n var eDocument = _this.gridOptionsWrapper.getDocument();\n if (eGui.contains(e.relatedTarget) ||\n eGui.contains(eDocument.activeElement) ||\n _this.eTitleBarButtons.contains(e.target)) {\n e.preventDefault();\n return;\n }\n var focusEl = _this.eContentWrapper.querySelector('button, [href], input, select, textarea, [tabindex]');\n if (focusEl) {\n focusEl.focus();\n }\n });\n if (popup && this.positionableFeature.isPositioned()) {\n return;\n }\n if (this.renderComponent) {\n this.renderComponent();\n }\n this.positionableFeature.initialisePosition();\n this.eContentWrapper.style.height = '0';\n };\n AgPanel.prototype.renderComponent = function () {\n var _this = this;\n var eGui = this.getGui();\n eGui.focus();\n this.close = function () {\n eGui.parentElement.removeChild(eGui);\n _this.destroy();\n };\n };\n AgPanel.prototype.getHeight = function () {\n return this.positionableFeature.getHeight();\n };\n AgPanel.prototype.setHeight = function (height) {\n this.positionableFeature.setHeight(height);\n };\n AgPanel.prototype.getWidth = function () {\n return this.positionableFeature.getWidth();\n };\n AgPanel.prototype.setWidth = function (width) {\n this.positionableFeature.setWidth(width);\n };\n AgPanel.prototype.setClosable = function (closable) {\n if (closable !== this.closable) {\n this.closable = closable;\n }\n if (closable) {\n var closeButtonComp = this.closeButtonComp = new Component(AgPanel.CLOSE_BTN_TEMPLATE);\n this.getContext().createBean(closeButtonComp);\n var eGui = closeButtonComp.getGui();\n var child = createIconNoSpan('close', this.gridOptionsWrapper);\n child.classList.add('ag-panel-title-bar-button-icon');\n eGui.appendChild(child);\n this.addTitleBarButton(closeButtonComp);\n closeButtonComp.addManagedListener(eGui, 'click', this.onBtClose.bind(this));\n }\n else if (this.closeButtonComp) {\n var eGui = this.closeButtonComp.getGui();\n eGui.parentElement.removeChild(eGui);\n this.closeButtonComp = this.destroyBean(this.closeButtonComp);\n }\n };\n AgPanel.prototype.setBodyComponent = function (bodyComponent) {\n bodyComponent.setParentComponent(this);\n this.eContentWrapper.appendChild(bodyComponent.getGui());\n };\n AgPanel.prototype.addTitleBarButton = function (button, position) {\n var eTitleBarButtons = this.eTitleBarButtons;\n var buttons = eTitleBarButtons.children;\n var len = buttons.length;\n if (position == null) {\n position = len;\n }\n position = Math.max(0, Math.min(position, len));\n button.addCssClass('ag-panel-title-bar-button');\n var eGui = button.getGui();\n if (position === 0) {\n eTitleBarButtons.insertAdjacentElement('afterbegin', eGui);\n }\n else if (position === len) {\n eTitleBarButtons.insertAdjacentElement('beforeend', eGui);\n }\n else {\n buttons[position - 1].insertAdjacentElement('afterend', eGui);\n }\n button.setParentComponent(this);\n };\n AgPanel.prototype.getBodyHeight = function () {\n return getInnerHeight(this.eContentWrapper);\n };\n AgPanel.prototype.getBodyWidth = function () {\n return getInnerWidth(this.eContentWrapper);\n };\n AgPanel.prototype.setTitle = function (title) {\n this.eTitle.innerText = title;\n };\n // called when user hits the 'x' in the top right\n AgPanel.prototype.onBtClose = function () {\n this.close();\n };\n AgPanel.prototype.destroy = function () {\n if (this.closeButtonComp) {\n this.closeButtonComp = this.destroyBean(this.closeButtonComp);\n }\n var eGui = this.getGui();\n if (eGui && eGui.offsetParent) {\n this.close();\n }\n _super.prototype.destroy.call(this);\n };\n AgPanel.CLOSE_BTN_TEMPLATE = \"
\";\n __decorate$1E([\n RefSelector('eContentWrapper')\n ], AgPanel.prototype, \"eContentWrapper\", void 0);\n __decorate$1E([\n RefSelector('eTitleBar')\n ], AgPanel.prototype, \"eTitleBar\", void 0);\n __decorate$1E([\n RefSelector('eTitleBarButtons')\n ], AgPanel.prototype, \"eTitleBarButtons\", void 0);\n __decorate$1E([\n RefSelector('eTitle')\n ], AgPanel.prototype, \"eTitle\", void 0);\n __decorate$1E([\n PostConstruct\n ], AgPanel.prototype, \"postConstruct\", null);\n return AgPanel;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1Z = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$e = (undefined && undefined.__assign) || function () {\n __assign$e = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$e.apply(this, arguments);\n};\nvar __decorate$1F = (undefined && undefined.__decorate) || function (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};\nvar AgDialog = /** @class */ (function (_super) {\n __extends$1Z(AgDialog, _super);\n function AgDialog(config) {\n var _this = _super.call(this, __assign$e(__assign$e({}, config), { popup: true })) || this;\n _this.isMaximizable = false;\n _this.isMaximized = false;\n _this.maximizeListeners = [];\n _this.resizeListenerDestroy = null;\n _this.lastPosition = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n return _this;\n }\n AgDialog.prototype.postConstruct = function () {\n var _this = this;\n var eGui = this.getGui();\n var _a = this.config, movable = _a.movable, resizable = _a.resizable, maximizable = _a.maximizable;\n this.addCssClass('ag-dialog');\n _super.prototype.postConstruct.call(this);\n this.addManagedListener(eGui, 'focusin', function (e) {\n if (eGui.contains(e.relatedTarget)) {\n return;\n }\n _this.popupService.bringPopupToFront(eGui);\n });\n if (movable) {\n this.setMovable(movable);\n }\n if (maximizable) {\n this.setMaximizable(maximizable);\n }\n if (resizable) {\n this.setResizable(resizable);\n }\n };\n AgDialog.prototype.renderComponent = function () {\n var eGui = this.getGui();\n var _a = this.config, alwaysOnTop = _a.alwaysOnTop, modal = _a.modal, title = _a.title;\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var addPopupRes = this.popupService.addPopup({\n modal: modal,\n eChild: eGui,\n closeOnEsc: true,\n closedCallback: this.destroy.bind(this),\n alwaysOnTop: alwaysOnTop,\n ariaLabel: title || translate('ariaLabelDialog', 'Dialog')\n });\n if (addPopupRes) {\n this.close = addPopupRes.hideFunc;\n }\n };\n AgDialog.prototype.toggleMaximize = function () {\n var position = this.positionableFeature.getPosition();\n if (this.isMaximized) {\n var _a = this.lastPosition, x = _a.x, y = _a.y, width = _a.width, height = _a.height;\n this.setWidth(width);\n this.setHeight(height);\n this.positionableFeature.offsetElement(x, y);\n }\n else {\n this.lastPosition.width = this.getWidth();\n this.lastPosition.height = this.getHeight();\n this.lastPosition.x = position.x;\n this.lastPosition.y = position.y;\n this.positionableFeature.offsetElement(0, 0);\n this.setHeight('100%');\n this.setWidth('100%');\n }\n this.isMaximized = !this.isMaximized;\n this.refreshMaximizeIcon();\n };\n AgDialog.prototype.refreshMaximizeIcon = function () {\n setDisplayed(this.maximizeIcon, !this.isMaximized);\n setDisplayed(this.minimizeIcon, this.isMaximized);\n };\n AgDialog.prototype.clearMaximizebleListeners = function () {\n if (this.maximizeListeners.length) {\n this.maximizeListeners.forEach(function (destroyListener) { return destroyListener(); });\n this.maximizeListeners.length = 0;\n }\n if (this.resizeListenerDestroy) {\n this.resizeListenerDestroy();\n this.resizeListenerDestroy = null;\n }\n };\n AgDialog.prototype.destroy = function () {\n this.maximizeButtonComp = this.destroyBean(this.maximizeButtonComp);\n this.clearMaximizebleListeners();\n _super.prototype.destroy.call(this);\n };\n AgDialog.prototype.setResizable = function (resizable) {\n this.positionableFeature.setResizable(resizable);\n };\n AgDialog.prototype.setMovable = function (movable) {\n this.positionableFeature.setMovable(movable, this.eTitleBar);\n };\n AgDialog.prototype.setMaximizable = function (maximizable) {\n var _this = this;\n if (!maximizable) {\n this.clearMaximizebleListeners();\n if (this.maximizeButtonComp) {\n this.destroyBean(this.maximizeButtonComp);\n this.maximizeButtonComp = this.maximizeIcon = this.minimizeIcon = undefined;\n }\n return;\n }\n var eTitleBar = this.eTitleBar;\n if (!eTitleBar || maximizable === this.isMaximizable) {\n return;\n }\n var maximizeButtonComp = this.maximizeButtonComp =\n this.createBean(new Component(/* html */ \"
\"));\n var eGui = maximizeButtonComp.getGui();\n eGui.appendChild(this.maximizeIcon = createIconNoSpan('maximize', this.gridOptionsWrapper));\n this.maximizeIcon.classList.add('ag-panel-title-bar-button-icon');\n eGui.appendChild(this.minimizeIcon = createIconNoSpan('minimize', this.gridOptionsWrapper));\n this.minimizeIcon.classList.add('ag-panel-title-bar-button-icon', 'ag-hidden');\n maximizeButtonComp.addManagedListener(eGui, 'click', this.toggleMaximize.bind(this));\n this.addTitleBarButton(maximizeButtonComp, 0);\n this.maximizeListeners.push(this.addManagedListener(eTitleBar, 'dblclick', this.toggleMaximize.bind(this)));\n this.resizeListenerDestroy = this.addManagedListener(this, 'resize', function () {\n _this.isMaximized = false;\n _this.refreshMaximizeIcon();\n });\n };\n __decorate$1F([\n Autowired('popupService')\n ], AgDialog.prototype, \"popupService\", void 0);\n return AgDialog;\n}(AgPanel));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1_ = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgColorPicker = /** @class */ (function (_super) {\n __extends$1_(AgColorPicker, _super);\n function AgColorPicker(config) {\n var _this = _super.call(this, config, 'ag-color-picker', 'colorPicker') || this;\n if (config && config.color) {\n _this.value = config.color;\n }\n return _this;\n }\n AgColorPicker.prototype.postConstruct = function () {\n _super.prototype.postConstruct.call(this);\n if (this.value) {\n this.setValue(this.value);\n }\n };\n AgColorPicker.prototype.showPicker = function () {\n var _this = this;\n var eGuiRect = this.getGui().getBoundingClientRect();\n var colorDialog = this.createBean(new AgDialog({\n closable: false,\n modal: true,\n hideTitleBar: true,\n minWidth: 190,\n width: 190,\n height: 250,\n x: eGuiRect.right - 190,\n y: eGuiRect.top - 250\n }));\n this.isPickerDisplayed = true;\n colorDialog.addCssClass('ag-color-dialog');\n setAriaExpanded(this.eWrapper, true);\n var colorPanel = this.createBean(new AgColorPanel({ picker: this }));\n colorPanel.addDestroyFunc(function () {\n if (colorDialog.isAlive()) {\n _this.destroyBean(colorDialog);\n }\n });\n colorDialog.setParentComponent(this);\n colorDialog.setBodyComponent(colorPanel);\n colorPanel.setValue(this.getValue());\n colorDialog.addDestroyFunc(function () {\n // here we check if the picker was already being\n // destroyed to avoid a stack overflow\n if (!_this.isDestroyingPicker) {\n _this.isDestroyingPicker = true;\n if (colorPanel.isAlive()) {\n _this.destroyBean(colorPanel);\n }\n }\n else {\n _this.isDestroyingPicker = false;\n }\n if (_this.isAlive()) {\n setAriaExpanded(_this.eWrapper, false);\n _this.getFocusableElement().focus();\n }\n _this.isPickerDisplayed = false;\n });\n return colorDialog;\n };\n AgColorPicker.prototype.setValue = function (color) {\n if (this.value === color) {\n return this;\n }\n this.eDisplayField.style.backgroundColor = color;\n return _super.prototype.setValue.call(this, color);\n };\n AgColorPicker.prototype.getValue = function () {\n return this.value;\n };\n return AgColorPicker;\n}(AgPickerField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1$ = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1G = (undefined && undefined.__decorate) || function (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};\nvar AgGroupComponent = /** @class */ (function (_super) {\n __extends$1$(AgGroupComponent, _super);\n function AgGroupComponent(params) {\n if (params === void 0) { params = {}; }\n var _this = _super.call(this, AgGroupComponent.getTemplate(params)) || this;\n _this.suppressEnabledCheckbox = true;\n _this.suppressOpenCloseIcons = false;\n var title = params.title, enabled = params.enabled, items = params.items, suppressEnabledCheckbox = params.suppressEnabledCheckbox, suppressOpenCloseIcons = params.suppressOpenCloseIcons;\n _this.title = title;\n _this.cssIdentifier = params.cssIdentifier || 'default';\n _this.enabled = enabled != null ? enabled : true;\n _this.items = items || [];\n _this.alignItems = params.alignItems || 'center';\n if (suppressEnabledCheckbox != null) {\n _this.suppressEnabledCheckbox = suppressEnabledCheckbox;\n }\n if (suppressOpenCloseIcons != null) {\n _this.suppressOpenCloseIcons = suppressOpenCloseIcons;\n }\n return _this;\n }\n AgGroupComponent.getTemplate = function (params) {\n var cssIdentifier = params.cssIdentifier || 'default';\n var direction = params.direction || 'vertical';\n return /* html */ \"
\\n
\\n \\n \\n \\n
\\n
\\n \\n
\\n
\\n
\";\n };\n AgGroupComponent.prototype.postConstruct = function () {\n if (this.items.length) {\n var initialItems = this.items;\n this.items = [];\n this.addItems(initialItems);\n }\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n this.cbGroupEnabled.setLabel(localeTextFunc('enabled', 'Enabled'));\n if (this.title) {\n this.setTitle(this.title);\n }\n if (this.enabled) {\n this.setEnabled(this.enabled);\n }\n this.setAlignItems(this.alignItems);\n this.hideEnabledCheckbox(this.suppressEnabledCheckbox);\n this.hideOpenCloseIcons(this.suppressOpenCloseIcons);\n this.setupExpandContract();\n this.refreshAriaStatus();\n this.refreshChildDisplay();\n };\n AgGroupComponent.prototype.setupExpandContract = function () {\n var _this = this;\n this.eGroupClosedIcon.appendChild(createIcon('columnSelectClosed', this.gridOptionsWrapper, null));\n this.eGroupOpenedIcon.appendChild(createIcon('columnSelectOpen', this.gridOptionsWrapper, null));\n this.addManagedListener(this.eTitleBar, 'click', function () { return _this.toggleGroupExpand(); });\n this.addManagedListener(this.eTitleBar, 'keydown', function (e) {\n switch (e.key) {\n case KeyCode.ENTER:\n case KeyCode.SPACE:\n e.preventDefault();\n _this.toggleGroupExpand();\n break;\n case KeyCode.RIGHT:\n case KeyCode.LEFT:\n e.preventDefault();\n _this.toggleGroupExpand(e.key === KeyCode.RIGHT);\n break;\n }\n });\n };\n AgGroupComponent.prototype.refreshAriaStatus = function () {\n if (!this.suppressOpenCloseIcons) {\n setAriaExpanded(this.eTitleBar, this.expanded);\n }\n };\n AgGroupComponent.prototype.refreshChildDisplay = function () {\n var showIcon = !this.suppressOpenCloseIcons;\n setDisplayed(this.eToolbar, this.expanded && !this.suppressEnabledCheckbox);\n setDisplayed(this.eGroupOpenedIcon, showIcon && this.expanded);\n setDisplayed(this.eGroupClosedIcon, showIcon && !this.expanded);\n };\n AgGroupComponent.prototype.isExpanded = function () {\n return this.expanded;\n };\n AgGroupComponent.prototype.setAlignItems = function (alignment) {\n if (this.alignItems !== alignment) {\n this.removeCssClass(\"ag-group-item-alignment-\" + this.alignItems);\n }\n this.alignItems = alignment;\n var newCls = \"ag-group-item-alignment-\" + this.alignItems;\n this.addCssClass(newCls);\n return this;\n };\n AgGroupComponent.prototype.toggleGroupExpand = function (expanded) {\n if (this.suppressOpenCloseIcons) {\n this.expanded = true;\n this.refreshChildDisplay();\n setDisplayed(this.eContainer, true);\n return this;\n }\n expanded = expanded != null ? expanded : !this.expanded;\n if (this.expanded === expanded) {\n return this;\n }\n this.expanded = expanded;\n this.refreshAriaStatus();\n this.refreshChildDisplay();\n setDisplayed(this.eContainer, expanded);\n this.dispatchEvent({ type: this.expanded ? AgGroupComponent.EVENT_EXPANDED : AgGroupComponent.EVENT_COLLAPSED });\n return this;\n };\n AgGroupComponent.prototype.addItems = function (items) {\n var _this = this;\n items.forEach(function (item) { return _this.addItem(item); });\n };\n AgGroupComponent.prototype.addItem = function (item) {\n var container = this.eContainer;\n var el = item instanceof Component ? item.getGui() : item;\n el.classList.add('ag-group-item', \"ag-\" + this.cssIdentifier + \"-group-item\");\n container.appendChild(el);\n this.items.push(el);\n };\n AgGroupComponent.prototype.hideItem = function (hide, index) {\n var itemToHide = this.items[index];\n itemToHide.classList.toggle('ag-hidden', hide);\n };\n AgGroupComponent.prototype.setTitle = function (title) {\n this.eTitle.innerText = title;\n return this;\n };\n AgGroupComponent.prototype.addCssClassToTitleBar = function (cssClass) {\n this.eTitleBar.classList.add(cssClass);\n };\n AgGroupComponent.prototype.setEnabled = function (enabled, skipToggle) {\n this.enabled = enabled;\n this.refreshDisabledStyles();\n this.toggleGroupExpand(enabled);\n if (!skipToggle) {\n this.cbGroupEnabled.setValue(enabled);\n }\n return this;\n };\n AgGroupComponent.prototype.isEnabled = function () {\n return this.enabled;\n };\n AgGroupComponent.prototype.onEnableChange = function (callbackFn) {\n var _this = this;\n this.cbGroupEnabled.onValueChange(function (newSelection) {\n _this.setEnabled(newSelection, true);\n callbackFn(newSelection);\n });\n return this;\n };\n AgGroupComponent.prototype.hideEnabledCheckbox = function (hide) {\n this.suppressEnabledCheckbox = hide;\n this.refreshChildDisplay();\n this.refreshDisabledStyles();\n return this;\n };\n AgGroupComponent.prototype.hideOpenCloseIcons = function (hide) {\n this.suppressOpenCloseIcons = hide;\n if (hide) {\n this.toggleGroupExpand(true);\n }\n return this;\n };\n AgGroupComponent.prototype.refreshDisabledStyles = function () {\n this.addOrRemoveCssClass('ag-disabled', !this.enabled);\n if (this.suppressEnabledCheckbox && !this.enabled) {\n this.eTitleBar.classList.add('ag-disabled-group-title-bar');\n this.eTitleBar.removeAttribute('tabindex');\n }\n else {\n this.eTitleBar.classList.remove('ag-disabled-group-title-bar');\n this.eTitleBar.setAttribute('tabindex', '0');\n }\n this.eContainer.classList.toggle('ag-disabled-group-container', !this.enabled);\n };\n AgGroupComponent.EVENT_EXPANDED = 'expanded';\n AgGroupComponent.EVENT_COLLAPSED = 'collapsed';\n __decorate$1G([\n RefSelector('eTitleBar')\n ], AgGroupComponent.prototype, \"eTitleBar\", void 0);\n __decorate$1G([\n RefSelector('eGroupOpenedIcon')\n ], AgGroupComponent.prototype, \"eGroupOpenedIcon\", void 0);\n __decorate$1G([\n RefSelector('eGroupClosedIcon')\n ], AgGroupComponent.prototype, \"eGroupClosedIcon\", void 0);\n __decorate$1G([\n RefSelector('eToolbar')\n ], AgGroupComponent.prototype, \"eToolbar\", void 0);\n __decorate$1G([\n RefSelector('cbGroupEnabled')\n ], AgGroupComponent.prototype, \"cbGroupEnabled\", void 0);\n __decorate$1G([\n RefSelector('eTitle')\n ], AgGroupComponent.prototype, \"eTitle\", void 0);\n __decorate$1G([\n RefSelector('eContainer')\n ], AgGroupComponent.prototype, \"eContainer\", void 0);\n __decorate$1G([\n PostConstruct\n ], AgGroupComponent.prototype, \"postConstruct\", null);\n return AgGroupComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$20 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1H = (undefined && undefined.__decorate) || function (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};\nvar TabGuardCtrl = /** @class */ (function (_super) {\n __extends$20(TabGuardCtrl, _super);\n function TabGuardCtrl(params) {\n var _this = _super.call(this) || this;\n _this.skipTabGuardFocus = false;\n var comp = params.comp, eTopGuard = params.eTopGuard, eBottomGuard = params.eBottomGuard, focusInnerElement = params.focusInnerElement, onFocusIn = params.onFocusIn, onFocusOut = params.onFocusOut, shouldStopEventPropagation = params.shouldStopEventPropagation, onTabKeyDown = params.onTabKeyDown, handleKeyDown = params.handleKeyDown, eFocusableElement = params.eFocusableElement;\n _this.comp = comp;\n _this.eTopGuard = eTopGuard;\n _this.eBottomGuard = eBottomGuard;\n _this.providedFocusInnerElement = focusInnerElement;\n _this.eFocusableElement = eFocusableElement;\n _this.providedFocusIn = onFocusIn;\n _this.providedFocusOut = onFocusOut;\n _this.providedShouldStopEventPropagation = shouldStopEventPropagation;\n _this.providedOnTabKeyDown = onTabKeyDown;\n _this.providedHandleKeyDown = handleKeyDown;\n return _this;\n }\n TabGuardCtrl.prototype.postConstruct = function () {\n var _this = this;\n this.createManagedBean(new ManagedFocusFeature(this.eFocusableElement, {\n shouldStopEventPropagation: function () { return _this.shouldStopEventPropagation(); },\n onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },\n handleKeyDown: function (e) { return _this.handleKeyDown(e); },\n onFocusIn: function (e) { return _this.onFocusIn(e); },\n onFocusOut: function (e) { return _this.onFocusOut(e); }\n }));\n this.activateTabGuards();\n [this.eTopGuard, this.eBottomGuard].forEach(function (guard) { return _this.addManagedListener(guard, 'focus', _this.onFocus.bind(_this)); });\n };\n TabGuardCtrl.prototype.handleKeyDown = function (e) {\n if (this.providedHandleKeyDown) {\n this.providedHandleKeyDown(e);\n }\n };\n TabGuardCtrl.prototype.tabGuardsAreActive = function () {\n return !!this.eTopGuard && this.eTopGuard.hasAttribute('tabIndex');\n };\n TabGuardCtrl.prototype.shouldStopEventPropagation = function () {\n if (this.providedShouldStopEventPropagation) {\n return this.providedShouldStopEventPropagation();\n }\n return false;\n };\n TabGuardCtrl.prototype.activateTabGuards = function () {\n this.comp.setTabIndex(this.getGridTabIndex());\n };\n TabGuardCtrl.prototype.deactivateTabGuards = function () {\n this.comp.setTabIndex();\n };\n TabGuardCtrl.prototype.onFocus = function (e) {\n if (this.skipTabGuardFocus) {\n this.skipTabGuardFocus = false;\n return;\n }\n var fromBottom = e.target === this.eBottomGuard;\n if (this.providedFocusInnerElement) {\n this.providedFocusInnerElement(fromBottom);\n }\n else {\n this.focusInnerElement(fromBottom);\n }\n };\n TabGuardCtrl.prototype.onFocusIn = function (e) {\n if (this.providedFocusIn && this.providedFocusIn(e)) {\n return;\n }\n this.deactivateTabGuards();\n };\n TabGuardCtrl.prototype.onFocusOut = function (e) {\n if (this.providedFocusOut && this.providedFocusOut(e)) {\n return;\n }\n if (!this.eFocusableElement.contains(e.relatedTarget)) {\n this.activateTabGuards();\n }\n };\n TabGuardCtrl.prototype.onTabKeyDown = function (e) {\n var _this = this;\n if (this.providedOnTabKeyDown) {\n this.providedOnTabKeyDown(e);\n return;\n }\n if (e.defaultPrevented) {\n return;\n }\n var tabGuardsAreActive = this.tabGuardsAreActive();\n if (tabGuardsAreActive) {\n this.deactivateTabGuards();\n }\n var nextRoot = this.getNextFocusableElement(e.shiftKey);\n if (tabGuardsAreActive) {\n // ensure the tab guards are only re-instated once the event has finished processing, to avoid the browser\n // tabbing to the tab guard from inside the component\n setTimeout(function () { return _this.activateTabGuards(); }, 0);\n }\n if (!nextRoot) {\n return;\n }\n nextRoot.focus();\n e.preventDefault();\n };\n TabGuardCtrl.prototype.getGridTabIndex = function () {\n return this.gridOptionsWrapper.getGridTabIndex();\n };\n TabGuardCtrl.prototype.focusInnerElement = function (fromBottom) {\n if (fromBottom === void 0) { fromBottom = false; }\n var focusable = this.focusService.findFocusableElements(this.eFocusableElement);\n if (this.tabGuardsAreActive()) {\n // remove tab guards from this component from list of focusable elements\n focusable.splice(0, 1);\n focusable.splice(focusable.length - 1, 1);\n }\n if (!focusable.length) {\n return;\n }\n focusable[fromBottom ? focusable.length - 1 : 0].focus();\n };\n TabGuardCtrl.prototype.getNextFocusableElement = function (backwards) {\n return this.focusService.findNextFocusableElement(this.eFocusableElement, false, backwards);\n };\n TabGuardCtrl.prototype.forceFocusOutOfContainer = function (up) {\n if (up === void 0) { up = false; }\n var tabGuardToFocus = up ? this.eTopGuard : this.eBottomGuard;\n this.activateTabGuards();\n this.skipTabGuardFocus = true;\n tabGuardToFocus.focus();\n };\n __decorate$1H([\n Autowired('focusService')\n ], TabGuardCtrl.prototype, \"focusService\", void 0);\n __decorate$1H([\n PostConstruct\n ], TabGuardCtrl.prototype, \"postConstruct\", null);\n return TabGuardCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$21 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read$f = (undefined && undefined.__read) || function (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};\nvar __spread$b = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$f(arguments[i]));\n return ar;\n};\nvar TabGuardComp = /** @class */ (function (_super) {\n __extends$21(TabGuardComp, _super);\n function TabGuardComp() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TabGuardComp.prototype.initialiseTabGuard = function (params) {\n this.eTopGuard = this.createTabGuard('top');\n this.eBottomGuard = this.createTabGuard('bottom');\n this.eFocusableElement = this.getFocusableElement();\n var tabGuards = [this.eTopGuard, this.eBottomGuard];\n var compProxy = {\n setTabIndex: function (tabIndex) {\n tabGuards.forEach(function (tabGuard) { return tabIndex != null ? tabGuard.setAttribute('tabIndex', tabIndex) : tabGuard.removeAttribute('tabIndex'); });\n }\n };\n this.addTabGuards(this.eTopGuard, this.eBottomGuard);\n this.tabGuardCtrl = this.createManagedBean(new TabGuardCtrl({\n comp: compProxy,\n eTopGuard: this.eTopGuard,\n eBottomGuard: this.eBottomGuard,\n eFocusableElement: this.eFocusableElement,\n onFocusIn: params.onFocusIn,\n onFocusOut: params.onFocusOut,\n focusInnerElement: params.focusInnerElement,\n handleKeyDown: params.handleKeyDown,\n onTabKeyDown: params.onTabKeyDown,\n shouldStopEventPropagation: params.shouldStopEventPropagation\n }));\n };\n TabGuardComp.prototype.createTabGuard = function (side) {\n var tabGuard = document.createElement('div');\n tabGuard.classList.add('ag-tab-guard', \"ag-tab-guard-\" + side);\n setAriaRole(tabGuard, 'presentation');\n return tabGuard;\n };\n TabGuardComp.prototype.addTabGuards = function (topTabGuard, bottomTabGuard) {\n this.eFocusableElement.insertAdjacentElement('afterbegin', topTabGuard);\n this.eFocusableElement.insertAdjacentElement('beforeend', bottomTabGuard);\n };\n TabGuardComp.prototype.removeAllChildrenExceptTabGuards = function () {\n var tabGuards = [this.eTopGuard, this.eBottomGuard];\n clearElement(this.getFocusableElement());\n this.addTabGuards.apply(this, __spread$b(tabGuards));\n };\n TabGuardComp.prototype.forceFocusOutOfContainer = function (up) {\n if (up === void 0) { up = false; }\n this.tabGuardCtrl.forceFocusOutOfContainer(up);\n };\n TabGuardComp.prototype.appendChild = function (newChild, container) {\n if (!isNodeOrElement(newChild)) {\n newChild = newChild.getGui();\n }\n var bottomTabGuard = this.eBottomGuard;\n if (bottomTabGuard) {\n bottomTabGuard.insertAdjacentElement('beforebegin', newChild);\n }\n else {\n _super.prototype.appendChild.call(this, newChild, container);\n }\n };\n return TabGuardComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$22 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$f = (undefined && undefined.__assign) || function () {\n __assign$f = Object.assign || function(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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$f.apply(this, arguments);\n};\nvar __decorate$1I = (undefined && undefined.__decorate) || function (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};\nvar AgMenuList = /** @class */ (function (_super) {\n __extends$22(AgMenuList, _super);\n function AgMenuList(level) {\n if (level === void 0) { level = 1; }\n var _this = _super.call(this, /* html */ \"
\") || this;\n _this.level = level;\n _this.menuItems = [];\n return _this;\n }\n AgMenuList.prototype.postConstruct = function () {\n var _this = this;\n this.initialiseTabGuard({\n onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },\n handleKeyDown: function (e) { return _this.handleKeyDown(e); }\n });\n };\n AgMenuList.prototype.onTabKeyDown = function (e) {\n var parent = this.getParentComponent();\n var parentGui = parent && parent.getGui();\n var isManaged = parentGui && parentGui.classList.contains('ag-focus-managed');\n if (!isManaged) {\n e.preventDefault();\n }\n if (e.shiftKey) {\n this.closeIfIsChild(e);\n }\n };\n AgMenuList.prototype.handleKeyDown = function (e) {\n switch (e.key) {\n case KeyCode.UP:\n case KeyCode.RIGHT:\n case KeyCode.DOWN:\n case KeyCode.LEFT:\n e.preventDefault();\n this.handleNavKey(e.key);\n break;\n case KeyCode.ESCAPE:\n var topMenu = this.findTopMenu();\n if (topMenu) {\n this.focusService.focusInto(topMenu.getGui());\n }\n break;\n }\n };\n AgMenuList.prototype.clearActiveItem = function () {\n if (this.activeMenuItem) {\n this.activeMenuItem.deactivate();\n this.activeMenuItem = null;\n }\n };\n AgMenuList.prototype.addMenuItems = function (menuItems) {\n var _this = this;\n if (menuItems == null) {\n return;\n }\n menuItems.forEach(function (menuItemOrString) {\n if (menuItemOrString === 'separator') {\n _this.addSeparator();\n }\n else if (typeof menuItemOrString === 'string') {\n console.warn(\"AG Grid: unrecognised menu item \" + menuItemOrString);\n }\n else {\n _this.addItem(menuItemOrString);\n }\n });\n };\n AgMenuList.prototype.addItem = function (menuItemDef) {\n var _this = this;\n var menuItem = this.createManagedBean(new AgMenuItemComponent(__assign$f(__assign$f({}, menuItemDef), { isAnotherSubMenuOpen: function () { return _this.menuItems.some(function (m) { return m.isSubMenuOpen(); }); } })));\n menuItem.setParentComponent(this);\n setAriaLevel(menuItem.getGui(), this.level);\n this.menuItems.push(menuItem);\n this.appendChild(menuItem.getGui());\n this.addManagedListener(menuItem, AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED, function (event) {\n _this.dispatchEvent(event);\n });\n this.addManagedListener(menuItem, AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED, function (event) {\n if (_this.activeMenuItem && _this.activeMenuItem !== event.menuItem) {\n _this.activeMenuItem.deactivate();\n }\n _this.activeMenuItem = event.menuItem;\n });\n };\n AgMenuList.prototype.activateFirstItem = function () {\n var item = this.menuItems.filter(function (currentItem) { return !currentItem.isDisabled(); })[0];\n if (!item) {\n return;\n }\n item.activate();\n };\n AgMenuList.prototype.addSeparator = function () {\n var separatorHtml = /* html */ \"\\n
\\n
\\n
\\n
\\n
\\n
\";\n this.appendChild(loadTemplate(separatorHtml));\n };\n AgMenuList.prototype.findTopMenu = function () {\n var parent = this.getParentComponent();\n if (!parent && this instanceof AgMenuList) {\n return this;\n }\n while (true) {\n var nextParent = parent && parent.getParentComponent && parent.getParentComponent();\n if (!nextParent || (!(nextParent instanceof AgMenuList || nextParent instanceof AgMenuItemComponent))) {\n break;\n }\n parent = nextParent;\n }\n return parent instanceof AgMenuList ? parent : undefined;\n };\n AgMenuList.prototype.handleNavKey = function (key) {\n switch (key) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n var nextItem = this.findNextItem(key === KeyCode.UP);\n if (nextItem && nextItem !== this.activeMenuItem) {\n nextItem.activate();\n }\n return;\n }\n var left = this.gridOptionsWrapper.isEnableRtl() ? KeyCode.RIGHT : KeyCode.LEFT;\n if (key === left) {\n this.closeIfIsChild();\n }\n else {\n this.openChild();\n }\n };\n AgMenuList.prototype.closeIfIsChild = function (e) {\n var parentItem = this.getParentComponent();\n if (parentItem && parentItem instanceof AgMenuItemComponent) {\n if (e) {\n e.preventDefault();\n }\n parentItem.closeSubMenu();\n parentItem.getGui().focus();\n }\n };\n AgMenuList.prototype.openChild = function () {\n if (this.activeMenuItem) {\n this.activeMenuItem.openSubMenu(true);\n }\n };\n AgMenuList.prototype.findNextItem = function (up) {\n var items = this.menuItems.filter(function (item) { return !item.isDisabled(); });\n if (!items.length) {\n return;\n }\n if (!this.activeMenuItem) {\n return up ? last(items) : items[0];\n }\n if (up) {\n items.reverse();\n }\n var nextItem;\n var foundCurrent = false;\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n if (!foundCurrent) {\n if (item === this.activeMenuItem) {\n foundCurrent = true;\n }\n continue;\n }\n nextItem = item;\n break;\n }\n return nextItem || this.activeMenuItem;\n };\n AgMenuList.prototype.destroy = function () {\n this.clearActiveItem();\n _super.prototype.destroy.call(this);\n };\n __decorate$1I([\n Autowired('focusService')\n ], AgMenuList.prototype, \"focusService\", void 0);\n __decorate$1I([\n PostConstruct\n ], AgMenuList.prototype, \"postConstruct\", null);\n return AgMenuList;\n}(TabGuardComp));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$23 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1J = (undefined && undefined.__decorate) || function (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};\nvar AgMenuPanel = /** @class */ (function (_super) {\n __extends$23(AgMenuPanel, _super);\n function AgMenuPanel(wrappedComponent) {\n var _this = _super.call(this) || this;\n _this.wrappedComponent = wrappedComponent;\n _this.setTemplateFromElement(wrappedComponent.getGui());\n return _this;\n }\n AgMenuPanel.prototype.postConstruct = function () {\n var _this = this;\n this.initialiseTabGuard({\n onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },\n handleKeyDown: function (e) { return _this.handleKeyDown(e); }\n });\n };\n AgMenuPanel.prototype.handleKeyDown = function (e) {\n if (e.key === KeyCode.ESCAPE) {\n this.closePanel();\n }\n };\n AgMenuPanel.prototype.onTabKeyDown = function (e) {\n if (e.defaultPrevented) {\n return;\n }\n this.closePanel();\n e.preventDefault();\n };\n AgMenuPanel.prototype.closePanel = function () {\n var menuItem = this.parentComponent;\n menuItem.closeSubMenu();\n setTimeout(function () { return menuItem.getGui().focus(); }, 0);\n };\n __decorate$1J([\n PostConstruct\n ], AgMenuPanel.prototype, \"postConstruct\", null);\n return AgMenuPanel;\n}(TabGuardComp));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$24 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1K = (undefined && undefined.__decorate) || function (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};\nvar AgMenuItemComponent = /** @class */ (function (_super) {\n __extends$24(AgMenuItemComponent, _super);\n function AgMenuItemComponent(params) {\n var _this = _super.call(this) || this;\n _this.params = params;\n _this.isActive = false;\n _this.subMenuIsOpen = false;\n _this.setTemplate(/* html */ \"
\");\n return _this;\n }\n AgMenuItemComponent.prototype.init = function () {\n var _this = this;\n this.addIcon();\n this.addName();\n this.addShortcut();\n this.addSubMenu();\n this.addTooltip();\n var eGui = this.getGui();\n if (this.params.disabled) {\n this.addCssClass(this.getClassName('disabled'));\n setAriaDisabled(eGui, true);\n }\n else {\n this.addGuiEventListener('click', function (e) { return _this.onItemSelected(e); });\n this.addGuiEventListener('keydown', function (e) {\n if (e.key === KeyCode.ENTER || e.key === KeyCode.SPACE) {\n e.preventDefault();\n _this.onItemSelected(e);\n }\n });\n this.addGuiEventListener('mousedown', function (e) {\n // Prevent event bubbling to other event handlers such as PopupService triggering\n // premature closing of any open sub-menu popup.\n e.stopPropagation();\n e.preventDefault();\n });\n this.addGuiEventListener('mouseenter', function () { return _this.onMouseEnter(); });\n this.addGuiEventListener('mouseleave', function () { return _this.onMouseLeave(); });\n }\n if (this.params.cssClasses) {\n this.params.cssClasses.forEach(function (it) { return _this.addCssClass(it); });\n }\n };\n AgMenuItemComponent.prototype.isDisabled = function () {\n return !!this.params.disabled;\n };\n AgMenuItemComponent.prototype.openSubMenu = function (activateFirstItem) {\n var _this = this;\n if (activateFirstItem === void 0) { activateFirstItem = false; }\n this.closeSubMenu();\n if (!this.params.subMenu) {\n return;\n }\n var ePopup = loadTemplate(/* html */ \"
\");\n var destroySubMenu;\n if (this.params.subMenu instanceof Array) {\n var currentLevel = getAriaLevel(this.getGui());\n var nextLevel = isNaN(currentLevel) ? 1 : (currentLevel + 1);\n var childMenu_1 = this.createBean(new AgMenuList(nextLevel));\n childMenu_1.setParentComponent(this);\n childMenu_1.addMenuItems(this.params.subMenu);\n ePopup.appendChild(childMenu_1.getGui());\n // bubble menu item selected events\n this.addManagedListener(childMenu_1, AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED, function (e) { return _this.dispatchEvent(e); });\n childMenu_1.addGuiEventListener('mouseenter', function () { return _this.cancelDeactivate(); });\n destroySubMenu = function () { return _this.destroyBean(childMenu_1); };\n if (activateFirstItem) {\n setTimeout(function () { return childMenu_1.activateFirstItem(); }, 0);\n }\n }\n else {\n var subMenu_1 = this.params.subMenu;\n var menuPanel = this.createBean(new AgMenuPanel(subMenu_1));\n menuPanel.setParentComponent(this);\n var subMenuGui_1 = menuPanel.getGui();\n var mouseEvent_1 = 'mouseenter';\n var mouseEnterListener_1 = function () { return _this.cancelDeactivate(); };\n subMenuGui_1.addEventListener(mouseEvent_1, mouseEnterListener_1);\n destroySubMenu = function () { return subMenuGui_1.removeEventListener(mouseEvent_1, mouseEnterListener_1); };\n ePopup.appendChild(subMenuGui_1);\n if (subMenu_1.afterGuiAttached) {\n setTimeout(function () { return subMenu_1.afterGuiAttached(); }, 0);\n }\n }\n var eGui = this.getGui();\n var positionCallback = this.popupService.positionPopupForMenu.bind(this.popupService, { eventSource: eGui, ePopup: ePopup });\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: ePopup,\n positionCallback: positionCallback,\n anchorToElement: eGui,\n ariaLabel: translate('ariaLabelSubMenu', 'SubMenu')\n });\n this.subMenuIsOpen = true;\n setAriaExpanded(eGui, true);\n this.hideSubMenu = function () {\n if (addPopupRes) {\n addPopupRes.hideFunc();\n }\n _this.subMenuIsOpen = false;\n setAriaExpanded(eGui, false);\n destroySubMenu();\n };\n };\n AgMenuItemComponent.prototype.closeSubMenu = function () {\n if (!this.hideSubMenu) {\n return;\n }\n this.hideSubMenu();\n this.hideSubMenu = null;\n setAriaExpanded(this.getGui(), false);\n };\n AgMenuItemComponent.prototype.isSubMenuOpen = function () {\n return this.subMenuIsOpen;\n };\n AgMenuItemComponent.prototype.activate = function (openSubMenu) {\n var _this = this;\n this.cancelActivate();\n if (this.params.disabled) {\n return;\n }\n this.isActive = true;\n this.addCssClass(this.getClassName('active'));\n this.getGui().focus();\n if (openSubMenu && this.params.subMenu) {\n window.setTimeout(function () {\n if (_this.isAlive() && _this.isActive) {\n _this.openSubMenu();\n }\n }, 300);\n }\n this.onItemActivated();\n };\n AgMenuItemComponent.prototype.deactivate = function () {\n this.cancelDeactivate();\n this.removeCssClass(this.getClassName('active'));\n this.isActive = false;\n if (this.subMenuIsOpen) {\n this.hideSubMenu();\n }\n };\n AgMenuItemComponent.prototype.addIcon = function () {\n if (!this.params.checked && !this.params.icon && this.params.isCompact) {\n return;\n }\n var icon = loadTemplate(/* html */ \"\");\n if (this.params.checked) {\n icon.appendChild(createIconNoSpan('check', this.gridOptionsWrapper));\n }\n else if (this.params.icon) {\n if (isNodeOrElement(this.params.icon)) {\n icon.appendChild(this.params.icon);\n }\n else if (typeof this.params.icon === 'string') {\n icon.innerHTML = this.params.icon;\n }\n else {\n console.warn('AG Grid: menu item icon must be DOM node or string');\n }\n }\n this.getGui().appendChild(icon);\n };\n AgMenuItemComponent.prototype.addName = function () {\n if (!this.params.name && this.params.isCompact) {\n return;\n }\n var name = loadTemplate(/* html */ \"\" + (this.params.name || '') + \"\");\n this.getGui().appendChild(name);\n };\n AgMenuItemComponent.prototype.addTooltip = function () {\n if (!this.params.tooltip) {\n return;\n }\n this.tooltip = this.params.tooltip;\n if (this.gridOptionsWrapper.isEnableBrowserTooltips()) {\n this.getGui().setAttribute('title', this.tooltip);\n }\n else {\n this.createManagedBean(new CustomTooltipFeature(this));\n }\n };\n AgMenuItemComponent.prototype.getTooltipParams = function () {\n return {\n location: 'menu',\n value: this.tooltip\n };\n };\n AgMenuItemComponent.prototype.addShortcut = function () {\n if (!this.params.shortcut && this.params.isCompact) {\n return;\n }\n var shortcut = loadTemplate(/* html */ \"\" + (this.params.shortcut || '') + \"\");\n this.getGui().appendChild(shortcut);\n };\n AgMenuItemComponent.prototype.addSubMenu = function () {\n if (!this.params.subMenu && this.params.isCompact) {\n return;\n }\n var pointer = loadTemplate(/* html */ \"\");\n var eGui = this.getGui();\n if (this.params.subMenu) {\n var iconName = this.gridOptionsWrapper.isEnableRtl() ? 'smallLeft' : 'smallRight';\n setAriaExpanded(eGui, false);\n pointer.appendChild(createIconNoSpan(iconName, this.gridOptionsWrapper));\n }\n eGui.appendChild(pointer);\n };\n AgMenuItemComponent.prototype.onItemSelected = function (event) {\n if (this.params.action) {\n this.params.action();\n }\n else {\n this.openSubMenu(event && event.type === 'keydown');\n }\n if (this.params.subMenu && !this.params.action) {\n return;\n }\n var e = {\n type: AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,\n action: this.params.action,\n checked: this.params.checked,\n cssClasses: this.params.cssClasses,\n disabled: this.params.disabled,\n icon: this.params.icon,\n name: this.params.name,\n shortcut: this.params.shortcut,\n subMenu: this.params.subMenu,\n tooltip: this.params.tooltip,\n event: event\n };\n this.dispatchEvent(e);\n };\n AgMenuItemComponent.prototype.onItemActivated = function () {\n var event = {\n type: AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED,\n menuItem: this,\n };\n this.dispatchEvent(event);\n };\n AgMenuItemComponent.prototype.cancelActivate = function () {\n if (this.activateTimeoutId) {\n window.clearTimeout(this.activateTimeoutId);\n this.activateTimeoutId = 0;\n }\n };\n AgMenuItemComponent.prototype.cancelDeactivate = function () {\n if (this.deactivateTimeoutId) {\n window.clearTimeout(this.deactivateTimeoutId);\n this.deactivateTimeoutId = 0;\n }\n };\n AgMenuItemComponent.prototype.onMouseEnter = function () {\n var _this = this;\n this.cancelDeactivate();\n if (this.params.isAnotherSubMenuOpen()) {\n // wait to see if the user enters the open sub-menu\n this.activateTimeoutId = window.setTimeout(function () { return _this.activate(true); }, AgMenuItemComponent.ACTIVATION_DELAY);\n }\n else {\n // activate immediately\n this.activate(true);\n }\n };\n AgMenuItemComponent.prototype.onMouseLeave = function () {\n var _this = this;\n this.cancelActivate();\n if (this.isSubMenuOpen()) {\n // wait to see if the user enters the sub-menu\n this.deactivateTimeoutId = window.setTimeout(function () { return _this.deactivate(); }, AgMenuItemComponent.ACTIVATION_DELAY);\n }\n else {\n // de-activate immediately\n this.deactivate();\n }\n };\n AgMenuItemComponent.prototype.getClassName = function (suffix) {\n var prefix = this.params.isCompact ? 'ag-compact-menu-option' : 'ag-menu-option';\n return suffix ? prefix + \"-\" + suffix : prefix;\n };\n AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED = 'menuItemSelected';\n AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED = 'menuItemActivated';\n AgMenuItemComponent.ACTIVATION_DELAY = 80;\n __decorate$1K([\n Autowired('popupService')\n ], AgMenuItemComponent.prototype, \"popupService\", void 0);\n __decorate$1K([\n PostConstruct\n ], AgMenuItemComponent.prototype, \"init\", null);\n return AgMenuItemComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$25 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1L = (undefined && undefined.__decorate) || function (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};\nvar __read$g = (undefined && undefined.__read) || function (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};\nvar __spread$c = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$g(arguments[i]));\n return ar;\n};\nvar FocusService = /** @class */ (function (_super) {\n __extends$25(FocusService, _super);\n function FocusService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FocusService_1 = FocusService;\n /**\n * Adds a gridCore to the list of the gridCores monitoring Keyboard Mode\n * in a specific HTMLDocument.\n *\n * @param doc {Document} - The Document containing the gridCore.\n * @param gridCore {GridComp} - The GridCore to be monitored.\n */\n FocusService.addKeyboardModeEvents = function (doc, controller) {\n var docControllers = FocusService_1.instancesMonitored.get(doc);\n if (docControllers && docControllers.length > 0) {\n if (docControllers.indexOf(controller) === -1) {\n docControllers.push(controller);\n }\n }\n else {\n FocusService_1.instancesMonitored.set(doc, [controller]);\n doc.addEventListener('keydown', FocusService_1.toggleKeyboardMode);\n doc.addEventListener('mousedown', FocusService_1.toggleKeyboardMode);\n }\n };\n /**\n * Removes a gridCore from the list of the gridCores monitoring Keyboard Mode\n * in a specific HTMLDocument.\n *\n * @param doc {Document} - The Document containing the gridCore.\n * @param gridCore {GridComp} - The GridCore to be removed.\n */\n FocusService.removeKeyboardModeEvents = function (doc, controller) {\n var docControllers = FocusService_1.instancesMonitored.get(doc);\n var newControllers = [];\n if (docControllers && docControllers.length) {\n newControllers = __spread$c(docControllers).filter(function (currentGridCore) { return currentGridCore !== controller; });\n FocusService_1.instancesMonitored.set(doc, newControllers);\n }\n if (newControllers.length === 0) {\n doc.removeEventListener('keydown', FocusService_1.toggleKeyboardMode);\n doc.removeEventListener('mousedown', FocusService_1.toggleKeyboardMode);\n }\n };\n /**\n * This method will be called by `keydown` and `mousedown` events on all Documents monitoring\n * KeyboardMode. It will then fire a KEYBOARD_FOCUS, MOUSE_FOCUS on each gridCore present in\n * the Document allowing each gridCore to maintain a state for KeyboardMode.\n *\n * @param event {KeyboardEvent | MouseEvent | TouchEvent} - The event triggered.\n */\n FocusService.toggleKeyboardMode = function (event) {\n var isKeyboardActive = FocusService_1.keyboardModeActive;\n var isKeyboardEvent = event.type === 'keydown';\n if (isKeyboardEvent) {\n // the following keys should not toggle keyboard mode.\n if (event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n }\n if (isKeyboardActive && isKeyboardEvent || !isKeyboardActive && !isKeyboardEvent) {\n return;\n }\n FocusService_1.keyboardModeActive = isKeyboardEvent;\n var doc = event.target.ownerDocument;\n if (!doc) {\n return;\n }\n var controllersForDoc = FocusService_1.instancesMonitored.get(doc);\n if (controllersForDoc) {\n controllersForDoc.forEach(function (controller) {\n controller.dispatchEvent({ type: isKeyboardEvent ? Events.EVENT_KEYBOARD_FOCUS : Events.EVENT_MOUSE_FOCUS });\n });\n }\n };\n FocusService.prototype.init = function () {\n var _this = this;\n var clearFocusedCellListener = this.clearFocusedCell.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, clearFocusedCellListener);\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onColumnEverythingChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_GROUP_OPENED, clearFocusedCellListener);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, clearFocusedCellListener);\n this.ctrlsService.whenReady(function (p) {\n _this.gridCtrl = p.gridCtrl;\n var doc = _this.gridOptionsWrapper.getDocument();\n FocusService_1.addKeyboardModeEvents(doc, _this.gridCtrl);\n _this.addDestroyFunc(function () { return _this.unregisterGridCompController(_this.gridCtrl); });\n });\n };\n FocusService.prototype.unregisterGridCompController = function (gridCompController) {\n var doc = this.gridOptionsWrapper.getDocument();\n FocusService_1.removeKeyboardModeEvents(doc, gridCompController);\n };\n FocusService.prototype.onColumnEverythingChanged = function () {\n // if the columns change, check and see if this column still exists. if it does, then\n // we can keep the focused cell. if it doesn't, then we need to drop the focused cell.\n if (!this.focusedCellPosition) {\n return;\n }\n var col = this.focusedCellPosition.column;\n var colFromColumnModel = this.columnModel.getGridColumn(col.getId());\n if (col !== colFromColumnModel) {\n this.clearFocusedCell();\n }\n };\n FocusService.prototype.isKeyboardMode = function () {\n return FocusService_1.keyboardModeActive;\n };\n // we check if the browser is focusing something, and if it is, and\n // it's the cell we think is focused, then return the cell. so this\n // methods returns the cell if a) we think it has focus and b) the\n // browser thinks it has focus. this then returns nothing if we\n // first focus a cell, then second click outside the grid, as then the\n // grid cell will still be focused as far as the grid is concerned,\n // however the browser focus will have moved somewhere else.\n FocusService.prototype.getFocusCellToUseAfterRefresh = function () {\n var eDocument = this.gridOptionsWrapper.getDocument();\n if (this.gridOptionsWrapper.isSuppressFocusAfterRefresh() || !this.focusedCellPosition) {\n return null;\n }\n // we check that the browser is actually focusing on the grid, if it is not, then\n // we have nothing to worry about. we check for ROW data, as this covers both focused Rows (for Full Width Rows)\n // and Cells (covers cells as cells live in rows)\n if (this.isDomDataMissingInHierarchy(eDocument.activeElement, RowCtrl.DOM_DATA_KEY_ROW_CTRL)) {\n return null;\n }\n return this.focusedCellPosition;\n };\n FocusService.prototype.getFocusHeaderToUseAfterRefresh = function () {\n var eDocument = this.gridOptionsWrapper.getDocument();\n if (this.gridOptionsWrapper.isSuppressFocusAfterRefresh() || !this.focusedHeaderPosition) {\n return null;\n }\n // we check that the browser is actually focusing on the grid, if it is not, then\n // we have nothing to worry about\n if (this.isDomDataMissingInHierarchy(eDocument.activeElement, AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL)) {\n return null;\n }\n return this.focusedHeaderPosition;\n };\n FocusService.prototype.isDomDataMissingInHierarchy = function (eBrowserCell, key) {\n var ePointer = eBrowserCell;\n while (ePointer) {\n var data = this.gridOptionsWrapper.getDomData(ePointer, key);\n if (data) {\n return false;\n }\n ePointer = ePointer.parentNode;\n }\n return true;\n };\n FocusService.prototype.clearFocusedCell = function () {\n this.focusedCellPosition = null;\n this.onCellFocused(false);\n };\n FocusService.prototype.getFocusedCell = function () {\n return this.focusedCellPosition;\n };\n FocusService.prototype.setFocusedCell = function (rowIndex, colKey, floating, forceBrowserFocus) {\n if (forceBrowserFocus === void 0) { forceBrowserFocus = false; }\n var gridColumn = this.columnModel.getGridColumn(colKey);\n // if column doesn't exist, then blank the focused cell and return. this can happen when user sets new columns,\n // and the focused cell is in a column that no longer exists. after columns change, the grid refreshes and tries\n // to re-focus the focused cell.\n if (!gridColumn) {\n this.focusedCellPosition = null;\n return;\n }\n this.focusedCellPosition = gridColumn ? { rowIndex: rowIndex, rowPinned: makeNull(floating), column: gridColumn } : null;\n this.onCellFocused(forceBrowserFocus);\n };\n FocusService.prototype.isCellFocused = function (cellPosition) {\n if (this.focusedCellPosition == null) {\n return false;\n }\n return this.focusedCellPosition.column === cellPosition.column &&\n this.isRowFocused(cellPosition.rowIndex, cellPosition.rowPinned);\n };\n FocusService.prototype.isRowNodeFocused = function (rowNode) {\n return this.isRowFocused(rowNode.rowIndex, rowNode.rowPinned);\n };\n FocusService.prototype.isHeaderWrapperFocused = function (headerCtrl) {\n if (this.focusedHeaderPosition == null) {\n return false;\n }\n var column = headerCtrl.getColumnGroupChild();\n var headerRowIndex = headerCtrl.getRowIndex();\n var pinned = headerCtrl.getPinned();\n var _a = this.focusedHeaderPosition, focusedColumn = _a.column, focusedHeaderRowIndex = _a.headerRowIndex;\n return column === focusedColumn &&\n headerRowIndex === focusedHeaderRowIndex &&\n pinned == focusedColumn.getPinned();\n };\n FocusService.prototype.clearFocusedHeader = function () {\n this.focusedHeaderPosition = null;\n };\n FocusService.prototype.getFocusedHeader = function () {\n return this.focusedHeaderPosition;\n };\n FocusService.prototype.setFocusedHeader = function (headerRowIndex, column) {\n this.focusedHeaderPosition = { headerRowIndex: headerRowIndex, column: column };\n };\n FocusService.prototype.focusHeaderPosition = function (params) {\n var direction = params.direction, fromTab = params.fromTab, allowUserOverride = params.allowUserOverride, event = params.event;\n var headerPosition = params.headerPosition;\n if (allowUserOverride) {\n var gridOptionsWrapper = this.gridOptionsWrapper;\n var currentPosition = this.getFocusedHeader();\n var headerRowCount = this.headerNavigationService.getHeaderRowCount();\n if (fromTab) {\n var userFunc = gridOptionsWrapper.getTabToNextHeaderFunc();\n if (userFunc) {\n var params_1 = {\n backwards: direction === 'Before',\n previousHeaderPosition: currentPosition,\n nextHeaderPosition: headerPosition,\n headerRowCount: headerRowCount,\n };\n headerPosition = userFunc(params_1);\n }\n }\n else {\n var userFunc = gridOptionsWrapper.getNavigateToNextHeaderFunc();\n if (userFunc && event) {\n var params_2 = {\n key: event.key,\n previousHeaderPosition: currentPosition,\n nextHeaderPosition: headerPosition,\n headerRowCount: headerRowCount,\n event: event,\n };\n headerPosition = userFunc(params_2);\n }\n }\n }\n if (!headerPosition) {\n return false;\n }\n if (headerPosition.headerRowIndex === -1) {\n return this.focusGridView(headerPosition.column);\n }\n this.headerNavigationService.scrollToColumn(headerPosition.column, direction);\n var headerRowContainerCtrl = this.ctrlsService.getHeaderRowContainerCtrl(headerPosition.column.getPinned());\n // this will automatically call the setFocusedHeader method above\n var focusSuccess = headerRowContainerCtrl.focusHeader(headerPosition.headerRowIndex, headerPosition.column, event);\n return focusSuccess;\n };\n FocusService.prototype.focusFirstHeader = function () {\n var firstColumn = this.columnModel.getAllDisplayedColumns()[0];\n if (!firstColumn) {\n return false;\n }\n if (firstColumn.getParent()) {\n firstColumn = this.columnModel.getColumnGroupAtLevel(firstColumn, 0);\n }\n return this.focusHeaderPosition({\n headerPosition: { headerRowIndex: 0, column: firstColumn }\n });\n };\n FocusService.prototype.focusLastHeader = function (event) {\n var headerRowIndex = this.headerNavigationService.getHeaderRowCount() - 1;\n var column = last(this.columnModel.getAllDisplayedColumns());\n return this.focusHeaderPosition({\n headerPosition: { headerRowIndex: headerRowIndex, column: column },\n event: event\n });\n };\n FocusService.prototype.isAnyCellFocused = function () {\n return !!this.focusedCellPosition;\n };\n FocusService.prototype.isRowFocused = function (rowIndex, floating) {\n if (this.focusedCellPosition == null) {\n return false;\n }\n return this.focusedCellPosition.rowIndex === rowIndex && this.focusedCellPosition.rowPinned === makeNull(floating);\n };\n FocusService.prototype.findFocusableElements = function (rootNode, exclude, onlyUnmanaged) {\n if (onlyUnmanaged === void 0) { onlyUnmanaged = false; }\n var focusableString = Constants.FOCUSABLE_SELECTOR;\n var excludeString = Constants.FOCUSABLE_EXCLUDE;\n if (exclude) {\n excludeString += ', ' + exclude;\n }\n if (onlyUnmanaged) {\n excludeString += ', [tabindex=\"-1\"]';\n }\n var nodes = Array.prototype.slice.apply(rootNode.querySelectorAll(focusableString));\n var excludeNodes = Array.prototype.slice.apply(rootNode.querySelectorAll(excludeString));\n if (!excludeNodes.length) {\n return nodes;\n }\n var diff = function (a, b) { return a.filter(function (element) { return b.indexOf(element) === -1; }); };\n return diff(nodes, excludeNodes);\n };\n FocusService.prototype.focusInto = function (rootNode, up, onlyUnmanaged) {\n if (up === void 0) { up = false; }\n if (onlyUnmanaged === void 0) { onlyUnmanaged = false; }\n var focusableElements = this.findFocusableElements(rootNode, null, onlyUnmanaged);\n var toFocus = up ? last(focusableElements) : focusableElements[0];\n if (toFocus) {\n toFocus.focus();\n return true;\n }\n return false;\n };\n FocusService.prototype.findNextFocusableElement = function (rootNode, onlyManaged, backwards) {\n if (rootNode === void 0) { rootNode = this.eGridDiv; }\n var focusable = this.findFocusableElements(rootNode, onlyManaged ? ':not([tabindex=\"-1\"])' : null);\n var eDocument = this.gridOptionsWrapper.getDocument();\n var activeEl = eDocument.activeElement;\n var currentIndex;\n if (onlyManaged) {\n currentIndex = focusable.findIndex(function (el) { return el.contains(activeEl); });\n }\n else {\n currentIndex = focusable.indexOf(activeEl);\n }\n var nextIndex = currentIndex + (backwards ? -1 : 1);\n if (nextIndex < 0 || nextIndex >= focusable.length) {\n return null;\n }\n return focusable[nextIndex];\n };\n FocusService.prototype.isFocusUnderManagedComponent = function (rootNode) {\n var eDocument = this.gridOptionsWrapper.getDocument();\n var managedContainers = rootNode.querySelectorAll(\".\" + ManagedFocusFeature.FOCUS_MANAGED_CLASS);\n if (!managedContainers.length) {\n return false;\n }\n for (var i = 0; i < managedContainers.length; i++) {\n if (managedContainers[i].contains(eDocument.activeElement)) {\n return true;\n }\n }\n return false;\n };\n FocusService.prototype.findTabbableParent = function (node, limit) {\n if (limit === void 0) { limit = 5; }\n var counter = 0;\n while (node && getTabIndex(node) === null && ++counter <= limit) {\n node = node.parentElement;\n }\n if (getTabIndex(node) === null) {\n return null;\n }\n return node;\n };\n FocusService.prototype.onCellFocused = function (forceBrowserFocus) {\n var event = {\n type: Events.EVENT_CELL_FOCUSED,\n forceBrowserFocus: forceBrowserFocus,\n rowIndex: null,\n column: null,\n floating: null,\n api: this.gridApi,\n columnApi: this.columnApi,\n rowPinned: null,\n isFullWidthCell: false\n };\n if (this.focusedCellPosition) {\n var rowIndex = event.rowIndex = this.focusedCellPosition.rowIndex;\n var rowPinned = event.rowPinned = this.focusedCellPosition.rowPinned;\n event.column = this.focusedCellPosition.column;\n var rowCtrl = this.rowRenderer.getRowByPosition({ rowIndex: rowIndex, rowPinned: rowPinned });\n if (rowCtrl) {\n event.isFullWidthCell = rowCtrl.isFullWidth();\n }\n }\n this.eventService.dispatchEvent(event);\n };\n FocusService.prototype.focusGridView = function (column, backwards) {\n // if suppressCellFocus is `true`, it means the user does not want to\n // navigate between the cells using tab. Instead, we put focus on either\n // the header or after the grid, depending on whether tab or shift-tab was pressed.\n if (this.gridOptionsWrapper.isSuppressCellFocus()) {\n if (backwards) {\n return this.focusLastHeader();\n }\n return this.focusNextGridCoreContainer(false);\n }\n var nextRow = backwards\n ? this.rowPositionUtils.getLastRow()\n : this.rowPositionUtils.getFirstRow();\n if (!nextRow) {\n return false;\n }\n var rowIndex = nextRow.rowIndex, rowPinned = nextRow.rowPinned;\n var focusedHeader = this.getFocusedHeader();\n if (!column && focusedHeader) {\n column = focusedHeader.column;\n }\n if (rowIndex == null || !column) {\n return false;\n }\n this.navigationService.ensureCellVisible({ rowIndex: rowIndex, column: column, rowPinned: rowPinned });\n this.setFocusedCell(rowIndex, column, makeNull(rowPinned), true);\n if (this.rangeService) {\n var cellPosition = { rowIndex: rowIndex, rowPinned: rowPinned, column: column };\n this.rangeService.setRangeToCell(cellPosition);\n }\n return true;\n };\n FocusService.prototype.focusNextGridCoreContainer = function (backwards) {\n if (this.gridCtrl.focusNextInnerContainer(backwards)) {\n return true;\n }\n if (!backwards && !this.gridCtrl.isDetailGrid()) {\n this.gridCtrl.forceFocusOutOfContainer();\n }\n return false;\n };\n var FocusService_1;\n FocusService.AG_KEYBOARD_FOCUS = 'ag-keyboard-focus';\n FocusService.keyboardModeActive = false;\n FocusService.instancesMonitored = new Map();\n __decorate$1L([\n Autowired('eGridDiv')\n ], FocusService.prototype, \"eGridDiv\", void 0);\n __decorate$1L([\n Autowired('columnModel')\n ], FocusService.prototype, \"columnModel\", void 0);\n __decorate$1L([\n Autowired('headerNavigationService')\n ], FocusService.prototype, \"headerNavigationService\", void 0);\n __decorate$1L([\n Autowired('columnApi')\n ], FocusService.prototype, \"columnApi\", void 0);\n __decorate$1L([\n Autowired('gridApi')\n ], FocusService.prototype, \"gridApi\", void 0);\n __decorate$1L([\n Autowired('rowRenderer')\n ], FocusService.prototype, \"rowRenderer\", void 0);\n __decorate$1L([\n Autowired('rowPositionUtils')\n ], FocusService.prototype, \"rowPositionUtils\", void 0);\n __decorate$1L([\n Optional('rangeService')\n ], FocusService.prototype, \"rangeService\", void 0);\n __decorate$1L([\n Autowired('navigationService')\n ], FocusService.prototype, \"navigationService\", void 0);\n __decorate$1L([\n Autowired('ctrlsService')\n ], FocusService.prototype, \"ctrlsService\", void 0);\n __decorate$1L([\n PostConstruct\n ], FocusService.prototype, \"init\", null);\n FocusService = FocusService_1 = __decorate$1L([\n Bean('focusService')\n ], FocusService);\n return FocusService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$26 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1M = (undefined && undefined.__decorate) || function (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};\nvar DIRECTION;\n(function (DIRECTION) {\n DIRECTION[DIRECTION[\"vertical\"] = 0] = \"vertical\";\n DIRECTION[DIRECTION[\"horizontal\"] = 1] = \"horizontal\";\n})(DIRECTION || (DIRECTION = {}));\nvar instanceIdSeq = 0;\nvar PopupService = /** @class */ (function (_super) {\n __extends$26(PopupService, _super);\n function PopupService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.popupList = [];\n return _this;\n }\n PopupService.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function (p) {\n _this.gridCtrl = p.gridCtrl;\n _this.addManagedListener(_this.gridCtrl, Events.EVENT_KEYBOARD_FOCUS, function () {\n _this.popupList.forEach(function (popup) { return popup.element.classList.add(FocusService.AG_KEYBOARD_FOCUS); });\n });\n _this.addManagedListener(_this.gridCtrl, Events.EVENT_MOUSE_FOCUS, function () {\n _this.popupList.forEach(function (popup) { return popup.element.classList.remove(FocusService.AG_KEYBOARD_FOCUS); });\n });\n });\n };\n PopupService.prototype.getPopupParent = function () {\n var ePopupParent = this.gridOptionsWrapper.getPopupParent();\n if (ePopupParent) {\n return ePopupParent;\n }\n return this.gridCtrl.getGui();\n };\n PopupService.prototype.positionPopupForMenu = function (params) {\n var sourceRect = params.eventSource.getBoundingClientRect();\n var parentRect = this.getParentRect();\n var y = this.keepXYWithinBounds(params.ePopup, sourceRect.top - parentRect.top, DIRECTION.vertical);\n var minWidth = (params.ePopup.clientWidth > 0) ? params.ePopup.clientWidth : 200;\n params.ePopup.style.minWidth = minWidth + \"px\";\n var widthOfParent = parentRect.right - parentRect.left;\n var maxX = widthOfParent - minWidth;\n // the x position of the popup depends on RTL or LTR. for normal cases, LTR, we put the child popup\n // to the right, unless it doesn't fit and we then put it to the left. for RTL it's the other way around,\n // we try place it first to the left, and then if not to the right.\n var x;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n // for RTL, try left first\n x = xLeftPosition();\n if (x < 0) {\n x = xRightPosition();\n }\n if (x > maxX) {\n x = 0;\n }\n }\n else {\n // for LTR, try right first\n x = xRightPosition();\n if (x > maxX) {\n x = xLeftPosition();\n }\n if (x < 0) {\n x = 0;\n }\n }\n params.ePopup.style.left = x + \"px\";\n params.ePopup.style.top = y + \"px\";\n function xRightPosition() {\n return sourceRect.right - parentRect.left - 2;\n }\n function xLeftPosition() {\n return sourceRect.left - parentRect.left - minWidth;\n }\n };\n PopupService.prototype.positionPopupUnderMouseEvent = function (params) {\n var ePopup = params.ePopup, nudgeX = params.nudgeX, nudgeY = params.nudgeY;\n var _a = this.calculatePointerAlign(params.mouseEvent), x = _a.x, y = _a.y;\n this.positionPopup({\n ePopup: ePopup,\n x: x,\n y: y,\n nudgeX: nudgeX,\n nudgeY: nudgeY,\n keepWithinBounds: true\n });\n this.callPostProcessPopup(params.type, params.ePopup, null, params.mouseEvent, params.column, params.rowNode);\n };\n PopupService.prototype.calculatePointerAlign = function (e) {\n var parentRect = this.getParentRect();\n return {\n x: e.clientX - parentRect.left,\n y: e.clientY - parentRect.top\n };\n };\n PopupService.prototype.positionPopupUnderComponent = function (params) {\n var sourceRect = params.eventSource.getBoundingClientRect();\n var alignSide = params.alignSide || 'left';\n var parentRect = this.getParentRect();\n var x = sourceRect.left - parentRect.left;\n if (alignSide === 'right') {\n x -= (params.ePopup.offsetWidth - sourceRect.width);\n }\n this.positionPopup({\n ePopup: params.ePopup,\n nudgeX: params.nudgeX,\n nudgeY: params.nudgeY,\n x: x,\n y: sourceRect.top - parentRect.top + sourceRect.height,\n keepWithinBounds: params.keepWithinBounds\n });\n this.callPostProcessPopup(params.type, params.ePopup, params.eventSource, null, params.column, params.rowNode);\n };\n PopupService.prototype.positionPopupOverComponent = function (params) {\n var sourceRect = params.eventSource.getBoundingClientRect();\n var parentRect = this.getParentRect();\n this.positionPopup({\n ePopup: params.ePopup,\n nudgeX: params.nudgeX,\n nudgeY: params.nudgeY,\n x: sourceRect.left - parentRect.left,\n y: sourceRect.top - parentRect.top,\n keepWithinBounds: params.keepWithinBounds\n });\n this.callPostProcessPopup(params.type, params.ePopup, params.eventSource, null, params.column, params.rowNode);\n };\n PopupService.prototype.callPostProcessPopup = function (type, ePopup, eventSource, mouseEvent, column, rowNode) {\n var callback = this.gridOptionsWrapper.getPostProcessPopupFunc();\n if (callback) {\n var params = {\n column: column,\n rowNode: rowNode,\n ePopup: ePopup,\n type: type,\n eventSource: eventSource,\n mouseEvent: mouseEvent\n };\n callback(params);\n }\n };\n PopupService.prototype.positionPopup = function (params) {\n var ePopup = params.ePopup, keepWithinBounds = params.keepWithinBounds, nudgeX = params.nudgeX, nudgeY = params.nudgeY;\n var x = params.x, y = params.y;\n if (nudgeX) {\n x += nudgeX;\n }\n if (nudgeY) {\n y += nudgeY;\n }\n // if popup is overflowing to the bottom, move it up\n if (keepWithinBounds) {\n x = this.keepXYWithinBounds(ePopup, x, DIRECTION.horizontal);\n y = this.keepXYWithinBounds(ePopup, y, DIRECTION.vertical);\n }\n ePopup.style.left = x + \"px\";\n ePopup.style.top = y + \"px\";\n };\n PopupService.prototype.getActivePopups = function () {\n return this.popupList.map(function (popup) { return popup.element; });\n };\n PopupService.prototype.getPopupList = function () {\n return this.popupList;\n };\n PopupService.prototype.getParentRect = function () {\n // subtract the popup parent borders, because popupParent.getBoundingClientRect\n // returns the rect outside the borders, but the 0,0 coordinate for absolute\n // positioning is inside the border, leading the popup to be off by the width\n // of the border\n var eDocument = this.gridOptionsWrapper.getDocument();\n var popupParent = this.getPopupParent();\n if (popupParent === eDocument.body) {\n popupParent = eDocument.documentElement;\n }\n var style = getComputedStyle(popupParent);\n var bounds = popupParent.getBoundingClientRect();\n return {\n top: bounds.top + parseFloat(style.borderTopWidth) || 0,\n left: bounds.left + parseFloat(style.borderLeftWidth) || 0,\n right: bounds.right + parseFloat(style.borderRightWidth) || 0,\n bottom: bounds.bottom + parseFloat(style.borderBottomWidth) || 0,\n };\n };\n PopupService.prototype.keepXYWithinBounds = function (ePopup, position, direction) {\n var isVertical = direction === DIRECTION.vertical;\n var sizeProperty = isVertical ? 'clientHeight' : 'clientWidth';\n var anchorProperty = isVertical ? 'top' : 'left';\n var offsetProperty = isVertical ? 'offsetHeight' : 'offsetWidth';\n var scrollPositionProperty = isVertical ? 'scrollTop' : 'scrollLeft';\n var eDocument = this.gridOptionsWrapper.getDocument();\n var docElement = eDocument.documentElement;\n var popupParent = this.getPopupParent();\n var parentRect = popupParent.getBoundingClientRect();\n var documentRect = eDocument.documentElement.getBoundingClientRect();\n var isBody = popupParent === eDocument.body;\n var offsetSize = ePopup[offsetProperty];\n var getSize = isVertical ? getAbsoluteHeight : getAbsoluteWidth;\n var sizeOfParent = isBody ? (getSize(docElement) + docElement[scrollPositionProperty]) : popupParent[sizeProperty];\n if (isBody) {\n sizeOfParent -= Math.abs(documentRect[anchorProperty] - parentRect[anchorProperty]);\n }\n var max = sizeOfParent - offsetSize;\n return Math.min(Math.max(position, 0), Math.abs(max));\n };\n PopupService.prototype.keepPopupPositionedRelativeTo = function (params) {\n var _this = this;\n var eParent = this.getPopupParent();\n var parentRect = eParent.getBoundingClientRect();\n var sourceRect = params.element.getBoundingClientRect();\n var initialDiffTop = parentRect.top - sourceRect.top;\n var initialDiffLeft = parentRect.left - sourceRect.left;\n var lastDiffTop = initialDiffTop;\n var lastDiffLeft = initialDiffLeft;\n var topPx = params.ePopup.style.top;\n var top = parseInt(topPx.substring(0, topPx.length - 1), 10);\n var leftPx = params.ePopup.style.left;\n var left = parseInt(leftPx.substring(0, leftPx.length - 1), 10);\n return new AgPromise(function (resolve) {\n _this.getFrameworkOverrides().setInterval(function () {\n var pRect = eParent.getBoundingClientRect();\n var sRect = params.element.getBoundingClientRect();\n var elementNotInDom = sRect.top == 0 && sRect.left == 0 && sRect.height == 0 && sRect.width == 0;\n if (elementNotInDom) {\n params.hidePopup();\n return;\n }\n var currentDiffTop = pRect.top - sRect.top;\n if (currentDiffTop != lastDiffTop) {\n var newTop = _this.keepXYWithinBounds(params.ePopup, top + initialDiffTop - currentDiffTop, DIRECTION.vertical);\n params.ePopup.style.top = newTop + \"px\";\n }\n lastDiffTop = currentDiffTop;\n var currentDiffLeft = pRect.left - sRect.left;\n if (currentDiffLeft != lastDiffLeft) {\n var newLeft = _this.keepXYWithinBounds(params.ePopup, left + initialDiffLeft - currentDiffLeft, DIRECTION.horizontal);\n params.ePopup.style.left = newLeft + \"px\";\n }\n lastDiffLeft = currentDiffLeft;\n }, 200).then(function (intervalId) {\n var result = function () {\n if (intervalId != null) {\n window.clearInterval(intervalId);\n }\n };\n resolve(result);\n });\n });\n };\n PopupService.prototype.addPopup = function (params) {\n var _this = this;\n var modal = params.modal, eChild = params.eChild, closeOnEsc = params.closeOnEsc, closedCallback = params.closedCallback, click = params.click, alwaysOnTop = params.alwaysOnTop, afterGuiAttached = params.afterGuiAttached, positionCallback = params.positionCallback, anchorToElement = params.anchorToElement, ariaLabel = params.ariaLabel;\n var eDocument = this.gridOptionsWrapper.getDocument();\n var destroyPositionTracker = new AgPromise(function (resolve) { return resolve(function () { }); });\n if (!eDocument) {\n console.warn('ag-grid: could not find the document, document is empty');\n return { hideFunc: function () { }, stopAnchoringPromise: destroyPositionTracker };\n }\n var pos = this.popupList.findIndex(function (popup) { return popup.element === eChild; });\n if (pos !== -1) {\n var popup = this.popupList[pos];\n return { hideFunc: popup.hideFunc, stopAnchoringPromise: popup.stopAnchoringPromise };\n }\n var ePopupParent = this.getPopupParent();\n if (eChild.style.top == null) {\n eChild.style.top = '0px';\n }\n if (eChild.style.left == null) {\n eChild.style.left = '0px';\n }\n // add env CSS class to child, in case user provided a popup parent, which means\n // theme class may be missing\n var eWrapper = document.createElement('div');\n var theme = this.environment.getTheme().theme;\n if (theme) {\n eWrapper.classList.add(theme);\n }\n eWrapper.classList.add('ag-popup');\n eChild.classList.add(this.gridOptionsWrapper.isEnableRtl() ? 'ag-rtl' : 'ag-ltr', 'ag-popup-child');\n if (!eChild.hasAttribute('role')) {\n setAriaRole(eChild, 'dialog');\n }\n setAriaLabel(eChild, ariaLabel);\n if (this.focusService.isKeyboardMode()) {\n eChild.classList.add(FocusService.AG_KEYBOARD_FOCUS);\n }\n eWrapper.appendChild(eChild);\n ePopupParent.appendChild(eWrapper);\n if (alwaysOnTop) {\n this.setAlwaysOnTop(eWrapper, true);\n }\n else {\n this.bringPopupToFront(eWrapper);\n }\n var popupHidden = false;\n var hidePopupOnKeyboardEvent = function (event) {\n if (!eWrapper.contains(eDocument.activeElement)) {\n return;\n }\n var key = event.key;\n if (key === KeyCode.ESCAPE) {\n hidePopup({ keyboardEvent: event });\n }\n };\n var hidePopupOnMouseEvent = function (event) { return hidePopup({ mouseEvent: event }); };\n var hidePopupOnTouchEvent = function (event) { return hidePopup({ touchEvent: event }); };\n var hidePopup = function (popupParams) {\n if (popupParams === void 0) { popupParams = {}; }\n var mouseEvent = popupParams.mouseEvent, touchEvent = popupParams.touchEvent, keyboardEvent = popupParams.keyboardEvent;\n if (\n // we don't hide popup if the event was on the child, or any\n // children of this child\n _this.isEventFromCurrentPopup({ mouseEvent: mouseEvent, touchEvent: touchEvent }, eChild) ||\n // if the event to close is actually the open event, then ignore it\n _this.isEventSameChainAsOriginalEvent({ originalMouseEvent: click, mouseEvent: mouseEvent, touchEvent: touchEvent }) ||\n // this method should only be called once. the client can have different\n // paths, each one wanting to close, so this method may be called multiple times.\n popupHidden) {\n return;\n }\n popupHidden = true;\n ePopupParent.removeChild(eWrapper);\n eDocument.removeEventListener('keydown', hidePopupOnKeyboardEvent);\n eDocument.removeEventListener('mousedown', hidePopupOnMouseEvent);\n eDocument.removeEventListener('touchstart', hidePopupOnTouchEvent);\n eDocument.removeEventListener('contextmenu', hidePopupOnMouseEvent);\n _this.eventService.removeEventListener(Events.EVENT_DRAG_STARTED, hidePopupOnMouseEvent);\n if (closedCallback) {\n closedCallback(mouseEvent || touchEvent || keyboardEvent);\n }\n _this.popupList = _this.popupList.filter(function (popup) { return popup.element !== eChild; });\n if (destroyPositionTracker) {\n destroyPositionTracker.then(function (destroyFunc) { return destroyFunc && destroyFunc(); });\n }\n };\n if (afterGuiAttached) {\n afterGuiAttached({ hidePopup: hidePopup });\n }\n // if we add these listeners now, then the current mouse\n // click will be included, which we don't want\n window.setTimeout(function () {\n if (closeOnEsc) {\n eDocument.addEventListener('keydown', hidePopupOnKeyboardEvent);\n }\n if (modal) {\n eDocument.addEventListener('mousedown', hidePopupOnMouseEvent);\n _this.eventService.addEventListener(Events.EVENT_DRAG_STARTED, hidePopupOnMouseEvent);\n eDocument.addEventListener('touchstart', hidePopupOnTouchEvent);\n eDocument.addEventListener('contextmenu', hidePopupOnMouseEvent);\n }\n }, 0);\n if (positionCallback) {\n positionCallback();\n }\n if (anchorToElement) {\n // keeps popup positioned under created, eg if context menu, if user scrolls\n // using touchpad and the cell moves, it moves the popup to keep it with the cell.\n destroyPositionTracker = this.keepPopupPositionedRelativeTo({\n element: anchorToElement,\n ePopup: eChild,\n hidePopup: hidePopup\n });\n }\n this.popupList.push({\n element: eChild,\n wrapper: eWrapper,\n hideFunc: hidePopup,\n stopAnchoringPromise: destroyPositionTracker,\n instanceId: instanceIdSeq++,\n isAnchored: !!anchorToElement\n });\n return {\n hideFunc: hidePopup,\n stopAnchoringPromise: destroyPositionTracker\n };\n };\n PopupService.prototype.hasAnchoredPopup = function () {\n return this.popupList.some(function (popup) { return popup.isAnchored; });\n };\n PopupService.prototype.isEventFromCurrentPopup = function (params, target) {\n var mouseEvent = params.mouseEvent, touchEvent = params.touchEvent;\n var event = mouseEvent ? mouseEvent : touchEvent;\n if (!event) {\n return false;\n }\n var indexOfThisChild = this.popupList.findIndex(function (popup) { return popup.element === target; });\n if (indexOfThisChild === -1) {\n return false;\n }\n for (var i = indexOfThisChild; i < this.popupList.length; i++) {\n var popup = this.popupList[i];\n if (isElementInEventPath(popup.element, event)) {\n return true;\n }\n }\n // if the user did not write their own Custom Element to be rendered as popup\n // and this component has an additional popup element, they should have the\n // `ag-custom-component-popup` class to be detected as part of the Custom Component\n return this.isElementWithinCustomPopup(event.target);\n };\n PopupService.prototype.isElementWithinCustomPopup = function (el) {\n var eDocument = this.gridOptionsWrapper.getDocument();\n while (el && el !== eDocument.body) {\n if (el.classList.contains('ag-custom-component-popup') || el.parentElement === null) {\n return true;\n }\n el = el.parentElement;\n }\n return false;\n };\n // in some browsers, the context menu event can be fired before the click event, which means\n // the context menu event could open the popup, but then the click event closes it straight away.\n PopupService.prototype.isEventSameChainAsOriginalEvent = function (params) {\n var originalMouseEvent = params.originalMouseEvent, mouseEvent = params.mouseEvent, touchEvent = params.touchEvent;\n // we check the coordinates of the event, to see if it's the same event. there is a 1 / 1000 chance that\n // the event is a different event, however that is an edge case that is not very relevant (the user clicking\n // twice on the same location isn't a normal path).\n // event could be mouse event or touch event.\n var mouseEventOrTouch = null;\n if (mouseEvent) {\n // mouse event can be used direction, it has coordinates\n mouseEventOrTouch = mouseEvent;\n }\n else if (touchEvent) {\n // touch event doesn't have coordinates, need it's touch object\n mouseEventOrTouch = touchEvent.touches[0];\n }\n if (mouseEventOrTouch && originalMouseEvent) {\n // for x, allow 4px margin, to cover iPads, where touch (which opens menu) is followed\n // by browser click (when you finger up, touch is interrupted as click in browser)\n var screenX_1 = mouseEvent ? mouseEvent.screenX : 0;\n var screenY_1 = mouseEvent ? mouseEvent.screenY : 0;\n var xMatch = Math.abs(originalMouseEvent.screenX - screenX_1) < 5;\n var yMatch = Math.abs(originalMouseEvent.screenY - screenY_1) < 5;\n if (xMatch && yMatch) {\n return true;\n }\n }\n return false;\n };\n PopupService.prototype.getWrapper = function (ePopup) {\n while (!ePopup.classList.contains('ag-popup') && ePopup.parentElement) {\n ePopup = ePopup.parentElement;\n }\n return ePopup.classList.contains('ag-popup') ? ePopup : null;\n };\n PopupService.prototype.setAlwaysOnTop = function (ePopup, alwaysOnTop) {\n var eWrapper = this.getWrapper(ePopup);\n if (!eWrapper) {\n return;\n }\n eWrapper.classList.toggle('ag-always-on-top', !!alwaysOnTop);\n if (alwaysOnTop) {\n this.bringPopupToFront(eWrapper);\n }\n };\n PopupService.prototype.bringPopupToFront = function (ePopup) {\n var parent = this.getPopupParent();\n var popupList = Array.prototype.slice.call(parent.querySelectorAll('.ag-popup'));\n var popupLen = popupList.length;\n var alwaysOnTopList = Array.prototype.slice.call(parent.querySelectorAll('.ag-popup.ag-always-on-top'));\n var onTopLength = alwaysOnTopList.length;\n var eWrapper = this.getWrapper(ePopup);\n if (!eWrapper || popupLen <= 1 || !parent.contains(ePopup)) {\n return;\n }\n var pos = popupList.indexOf(eWrapper);\n var innerEls = eWrapper.querySelectorAll('div');\n var innerElsScrollMap = [];\n innerEls.forEach(function (el) {\n if (el.scrollTop !== 0) {\n innerElsScrollMap.push([el, el.scrollTop]);\n }\n });\n if (onTopLength) {\n var isPopupAlwaysOnTop = eWrapper.classList.contains('ag-always-on-top');\n if (isPopupAlwaysOnTop) {\n if (pos !== popupLen - 1) {\n last(alwaysOnTopList).insertAdjacentElement('afterend', eWrapper);\n }\n }\n else if (pos !== popupLen - onTopLength - 1) {\n alwaysOnTopList[0].insertAdjacentElement('beforebegin', eWrapper);\n }\n }\n else if (pos !== popupLen - 1) {\n last(popupList).insertAdjacentElement('afterend', eWrapper);\n }\n while (innerElsScrollMap.length) {\n var currentEl = innerElsScrollMap.pop();\n currentEl[0].scrollTop = currentEl[1];\n }\n var params = {\n type: 'popupToFront',\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n eWrapper: eWrapper\n };\n this.eventService.dispatchEvent(params);\n };\n __decorate$1M([\n Autowired('environment')\n ], PopupService.prototype, \"environment\", void 0);\n __decorate$1M([\n Autowired('focusService')\n ], PopupService.prototype, \"focusService\", void 0);\n __decorate$1M([\n Autowired('ctrlsService')\n ], PopupService.prototype, \"ctrlsService\", void 0);\n __decorate$1M([\n PostConstruct\n ], PopupService.prototype, \"postConstruct\", null);\n PopupService = __decorate$1M([\n Bean('popupService')\n ], PopupService);\n return PopupService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$27 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1N = (undefined && undefined.__decorate) || function (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};\nvar VirtualList = /** @class */ (function (_super) {\n __extends$27(VirtualList, _super);\n function VirtualList(cssIdentifier, ariaRole, listName) {\n if (cssIdentifier === void 0) { cssIdentifier = 'default'; }\n if (ariaRole === void 0) { ariaRole = 'listbox'; }\n var _this = _super.call(this, VirtualList.getTemplate(cssIdentifier)) || this;\n _this.cssIdentifier = cssIdentifier;\n _this.ariaRole = ariaRole;\n _this.listName = listName;\n _this.renderedRows = new Map();\n _this.rowHeight = 20;\n _this.isDestroyed = false;\n return _this;\n }\n VirtualList.prototype.postConstruct = function () {\n var _this = this;\n this.addScrollListener();\n this.rowHeight = this.getItemHeight();\n this.addResizeObserver();\n this.initialiseTabGuard({\n onFocusIn: function (e) { return _this.onFocusIn(e); },\n onFocusOut: function (e) { return _this.onFocusOut(e); },\n focusInnerElement: function (fromBottom) { return _this.focusInnerElement(fromBottom); },\n onTabKeyDown: function (e) { return _this.onTabKeyDown(e); },\n handleKeyDown: function (e) { return _this.handleKeyDown(e); }\n });\n this.setAriaProperties();\n };\n VirtualList.prototype.setAriaProperties = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var listName = translate('ariaDefaultListName', this.listName || 'List');\n var ariaEl = this.eContainer;\n setAriaRole(ariaEl, this.ariaRole);\n setAriaLabel(ariaEl, listName);\n };\n VirtualList.prototype.addResizeObserver = function () {\n var listener = this.drawVirtualRows.bind(this);\n var destroyObserver = this.resizeObserverService.observeResize(this.getGui(), listener);\n this.addDestroyFunc(destroyObserver);\n };\n VirtualList.prototype.focusInnerElement = function (fromBottom) {\n this.focusRow(fromBottom ? this.model.getRowCount() - 1 : 0);\n };\n VirtualList.prototype.onFocusIn = function (e) {\n var target = e.target;\n if (target.classList.contains('ag-virtual-list-item')) {\n this.lastFocusedRowIndex = getAriaPosInSet(target) - 1;\n }\n return false;\n };\n VirtualList.prototype.onFocusOut = function (e) {\n if (!this.getFocusableElement().contains(e.relatedTarget)) {\n this.lastFocusedRowIndex = null;\n }\n return false;\n };\n VirtualList.prototype.handleKeyDown = function (e) {\n switch (e.key) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n if (this.navigate(e.key === KeyCode.UP)) {\n e.preventDefault();\n }\n break;\n }\n };\n VirtualList.prototype.onTabKeyDown = function (e) {\n if (this.navigate(e.shiftKey)) {\n e.preventDefault();\n }\n else {\n // focus on the first or last focusable element to ensure that any other handlers start from there\n this.focusService.focusInto(this.getGui(), !e.shiftKey);\n }\n };\n VirtualList.prototype.navigate = function (up) {\n if (this.lastFocusedRowIndex == null) {\n return false;\n }\n var nextRow = this.lastFocusedRowIndex + (up ? -1 : 1);\n if (nextRow < 0 || nextRow >= this.model.getRowCount()) {\n return false;\n }\n this.focusRow(nextRow);\n return true;\n };\n VirtualList.prototype.getLastFocusedRow = function () {\n return this.lastFocusedRowIndex;\n };\n VirtualList.prototype.focusRow = function (rowNumber) {\n var _this = this;\n this.ensureIndexVisible(rowNumber);\n window.setTimeout(function () {\n var renderedRow = _this.renderedRows.get(rowNumber);\n if (renderedRow) {\n renderedRow.eDiv.focus();\n }\n }, 10);\n };\n VirtualList.prototype.getComponentAt = function (rowIndex) {\n var comp = this.renderedRows.get(rowIndex);\n return comp && comp.rowComponent;\n };\n VirtualList.getTemplate = function (cssIdentifier) {\n return /* html */ \"\\n
\\n
\\n
\";\n };\n VirtualList.prototype.getItemHeight = function () {\n return this.gridOptionsWrapper.getListItemHeight();\n };\n VirtualList.prototype.ensureIndexVisible = function (index) {\n var lastRow = this.model.getRowCount();\n if (typeof index !== 'number' || index < 0 || index >= lastRow) {\n console.warn('AG Grid: invalid row index for ensureIndexVisible: ' + index);\n return;\n }\n var rowTopPixel = index * this.rowHeight;\n var rowBottomPixel = rowTopPixel + this.rowHeight;\n var eGui = this.getGui();\n var viewportTopPixel = eGui.scrollTop;\n var viewportHeight = eGui.offsetHeight;\n var viewportBottomPixel = viewportTopPixel + viewportHeight;\n var viewportScrolledPastRow = viewportTopPixel > rowTopPixel;\n var viewportScrolledBeforeRow = viewportBottomPixel < rowBottomPixel;\n if (viewportScrolledPastRow) {\n // if row is before, scroll up with row at top\n eGui.scrollTop = rowTopPixel;\n }\n else if (viewportScrolledBeforeRow) {\n // if row is below, scroll down with row at bottom\n var newScrollPosition = rowBottomPixel - viewportHeight;\n eGui.scrollTop = newScrollPosition;\n }\n };\n VirtualList.prototype.setComponentCreator = function (componentCreator) {\n this.componentCreator = componentCreator;\n };\n VirtualList.prototype.getRowHeight = function () {\n return this.rowHeight;\n };\n VirtualList.prototype.getScrollTop = function () {\n return this.getGui().scrollTop;\n };\n VirtualList.prototype.setRowHeight = function (rowHeight) {\n this.rowHeight = rowHeight;\n this.refresh();\n };\n VirtualList.prototype.refresh = function () {\n var _this = this;\n if (this.model == null || this.isDestroyed) {\n return;\n }\n var rowCount = this.model.getRowCount();\n this.eContainer.style.height = rowCount * this.rowHeight + \"px\";\n // ensure height is applied before attempting to redraw rows\n waitUntil(function () { return _this.eContainer.clientHeight >= rowCount * _this.rowHeight; }, function () {\n if (_this.isDestroyed) {\n return;\n }\n _this.clearVirtualRows();\n _this.drawVirtualRows();\n });\n };\n VirtualList.prototype.clearVirtualRows = function () {\n var _this = this;\n this.renderedRows.forEach(function (_, rowIndex) { return _this.removeRow(rowIndex); });\n };\n VirtualList.prototype.drawVirtualRows = function () {\n var gui = this.getGui();\n var topPixel = gui.scrollTop;\n var bottomPixel = topPixel + gui.offsetHeight;\n var firstRow = Math.floor(topPixel / this.rowHeight);\n var lastRow = Math.floor(bottomPixel / this.rowHeight);\n this.ensureRowsRendered(firstRow, lastRow);\n };\n VirtualList.prototype.ensureRowsRendered = function (start, finish) {\n var _this = this;\n // remove any rows that are no longer required\n this.renderedRows.forEach(function (_, rowIndex) {\n if ((rowIndex < start || rowIndex > finish) && rowIndex !== _this.lastFocusedRowIndex) {\n _this.removeRow(rowIndex);\n }\n });\n // insert any required new rows\n for (var rowIndex = start; rowIndex <= finish; rowIndex++) {\n if (this.renderedRows.has(rowIndex)) {\n continue;\n }\n // check this row actually exists (in case overflow buffer window exceeds real data)\n if (rowIndex < this.model.getRowCount()) {\n this.insertRow(rowIndex);\n }\n }\n };\n VirtualList.prototype.insertRow = function (rowIndex) {\n var _this = this;\n var value = this.model.getRow(rowIndex);\n var eDiv = document.createElement('div');\n eDiv.classList.add('ag-virtual-list-item', \"ag-\" + this.cssIdentifier + \"-virtual-list-item\");\n setAriaRole(eDiv, this.ariaRole === 'tree' ? 'treeitem' : 'option');\n setAriaSetSize(eDiv, this.model.getRowCount());\n setAriaPosInSet(eDiv, rowIndex + 1);\n eDiv.setAttribute('tabindex', '-1');\n if (typeof this.model.isRowSelected === 'function') {\n var isSelected = this.model.isRowSelected(rowIndex);\n setAriaSelected(eDiv, !!isSelected);\n setAriaChecked(eDiv, isSelected);\n }\n eDiv.style.height = this.rowHeight + \"px\";\n eDiv.style.top = this.rowHeight * rowIndex + \"px\";\n var rowComponent = this.componentCreator(value, eDiv);\n rowComponent.addGuiEventListener('focusin', function () { return _this.lastFocusedRowIndex = rowIndex; });\n eDiv.appendChild(rowComponent.getGui());\n // keep the DOM order consistent with the order of the rows\n if (this.renderedRows.has(rowIndex - 1)) {\n this.renderedRows.get(rowIndex - 1).eDiv.insertAdjacentElement('afterend', eDiv);\n }\n else if (this.renderedRows.has(rowIndex + 1)) {\n this.renderedRows.get(rowIndex + 1).eDiv.insertAdjacentElement('beforebegin', eDiv);\n }\n else {\n this.eContainer.appendChild(eDiv);\n }\n this.renderedRows.set(rowIndex, { rowComponent: rowComponent, eDiv: eDiv });\n };\n VirtualList.prototype.removeRow = function (rowIndex) {\n var component = this.renderedRows.get(rowIndex);\n this.eContainer.removeChild(component.eDiv);\n this.destroyBean(component.rowComponent);\n this.renderedRows.delete(rowIndex);\n };\n VirtualList.prototype.addScrollListener = function () {\n var _this = this;\n this.addGuiEventListener('scroll', function () { return _this.drawVirtualRows(); });\n };\n VirtualList.prototype.setModel = function (model) {\n this.model = model;\n };\n VirtualList.prototype.destroy = function () {\n if (this.isDestroyed) {\n return;\n }\n this.clearVirtualRows();\n this.isDestroyed = true;\n _super.prototype.destroy.call(this);\n };\n __decorate$1N([\n Autowired('resizeObserverService')\n ], VirtualList.prototype, \"resizeObserverService\", void 0);\n __decorate$1N([\n Autowired('focusService')\n ], VirtualList.prototype, \"focusService\", void 0);\n __decorate$1N([\n RefSelector('eContainer')\n ], VirtualList.prototype, \"eContainer\", void 0);\n __decorate$1N([\n PostConstruct\n ], VirtualList.prototype, \"postConstruct\", null);\n return VirtualList;\n}(TabGuardComp));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar OUTSIDE_ANGULAR_EVENTS = ['mouseover', 'mouseout', 'mouseenter', 'mouseleave'];\nvar PASSIVE_EVENTS$1 = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];\n/** The base frameworks, eg React & Angular, override this bean with implementations specific to their requirement. */\nvar VanillaFrameworkOverrides = /** @class */ (function () {\n function VanillaFrameworkOverrides() {\n this.isOutsideAngular = function (eventType) { return includes(OUTSIDE_ANGULAR_EVENTS, eventType); };\n }\n // for Vanilla JS, we use simple timeout\n VanillaFrameworkOverrides.prototype.setTimeout = function (action, timeout) {\n window.setTimeout(action, timeout);\n };\n VanillaFrameworkOverrides.prototype.setInterval = function (action, timeout) {\n return new AgPromise(function (resolve) {\n resolve(window.setInterval(action, timeout));\n });\n };\n // for Vanilla JS, we just add the event to the element\n VanillaFrameworkOverrides.prototype.addEventListener = function (element, type, listener, useCapture) {\n var isPassive = includes(PASSIVE_EVENTS$1, type);\n element.addEventListener(type, listener, { capture: !!useCapture, passive: isPassive });\n };\n // for Vanilla JS, we just execute the listener\n VanillaFrameworkOverrides.prototype.dispatchEvent = function (eventType, listener, global) {\n listener();\n };\n VanillaFrameworkOverrides.prototype.frameworkComponent = function (name) {\n return null;\n };\n VanillaFrameworkOverrides.prototype.isFrameworkComponent = function (comp) {\n return false;\n };\n return VanillaFrameworkOverrides;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$28 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1O = (undefined && undefined.__decorate) || function (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};\nvar CellNavigationService = /** @class */ (function (_super) {\n __extends$28(CellNavigationService, _super);\n function CellNavigationService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // returns null if no cell to focus on, ie at the end of the grid\n CellNavigationService.prototype.getNextCellToFocus = function (key, focusedCell, ctrlPressed) {\n if (ctrlPressed === void 0) { ctrlPressed = false; }\n if (ctrlPressed) {\n return this.getNextCellToFocusWithCtrlPressed(key, focusedCell);\n }\n return this.getNextCellToFocusWithoutCtrlPressed(key, focusedCell);\n };\n CellNavigationService.prototype.getNextCellToFocusWithCtrlPressed = function (key, focusedCell) {\n var upKey = key === KeyCode.UP;\n var downKey = key === KeyCode.DOWN;\n var leftKey = key === KeyCode.LEFT;\n var column;\n var rowIndex;\n if (upKey || downKey) {\n rowIndex = upKey ? this.paginationProxy.getPageFirstRow() : this.paginationProxy.getPageLastRow();\n column = focusedCell.column;\n }\n else {\n var allColumns = this.columnModel.getAllDisplayedColumns();\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n rowIndex = focusedCell.rowIndex;\n column = leftKey !== isRtl ? allColumns[0] : last(allColumns);\n }\n return {\n rowIndex: rowIndex,\n rowPinned: null,\n column: column\n };\n };\n CellNavigationService.prototype.getNextCellToFocusWithoutCtrlPressed = function (key, focusedCell) {\n // starting with the provided cell, we keep moving until we find a cell we can\n // focus on.\n var pointer = focusedCell;\n var finished = false;\n // finished will be true when either:\n // a) cell found that we can focus on\n // b) run out of cells (ie the method returns null)\n while (!finished) {\n switch (key) {\n case KeyCode.UP:\n pointer = this.getCellAbove(pointer);\n break;\n case KeyCode.DOWN:\n pointer = this.getCellBelow(pointer);\n break;\n case KeyCode.RIGHT:\n if (this.gridOptionsWrapper.isEnableRtl()) {\n pointer = this.getCellToLeft(pointer);\n }\n else {\n pointer = this.getCellToRight(pointer);\n }\n break;\n case KeyCode.LEFT:\n if (this.gridOptionsWrapper.isEnableRtl()) {\n pointer = this.getCellToRight(pointer);\n }\n else {\n pointer = this.getCellToLeft(pointer);\n }\n break;\n default:\n pointer = null;\n console.warn('AG Grid: unknown key for navigation ' + key);\n break;\n }\n if (pointer) {\n finished = this.isCellGoodToFocusOn(pointer);\n }\n else {\n finished = true;\n }\n }\n return pointer;\n };\n CellNavigationService.prototype.isCellGoodToFocusOn = function (gridCell) {\n var column = gridCell.column;\n var rowNode;\n switch (gridCell.rowPinned) {\n case Constants.PINNED_TOP:\n rowNode = this.pinnedRowModel.getPinnedTopRow(gridCell.rowIndex);\n break;\n case Constants.PINNED_BOTTOM:\n rowNode = this.pinnedRowModel.getPinnedBottomRow(gridCell.rowIndex);\n break;\n default:\n rowNode = this.rowModel.getRow(gridCell.rowIndex);\n break;\n }\n if (!rowNode) {\n return false;\n }\n var suppressNavigable = column.isSuppressNavigable(rowNode);\n return !suppressNavigable;\n };\n CellNavigationService.prototype.getCellToLeft = function (lastCell) {\n if (!lastCell) {\n return null;\n }\n var colToLeft = this.columnModel.getDisplayedColBefore(lastCell.column);\n if (!colToLeft) {\n return null;\n }\n return {\n rowIndex: lastCell.rowIndex,\n column: colToLeft,\n rowPinned: lastCell.rowPinned\n };\n };\n CellNavigationService.prototype.getCellToRight = function (lastCell) {\n if (!lastCell) {\n return null;\n }\n var colToRight = this.columnModel.getDisplayedColAfter(lastCell.column);\n // if already on right, do nothing\n if (!colToRight) {\n return null;\n }\n return {\n rowIndex: lastCell.rowIndex,\n column: colToRight,\n rowPinned: lastCell.rowPinned\n };\n };\n CellNavigationService.prototype.getRowBelow = function (rowPosition) {\n // if already on top row, do nothing\n var index = rowPosition.rowIndex;\n var pinned = rowPosition.rowPinned;\n if (this.isLastRowInContainer(rowPosition)) {\n switch (pinned) {\n case Constants.PINNED_BOTTOM:\n // never any rows after pinned bottom\n return null;\n case Constants.PINNED_TOP:\n // if on last row of pinned top, then next row is main body (if rows exist),\n // otherwise it's the pinned bottom\n if (this.rowModel.isRowsToRender()) {\n return { rowIndex: this.paginationProxy.getPageFirstRow(), rowPinned: null };\n }\n if (this.pinnedRowModel.isRowsToRender(Constants.PINNED_BOTTOM)) {\n return { rowIndex: 0, rowPinned: Constants.PINNED_BOTTOM };\n }\n return null;\n default:\n // if in the main body, then try pinned bottom, otherwise return nothing\n if (this.pinnedRowModel.isRowsToRender(Constants.PINNED_BOTTOM)) {\n return { rowIndex: 0, rowPinned: Constants.PINNED_BOTTOM };\n }\n return null;\n }\n }\n return { rowIndex: index + 1, rowPinned: pinned };\n };\n CellNavigationService.prototype.getCellBelow = function (lastCell) {\n if (!lastCell) {\n return null;\n }\n var rowBelow = this.getRowBelow(lastCell);\n if (rowBelow) {\n return {\n rowIndex: rowBelow.rowIndex,\n column: lastCell.column,\n rowPinned: rowBelow.rowPinned\n };\n }\n return null;\n };\n CellNavigationService.prototype.isLastRowInContainer = function (rowPosition) {\n var pinned = rowPosition.rowPinned;\n var index = rowPosition.rowIndex;\n if (pinned === Constants.PINNED_TOP) {\n var lastTopIndex = this.pinnedRowModel.getPinnedTopRowData().length - 1;\n return lastTopIndex <= index;\n }\n if (pinned === Constants.PINNED_BOTTOM) {\n var lastBottomIndex = this.pinnedRowModel.getPinnedBottomRowData().length - 1;\n return lastBottomIndex <= index;\n }\n var lastBodyIndex = this.paginationProxy.getPageLastRow();\n return lastBodyIndex <= index;\n };\n CellNavigationService.prototype.getRowAbove = function (rowPosition) {\n // if already on top row, do nothing\n var index = rowPosition.rowIndex;\n var pinned = rowPosition.rowPinned;\n var isFirstRow = pinned ? index === 0 : index === this.paginationProxy.getPageFirstRow();\n // if already on top row, do nothing\n if (isFirstRow) {\n if (pinned === Constants.PINNED_TOP) {\n return null;\n }\n if (!pinned) {\n if (this.pinnedRowModel.isRowsToRender(Constants.PINNED_TOP)) {\n return this.getLastFloatingTopRow();\n }\n return null;\n }\n // last floating bottom\n if (this.rowModel.isRowsToRender()) {\n return this.getLastBodyCell();\n }\n if (this.pinnedRowModel.isRowsToRender(Constants.PINNED_TOP)) {\n return this.getLastFloatingTopRow();\n }\n return null;\n }\n return { rowIndex: index - 1, rowPinned: pinned };\n };\n CellNavigationService.prototype.getCellAbove = function (lastCell) {\n if (!lastCell) {\n return null;\n }\n var rowAbove = this.getRowAbove({ rowIndex: lastCell.rowIndex, rowPinned: lastCell.rowPinned });\n if (rowAbove) {\n return {\n rowIndex: rowAbove.rowIndex,\n column: lastCell.column,\n rowPinned: rowAbove.rowPinned\n };\n }\n return null;\n };\n CellNavigationService.prototype.getLastBodyCell = function () {\n var lastBodyRow = this.paginationProxy.getPageLastRow();\n return { rowIndex: lastBodyRow, rowPinned: null };\n };\n CellNavigationService.prototype.getLastFloatingTopRow = function () {\n var lastFloatingRow = this.pinnedRowModel.getPinnedTopRowData().length - 1;\n return { rowIndex: lastFloatingRow, rowPinned: Constants.PINNED_TOP };\n };\n CellNavigationService.prototype.getNextTabbedCell = function (gridCell, backwards) {\n if (backwards) {\n return this.getNextTabbedCellBackwards(gridCell);\n }\n return this.getNextTabbedCellForwards(gridCell);\n };\n CellNavigationService.prototype.getNextTabbedCellForwards = function (gridCell) {\n var displayedColumns = this.columnModel.getAllDisplayedColumns();\n var newRowIndex = gridCell.rowIndex;\n var newFloating = gridCell.rowPinned;\n // move along to the next cell\n var newColumn = this.columnModel.getDisplayedColAfter(gridCell.column);\n // check if end of the row, and if so, go forward a row\n if (!newColumn) {\n newColumn = displayedColumns[0];\n var rowBelow = this.getRowBelow(gridCell);\n if (missing(rowBelow)) {\n return null;\n }\n // If we are tabbing and there is a paging panel present, tabbing should go\n // to the paging panel instead of loading the next page.\n if (!rowBelow.rowPinned && !this.paginationProxy.isRowInPage(rowBelow)) {\n return null;\n }\n newRowIndex = rowBelow ? rowBelow.rowIndex : null;\n newFloating = rowBelow ? rowBelow.rowPinned : null;\n }\n return { rowIndex: newRowIndex, column: newColumn, rowPinned: newFloating };\n };\n CellNavigationService.prototype.getNextTabbedCellBackwards = function (gridCell) {\n var displayedColumns = this.columnModel.getAllDisplayedColumns();\n var newRowIndex = gridCell.rowIndex;\n var newFloating = gridCell.rowPinned;\n // move along to the next cell\n var newColumn = this.columnModel.getDisplayedColBefore(gridCell.column);\n // check if end of the row, and if so, go forward a row\n if (!newColumn) {\n newColumn = last(displayedColumns);\n var rowAbove = this.getRowAbove({ rowIndex: gridCell.rowIndex, rowPinned: gridCell.rowPinned });\n if (missing(rowAbove)) {\n return null;\n }\n // If we are tabbing and there is a paging panel present, tabbing should go\n // to the paging panel instead of loading the next page.\n if (!rowAbove.rowPinned && !this.paginationProxy.isRowInPage(rowAbove)) {\n return null;\n }\n newRowIndex = rowAbove ? rowAbove.rowIndex : null;\n newFloating = rowAbove ? rowAbove.rowPinned : null;\n }\n return { rowIndex: newRowIndex, column: newColumn, rowPinned: newFloating };\n };\n __decorate$1O([\n Autowired('columnModel')\n ], CellNavigationService.prototype, \"columnModel\", void 0);\n __decorate$1O([\n Autowired('rowModel')\n ], CellNavigationService.prototype, \"rowModel\", void 0);\n __decorate$1O([\n Autowired('pinnedRowModel')\n ], CellNavigationService.prototype, \"pinnedRowModel\", void 0);\n __decorate$1O([\n Autowired('paginationProxy')\n ], CellNavigationService.prototype, \"paginationProxy\", void 0);\n CellNavigationService = __decorate$1O([\n Bean('cellNavigationService')\n ], CellNavigationService);\n return CellNavigationService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$29 = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1P = (undefined && undefined.__decorate) || function (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};\nvar __param$5 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar AlignedGridsService = /** @class */ (function (_super) {\n __extends$29(AlignedGridsService, _super);\n function AlignedGridsService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // flag to mark if we are consuming. to avoid cyclic events (ie other grid firing back to master\n // while processing a master event) we mark this if consuming an event, and if we are, then\n // we don't fire back any events.\n _this.consuming = false;\n return _this;\n }\n AlignedGridsService.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('AlignedGridsService');\n };\n AlignedGridsService.prototype.init = function () {\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, this.fireColumnEvent.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VISIBLE, this.fireColumnEvent.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PINNED, this.fireColumnEvent.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_GROUP_OPENED, this.fireColumnEvent.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_RESIZED, this.fireColumnEvent.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_BODY_SCROLL, this.fireScrollEvent.bind(this));\n };\n // common logic across all the fire methods\n AlignedGridsService.prototype.fireEvent = function (callback) {\n // if we are already consuming, then we are acting on an event from a master,\n // so we don't cause a cyclic firing of events\n if (this.consuming) {\n return;\n }\n // iterate through the aligned grids, and pass each aligned grid service to the callback\n var otherGrids = this.gridOptionsWrapper.getAlignedGrids();\n if (otherGrids) {\n otherGrids.forEach(function (otherGridOptions) {\n if (otherGridOptions.api) {\n var alignedGridService = otherGridOptions.api.__getAlignedGridService();\n callback(alignedGridService);\n }\n });\n }\n };\n // common logic across all consume methods. very little common logic, however extracting\n // guarantees consistency across the methods.\n AlignedGridsService.prototype.onEvent = function (callback) {\n this.consuming = true;\n callback();\n this.consuming = false;\n };\n AlignedGridsService.prototype.fireColumnEvent = function (event) {\n this.fireEvent(function (alignedGridsService) {\n alignedGridsService.onColumnEvent(event);\n });\n };\n AlignedGridsService.prototype.fireScrollEvent = function (event) {\n if (event.direction !== 'horizontal') {\n return;\n }\n this.fireEvent(function (alignedGridsService) {\n alignedGridsService.onScrollEvent(event);\n });\n };\n AlignedGridsService.prototype.onScrollEvent = function (event) {\n var _this = this;\n this.onEvent(function () {\n var gridBodyCon = _this.ctrlsService.getGridBodyCtrl();\n gridBodyCon.getScrollFeature().setHorizontalScrollPosition(event.left);\n });\n };\n AlignedGridsService.prototype.getMasterColumns = function (event) {\n var result = [];\n if (event.columns) {\n event.columns.forEach(function (column) {\n result.push(column);\n });\n }\n else if (event.column) {\n result.push(event.column);\n }\n return result;\n };\n AlignedGridsService.prototype.getColumnIds = function (event) {\n var result = [];\n if (event.columns) {\n event.columns.forEach(function (column) {\n result.push(column.getColId());\n });\n }\n else if (event.column) {\n result.push(event.column.getColId());\n }\n return result;\n };\n AlignedGridsService.prototype.onColumnEvent = function (event) {\n var _this = this;\n this.onEvent(function () {\n switch (event.type) {\n case Events.EVENT_COLUMN_MOVED:\n case Events.EVENT_COLUMN_VISIBLE:\n case Events.EVENT_COLUMN_PINNED:\n case Events.EVENT_COLUMN_RESIZED:\n var colEvent = event;\n _this.processColumnEvent(colEvent);\n break;\n case Events.EVENT_COLUMN_GROUP_OPENED:\n var groupOpenedEvent = event;\n _this.processGroupOpenedEvent(groupOpenedEvent);\n break;\n case Events.EVENT_COLUMN_PIVOT_CHANGED:\n // we cannot support pivoting with aligned grids as the columns will be out of sync as the\n // grids will have columns created based on the row data of the grid.\n console.warn('AG Grid: pivoting is not supported with aligned grids. ' +\n 'You can only use one of these features at a time in a grid.');\n break;\n }\n });\n };\n AlignedGridsService.prototype.processGroupOpenedEvent = function (groupOpenedEvent) {\n // likewise for column group\n var masterColumnGroup = groupOpenedEvent.columnGroup;\n var otherColumnGroup = null;\n if (masterColumnGroup) {\n var groupId = masterColumnGroup.getGroupId();\n otherColumnGroup = this.columnModel.getProvidedColumnGroup(groupId);\n }\n if (masterColumnGroup && !otherColumnGroup) {\n return;\n }\n this.logger.log('onColumnEvent-> processing ' + groupOpenedEvent + ' expanded = ' + masterColumnGroup.isExpanded());\n this.columnModel.setColumnGroupOpened(otherColumnGroup, masterColumnGroup.isExpanded(), \"alignedGridChanged\");\n };\n AlignedGridsService.prototype.processColumnEvent = function (colEvent) {\n var _this = this;\n // the column in the event is from the master grid. need to\n // look up the equivalent from this (other) grid\n var masterColumn = colEvent.column;\n var otherColumn = null;\n if (masterColumn) {\n otherColumn = this.columnModel.getPrimaryColumn(masterColumn.getColId());\n }\n // if event was with respect to a master column, that is not present in this\n // grid, then we ignore the event\n if (masterColumn && !otherColumn) {\n return;\n }\n // in time, all the methods below should use the column ids, it's a more generic way\n // of handling columns, and also allows for single or multi column events\n var masterColumns = this.getMasterColumns(colEvent);\n switch (colEvent.type) {\n case Events.EVENT_COLUMN_MOVED:\n // when the user moves columns via setColumnState, we can't depend on moving specific columns\n // to an index, as there maybe be many indexes columns moved to (as wasn't result of a mouse drag).\n // so only way to be sure is match the order of all columns using Column State.\n {\n var movedEvent = colEvent;\n var srcColState = colEvent.columnApi.getColumnState();\n var destColState = srcColState.map(function (s) { return ({ colId: s.colId }); });\n this.columnModel.applyColumnState({ state: destColState, applyOrder: true }, \"alignedGridChanged\");\n this.logger.log(\"onColumnEvent-> processing \" + colEvent.type + \" toIndex = \" + movedEvent.toIndex);\n }\n break;\n case Events.EVENT_COLUMN_VISIBLE:\n // when the user changes visibility via setColumnState, we can't depend on visibility flag in event\n // as there maybe be mix of true/false (as wasn't result of a mouse click to set visiblity).\n // so only way to be sure is match the visibility of all columns using Column State.\n {\n var visibleEvent = colEvent;\n var srcColState = colEvent.columnApi.getColumnState();\n var destColState = srcColState.map(function (s) { return ({ colId: s.colId, hide: s.hide }); });\n this.columnModel.applyColumnState({ state: destColState }, \"alignedGridChanged\");\n this.logger.log(\"onColumnEvent-> processing \" + colEvent.type + \" visible = \" + visibleEvent.visible);\n }\n break;\n case Events.EVENT_COLUMN_PINNED:\n {\n var pinnedEvent = colEvent;\n var srcColState = colEvent.columnApi.getColumnState();\n var destColState = srcColState.map(function (s) { return ({ colId: s.colId, pinned: s.pinned }); });\n this.columnModel.applyColumnState({ state: destColState }, \"alignedGridChanged\");\n this.logger.log(\"onColumnEvent-> processing \" + colEvent.type + \" pinned = \" + pinnedEvent.pinned);\n }\n break;\n case Events.EVENT_COLUMN_RESIZED:\n var resizedEvent_1 = colEvent;\n masterColumns.forEach(function (column) {\n _this.logger.log(\"onColumnEvent-> processing \" + colEvent.type + \" actualWidth = \" + column.getActualWidth());\n var columnWidths = [{ key: column.getColId(), newWidth: column.getActualWidth() }];\n _this.columnModel.setColumnWidths(columnWidths, false, resizedEvent_1.finished, \"alignedGridChanged\");\n });\n break;\n }\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n var isVerticalScrollShowing = gridBodyCon.isVerticalScrollShowing();\n var alignedGrids = this.gridOptionsWrapper.getAlignedGrids();\n if (alignedGrids) {\n alignedGrids.forEach(function (grid) {\n if (grid.api) {\n grid.api.setAlwaysShowVerticalScroll(isVerticalScrollShowing);\n }\n });\n }\n };\n __decorate$1P([\n Autowired('columnModel')\n ], AlignedGridsService.prototype, \"columnModel\", void 0);\n __decorate$1P([\n Autowired('ctrlsService')\n ], AlignedGridsService.prototype, \"ctrlsService\", void 0);\n __decorate$1P([\n __param$5(0, Qualifier('loggerFactory'))\n ], AlignedGridsService.prototype, \"setBeans\", null);\n __decorate$1P([\n PostConstruct\n ], AlignedGridsService.prototype, \"init\", null);\n AlignedGridsService = __decorate$1P([\n Bean('alignedGridsService')\n ], AlignedGridsService);\n return AlignedGridsService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2a = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1Q = (undefined && undefined.__decorate) || function (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};\nvar __param$6 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar SelectionService = /** @class */ (function (_super) {\n __extends$2a(SelectionService, _super);\n function SelectionService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SelectionService.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('selectionService');\n this.reset();\n };\n SelectionService.prototype.init = function () {\n this.groupSelectsChildren = this.gridOptionsWrapper.isGroupSelectsChildren();\n this.addManagedListener(this.eventService, Events.EVENT_ROW_SELECTED, this.onRowSelected.bind(this));\n };\n SelectionService.prototype.setLastSelectedNode = function (rowNode) {\n this.lastSelectedNode = rowNode;\n };\n SelectionService.prototype.getLastSelectedNode = function () {\n return this.lastSelectedNode;\n };\n SelectionService.prototype.getSelectedNodes = function () {\n var selectedNodes = [];\n iterateObject(this.selectedNodes, function (key, rowNode) {\n if (rowNode) {\n selectedNodes.push(rowNode);\n }\n });\n return selectedNodes;\n };\n SelectionService.prototype.getSelectedRows = function () {\n var selectedRows = [];\n iterateObject(this.selectedNodes, function (key, rowNode) {\n if (rowNode && rowNode.data) {\n selectedRows.push(rowNode.data);\n }\n });\n return selectedRows;\n };\n SelectionService.prototype.removeGroupsFromSelection = function () {\n var _this = this;\n iterateObject(this.selectedNodes, function (key, rowNode) {\n if (rowNode && rowNode.group) {\n _this.selectedNodes[rowNode.id] = undefined;\n }\n });\n };\n // should only be called if groupSelectsChildren=true\n SelectionService.prototype.updateGroupsFromChildrenSelections = function (changedPath) {\n // we only do this when group selection state depends on selected children\n if (!this.gridOptionsWrapper.isGroupSelectsChildren()) {\n return;\n }\n // also only do it if CSRM (code should never allow this anyway)\n if (this.rowModel.getType() !== Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n return;\n }\n var clientSideRowModel = this.rowModel;\n var rootNode = clientSideRowModel.getRootNode();\n if (!changedPath) {\n changedPath = new ChangedPath(true, rootNode);\n changedPath.setInactive();\n }\n changedPath.forEachChangedNodeDepthFirst(function (rowNode) {\n if (rowNode !== rootNode) {\n rowNode.calculateSelectedFromChildren();\n }\n });\n // clientSideRowModel.getTopLevelNodes()!.forEach((rowNode: RowNode) => {\n // rowNode.depthFirstSearch((node) => {\n // if (node.group) {\n // }\n // });\n // });\n };\n SelectionService.prototype.getNodeForIdIfSelected = function (id) {\n return this.selectedNodes[id];\n };\n SelectionService.prototype.clearOtherNodes = function (rowNodeToKeepSelected) {\n var _this = this;\n var groupsToRefresh = {};\n var updatedCount = 0;\n iterateObject(this.selectedNodes, function (key, otherRowNode) {\n if (otherRowNode && otherRowNode.id !== rowNodeToKeepSelected.id) {\n var rowNode = _this.selectedNodes[otherRowNode.id];\n updatedCount += rowNode.setSelectedParams({\n newValue: false,\n clearSelection: false,\n suppressFinishActions: true\n });\n if (_this.groupSelectsChildren && otherRowNode.parent) {\n groupsToRefresh[otherRowNode.parent.id] = otherRowNode.parent;\n }\n }\n });\n iterateObject(groupsToRefresh, function (key, group) {\n group.calculateSelectedFromChildren();\n });\n return updatedCount;\n };\n SelectionService.prototype.onRowSelected = function (event) {\n var rowNode = event.node;\n // we do not store the group rows when the groups select children\n if (this.groupSelectsChildren && rowNode.group) {\n return;\n }\n if (rowNode.isSelected()) {\n this.selectedNodes[rowNode.id] = rowNode;\n }\n else {\n this.selectedNodes[rowNode.id] = undefined;\n }\n };\n SelectionService.prototype.syncInRowNode = function (rowNode, oldNode) {\n this.syncInOldRowNode(rowNode, oldNode);\n this.syncInNewRowNode(rowNode);\n };\n // if the id has changed for the node, then this means the rowNode\n // is getting used for a different data item, which breaks\n // our selectedNodes, as the node now is mapped by the old id\n // which is inconsistent. so to keep the old node as selected,\n // we swap in the clone (with the old id and old data). this means\n // the oldNode is effectively a daemon we keep a reference to,\n // so if client calls api.getSelectedNodes(), it gets the daemon\n // in the result. when the client un-selects, the reference to the\n // daemon is removed. the daemon, because it's an oldNode, is not\n // used by the grid for rendering, it's a copy of what the node used\n // to be like before the id was changed.\n SelectionService.prototype.syncInOldRowNode = function (rowNode, oldNode) {\n var oldNodeHasDifferentId = exists(oldNode) && (rowNode.id !== oldNode.id);\n if (oldNodeHasDifferentId && oldNode) {\n var id = oldNode.id;\n var oldNodeSelected = this.selectedNodes[id] == rowNode;\n if (oldNodeSelected) {\n this.selectedNodes[oldNode.id] = oldNode;\n }\n }\n };\n SelectionService.prototype.syncInNewRowNode = function (rowNode) {\n if (exists(this.selectedNodes[rowNode.id])) {\n rowNode.setSelectedInitialValue(true);\n this.selectedNodes[rowNode.id] = rowNode;\n }\n else {\n rowNode.setSelectedInitialValue(false);\n }\n };\n SelectionService.prototype.reset = function () {\n this.logger.log('reset');\n this.selectedNodes = {};\n this.lastSelectedNode = null;\n };\n // returns a list of all nodes at 'best cost' - a feature to be used\n // with groups / trees. if a group has all it's children selected,\n // then the group appears in the result, but not the children.\n // Designed for use with 'children' as the group selection type,\n // where groups don't actually appear in the selection normally.\n SelectionService.prototype.getBestCostNodeSelection = function () {\n if (this.rowModel.getType() !== Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n console.warn('AG Grid: `getBestCostNodeSelection` is only available when using normal row model');\n return;\n }\n var clientSideRowModel = this.rowModel;\n var topLevelNodes = clientSideRowModel.getTopLevelNodes();\n if (topLevelNodes === null) {\n console.warn('AG Grid: `selectAll` not available doing `rowModel=virtual`');\n return;\n }\n var result = [];\n // recursive function, to find the selected nodes\n function traverse(nodes) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n if (node.isSelected()) {\n result.push(node);\n }\n else {\n // if not selected, then if it's a group, and the group\n // has children, continue to search for selections\n var maybeGroup = node;\n if (maybeGroup.group && maybeGroup.children) {\n traverse(maybeGroup.children);\n }\n }\n }\n }\n traverse(topLevelNodes);\n return result;\n };\n SelectionService.prototype.setRowModel = function (rowModel) {\n this.rowModel = rowModel;\n };\n SelectionService.prototype.isEmpty = function () {\n var count = 0;\n iterateObject(this.selectedNodes, function (nodeId, rowNode) {\n if (rowNode) {\n count++;\n }\n });\n return count === 0;\n };\n SelectionService.prototype.deselectAllRowNodes = function (justFiltered) {\n if (justFiltered === void 0) { justFiltered = false; }\n var callback = function (rowNode) { return rowNode.selectThisNode(false); };\n var rowModelClientSide = this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n if (justFiltered) {\n if (!rowModelClientSide) {\n console.error('AG Grid: selecting just filtered only works with In Memory Row Model');\n return;\n }\n var clientSideRowModel = this.rowModel;\n clientSideRowModel.forEachNodeAfterFilter(callback);\n }\n else {\n iterateObject(this.selectedNodes, function (id, rowNode) {\n // remember the reference can be to null, as we never 'delete' from the map\n if (rowNode) {\n callback(rowNode);\n }\n });\n // this clears down the map (whereas above only sets the items in map to 'undefined')\n this.reset();\n }\n // the above does not clean up the parent rows if they are selected\n if (rowModelClientSide && this.groupSelectsChildren) {\n this.updateGroupsFromChildrenSelections();\n }\n var event = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n SelectionService.prototype.selectAllRowNodes = function (justFiltered) {\n if (justFiltered === void 0) { justFiltered = false; }\n if (this.rowModel.getType() !== Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n throw new Error(\"selectAll only available with normal row model, ie not \" + this.rowModel.getType());\n }\n var clientSideRowModel = this.rowModel;\n var callback = function (rowNode) { return rowNode.selectThisNode(true); };\n if (justFiltered) {\n clientSideRowModel.forEachNodeAfterFilter(callback);\n }\n else {\n clientSideRowModel.forEachNode(callback);\n }\n // the above does not clean up the parent rows if they are selected\n if (this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE && this.groupSelectsChildren) {\n this.updateGroupsFromChildrenSelections();\n }\n var event = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n /**\n * @method\n * @deprecated\n */\n SelectionService.prototype.selectNode = function (rowNode, tryMulti) {\n if (rowNode) {\n rowNode.setSelectedParams({ newValue: true, clearSelection: !tryMulti });\n }\n };\n /**\n * @method\n * @deprecated\n */\n SelectionService.prototype.deselectIndex = function (rowIndex) {\n var node = this.rowModel.getRow(rowIndex);\n this.deselectNode(node);\n };\n /**\n * @method\n * @deprecated\n */\n SelectionService.prototype.deselectNode = function (rowNode) {\n if (rowNode) {\n rowNode.setSelectedParams({ newValue: false, clearSelection: false });\n }\n };\n /**\n * @method\n * @deprecated\n */\n SelectionService.prototype.selectIndex = function (index, tryMulti) {\n var node = this.rowModel.getRow(index);\n this.selectNode(node, tryMulti);\n };\n __decorate$1Q([\n Autowired('rowModel')\n ], SelectionService.prototype, \"rowModel\", void 0);\n __decorate$1Q([\n Autowired('columnApi')\n ], SelectionService.prototype, \"columnApi\", void 0);\n __decorate$1Q([\n Autowired('gridApi')\n ], SelectionService.prototype, \"gridApi\", void 0);\n __decorate$1Q([\n __param$6(0, Qualifier('loggerFactory'))\n ], SelectionService.prototype, \"setBeans\", null);\n __decorate$1Q([\n PostConstruct\n ], SelectionService.prototype, \"init\", null);\n SelectionService = __decorate$1Q([\n Bean('selectionService')\n ], SelectionService);\n return SelectionService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$1R = (undefined && undefined.__decorate) || function (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};\nvar ColumnApi = /** @class */ (function () {\n function ColumnApi() {\n }\n /** Gets the grid to size the columns to the specified width in pixels, e.g. `sizeColumnsToFit(900)`. To have the grid fit the columns to the grid's width, use the Grid API `gridApi.sizeColumnsToFit()` instead. */\n ColumnApi.prototype.sizeColumnsToFit = function (gridWidth) {\n // AG-3403 validate that gridWidth is provided because this method has the same name as\n // a method on the grid API that takes no arguments, and it's easy to confuse the two\n if (typeof gridWidth === \"undefined\") {\n console.error('AG Grid: missing parameter to columnApi.sizeColumnsToFit(gridWidth)');\n }\n this.columnModel.sizeColumnsToFit(gridWidth, 'api');\n };\n /** Call this if you want to open or close a column group. */\n ColumnApi.prototype.setColumnGroupOpened = function (group, newValue) { this.columnModel.setColumnGroupOpened(group, newValue, 'api'); };\n /** Returns the column group with the given name. */\n ColumnApi.prototype.getColumnGroup = function (name, instanceId) { return this.columnModel.getColumnGroup(name, instanceId); };\n /** Returns the provided column group with the given name. */\n ColumnApi.prototype.getProvidedColumnGroup = function (name) { return this.columnModel.getProvidedColumnGroup(name); };\n /** Returns the display name for a column. Useful if you are doing your own header rendering and want the grid to work out if `headerValueGetter` is used, or if you are doing your own column management GUI, to know what to show as the column name. */\n ColumnApi.prototype.getDisplayNameForColumn = function (column, location) { return this.columnModel.getDisplayNameForColumn(column, location) || ''; };\n /** Returns the display name for a column group (when grouping columns). */\n ColumnApi.prototype.getDisplayNameForColumnGroup = function (columnGroup, location) { return this.columnModel.getDisplayNameForColumnGroup(columnGroup, location) || ''; };\n /** Returns the column with the given `colKey`, which can either be the `colId` (a string) or the `colDef` (an object). */\n ColumnApi.prototype.getColumn = function (key) { return this.columnModel.getPrimaryColumn(key); };\n /** Applies the state of the columns from a previous state. Returns `false` if one or more columns could not be found. */\n ColumnApi.prototype.applyColumnState = function (params) { return this.columnModel.applyColumnState(params, 'api'); };\n /** Gets the state of the columns. Typically used when saving column state. */\n ColumnApi.prototype.getColumnState = function () { return this.columnModel.getColumnState(); };\n /** Sets the state back to match the originally provided column definitions. */\n ColumnApi.prototype.resetColumnState = function () { this.columnModel.resetColumnState('api'); };\n /** Gets the state of the column groups. Typically used when saving column group state. */\n ColumnApi.prototype.getColumnGroupState = function () { return this.columnModel.getColumnGroupState(); };\n /** Sets the state of the column group state from a previous state. */\n ColumnApi.prototype.setColumnGroupState = function (stateItems) { this.columnModel.setColumnGroupState(stateItems, 'api'); };\n /** Sets the state back to match the originally provided column definitions. */\n ColumnApi.prototype.resetColumnGroupState = function () { this.columnModel.resetColumnGroupState('api'); };\n /** Returns `true` if pinning left or right, otherwise `false`. */\n ColumnApi.prototype.isPinning = function () { return this.columnModel.isPinningLeft() || this.columnModel.isPinningRight(); };\n /** Returns `true` if pinning left, otherwise `false`. */\n ColumnApi.prototype.isPinningLeft = function () { return this.columnModel.isPinningLeft(); };\n /** Returns `true` if pinning right, otherwise `false`. */\n ColumnApi.prototype.isPinningRight = function () { return this.columnModel.isPinningRight(); };\n /** Returns the column to the right of the provided column, taking into consideration open / closed column groups and visible columns. This is useful if you need to know what column is beside yours e.g. if implementing your own cell navigation. */\n ColumnApi.prototype.getDisplayedColAfter = function (col) { return this.columnModel.getDisplayedColAfter(col); };\n /** Same as `getVisibleColAfter` except gives column to the left. */\n ColumnApi.prototype.getDisplayedColBefore = function (col) { return this.columnModel.getDisplayedColBefore(col); };\n /** Sets the visibility of a column. Key can be the column ID or `Column` object. */\n ColumnApi.prototype.setColumnVisible = function (key, visible) { this.columnModel.setColumnVisible(key, visible, 'api'); };\n /** Same as `setColumnVisible`, but provide a list of column keys. */\n ColumnApi.prototype.setColumnsVisible = function (keys, visible) { this.columnModel.setColumnsVisible(keys, visible, 'api'); };\n /** Sets the column pinned / unpinned. Key can be the column ID, field, `ColDef` object or `Column` object. */\n ColumnApi.prototype.setColumnPinned = function (key, pinned) { this.columnModel.setColumnPinned(key, pinned, 'api'); };\n /** Same as `setColumnPinned`, but provide a list of column keys. */\n ColumnApi.prototype.setColumnsPinned = function (keys, pinned) { this.columnModel.setColumnsPinned(keys, pinned, 'api'); };\n /** Returns all the columns, regardless of visible or not. */\n ColumnApi.prototype.getAllColumns = function () { return this.columnModel.getAllPrimaryColumns(); };\n /**\n * Returns all the grid columns, same as `getAllColumns()`, except\n *\n * a) it has the order of the columns that are presented in the grid\n *\n * b) it's after the 'pivot' step, so if pivoting, has the value columns for the pivot.\n */\n ColumnApi.prototype.getAllGridColumns = function () { return this.columnModel.getAllGridColumns(); };\n /** Same as `getAllDisplayedColumns` but just for the pinned left portion of the grid. */\n ColumnApi.prototype.getDisplayedLeftColumns = function () { return this.columnModel.getDisplayedLeftColumns(); };\n /** Same as `getAllDisplayedColumns` but just for the center portion of the grid. */\n ColumnApi.prototype.getDisplayedCenterColumns = function () { return this.columnModel.getDisplayedCenterColumns(); };\n /** Same as `getAllDisplayedColumns` but just for the pinned right portion of the grid. */\n ColumnApi.prototype.getDisplayedRightColumns = function () { return this.columnModel.getDisplayedRightColumns(); };\n /** Returns all columns currently displayed (e.g. are visible and if in a group, the group is showing the columns) for the pinned left, centre and pinned right portions of the grid. */\n ColumnApi.prototype.getAllDisplayedColumns = function () { return this.columnModel.getAllDisplayedColumns(); };\n /** Same as `getAllGridColumns()`, except only returns rendered columns, i.e. columns that are not within the viewport and therefore not rendered, due to column virtualisation, are not displayed. */\n ColumnApi.prototype.getAllDisplayedVirtualColumns = function () { return this.columnModel.getViewportColumns(); };\n /** Moves a column to `toIndex`. The column is first removed, then added at the `toIndex` location, thus index locations will change to the right of the column after the removal. */\n ColumnApi.prototype.moveColumn = function (key, toIndex) {\n if (typeof key === 'number') {\n // moveColumn used to take indexes, so this is advising user who hasn't moved to new method name\n console.warn('AG Grid: you are using moveColumn(fromIndex, toIndex) - moveColumn takes a column key and a destination index, not two indexes, to move with indexes use moveColumnByIndex(from,to) instead');\n this.columnModel.moveColumnByIndex(key, toIndex, 'api');\n }\n else {\n this.columnModel.moveColumn(key, toIndex, 'api');\n }\n };\n /** Same as `moveColumn` but works on index locations. */\n ColumnApi.prototype.moveColumnByIndex = function (fromIndex, toIndex) { this.columnModel.moveColumnByIndex(fromIndex, toIndex, 'api'); };\n /** Same as `moveColumn` but works on list. */\n ColumnApi.prototype.moveColumns = function (columnsToMoveKeys, toIndex) { this.columnModel.moveColumns(columnsToMoveKeys, toIndex, 'api'); };\n /** Move the column to a new position in the row grouping order. */\n ColumnApi.prototype.moveRowGroupColumn = function (fromIndex, toIndex) { this.columnModel.moveRowGroupColumn(fromIndex, toIndex); };\n /** Sets the agg function for a column. `aggFunc` can be one of `'min' | 'max' | 'sum'`. */\n ColumnApi.prototype.setColumnAggFunc = function (key, aggFunc) { this.columnModel.setColumnAggFunc(key, aggFunc); };\n /** Sets the column width on a single column. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many `columnWidth` events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to `true`. */\n ColumnApi.prototype.setColumnWidth = function (key, newWidth, finished, source) {\n if (finished === void 0) { finished = true; }\n this.columnModel.setColumnWidths([{ key: key, newWidth: newWidth }], false, finished, source);\n };\n /** Sets the column widths on multiple columns. This method offers better performance than calling `setColumnWidth` multiple times. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many `columnWidth` events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to `true`. */\n ColumnApi.prototype.setColumnWidths = function (columnWidths, finished, source) {\n if (finished === void 0) { finished = true; }\n this.columnModel.setColumnWidths(columnWidths, false, finished, source);\n };\n /** Set the pivot mode. */\n ColumnApi.prototype.setPivotMode = function (pivotMode) { this.columnModel.setPivotMode(pivotMode); };\n /** Get the pivot mode. */\n ColumnApi.prototype.isPivotMode = function () { return this.columnModel.isPivotMode(); };\n /** Returns the pivot column for the given `pivotKeys` and `valueColId`. Useful to then call operations on the pivot column. */\n ColumnApi.prototype.getSecondaryPivotColumn = function (pivotKeys, valueColKey) { return this.columnModel.getSecondaryPivotColumn(pivotKeys, valueColKey); };\n /** Set the value columns. */\n ColumnApi.prototype.setValueColumns = function (colKeys) { this.columnModel.setValueColumns(colKeys, 'api'); };\n /** Get value columns. */\n ColumnApi.prototype.getValueColumns = function () { return this.columnModel.getValueColumns(); };\n /** Remove a value column. */\n ColumnApi.prototype.removeValueColumn = function (colKey) { this.columnModel.removeValueColumn(colKey, 'api'); };\n /** Same as `removeValueColumns` but provide a list. */\n ColumnApi.prototype.removeValueColumns = function (colKeys) { this.columnModel.removeValueColumns(colKeys, 'api'); };\n /** Add a value column. */\n ColumnApi.prototype.addValueColumn = function (colKey) { this.columnModel.addValueColumn(colKey, 'api'); };\n /** Same as `addValueColumn` but provide a list. */\n ColumnApi.prototype.addValueColumns = function (colKeys) { this.columnModel.addValueColumns(colKeys, 'api'); };\n /** Set the row group columns. */\n ColumnApi.prototype.setRowGroupColumns = function (colKeys) { this.columnModel.setRowGroupColumns(colKeys, 'api'); };\n /** Remove a column from the row groups. */\n ColumnApi.prototype.removeRowGroupColumn = function (colKey) { this.columnModel.removeRowGroupColumn(colKey, 'api'); };\n /** Same as `removeRowGroupColumn` but provide a list of columns. */\n ColumnApi.prototype.removeRowGroupColumns = function (colKeys) { this.columnModel.removeRowGroupColumns(colKeys, 'api'); };\n /** Add a column to the row groups. */\n ColumnApi.prototype.addRowGroupColumn = function (colKey) { this.columnModel.addRowGroupColumn(colKey, 'api'); };\n /** Same as `addRowGroupColumn` but provide a list of columns. */\n ColumnApi.prototype.addRowGroupColumns = function (colKeys) { this.columnModel.addRowGroupColumns(colKeys, 'api'); };\n /** Get row group columns. */\n ColumnApi.prototype.getRowGroupColumns = function () { return this.columnModel.getRowGroupColumns(); };\n /** Set the pivot columns. */\n ColumnApi.prototype.setPivotColumns = function (colKeys) { this.columnModel.setPivotColumns(colKeys, 'api'); };\n /** Remove a pivot column. */\n ColumnApi.prototype.removePivotColumn = function (colKey) { this.columnModel.removePivotColumn(colKey, 'api'); };\n /** Same as `removePivotColumn` but provide a list of columns. */\n ColumnApi.prototype.removePivotColumns = function (colKeys) { this.columnModel.removePivotColumns(colKeys, 'api'); };\n /** Add a pivot column. */\n ColumnApi.prototype.addPivotColumn = function (colKey) { this.columnModel.addPivotColumn(colKey, 'api'); };\n /** Same as `addPivotColumn` but provide a list of columns. */\n ColumnApi.prototype.addPivotColumns = function (colKeys) { this.columnModel.addPivotColumns(colKeys, 'api'); };\n /** Get the pivot columns. */\n ColumnApi.prototype.getPivotColumns = function () { return this.columnModel.getPivotColumns(); };\n /** Same as `getAllDisplayedColumnGroups` but just for the pinned left portion of the grid. */\n ColumnApi.prototype.getLeftDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeLeft(); };\n /** Same as `getAllDisplayedColumnGroups` but just for the center portion of the grid. */\n ColumnApi.prototype.getCenterDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeCentre(); };\n /** Same as `getAllDisplayedColumnGroups` but just for the pinned right portion of the grid. */\n ColumnApi.prototype.getRightDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeRight(); };\n /** Returns all 'root' column headers. If you are not grouping columns, these return the columns. If you are grouping, these return the top level groups - you can navigate down through each one to get the other lower level headers and finally the columns at the bottom. */\n ColumnApi.prototype.getAllDisplayedColumnGroups = function () { return this.columnModel.getAllDisplayedTrees(); };\n /** Auto-sizes a column based on its contents. */\n ColumnApi.prototype.autoSizeColumn = function (key, skipHeader) { return this.columnModel.autoSizeColumn(key, skipHeader, 'api'); };\n /** Same as `autoSizeColumn`, but provide a list of column keys. */\n ColumnApi.prototype.autoSizeColumns = function (keys, skipHeader) {\n this.columnModel.autoSizeColumns({ columns: keys, skipHeader: skipHeader });\n };\n /** Calls `autoSizeColumns` on all displayed columns. */\n ColumnApi.prototype.autoSizeAllColumns = function (skipHeader) { this.columnModel.autoSizeAllColumns(skipHeader, 'api'); };\n /** Set the secondary pivot columns. */\n ColumnApi.prototype.setSecondaryColumns = function (colDefs) { this.columnModel.setSecondaryColumns(colDefs, 'api'); };\n /** Returns the grid's secondary columns. */\n ColumnApi.prototype.getSecondaryColumns = function () { return this.columnModel.getSecondaryColumns(); };\n /** Returns the grid's primary columns. */\n ColumnApi.prototype.getPrimaryColumns = function () { return this.columnModel.getAllPrimaryColumns(); };\n ColumnApi.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid = function () {\n // some users were raising support issues with regards memory leaks. the problem was the customers applications\n // were keeping references to the API. trying to educate them all would be difficult, easier to just remove\n // all references in the API so at least the core grid can be garbage collected.\n //\n // wait about 100ms before clearing down the references, in case user has some cleanup to do,\n // and needs to deference the API first\n setTimeout(_.removeAllReferences.bind(window, this, 'Column API'), 100);\n };\n // below goes through deprecated items, prints message to user, then calls the new version of the same method\n // public getColumnDefs(): (ColDef | ColGroupDef)[] {\n // this.setColumnGroupOpened(group, newValue);\n // return null;\n // }\n /** @deprecated columnGroupOpened no longer exists, use setColumnGroupOpened */\n ColumnApi.prototype.columnGroupOpened = function (group, newValue) {\n console.error('AG Grid: columnGroupOpened no longer exists, use setColumnGroupOpened');\n this.setColumnGroupOpened(group, newValue);\n };\n /** @deprecated hideColumns is deprecated, use setColumnsVisible */\n ColumnApi.prototype.hideColumns = function (colIds, hide) {\n console.error('AG Grid: hideColumns is deprecated, use setColumnsVisible');\n this.columnModel.setColumnsVisible(colIds, !hide, 'api');\n };\n /** @deprecated hideColumn is deprecated, use setColumnVisible */\n ColumnApi.prototype.hideColumn = function (colId, hide) {\n console.error('AG Grid: hideColumn is deprecated, use setColumnVisible');\n this.columnModel.setColumnVisible(colId, !hide, 'api');\n };\n /** @deprecated setState is deprecated, use setColumnState */\n ColumnApi.prototype.setState = function (columnState) {\n console.error('AG Grid: setState is deprecated, use setColumnState');\n return this.setColumnState(columnState);\n };\n /** @deprecated getState is deprecated, use getColumnState */\n ColumnApi.prototype.getState = function () {\n console.error('AG Grid: getState is deprecated, use getColumnState');\n return this.getColumnState();\n };\n /** @deprecated resetState is deprecated, use resetColumnState */\n ColumnApi.prototype.resetState = function () {\n console.error('AG Grid: resetState is deprecated, use resetColumnState');\n this.resetColumnState();\n };\n /** @deprecated getAggregationColumns is deprecated, use getValueColumns */\n ColumnApi.prototype.getAggregationColumns = function () {\n console.error('AG Grid: getAggregationColumns is deprecated, use getValueColumns');\n return this.columnModel.getValueColumns();\n };\n /** @deprecated removeAggregationColumn is deprecated, use removeValueColumn */\n ColumnApi.prototype.removeAggregationColumn = function (colKey) {\n console.error('AG Grid: removeAggregationColumn is deprecated, use removeValueColumn');\n this.columnModel.removeValueColumn(colKey, 'api');\n };\n /** @deprecated removeAggregationColumns is deprecated, use removeValueColumns */\n ColumnApi.prototype.removeAggregationColumns = function (colKeys) {\n console.error('AG Grid: removeAggregationColumns is deprecated, use removeValueColumns');\n this.columnModel.removeValueColumns(colKeys, 'api');\n };\n /** @deprecated addAggregationColumn is deprecated, use addValueColumn */\n ColumnApi.prototype.addAggregationColumn = function (colKey) {\n console.error('AG Grid: addAggregationColumn is deprecated, use addValueColumn');\n this.columnModel.addValueColumn(colKey, 'api');\n };\n /** @deprecated addAggregationColumns is deprecated, use addValueColumns */\n ColumnApi.prototype.addAggregationColumns = function (colKeys) {\n console.error('AG Grid: addAggregationColumns is deprecated, use addValueColumns');\n this.columnModel.addValueColumns(colKeys, 'api');\n };\n /** @deprecated setColumnAggFunction is deprecated, use setColumnAggFunc */\n ColumnApi.prototype.setColumnAggFunction = function (column, aggFunc) {\n console.error('AG Grid: setColumnAggFunction is deprecated, use setColumnAggFunc');\n this.columnModel.setColumnAggFunc(column, aggFunc, 'api');\n };\n /** @deprecated getDisplayNameForCol is deprecated, use getDisplayNameForColumn */\n ColumnApi.prototype.getDisplayNameForCol = function (column) {\n console.error('AG Grid: getDisplayNameForCol is deprecated, use getDisplayNameForColumn');\n return this.getDisplayNameForColumn(column, null);\n };\n /** @deprecated setColumnState is deprecated, use applyColumnState. */\n ColumnApi.prototype.setColumnState = function (columnState) {\n console.error('AG Grid: setColumnState is deprecated, use applyColumnState');\n return this.columnModel.applyColumnState({ state: columnState, applyOrder: true }, 'api');\n };\n /** @deprecated getOriginalColumnGroup is deprecated, use getProvidedColumnGroup. */\n ColumnApi.prototype.getOriginalColumnGroup = function (name) {\n console.error('AG Grid: getOriginalColumnGroup is deprecated, use getProvidedColumnGroup');\n return this.columnModel.getProvidedColumnGroup(name);\n };\n __decorate$1R([\n Autowired('columnModel')\n ], ColumnApi.prototype, \"columnModel\", void 0);\n __decorate$1R([\n PreDestroy\n ], ColumnApi.prototype, \"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid\", null);\n ColumnApi = __decorate$1R([\n Bean('columnApi')\n ], ColumnApi);\n return ColumnApi;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2b = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1S = (undefined && undefined.__decorate) || function (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};\nvar ValueService = /** @class */ (function (_super) {\n __extends$2b(ValueService, _super);\n function ValueService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.initialised = false;\n return _this;\n }\n ValueService.prototype.init = function () {\n var _this = this;\n this.cellExpressions = this.gridOptionsWrapper.isEnableCellExpressions();\n this.initialised = true;\n // We listen to our own event and use it to call the columnSpecific callback,\n // this way the handler calls are correctly interleaved with other global events\n this.eventService.addEventListener(Events.EVENT_CELL_VALUE_CHANGED, function (event) { return _this.callColumnCellValueChangedHandler(event); }, this.gridOptionsWrapper.useAsyncEvents());\n };\n ValueService.prototype.getValue = function (column, rowNode, forFilter, ignoreAggData) {\n if (forFilter === void 0) { forFilter = false; }\n if (ignoreAggData === void 0) { ignoreAggData = false; }\n // hack - the grid is getting refreshed before this bean gets initialised, race condition.\n // really should have a way so they get initialised in the right order???\n if (!this.initialised) {\n this.init();\n }\n if (!rowNode) {\n return;\n }\n // pull these out to make code below easier to read\n var colDef = column.getColDef();\n var field = colDef.field;\n var colId = column.getId();\n var data = rowNode.data;\n var result;\n // if there is a value getter, this gets precedence over a field\n var groupDataExists = rowNode.groupData && rowNode.groupData[colId] !== undefined;\n var aggDataExists = !ignoreAggData && rowNode.aggData && rowNode.aggData[colId] !== undefined;\n if (forFilter && colDef.filterValueGetter) {\n result = this.executeFilterValueGetter(colDef.filterValueGetter, data, column, rowNode);\n }\n else if (this.gridOptionsWrapper.isTreeData() && aggDataExists) {\n result = rowNode.aggData[colId];\n }\n else if (this.gridOptionsWrapper.isTreeData() && colDef.valueGetter) {\n result = this.executeValueGetter(colDef.valueGetter, data, column, rowNode);\n }\n else if (this.gridOptionsWrapper.isTreeData() && (field && data)) {\n result = getValueUsingField(data, field, column.isFieldContainsDots());\n }\n else if (groupDataExists) {\n result = rowNode.groupData[colId];\n }\n else if (aggDataExists) {\n result = rowNode.aggData[colId];\n }\n else if (colDef.valueGetter) {\n result = this.executeValueGetter(colDef.valueGetter, data, column, rowNode);\n }\n else if (field && data) {\n result = getValueUsingField(data, field, column.isFieldContainsDots());\n }\n // the result could be an expression itself, if we are allowing cell values to be expressions\n if (this.cellExpressions && (typeof result === 'string') && result.indexOf('=') === 0) {\n var cellValueGetter = result.substring(1);\n result = this.executeValueGetter(cellValueGetter, data, column, rowNode);\n }\n if (result == null) {\n var openedGroup = this.getOpenedGroup(rowNode, column);\n if (openedGroup != null) {\n return openedGroup;\n }\n }\n return result;\n };\n ValueService.prototype.getOpenedGroup = function (rowNode, column) {\n if (!this.gridOptionsWrapper.isShowOpenedGroup()) {\n return;\n }\n var colDef = column.getColDef();\n if (!colDef.showRowGroup) {\n return;\n }\n var showRowGroup = column.getColDef().showRowGroup;\n var pointer = rowNode.parent;\n while (pointer != null) {\n if (pointer.rowGroupColumn && (showRowGroup === true || showRowGroup === pointer.rowGroupColumn.getId())) {\n return pointer.key;\n }\n pointer = pointer.parent;\n }\n return undefined;\n };\n /**\n * Sets the value of a GridCell\n * @param rowNode The `RowNode` to be updated\n * @param colKey The `Column` to be updated\n * @param newValue The new value to be set\n * @param eventSource The event source\n * @returns `True` if the value has been updated, otherwise`False`.\n */\n ValueService.prototype.setValue = function (rowNode, colKey, newValue, eventSource) {\n var column = this.columnModel.getPrimaryColumn(colKey);\n if (!rowNode || !column) {\n return false;\n }\n // this will only happen if user is trying to paste into a group row, which doesn't make sense\n // the user should not be trying to paste into group rows\n if (missing(rowNode.data)) {\n rowNode.data = {};\n }\n // for backwards compatibility we are also retrieving the newValueHandler as well as the valueSetter\n var _a = column.getColDef(), field = _a.field, newValueHandler = _a.newValueHandler, valueSetter = _a.valueSetter;\n // need either a field or a newValueHandler for this to work\n if (missing(field) && missing(newValueHandler) && missing(valueSetter)) {\n // we don't tell user about newValueHandler, as that is deprecated\n console.warn(\"AG Grid: you need either field or valueSetter set on colDef for editing to work\");\n return false;\n }\n var params = {\n node: rowNode,\n data: rowNode.data,\n oldValue: this.getValue(column, rowNode),\n newValue: newValue,\n colDef: column.getColDef(),\n column: column,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n params.newValue = newValue;\n var valueWasDifferent;\n if (newValueHandler && exists(newValueHandler)) {\n valueWasDifferent = newValueHandler(params);\n }\n else if (exists(valueSetter)) {\n valueWasDifferent = this.expressionService.evaluate(valueSetter, params);\n }\n else {\n valueWasDifferent = this.setValueUsingField(rowNode.data, field, newValue, column.isFieldContainsDots());\n }\n // in case user forgot to return something (possible if they are not using TypeScript\n // and just forgot, or using an old newValueHandler we didn't always expect a return\n // value here), we default the return value to true, so we always refresh.\n if (valueWasDifferent === undefined) {\n valueWasDifferent = true;\n }\n // if no change to the value, then no need to do the updating, or notifying via events.\n // otherwise the user could be tabbing around the grid, and cellValueChange would get called\n // all the time.\n if (!valueWasDifferent) {\n return false;\n }\n // reset quick filter on this row\n rowNode.resetQuickFilterAggregateText();\n this.valueCache.onDataChanged();\n params.newValue = this.getValue(column, rowNode);\n var event = {\n type: Events.EVENT_CELL_VALUE_CHANGED,\n event: null,\n rowIndex: rowNode.rowIndex,\n rowPinned: rowNode.rowPinned,\n column: params.column,\n api: params.api,\n columnApi: params.columnApi,\n colDef: params.colDef,\n context: params.context,\n data: rowNode.data,\n node: rowNode,\n oldValue: params.oldValue,\n newValue: params.newValue,\n value: params.newValue,\n source: eventSource\n };\n this.eventService.dispatchEvent(event);\n return true;\n };\n ValueService.prototype.callColumnCellValueChangedHandler = function (event) {\n var onCellValueChanged = event.colDef.onCellValueChanged;\n if (typeof onCellValueChanged === 'function') {\n onCellValueChanged({\n node: event.node,\n data: event.data,\n oldValue: event.oldValue,\n newValue: event.newValue,\n colDef: event.colDef,\n column: event.column,\n api: event.api,\n columnApi: event.columnApi,\n context: event.context\n });\n }\n };\n ValueService.prototype.setValueUsingField = function (data, field, newValue, isFieldContainsDots) {\n if (!field) {\n return false;\n }\n // if no '.', then it's not a deep value\n var valuesAreSame = false;\n if (!isFieldContainsDots) {\n data[field] = newValue;\n }\n else {\n // otherwise it is a deep value, so need to dig for it\n var fieldPieces = field.split('.');\n var currentObject = data;\n while (fieldPieces.length > 0 && currentObject) {\n var fieldPiece = fieldPieces.shift();\n if (fieldPieces.length === 0) {\n currentObject[fieldPiece] = newValue;\n }\n else {\n currentObject = currentObject[fieldPiece];\n }\n }\n }\n return !valuesAreSame;\n };\n ValueService.prototype.executeFilterValueGetter = function (valueGetter, data, column, rowNode) {\n var params = {\n data: data,\n node: rowNode,\n column: column,\n colDef: column.getColDef(),\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext(),\n getValue: this.getValueCallback.bind(this, rowNode)\n };\n return this.expressionService.evaluate(valueGetter, params);\n };\n ValueService.prototype.executeValueGetter = function (valueGetter, data, column, rowNode) {\n var colId = column.getId();\n // if inside the same turn, just return back the value we got last time\n var valueFromCache = this.valueCache.getValue(rowNode, colId);\n if (valueFromCache !== undefined) {\n return valueFromCache;\n }\n var params = {\n data: data,\n node: rowNode,\n column: column,\n colDef: column.getColDef(),\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext(),\n getValue: this.getValueCallback.bind(this, rowNode)\n };\n var result = this.expressionService.evaluate(valueGetter, params);\n // if a turn is active, store the value in case the grid asks for it again\n this.valueCache.setValue(rowNode, colId, result);\n return result;\n };\n ValueService.prototype.getValueCallback = function (node, field) {\n var otherColumn = this.columnModel.getPrimaryColumn(field);\n if (otherColumn) {\n return this.getValue(otherColumn, node);\n }\n return null;\n };\n // used by row grouping and pivot, to get key for a row. col can be a pivot col or a row grouping col\n ValueService.prototype.getKeyForNode = function (col, rowNode) {\n var value = this.getValue(col, rowNode);\n var keyCreator = col.getColDef().keyCreator;\n var result = value;\n if (keyCreator) {\n var keyParams = {\n value: value,\n colDef: col.getColDef(),\n column: col,\n node: rowNode,\n data: rowNode.data,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n result = keyCreator(keyParams);\n }\n // if already a string, or missing, just return it\n if (typeof result === 'string' || result == null) {\n return result;\n }\n result = String(result);\n if (result === '[object Object]') {\n doOnce(function () {\n console.warn('AG Grid: a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key');\n }, 'getKeyForNode - warn about [object,object]');\n }\n return result;\n };\n __decorate$1S([\n Autowired('expressionService')\n ], ValueService.prototype, \"expressionService\", void 0);\n __decorate$1S([\n Autowired('columnModel')\n ], ValueService.prototype, \"columnModel\", void 0);\n __decorate$1S([\n Autowired('valueCache')\n ], ValueService.prototype, \"valueCache\", void 0);\n __decorate$1S([\n PostConstruct\n ], ValueService.prototype, \"init\", null);\n ValueService = __decorate$1S([\n Bean('valueService')\n ], ValueService);\n return ValueService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2c = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1T = (undefined && undefined.__decorate) || function (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};\nvar __param$7 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar ExpressionService = /** @class */ (function (_super) {\n __extends$2c(ExpressionService, _super);\n function ExpressionService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.expressionToFunctionCache = {};\n return _this;\n }\n ExpressionService.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('ExpressionService');\n };\n ExpressionService.prototype.evaluate = function (expressionOrFunc, params) {\n if (typeof expressionOrFunc === 'function') {\n // valueGetter is a function, so just call it\n var func = expressionOrFunc;\n return func(params);\n }\n else if (typeof expressionOrFunc === 'string') {\n // valueGetter is an expression, so execute the expression\n var expression = expressionOrFunc;\n return this.evaluateExpression(expression, params);\n }\n else {\n console.error('AG Grid: value should be either a string or a function', expressionOrFunc);\n }\n };\n ExpressionService.prototype.evaluateExpression = function (expression, params) {\n try {\n var javaScriptFunction = this.createExpressionFunction(expression);\n // the params don't have all these values, rather we add every possible\n // value a params can have, which makes whatever is in the params available.\n var result = javaScriptFunction(params.value, params.context, params.oldValue, params.newValue, params.value, params.node, params.data, params.colDef, params.rowIndex, params.api, params.columnApi, params.getValue, params.column, params.columnGroup);\n return result;\n }\n catch (e) {\n // the expression failed, which can happen, as it's the client that\n // provides the expression. so print a nice message\n // tslint:disable-next-line\n console.log('Processing of the expression failed');\n // tslint:disable-next-line\n console.log('Expression = ' + expression);\n // tslint:disable-next-line\n console.log('Params =', params);\n // tslint:disable-next-line\n console.log('Exception = ' + e);\n return null;\n }\n };\n ExpressionService.prototype.createExpressionFunction = function (expression) {\n // check cache first\n if (this.expressionToFunctionCache[expression]) {\n return this.expressionToFunctionCache[expression];\n }\n // if not found in cache, return the function\n var functionBody = this.createFunctionBody(expression);\n var theFunction = new Function('x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup', functionBody);\n // store in cache\n this.expressionToFunctionCache[expression] = theFunction;\n return theFunction;\n };\n ExpressionService.prototype.createFunctionBody = function (expression) {\n // if the expression has the 'return' word in it, then use as is,\n // if not, then wrap it with return and ';' to make a function\n if (expression.indexOf('return') >= 0) {\n return expression;\n }\n else {\n return 'return ' + expression + ';';\n }\n };\n __decorate$1T([\n __param$7(0, Qualifier('loggerFactory'))\n ], ExpressionService.prototype, \"setBeans\", null);\n ExpressionService = __decorate$1T([\n Bean('expressionService')\n ], ExpressionService);\n return ExpressionService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2d = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1U = (undefined && undefined.__decorate) || function (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};\nvar TemplateService = /** @class */ (function (_super) {\n __extends$2d(TemplateService, _super);\n function TemplateService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.templateCache = {};\n _this.waitingCallbacks = {};\n return _this;\n }\n // returns the template if it is loaded, or null if it is not loaded\n // but will call the callback when it is loaded\n TemplateService.prototype.getTemplate = function (url, callback) {\n var templateFromCache = this.templateCache[url];\n if (templateFromCache) {\n return templateFromCache;\n }\n var callbackList = this.waitingCallbacks[url];\n var that = this;\n if (!callbackList) {\n // first time this was called, so need a new list for callbacks\n callbackList = [];\n this.waitingCallbacks[url] = callbackList;\n // and also need to do the http request\n var client = new XMLHttpRequest();\n client.onload = function () {\n that.handleHttpResult(this, url);\n };\n client.open(\"GET\", url);\n client.send();\n }\n // add this callback\n if (callback) {\n callbackList.push(callback);\n }\n // caller needs to wait for template to load, so return null\n return null;\n };\n TemplateService.prototype.handleHttpResult = function (httpResult, url) {\n if (httpResult.status !== 200 || httpResult.response === null) {\n console.warn(\"AG Grid: Unable to get template error \" + httpResult.status + \" - \" + url);\n return;\n }\n // response success, so process it\n // in IE9 the response is in - responseText\n this.templateCache[url] = httpResult.response || httpResult.responseText;\n // inform all listeners that this is now in the cache\n var callbacks = this.waitingCallbacks[url];\n for (var i = 0; i < callbacks.length; i++) {\n var callback = callbacks[i];\n // we could pass the callback the response, however we know the client of this code\n // is the cell renderer, and it passes the 'cellRefresh' method in as the callback\n // which doesn't take any parameters.\n callback();\n }\n };\n TemplateService = __decorate$1U([\n Bean('templateService')\n ], TemplateService);\n return TemplateService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2e = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1V = (undefined && undefined.__decorate) || function (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};\nvar __param$8 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar LoggerFactory = /** @class */ (function (_super) {\n __extends$2e(LoggerFactory, _super);\n function LoggerFactory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n LoggerFactory.prototype.setBeans = function (gridOptionsWrapper) {\n this.logging = gridOptionsWrapper.isDebug();\n };\n LoggerFactory.prototype.create = function (name) {\n return new Logger(name, this.isLogging.bind(this));\n };\n LoggerFactory.prototype.isLogging = function () {\n return this.logging;\n };\n __decorate$1V([\n __param$8(0, Qualifier('gridOptionsWrapper'))\n ], LoggerFactory.prototype, \"setBeans\", null);\n LoggerFactory = __decorate$1V([\n Bean('loggerFactory')\n ], LoggerFactory);\n return LoggerFactory;\n}(BeanStub));\nvar Logger = /** @class */ (function () {\n function Logger(name, isLoggingFunc) {\n this.name = name;\n this.isLoggingFunc = isLoggingFunc;\n }\n Logger.prototype.isLogging = function () {\n return this.isLoggingFunc();\n };\n Logger.prototype.log = function (message) {\n if (this.isLoggingFunc()) {\n // tslint:disable-next-line\n console.log('AG Grid.' + this.name + ': ' + message);\n }\n };\n return Logger;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2f = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1W = (undefined && undefined.__decorate) || function (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};\nvar GridCtrl = /** @class */ (function (_super) {\n __extends$2f(GridCtrl, _super);\n function GridCtrl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridCtrl.prototype.setComp = function (view, eGridDiv, eGui) {\n var _this = this;\n this.view = view;\n this.eGridHostDiv = eGridDiv;\n this.eGui = eGui;\n this.mouseEventService.stampTopLevelGridCompWithGridInstance(eGridDiv);\n this.createManagedBean(new LayoutFeature(this.view));\n // important to set rtl before doLayout, as setting the RTL class impacts the scroll position,\n // which doLayout indirectly depends on\n this.addRtlSupport();\n this.addManagedListener(this, Events.EVENT_KEYBOARD_FOCUS, function () {\n _this.view.addOrRemoveKeyboardFocusClass(true);\n });\n this.addManagedListener(this, Events.EVENT_MOUSE_FOCUS, function () {\n _this.view.addOrRemoveKeyboardFocusClass(false);\n });\n var unsubscribeFromResize = this.resizeObserverService.observeResize(this.eGridHostDiv, this.onGridSizeChanged.bind(this));\n this.addDestroyFunc(function () { return unsubscribeFromResize(); });\n this.ctrlsService.registerGridCtrl(this);\n };\n GridCtrl.prototype.isDetailGrid = function () {\n var _a, _b;\n var el = this.focusService.findTabbableParent(this.getGui());\n return ((_b = (_a = el) === null || _a === void 0 ? void 0 : _a.getAttribute('row-id')) === null || _b === void 0 ? void 0 : _b.startsWith('detail')) || false;\n };\n GridCtrl.prototype.showDropZones = function () {\n return ModuleRegistry.isRegistered(exports.ModuleNames.RowGroupingModule);\n };\n GridCtrl.prototype.showSideBar = function () {\n return ModuleRegistry.isRegistered(exports.ModuleNames.SideBarModule);\n };\n GridCtrl.prototype.showStatusBar = function () {\n return ModuleRegistry.isRegistered(exports.ModuleNames.StatusBarModule);\n };\n GridCtrl.prototype.showWatermark = function () {\n return ModuleRegistry.isRegistered(exports.ModuleNames.EnterpriseCoreModule);\n };\n GridCtrl.prototype.onGridSizeChanged = function () {\n var event = {\n type: Events.EVENT_GRID_SIZE_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi,\n clientWidth: this.eGridHostDiv.clientWidth,\n clientHeight: this.eGridHostDiv.clientHeight\n };\n this.eventService.dispatchEvent(event);\n };\n GridCtrl.prototype.addRtlSupport = function () {\n var cssClass = this.gridOptionsWrapper.isEnableRtl() ? 'ag-rtl' : 'ag-ltr';\n this.view.setRtlClass(cssClass);\n };\n GridCtrl.prototype.destroyGridUi = function () {\n this.view.destroyGridUi();\n };\n GridCtrl.prototype.getGui = function () {\n return this.eGui;\n };\n GridCtrl.prototype.setResizeCursor = function (on) {\n this.view.setCursor(on ? 'ew-resize' : null);\n };\n GridCtrl.prototype.disableUserSelect = function (on) {\n this.view.setUserSelect(on ? 'none' : null);\n };\n GridCtrl.prototype.focusNextInnerContainer = function (backwards) {\n var eDocument = this.gridOptionsWrapper.getDocument();\n var focusableContainers = this.view.getFocusableContainers();\n var idxWithFocus = focusableContainers.findIndex(function (container) { return container.contains(eDocument.activeElement); });\n var nextIdx = idxWithFocus + (backwards ? -1 : 1);\n if (nextIdx <= 0 || nextIdx >= focusableContainers.length) {\n return false;\n }\n return this.focusService.focusInto(focusableContainers[nextIdx]);\n };\n GridCtrl.prototype.focusInnerElement = function (fromBottom) {\n var focusableContainers = this.view.getFocusableContainers();\n if (fromBottom) {\n if (focusableContainers.length > 1) {\n return this.focusService.focusInto(last(focusableContainers), true);\n }\n var lastColumn = last(this.columnModel.getAllDisplayedColumns());\n if (this.focusService.focusGridView(lastColumn, true)) {\n return true;\n }\n }\n return this.focusService.focusFirstHeader();\n };\n GridCtrl.prototype.forceFocusOutOfContainer = function (up) {\n if (up === void 0) { up = false; }\n this.view.forceFocusOutOfContainer(up);\n };\n __decorate$1W([\n Autowired('columnApi')\n ], GridCtrl.prototype, \"columnApi\", void 0);\n __decorate$1W([\n Autowired('gridApi')\n ], GridCtrl.prototype, \"gridApi\", void 0);\n __decorate$1W([\n Autowired('focusService')\n ], GridCtrl.prototype, \"focusService\", void 0);\n __decorate$1W([\n Autowired('resizeObserverService')\n ], GridCtrl.prototype, \"resizeObserverService\", void 0);\n __decorate$1W([\n Autowired('columnModel')\n ], GridCtrl.prototype, \"columnModel\", void 0);\n __decorate$1W([\n Autowired('ctrlsService')\n ], GridCtrl.prototype, \"ctrlsService\", void 0);\n __decorate$1W([\n Autowired('mouseEventService')\n ], GridCtrl.prototype, \"mouseEventService\", void 0);\n return GridCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2g = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1X = (undefined && undefined.__decorate) || function (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};\nvar GridComp = /** @class */ (function (_super) {\n __extends$2g(GridComp, _super);\n function GridComp(eGridDiv) {\n var _this = _super.call(this, undefined) || this;\n _this.eGridDiv = eGridDiv;\n return _this;\n }\n GridComp.prototype.postConstruct = function () {\n var _this = this;\n this.logger = this.loggerFactory.create('GridComp');\n var compProxy = {\n destroyGridUi: function () { return _this.destroyBean(_this); },\n setRtlClass: function (cssClass) { return _this.addCssClass(cssClass); },\n addOrRemoveKeyboardFocusClass: function (addOrRemove) { return _this.addOrRemoveCssClass(FocusService.AG_KEYBOARD_FOCUS, addOrRemove); },\n forceFocusOutOfContainer: this.forceFocusOutOfContainer.bind(this),\n updateLayoutClasses: this.updateLayoutClasses.bind(this),\n getFocusableContainers: this.getFocusableContainers.bind(this),\n setUserSelect: function (value) {\n _this.getGui().style.userSelect = value != null ? value : '';\n _this.getGui().style.webkitUserSelect = value != null ? value : '';\n },\n setCursor: function (value) {\n _this.getGui().style.cursor = value != null ? value : '';\n }\n };\n this.ctrl = this.createManagedBean(new GridCtrl());\n var template = this.createTemplate();\n this.setTemplate(template);\n this.ctrl.setComp(compProxy, this.eGridDiv, this.getGui());\n this.insertGridIntoDom();\n this.initialiseTabGuard({\n // we want to override the default behaviour to do nothing for onTabKeyDown\n onTabKeyDown: function () { return undefined; },\n focusInnerElement: function (fromBottom) { return _this.ctrl.focusInnerElement(fromBottom); }\n });\n };\n GridComp.prototype.insertGridIntoDom = function () {\n var _this = this;\n var eGui = this.getGui();\n this.eGridDiv.appendChild(eGui);\n this.addDestroyFunc(function () {\n _this.eGridDiv.removeChild(eGui);\n _this.logger.log('Grid removed from DOM');\n });\n };\n GridComp.prototype.updateLayoutClasses = function (cssClass, params) {\n var eRootWrapperBodyClassList = this.eRootWrapperBody.classList;\n eRootWrapperBodyClassList.toggle(exports.LayoutCssClasses.AUTO_HEIGHT, params.autoHeight);\n eRootWrapperBodyClassList.toggle(exports.LayoutCssClasses.NORMAL, params.normal);\n eRootWrapperBodyClassList.toggle(exports.LayoutCssClasses.PRINT, params.print);\n this.addOrRemoveCssClass(exports.LayoutCssClasses.AUTO_HEIGHT, params.autoHeight);\n this.addOrRemoveCssClass(exports.LayoutCssClasses.NORMAL, params.normal);\n this.addOrRemoveCssClass(exports.LayoutCssClasses.PRINT, params.print);\n };\n GridComp.prototype.createTemplate = function () {\n var dropZones = this.ctrl.showDropZones() ? '' : '';\n var sideBar = this.ctrl.showSideBar() ? '' : '';\n var statusBar = this.ctrl.showStatusBar() ? '' : '';\n var watermark = this.ctrl.showWatermark() ? '' : '';\n var template = /* html */ \"
\\n \" + dropZones + \"\\n
\\n \\n \" + sideBar + \"\\n
\\n \" + statusBar + \"\\n \\n \" + watermark + \"\\n
\";\n return template;\n };\n GridComp.prototype.getFocusableElement = function () {\n return this.eRootWrapperBody;\n };\n GridComp.prototype.getFocusableContainers = function () {\n var focusableContainers = [\n this.gridBodyComp.getGui()\n ];\n if (this.sideBarComp) {\n focusableContainers.push(this.sideBarComp.getGui());\n }\n return focusableContainers.filter(function (el) { return isVisible(el); });\n };\n __decorate$1X([\n Autowired('loggerFactory')\n ], GridComp.prototype, \"loggerFactory\", void 0);\n __decorate$1X([\n RefSelector('gridBody')\n ], GridComp.prototype, \"gridBodyComp\", void 0);\n __decorate$1X([\n RefSelector('sideBar')\n ], GridComp.prototype, \"sideBarComp\", void 0);\n __decorate$1X([\n RefSelector('rootWrapperBody')\n ], GridComp.prototype, \"eRootWrapperBody\", void 0);\n __decorate$1X([\n PostConstruct\n ], GridComp.prototype, \"postConstruct\", null);\n return GridComp;\n}(TabGuardComp));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2h = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1Y = (undefined && undefined.__decorate) || function (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};\nvar SortController = /** @class */ (function (_super) {\n __extends$2h(SortController, _super);\n function SortController() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SortController_1 = SortController;\n SortController.prototype.progressSort = function (column, multiSort, source) {\n var nextDirection = this.getNextSortDirection(column);\n this.setSortForColumn(column, nextDirection, multiSort, source);\n };\n SortController.prototype.setSortForColumn = function (column, sort, multiSort, source) {\n // auto correct - if sort not legal value, then set it to 'no sort' (which is null)\n if (sort !== Constants.SORT_ASC && sort !== Constants.SORT_DESC) {\n sort = null;\n }\n // update sort on current col\n column.setSort(sort, source);\n var doingMultiSort = (multiSort || this.gridOptionsWrapper.isAlwaysMultiSort()) && !this.gridOptionsWrapper.isSuppressMultiSort();\n // clear sort on all columns except this one, and update the icons\n if (!doingMultiSort) {\n this.clearSortBarThisColumn(column, source);\n }\n // sortIndex used for knowing order of cols when multi-col sort\n this.updateSortIndex(column);\n this.dispatchSortChangedEvents(source);\n };\n SortController.prototype.updateSortIndex = function (lastColToChange) {\n // update sortIndex on all sorting cols\n var allSortedCols = this.getColumnsWithSortingOrdered();\n var sortIndex = 0;\n allSortedCols.forEach(function (col) {\n if (col !== lastColToChange) {\n col.setSortIndex(sortIndex);\n sortIndex++;\n }\n });\n // last col to change always gets the last sort index, it's added to the end\n if (lastColToChange.getSort()) {\n lastColToChange.setSortIndex(sortIndex);\n }\n // clear sort index on all cols not sorting\n var allCols = this.columnModel.getPrimaryAndSecondaryAndAutoColumns();\n allCols.filter(function (col) { return col.getSort() == null; }).forEach(function (col) { return col.setSortIndex(); });\n };\n // gets called by API, so if data changes, use can call this, which will end up\n // working out the sort order again of the rows.\n SortController.prototype.onSortChanged = function (source) {\n this.dispatchSortChangedEvents(source);\n };\n SortController.prototype.isSortActive = function () {\n // pull out all the columns that have sorting set\n var allCols = this.columnModel.getPrimaryAndSecondaryAndAutoColumns();\n var sortedCols = allCols.filter(function (column) { return !!column.getSort(); });\n return sortedCols && sortedCols.length > 0;\n };\n SortController.prototype.dispatchSortChangedEvents = function (source) {\n var event = {\n type: Events.EVENT_SORT_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n SortController.prototype.clearSortBarThisColumn = function (columnToSkip, source) {\n this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(function (columnToClear) {\n // Do not clear if either holding shift, or if column in question was clicked\n if (columnToClear !== columnToSkip) {\n // setting to 'undefined' as null means 'none' rather than cleared, otherwise issue will arise\n // if sort order is: ['desc', null , 'asc'], as it will start at null rather than 'desc'.\n columnToClear.setSort(undefined, source);\n }\n });\n };\n SortController.prototype.getNextSortDirection = function (column) {\n var sortingOrder;\n if (column.getColDef().sortingOrder) {\n sortingOrder = column.getColDef().sortingOrder;\n }\n else if (this.gridOptionsWrapper.getSortingOrder()) {\n sortingOrder = this.gridOptionsWrapper.getSortingOrder();\n }\n else {\n sortingOrder = SortController_1.DEFAULT_SORTING_ORDER;\n }\n if (!Array.isArray(sortingOrder) || sortingOrder.length <= 0) {\n console.warn(\"AG Grid: sortingOrder must be an array with at least one element, currently it's \" + sortingOrder);\n return null;\n }\n var currentIndex = sortingOrder.indexOf(column.getSort());\n var notInArray = currentIndex < 0;\n var lastItemInArray = currentIndex == sortingOrder.length - 1;\n var result;\n if (notInArray || lastItemInArray) {\n result = sortingOrder[0];\n }\n else {\n result = sortingOrder[currentIndex + 1];\n }\n // verify the sort type exists, as the user could provide the sortingOrder, need to make sure it's valid\n if (SortController_1.DEFAULT_SORTING_ORDER.indexOf(result) < 0) {\n console.warn('AG Grid: invalid sort type ' + result);\n return null;\n }\n return result;\n };\n SortController.prototype.getColumnsWithSortingOrdered = function () {\n // pull out all the columns that have sorting set\n var allColumnsIncludingAuto = this.columnModel.getPrimaryAndSecondaryAndAutoColumns();\n var columnsWithSorting = allColumnsIncludingAuto.filter(function (column) { return !!column.getSort(); });\n // when both cols are missing sortIndex, we use the position of the col in all cols list.\n // this means if colDefs only have sort, but no sortIndex, we deterministically pick which\n // cols is sorted by first.\n var allColsIndexes = {};\n allColumnsIncludingAuto.forEach(function (col, index) { return allColsIndexes[col.getId()] = index; });\n // put the columns in order of which one got sorted first\n columnsWithSorting.sort(function (a, b) {\n var iA = a.getSortIndex();\n var iB = b.getSortIndex();\n if (iA != null && iB != null) {\n return iA - iB; // both present, normal comparison\n }\n else if (iA == null && iB == null) {\n // both missing, compare using column positions\n var posA = allColsIndexes[a.getId()];\n var posB = allColsIndexes[b.getId()];\n return posA > posB ? 1 : -1;\n }\n else if (iB == null) {\n return -1; // iB missing\n }\n else {\n return 1; // iA missing\n }\n });\n return columnsWithSorting;\n };\n // used by server side row models, to sent sort to server\n SortController.prototype.getSortModel = function () {\n return this.getColumnsWithSortingOrdered().map(function (column) { return ({\n sort: column.getSort(),\n colId: column.getId()\n }); });\n };\n SortController.prototype.getSortOptions = function () {\n return this.getColumnsWithSortingOrdered().map(function (column) { return ({\n sort: column.getSort(),\n column: column\n }); });\n };\n var SortController_1;\n SortController.DEFAULT_SORTING_ORDER = [Constants.SORT_ASC, Constants.SORT_DESC, null];\n __decorate$1Y([\n Autowired('columnModel')\n ], SortController.prototype, \"columnModel\", void 0);\n __decorate$1Y([\n Autowired('columnApi')\n ], SortController.prototype, \"columnApi\", void 0);\n __decorate$1Y([\n Autowired('gridApi')\n ], SortController.prototype, \"gridApi\", void 0);\n SortController = SortController_1 = __decorate$1Y([\n Bean('sortController')\n ], SortController);\n return SortController;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2i = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1Z = (undefined && undefined.__decorate) || function (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};\nvar ColumnHoverService = /** @class */ (function (_super) {\n __extends$2i(ColumnHoverService, _super);\n function ColumnHoverService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ColumnHoverService.prototype.setMouseOver = function (columns) {\n this.selectedColumns = columns;\n var event = {\n type: Events.EVENT_COLUMN_HOVER_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnHoverService.prototype.clearMouseOver = function () {\n this.selectedColumns = null;\n var event = {\n type: Events.EVENT_COLUMN_HOVER_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnHoverService.prototype.isHovered = function (column) {\n return !!this.selectedColumns && this.selectedColumns.indexOf(column) >= 0;\n };\n __decorate$1Z([\n Autowired('columnApi')\n ], ColumnHoverService.prototype, \"columnApi\", void 0);\n __decorate$1Z([\n Autowired('gridApi')\n ], ColumnHoverService.prototype, \"gridApi\", void 0);\n ColumnHoverService = __decorate$1Z([\n Bean('columnHoverService')\n ], ColumnHoverService);\n return ColumnHoverService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2j = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1_ = (undefined && undefined.__decorate) || function (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};\nvar ColumnAnimationService = /** @class */ (function (_super) {\n __extends$2j(ColumnAnimationService, _super);\n function ColumnAnimationService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.executeNextFuncs = [];\n _this.executeLaterFuncs = [];\n _this.active = false;\n _this.animationThreadCount = 0;\n return _this;\n }\n ColumnAnimationService.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function (p) { return _this.gridBodyCtrl = p.gridBodyCtrl; });\n };\n ColumnAnimationService.prototype.isActive = function () {\n return this.active;\n };\n ColumnAnimationService.prototype.start = function () {\n if (this.active) {\n return;\n }\n if (this.gridOptionsWrapper.isSuppressColumnMoveAnimation()) {\n return;\n }\n // if doing RTL, we don't animate open / close as due to how the pixels are inverted,\n // the animation moves all the row the the right rather than to the left (ie it's the static\n // columns that actually get their coordinates updated)\n if (this.gridOptionsWrapper.isEnableRtl()) {\n return;\n }\n this.ensureAnimationCssClassPresent();\n this.active = true;\n };\n ColumnAnimationService.prototype.finish = function () {\n if (!this.active) {\n return;\n }\n this.flush();\n this.active = false;\n };\n ColumnAnimationService.prototype.executeNextVMTurn = function (func) {\n if (this.active) {\n this.executeNextFuncs.push(func);\n }\n else {\n func();\n }\n };\n ColumnAnimationService.prototype.executeLaterVMTurn = function (func) {\n if (this.active) {\n this.executeLaterFuncs.push(func);\n }\n else {\n func();\n }\n };\n ColumnAnimationService.prototype.ensureAnimationCssClassPresent = function () {\n var _this = this;\n // up the count, so we can tell if someone else has updated the count\n // by the time the 'wait' func executes\n this.animationThreadCount++;\n var animationThreadCountCopy = this.animationThreadCount;\n this.gridBodyCtrl.setColumnMovingCss(true);\n this.executeLaterFuncs.push(function () {\n // only remove the class if this thread was the last one to update it\n if (_this.animationThreadCount === animationThreadCountCopy) {\n _this.gridBodyCtrl.setColumnMovingCss(false);\n }\n });\n };\n ColumnAnimationService.prototype.flush = function () {\n var nowFuncs = this.executeNextFuncs;\n this.executeNextFuncs = [];\n var waitFuncs = this.executeLaterFuncs;\n this.executeLaterFuncs = [];\n if (nowFuncs.length === 0 && waitFuncs.length === 0) {\n return;\n }\n window.setTimeout(function () { return nowFuncs.forEach(function (func) { return func(); }); }, 0);\n window.setTimeout(function () { return waitFuncs.forEach(function (func) { return func(); }); }, 300);\n };\n __decorate$1_([\n Autowired('ctrlsService')\n ], ColumnAnimationService.prototype, \"ctrlsService\", void 0);\n __decorate$1_([\n PostConstruct\n ], ColumnAnimationService.prototype, \"postConstruct\", null);\n ColumnAnimationService = __decorate$1_([\n Bean('columnAnimationService')\n ], ColumnAnimationService);\n return ColumnAnimationService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2k = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$1$ = (undefined && undefined.__decorate) || function (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};\nvar AutoGroupColService = /** @class */ (function (_super) {\n __extends$2k(AutoGroupColService, _super);\n function AutoGroupColService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AutoGroupColService_1 = AutoGroupColService;\n AutoGroupColService.prototype.createAutoGroupColumns = function (existingCols, rowGroupColumns) {\n var _this = this;\n var groupAutoColumns = [];\n var doingTreeData = this.gridOptionsWrapper.isTreeData();\n var doingMultiAutoColumn = this.gridOptionsWrapper.isGroupMultiAutoColumn();\n if (doingTreeData && doingMultiAutoColumn) {\n console.warn('AG Grid: you cannot mix groupMultiAutoColumn with treeData, only one column can be used to display groups when doing tree data');\n doingMultiAutoColumn = false;\n }\n // if doing groupMultiAutoColumn, then we call the method multiple times, once\n // for each column we are grouping by\n if (doingMultiAutoColumn) {\n rowGroupColumns.forEach(function (rowGroupCol, index) {\n groupAutoColumns.push(_this.createOneAutoGroupColumn(existingCols, rowGroupCol, index));\n });\n }\n else {\n groupAutoColumns.push(this.createOneAutoGroupColumn(existingCols));\n }\n return groupAutoColumns;\n };\n // rowGroupCol and index are missing if groupMultiAutoColumn=false\n AutoGroupColService.prototype.createOneAutoGroupColumn = function (existingCols, rowGroupCol, index) {\n // if one provided by user, use it, otherwise create one\n var defaultAutoColDef = this.generateDefaultColDef(rowGroupCol);\n // if doing multi, set the field\n var colId;\n if (rowGroupCol) {\n colId = Constants.GROUP_AUTO_COLUMN_ID + \"-\" + rowGroupCol.getId();\n }\n else {\n colId = AutoGroupColService_1.GROUP_AUTO_COLUMN_BUNDLE_ID;\n }\n var userAutoColDef = this.gridOptionsWrapper.getAutoGroupColumnDef();\n mergeDeep(defaultAutoColDef, userAutoColDef);\n defaultAutoColDef = this.columnFactory.mergeColDefs(defaultAutoColDef);\n defaultAutoColDef.colId = colId;\n // For tree data the filter is always allowed\n if (!this.gridOptionsWrapper.isTreeData()) {\n // we would only allow filter if the user has provided field or value getter. otherwise the filter\n // would not be able to work.\n var noFieldOrValueGetter = missing(defaultAutoColDef.field) && missing(defaultAutoColDef.valueGetter) && missing(defaultAutoColDef.filterValueGetter);\n if (noFieldOrValueGetter) {\n defaultAutoColDef.filter = false;\n }\n }\n // if showing many cols, we don't want to show more than one with a checkbox for selection\n if (index && index > 0) {\n defaultAutoColDef.headerCheckboxSelection = false;\n }\n var existingCol = existingCols.find(function (col) { return col.getId() == colId; });\n if (existingCol) {\n existingCol.setColDef(defaultAutoColDef, null);\n this.columnFactory.applyColumnState(existingCol, defaultAutoColDef);\n return existingCol;\n }\n var newCol = new Column(defaultAutoColDef, null, colId, true);\n this.context.createBean(newCol);\n return newCol;\n };\n AutoGroupColService.prototype.generateDefaultColDef = function (rowGroupCol) {\n var userDef = this.gridOptionsWrapper.getAutoGroupColumnDef();\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var res = {\n headerName: localeTextFunc('group', 'Group')\n };\n var userHasProvidedGroupCellRenderer = userDef &&\n (userDef.cellRenderer || userDef.cellRendererFramework || userDef.cellRendererSelector);\n // only add the default group cell renderer if user hasn't provided one\n if (!userHasProvidedGroupCellRenderer) {\n res.cellRenderer = 'agGroupCellRenderer';\n }\n // we never allow moving the group column\n // defaultAutoColDef.suppressMovable = true;\n if (rowGroupCol) {\n var colDef = rowGroupCol.getColDef();\n Object.assign(res, {\n // cellRendererParams.groupKey: colDefToCopy.field;\n headerName: this.columnModel.getDisplayNameForColumn(rowGroupCol, 'header'),\n headerValueGetter: colDef.headerValueGetter\n });\n if (colDef.cellRenderer || colDef.cellRendererFramework) {\n Object.assign(res, {\n cellRendererParams: {\n innerRenderer: colDef.cellRenderer,\n innerRendererFramework: colDef.cellRendererFramework,\n innerRendererParams: colDef.cellRendererParams\n }\n });\n }\n res.showRowGroup = rowGroupCol.getColId();\n }\n else {\n res.showRowGroup = true;\n }\n return res;\n };\n var AutoGroupColService_1;\n AutoGroupColService.GROUP_AUTO_COLUMN_BUNDLE_ID = Constants.GROUP_AUTO_COLUMN_ID;\n __decorate$1$([\n Autowired('columnModel')\n ], AutoGroupColService.prototype, \"columnModel\", void 0);\n __decorate$1$([\n Autowired('columnFactory')\n ], AutoGroupColService.prototype, \"columnFactory\", void 0);\n AutoGroupColService = AutoGroupColService_1 = __decorate$1$([\n Bean('autoGroupColService')\n ], AutoGroupColService);\n return AutoGroupColService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2l = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$20 = (undefined && undefined.__decorate) || function (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};\nvar PaginationAutoPageSizeService = /** @class */ (function (_super) {\n __extends$2l(PaginationAutoPageSizeService, _super);\n function PaginationAutoPageSizeService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PaginationAutoPageSizeService.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function (p) {\n _this.centerRowContainerCon = p.centerRowContainerCtrl;\n _this.addManagedListener(_this.eventService, Events.EVENT_BODY_HEIGHT_CHANGED, _this.onBodyHeightChanged.bind(_this));\n _this.addManagedListener(_this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, _this.onScrollVisibilityChanged.bind(_this));\n _this.checkPageSize();\n });\n };\n PaginationAutoPageSizeService.prototype.notActive = function () {\n return !this.gridOptionsWrapper.isPaginationAutoPageSize();\n };\n PaginationAutoPageSizeService.prototype.onScrollVisibilityChanged = function () {\n this.checkPageSize();\n };\n PaginationAutoPageSizeService.prototype.onBodyHeightChanged = function () {\n this.checkPageSize();\n };\n PaginationAutoPageSizeService.prototype.checkPageSize = function () {\n if (this.notActive()) {\n return;\n }\n var rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();\n var bodyHeight = this.centerRowContainerCon.getViewportSizeFeature().getBodyHeight();\n if (bodyHeight > 0) {\n var newPageSize = Math.floor(bodyHeight / rowHeight);\n this.gridOptionsWrapper.setProperty('paginationPageSize', newPageSize);\n }\n };\n __decorate$20([\n Autowired('ctrlsService')\n ], PaginationAutoPageSizeService.prototype, \"ctrlsService\", void 0);\n __decorate$20([\n PostConstruct\n ], PaginationAutoPageSizeService.prototype, \"postConstruct\", null);\n PaginationAutoPageSizeService = __decorate$20([\n Bean('paginationAutoPageSizeService')\n ], PaginationAutoPageSizeService);\n return PaginationAutoPageSizeService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2m = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$21 = (undefined && undefined.__decorate) || function (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};\nvar ValueCache = /** @class */ (function (_super) {\n __extends$2m(ValueCache, _super);\n function ValueCache() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cacheVersion = 0;\n return _this;\n }\n ValueCache.prototype.init = function () {\n this.active = this.gridOptionsWrapper.isValueCache();\n this.neverExpires = this.gridOptionsWrapper.isValueCacheNeverExpires();\n };\n ValueCache.prototype.onDataChanged = function () {\n if (this.neverExpires) {\n return;\n }\n this.expire();\n };\n ValueCache.prototype.expire = function () {\n this.cacheVersion++;\n };\n ValueCache.prototype.setValue = function (rowNode, colId, value) {\n if (this.active) {\n if (rowNode.__cacheVersion !== this.cacheVersion) {\n rowNode.__cacheVersion = this.cacheVersion;\n rowNode.__cacheData = {};\n }\n rowNode.__cacheData[colId] = value;\n }\n };\n ValueCache.prototype.getValue = function (rowNode, colId) {\n if (!this.active || rowNode.__cacheVersion !== this.cacheVersion) {\n return undefined;\n }\n return rowNode.__cacheData[colId];\n };\n __decorate$21([\n PostConstruct\n ], ValueCache.prototype, \"init\", null);\n ValueCache = __decorate$21([\n Bean('valueCache')\n ], ValueCache);\n return ValueCache;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2n = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$22 = (undefined && undefined.__decorate) || function (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};\nvar ChangeDetectionService = /** @class */ (function (_super) {\n __extends$2n(ChangeDetectionService, _super);\n function ChangeDetectionService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ChangeDetectionService.prototype.init = function () {\n if (this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n this.clientSideRowModel = this.rowModel;\n }\n this.addManagedListener(this.eventService, Events.EVENT_CELL_VALUE_CHANGED, this.onCellValueChanged.bind(this));\n };\n ChangeDetectionService.prototype.onCellValueChanged = function (event) {\n // Clipboard service manages its own change detection, so no need to do it here.\n // The clipboard manages its own as otherwise this would happen once for every cell\n // that got updated as part of a paste operation, so e.g. if 100 cells in a paste operation,\n // this doChangeDetection would get called 100 times (once for each cell), instead clipboard\n // service executes the logic we have here once (in essence batching up all cell changes\n // into one change detection).\n if (event.source === Constants.SOURCE_PASTE) {\n return;\n }\n this.doChangeDetection(event.node, event.column);\n };\n ChangeDetectionService.prototype.doChangeDetection = function (rowNode, column) {\n if (this.gridOptionsWrapper.isSuppressChangeDetection()) {\n return;\n }\n // step 1 of change detection is to update the aggregated values\n if (this.clientSideRowModel && !rowNode.isRowPinned()) {\n var onlyChangedColumns = this.gridOptionsWrapper.isAggregateOnlyChangedColumns();\n var changedPath = new ChangedPath(onlyChangedColumns, this.clientSideRowModel.getRootNode());\n changedPath.addParentNode(rowNode.parent, [column]);\n this.clientSideRowModel.doAggregate(changedPath);\n }\n // step 2 of change detection is to refresh the cells\n this.rowRenderer.refreshCells();\n };\n __decorate$22([\n Autowired('rowModel')\n ], ChangeDetectionService.prototype, \"rowModel\", void 0);\n __decorate$22([\n Autowired('rowRenderer')\n ], ChangeDetectionService.prototype, \"rowRenderer\", void 0);\n __decorate$22([\n PostConstruct\n ], ChangeDetectionService.prototype, \"init\", null);\n ChangeDetectionService = __decorate$22([\n Bean('changeDetectionService')\n ], ChangeDetectionService);\n return ChangeDetectionService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2o = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$23 = (undefined && undefined.__decorate) || function (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};\nvar AgComponentUtils = /** @class */ (function (_super) {\n __extends$2o(AgComponentUtils, _super);\n function AgComponentUtils() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AgComponentUtils.prototype.adaptFunction = function (propertyName, jsCompFunc) {\n var metadata = this.componentMetadataProvider.retrieve(propertyName);\n if (metadata && metadata.functionAdapter) {\n return metadata.functionAdapter(jsCompFunc);\n }\n return null;\n };\n AgComponentUtils.prototype.adaptCellRendererFunction = function (callback) {\n var Adapter = /** @class */ (function () {\n function Adapter() {\n }\n Adapter.prototype.refresh = function (params) {\n return false;\n };\n Adapter.prototype.getGui = function () {\n return this.eGui;\n };\n Adapter.prototype.init = function (params) {\n var callbackResult = callback(params);\n var type = typeof callbackResult;\n if (type === 'string' || type === 'number' || type === 'boolean') {\n this.eGui = loadTemplate('' + callbackResult + '');\n return;\n }\n if (callbackResult == null) {\n this.eGui = loadTemplate('');\n return;\n }\n this.eGui = callbackResult;\n };\n return Adapter;\n }());\n return Adapter;\n };\n AgComponentUtils.prototype.doesImplementIComponent = function (candidate) {\n if (!candidate) {\n return false;\n }\n return candidate.prototype && 'getGui' in candidate.prototype;\n };\n __decorate$23([\n Autowired(\"componentMetadataProvider\")\n ], AgComponentUtils.prototype, \"componentMetadataProvider\", void 0);\n AgComponentUtils = __decorate$23([\n Bean(\"agComponentUtils\")\n ], AgComponentUtils);\n return AgComponentUtils;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2p = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$24 = (undefined && undefined.__decorate) || function (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};\nvar ComponentMetadataProvider = /** @class */ (function (_super) {\n __extends$2p(ComponentMetadataProvider, _super);\n function ComponentMetadataProvider() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ComponentMetadataProvider.prototype.postConstruct = function () {\n this.componentMetaData = {\n dateComponent: {\n mandatoryMethodList: ['getDate', 'setDate'],\n optionalMethodList: ['afterGuiAttached', 'setInputPlaceholder', 'setInputAriaLabel']\n },\n detailCellRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n headerComponent: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh']\n },\n headerGroupComponent: {\n mandatoryMethodList: [],\n optionalMethodList: []\n },\n loadingCellRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: []\n },\n loadingOverlayComponent: {\n mandatoryMethodList: [],\n optionalMethodList: []\n },\n noRowsOverlayComponent: {\n mandatoryMethodList: [],\n optionalMethodList: []\n },\n floatingFilterComponent: {\n mandatoryMethodList: ['onParentModelChanged'],\n optionalMethodList: ['afterGuiAttached']\n },\n floatingFilterWrapperComponent: {\n mandatoryMethodList: [],\n optionalMethodList: []\n },\n cellRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh', 'afterGuiAttached'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n cellEditor: {\n mandatoryMethodList: ['getValue'],\n optionalMethodList: ['isPopup', 'isCancelBeforeStart', 'isCancelAfterEnd', 'getPopupPosition', 'focusIn', 'focusOut', 'afterGuiAttached']\n },\n innerRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['afterGuiAttached'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n fullWidthCellRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh', 'afterGuiAttached'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n pinnedRowCellRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh', 'afterGuiAttached'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n groupRowRenderer: {\n mandatoryMethodList: [],\n optionalMethodList: ['afterGuiAttached'],\n functionAdapter: this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)\n },\n filter: {\n mandatoryMethodList: ['isFilterActive', 'doesFilterPass', 'getModel', 'setModel'],\n optionalMethodList: ['afterGuiAttached', 'onNewRowsLoaded', 'getModelAsString', 'onFloatingFilterChanged']\n },\n filterComponent: {\n mandatoryMethodList: ['isFilterActive', 'doesFilterPass', 'getModel', 'setModel'],\n optionalMethodList: ['afterGuiAttached', 'onNewRowsLoaded', 'getModelAsString', 'onFloatingFilterChanged']\n },\n statusPanel: {\n mandatoryMethodList: [],\n optionalMethodList: ['afterGuiAttached'],\n },\n toolPanel: {\n mandatoryMethodList: [],\n optionalMethodList: ['refresh', 'afterGuiAttached']\n },\n tooltipComponent: {\n mandatoryMethodList: [],\n optionalMethodList: []\n }\n };\n };\n ComponentMetadataProvider.prototype.retrieve = function (name) {\n return this.componentMetaData[name];\n };\n __decorate$24([\n Autowired(\"agComponentUtils\")\n ], ComponentMetadataProvider.prototype, \"agComponentUtils\", void 0);\n __decorate$24([\n PostConstruct\n ], ComponentMetadataProvider.prototype, \"postConstruct\", null);\n ComponentMetadataProvider = __decorate$24([\n Bean(\"componentMetadataProvider\")\n ], ComponentMetadataProvider);\n return ComponentMetadataProvider;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2q = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$25 = (undefined && undefined.__decorate) || function (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};\nvar MAT_GRID_SIZE = 8;\nvar BASE_GRID_SIZE = 4;\nvar BALHAM_GRID_SIZE = 4;\nvar ALPINE_GRID_SIZE = 6;\nvar HARD_CODED_SIZES = {\n // this item is required for custom themes\n 'ag-theme-custom': {\n headerHeight: 25,\n headerCellMinWidth: 24,\n listItemHeight: BASE_GRID_SIZE * 5,\n rowHeight: 25,\n chartMenuPanelWidth: 220\n },\n 'ag-theme-material': {\n headerHeight: MAT_GRID_SIZE * 7,\n headerCellMinWidth: 48,\n listItemHeight: MAT_GRID_SIZE * 4,\n rowHeight: MAT_GRID_SIZE * 6,\n chartMenuPanelWidth: 240\n },\n 'ag-theme-balham': {\n headerHeight: BALHAM_GRID_SIZE * 8,\n headerCellMinWidth: 24,\n listItemHeight: BALHAM_GRID_SIZE * 6,\n rowHeight: BALHAM_GRID_SIZE * 7,\n chartMenuPanelWidth: 220\n },\n 'ag-theme-alpine': {\n headerHeight: ALPINE_GRID_SIZE * 8,\n headerCellMinWidth: 36,\n listItemHeight: ALPINE_GRID_SIZE * 4,\n rowHeight: ALPINE_GRID_SIZE * 7,\n chartMenuPanelWidth: 240\n }\n};\n/**\n * this object contains a list of Sass variables and an array\n * of CSS styles required to get the correct value.\n * eg. $virtual-item-height requires a structure, so we can get its height.\n *
\n *
\n *
\n *
\n *
\n */\nvar SASS_PROPERTY_BUILDER = {\n headerHeight: ['ag-header-row'],\n headerCellMinWidth: ['ag-header-cell'],\n listItemHeight: ['ag-virtual-list-item'],\n rowHeight: ['ag-row'],\n chartMenuPanelWidth: ['ag-chart-docked-container']\n};\nvar CALCULATED_SIZES = {};\nvar Environment = /** @class */ (function (_super) {\n __extends$2q(Environment, _super);\n function Environment() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Environment.prototype.getSassVariable = function (theme, key) {\n var useTheme = 'ag-theme-' + (theme.match('material') ? 'material' : theme.match('balham') ? 'balham' : theme.match('alpine') ? 'alpine' : 'custom');\n var defaultValue = HARD_CODED_SIZES[useTheme][key];\n var calculatedValue = 0;\n if (!CALCULATED_SIZES[theme]) {\n CALCULATED_SIZES[theme] = {};\n }\n var size = CALCULATED_SIZES[theme][key];\n if (size != null) {\n return size;\n }\n if (SASS_PROPERTY_BUILDER[key]) {\n var classList = SASS_PROPERTY_BUILDER[key];\n var div = document.createElement('div');\n div.classList.add(theme);\n div.style.position = 'absolute';\n var el = classList.reduce(function (prevEl, currentClass) {\n var currentDiv = document.createElement('div');\n currentDiv.style.position = 'static';\n currentDiv.classList.add(currentClass);\n prevEl.appendChild(currentDiv);\n return currentDiv;\n }, div);\n if (document.body) {\n document.body.appendChild(div);\n var sizeName = key.toLowerCase().indexOf('height') !== -1 ? 'height' : 'width';\n calculatedValue = parseInt(window.getComputedStyle(el)[sizeName], 10);\n document.body.removeChild(div);\n }\n }\n CALCULATED_SIZES[theme][key] = calculatedValue || defaultValue;\n return CALCULATED_SIZES[theme][key];\n };\n Environment.prototype.isThemeDark = function () {\n var theme = this.getTheme().theme;\n return !!theme && theme.indexOf('dark') >= 0;\n };\n Environment.prototype.chartMenuPanelWidth = function () {\n var theme = this.getTheme().themeFamily;\n return this.getSassVariable(theme, 'chartMenuPanelWidth');\n };\n Environment.prototype.getTheme = function () {\n var reg = /\\bag-(material|(?:theme-([\\w\\-]*)))\\b/;\n var el = this.eGridDiv;\n var themeMatch = null;\n while (el) {\n themeMatch = reg.exec(el.className);\n if (!themeMatch) {\n el = el.parentElement || undefined;\n }\n else {\n break;\n }\n }\n if (!themeMatch) {\n return {};\n }\n var theme = themeMatch[0];\n var usingOldTheme = themeMatch[2] === undefined;\n if (usingOldTheme) {\n var newTheme_1 = theme.replace('ag-', 'ag-theme-');\n doOnce(function () { return console.warn(\"AG Grid: As of v19 old theme are no longer provided. Please replace \" + theme + \" with \" + newTheme_1 + \".\"); }, 'using-old-theme');\n }\n return { theme: theme, el: el, themeFamily: theme.replace(/-dark$/, '') };\n };\n __decorate$25([\n Autowired('eGridDiv')\n ], Environment.prototype, \"eGridDiv\", void 0);\n Environment = __decorate$25([\n Bean('environment')\n ], Environment);\n return Environment;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2r = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$26 = (undefined && undefined.__decorate) || function (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};\nvar __param$9 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\n/**\n * This class solves the 'max height' problem, where the user might want to show more data than\n * the max div height actually allows.\n */\nvar RowContainerHeightService = /** @class */ (function (_super) {\n __extends$2r(RowContainerHeightService, _super);\n function RowContainerHeightService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // the scrollY position\n _this.scrollY = 0;\n // how tall the body is\n _this.uiBodyHeight = 0;\n return _this;\n }\n RowContainerHeightService.prototype.agWire = function (loggerFactory) {\n this.logger = loggerFactory.create(\"RowContainerHeightService\");\n };\n RowContainerHeightService.prototype.postConstruct = function () {\n this.addManagedListener(this.eventService, Events.EVENT_BODY_HEIGHT_CHANGED, this.updateOffset.bind(this));\n this.maxDivHeight = getMaxDivHeight();\n this.logger.log('maxDivHeight = ' + this.maxDivHeight);\n };\n RowContainerHeightService.prototype.isStretching = function () {\n return this.stretching;\n };\n RowContainerHeightService.prototype.getDivStretchOffset = function () {\n return this.divStretchOffset;\n };\n RowContainerHeightService.prototype.updateOffset = function () {\n if (!this.stretching) {\n return;\n }\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n var newScrollY = gridBodyCon.getScrollFeature().getVScrollPosition().top;\n var newBodyHeight = this.getUiBodyHeight();\n var atLeastOneChanged = newScrollY !== this.scrollY || newBodyHeight !== this.uiBodyHeight;\n if (atLeastOneChanged) {\n this.scrollY = newScrollY;\n this.uiBodyHeight = newBodyHeight;\n this.calculateOffset();\n }\n };\n RowContainerHeightService.prototype.calculateOffset = function () {\n this.setUiContainerHeight(this.maxDivHeight);\n this.pixelsToShave = this.modelHeight - this.uiContainerHeight;\n this.maxScrollY = this.uiContainerHeight - this.uiBodyHeight;\n var scrollPercent = this.scrollY / this.maxScrollY;\n var divStretchOffset = scrollPercent * this.pixelsToShave;\n this.logger.log(\"Div Stretch Offset = \" + divStretchOffset + \" (\" + this.pixelsToShave + \" * \" + scrollPercent + \")\");\n this.setDivStretchOffset(divStretchOffset);\n };\n RowContainerHeightService.prototype.setUiContainerHeight = function (height) {\n if (height !== this.uiContainerHeight) {\n this.uiContainerHeight = height;\n this.eventService.dispatchEvent({ type: Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED });\n }\n };\n RowContainerHeightService.prototype.clearOffset = function () {\n this.setUiContainerHeight(this.modelHeight);\n this.pixelsToShave = 0;\n this.setDivStretchOffset(0);\n };\n RowContainerHeightService.prototype.setDivStretchOffset = function (newOffset) {\n // because we are talking pixels, no point in confusing things with half numbers\n var newOffsetFloor = typeof newOffset === 'number' ? Math.floor(newOffset) : null;\n if (this.divStretchOffset === newOffsetFloor) {\n return;\n }\n this.divStretchOffset = newOffsetFloor;\n this.eventService.dispatchEvent({ type: Events.EVENT_HEIGHT_SCALE_CHANGED });\n };\n RowContainerHeightService.prototype.setModelHeight = function (modelHeight) {\n this.modelHeight = modelHeight;\n this.stretching = modelHeight != null // null happens when in print layout\n && this.maxDivHeight > 0\n && modelHeight > this.maxDivHeight;\n if (this.stretching) {\n this.calculateOffset();\n }\n else {\n this.clearOffset();\n }\n };\n RowContainerHeightService.prototype.getUiContainerHeight = function () {\n return this.uiContainerHeight;\n };\n RowContainerHeightService.prototype.getRealPixelPosition = function (modelPixel) {\n return modelPixel - this.divStretchOffset;\n };\n RowContainerHeightService.prototype.getUiBodyHeight = function () {\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n var pos = gridBodyCon.getScrollFeature().getVScrollPosition();\n return pos.bottom - pos.top;\n };\n RowContainerHeightService.prototype.getScrollPositionForPixel = function (rowTop) {\n if (this.pixelsToShave <= 0) {\n return rowTop;\n }\n var modelMaxScroll = this.modelHeight - this.getUiBodyHeight();\n var scrollPercent = rowTop / modelMaxScroll;\n var scrollPixel = this.maxScrollY * scrollPercent;\n return scrollPixel;\n };\n __decorate$26([\n Autowired('ctrlsService')\n ], RowContainerHeightService.prototype, \"ctrlsService\", void 0);\n __decorate$26([\n __param$9(0, Qualifier(\"loggerFactory\"))\n ], RowContainerHeightService.prototype, \"agWire\", null);\n __decorate$26([\n PostConstruct\n ], RowContainerHeightService.prototype, \"postConstruct\", null);\n RowContainerHeightService = __decorate$26([\n Bean('rowContainerHeightService')\n ], RowContainerHeightService);\n return RowContainerHeightService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2s = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$27 = (undefined && undefined.__decorate) || function (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};\nvar SelectableService = /** @class */ (function (_super) {\n __extends$2s(SelectableService, _super);\n function SelectableService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SelectableService.prototype.init = function () {\n this.groupSelectsChildren = this.gridOptionsWrapper.isGroupSelectsChildren();\n this.isRowSelectableFunc = this.gridOptionsWrapper.getIsRowSelectableFunc();\n };\n SelectableService.prototype.updateSelectableAfterGrouping = function (rowNode) {\n if (this.isRowSelectableFunc) {\n var nextChildrenFunc = function (node) { return node.childrenAfterGroup; };\n this.recurseDown(rowNode.childrenAfterGroup, nextChildrenFunc);\n }\n };\n SelectableService.prototype.recurseDown = function (children, nextChildrenFunc) {\n var _this = this;\n if (!children) {\n return;\n }\n children.forEach(function (child) {\n if (!child.group) {\n return;\n } // only interested in groups\n if (child.hasChildren()) {\n _this.recurseDown(nextChildrenFunc(child), nextChildrenFunc);\n }\n var rowSelectable;\n if (_this.groupSelectsChildren) {\n // have this group selectable if at least one direct child is selectable\n var firstSelectable = (nextChildrenFunc(child) || []).find(function (rowNode) { return rowNode.selectable === true; });\n rowSelectable = exists(firstSelectable);\n }\n else {\n // directly retrieve selectable value from user callback\n rowSelectable = _this.isRowSelectableFunc ? _this.isRowSelectableFunc(child) : false;\n }\n child.setRowSelectable(rowSelectable);\n });\n };\n __decorate$27([\n PostConstruct\n ], SelectableService.prototype, \"init\", null);\n SelectableService = __decorate$27([\n Bean('selectableService')\n ], SelectableService);\n return SelectableService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2t = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$28 = (undefined && undefined.__decorate) || function (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};\nvar PaginationComp = /** @class */ (function (_super) {\n __extends$2t(PaginationComp, _super);\n function PaginationComp() {\n var _this = _super.call(this) || this;\n _this.previousAndFirstButtonsDisabled = false;\n _this.nextButtonDisabled = false;\n _this.lastButtonDisabled = false;\n return _this;\n }\n PaginationComp.prototype.postConstruct = function () {\n var _this = this;\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n this.setTemplate(this.getTemplate());\n this.btFirst.insertAdjacentElement('afterbegin', createIconNoSpan(isRtl ? 'last' : 'first', this.gridOptionsWrapper));\n this.btPrevious.insertAdjacentElement('afterbegin', createIconNoSpan(isRtl ? 'next' : 'previous', this.gridOptionsWrapper));\n this.btNext.insertAdjacentElement('afterbegin', createIconNoSpan(isRtl ? 'previous' : 'next', this.gridOptionsWrapper));\n this.btLast.insertAdjacentElement('afterbegin', createIconNoSpan(isRtl ? 'first' : 'last', this.gridOptionsWrapper));\n var isPaging = this.gridOptionsWrapper.isPagination();\n var paginationPanelEnabled = isPaging && !this.gridOptionsWrapper.isSuppressPaginationPanel();\n if (!paginationPanelEnabled) {\n this.setDisplayed(false);\n return;\n }\n this.addManagedListener(this.eventService, Events.EVENT_PAGINATION_CHANGED, this.onPaginationChanged.bind(this));\n [\n { el: this.btFirst, fn: this.onBtFirst.bind(this) },\n { el: this.btPrevious, fn: this.onBtPrevious.bind(this) },\n { el: this.btNext, fn: this.onBtNext.bind(this) },\n { el: this.btLast, fn: this.onBtLast.bind(this) }\n ].forEach(function (item) {\n var el = item.el, fn = item.fn;\n _this.addManagedListener(el, 'click', fn);\n _this.addManagedListener(el, 'keydown', function (e) {\n if (e.key === KeyCode.ENTER || e.key === KeyCode.SPACE) {\n e.preventDefault();\n fn();\n }\n });\n });\n this.onPaginationChanged();\n };\n PaginationComp.prototype.onPaginationChanged = function () {\n this.enableOrDisableButtons();\n this.updateRowLabels();\n this.setCurrentPageLabel();\n this.setTotalLabels();\n };\n PaginationComp.prototype.onBtFirst = function () {\n if (!this.previousAndFirstButtonsDisabled) {\n this.paginationProxy.goToFirstPage();\n }\n };\n PaginationComp.prototype.setCurrentPageLabel = function () {\n var pagesExist = this.paginationProxy.getTotalPages() > 0;\n var currentPage = this.paginationProxy.getCurrentPage();\n var toDisplay = pagesExist ? currentPage + 1 : 0;\n this.lbCurrent.innerHTML = this.formatNumber(toDisplay);\n };\n PaginationComp.prototype.formatNumber = function (value) {\n var userFunc = this.gridOptionsWrapper.getPaginationNumberFormatterFunc();\n if (userFunc) {\n var params = { value: value };\n return userFunc(params);\n }\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var thousandSeparator = localeTextFunc('thousandSeparator', ',');\n var decimalSeparator = localeTextFunc('decimalSeparator', '.');\n return formatNumberCommas(value, thousandSeparator, decimalSeparator);\n };\n PaginationComp.prototype.getTemplate = function () {\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var strPage = localeTextFunc('page', 'Page');\n var strTo = localeTextFunc('to', 'to');\n var strOf = localeTextFunc('of', 'of');\n var strFirst = localeTextFunc('firstPage', 'First Page');\n var strPrevious = localeTextFunc('previousPage', 'Previous Page');\n var strNext = localeTextFunc('nextPage', 'Next Page');\n var strLast = localeTextFunc('lastPage', 'Last Page');\n var compId = this.getCompId();\n return /* html */ \"
\\n \\n \\n \" + strTo + \"\\n \\n \" + strOf + \"\\n \\n \\n \\n
\\n
\\n \\n \" + strPage + \"\\n \\n \" + strOf + \"\\n \\n \\n
\\n
\\n
\\n
\";\n };\n PaginationComp.prototype.onBtNext = function () {\n if (!this.nextButtonDisabled) {\n this.paginationProxy.goToNextPage();\n }\n };\n PaginationComp.prototype.onBtPrevious = function () {\n if (!this.previousAndFirstButtonsDisabled) {\n this.paginationProxy.goToPreviousPage();\n }\n };\n PaginationComp.prototype.onBtLast = function () {\n if (!this.lastButtonDisabled) {\n this.paginationProxy.goToLastPage();\n }\n };\n PaginationComp.prototype.enableOrDisableButtons = function () {\n var currentPage = this.paginationProxy.getCurrentPage();\n var maxRowFound = this.paginationProxy.isLastPageFound();\n var totalPages = this.paginationProxy.getTotalPages();\n this.previousAndFirstButtonsDisabled = currentPage === 0;\n this.toggleButtonDisabled(this.btFirst, this.previousAndFirstButtonsDisabled);\n this.toggleButtonDisabled(this.btPrevious, this.previousAndFirstButtonsDisabled);\n var zeroPagesToDisplay = this.isZeroPagesToDisplay();\n var onLastPage = maxRowFound && currentPage === (totalPages - 1);\n this.nextButtonDisabled = onLastPage || zeroPagesToDisplay;\n this.lastButtonDisabled = !maxRowFound || zeroPagesToDisplay || currentPage === (totalPages - 1);\n this.toggleButtonDisabled(this.btNext, this.nextButtonDisabled);\n this.toggleButtonDisabled(this.btLast, this.lastButtonDisabled);\n };\n PaginationComp.prototype.toggleButtonDisabled = function (button, disabled) {\n setAriaDisabled(button, disabled);\n button.classList.toggle('ag-disabled', disabled);\n if (disabled) {\n button.removeAttribute('tabindex');\n }\n else {\n button.setAttribute('tabindex', '0');\n }\n };\n PaginationComp.prototype.updateRowLabels = function () {\n var currentPage = this.paginationProxy.getCurrentPage();\n var pageSize = this.paginationProxy.getPageSize();\n var maxRowFound = this.paginationProxy.isLastPageFound();\n var rowCount = this.paginationProxy.isLastPageFound() ?\n this.paginationProxy.getMasterRowCount() : null;\n var startRow;\n var endRow;\n if (this.isZeroPagesToDisplay()) {\n startRow = endRow = 0;\n }\n else {\n startRow = (pageSize * currentPage) + 1;\n endRow = startRow + pageSize - 1;\n if (maxRowFound && endRow > rowCount) {\n endRow = rowCount;\n }\n }\n this.lbFirstRowOnPage.innerHTML = this.formatNumber(startRow);\n if (this.rowNodeBlockLoader.isLoading()) {\n this.lbLastRowOnPage.innerHTML = '?';\n }\n else {\n this.lbLastRowOnPage.innerHTML = this.formatNumber(endRow);\n }\n };\n PaginationComp.prototype.isZeroPagesToDisplay = function () {\n var maxRowFound = this.paginationProxy.isLastPageFound();\n var totalPages = this.paginationProxy.getTotalPages();\n return maxRowFound && totalPages === 0;\n };\n PaginationComp.prototype.setTotalLabels = function () {\n var lastPageFound = this.paginationProxy.isLastPageFound();\n var totalPages = this.paginationProxy.getTotalPages();\n var rowCount = lastPageFound ? this.paginationProxy.getMasterRowCount() : null;\n // When `pivotMode=true` and no grouping or value columns exist, a single 'hidden' group row (root node) is in\n // the grid and the pagination totals will correctly display total = 1. However this is confusing to users as\n // they can't see it. To address this UX issue we simply set the totals to zero in the pagination panel.\n if (rowCount === 1) {\n var firstRow = this.paginationProxy.getRow(0);\n // a group node with no group or agg data will not be visible to users\n var hiddenGroupRow = firstRow && firstRow.group && !(firstRow.groupData || firstRow.aggData);\n if (hiddenGroupRow) {\n this.setTotalLabelsToZero();\n return;\n }\n }\n if (lastPageFound) {\n this.lbTotal.innerHTML = this.formatNumber(totalPages);\n this.lbRecordCount.innerHTML = this.formatNumber(rowCount);\n }\n else {\n var moreText = this.gridOptionsWrapper.getLocaleTextFunc()('more', 'more');\n this.lbTotal.innerHTML = moreText;\n this.lbRecordCount.innerHTML = moreText;\n }\n };\n PaginationComp.prototype.setTotalLabelsToZero = function () {\n this.lbFirstRowOnPage.innerHTML = this.formatNumber(0);\n this.lbCurrent.innerHTML = this.formatNumber(0);\n this.lbLastRowOnPage.innerHTML = this.formatNumber(0);\n this.lbTotal.innerHTML = this.formatNumber(0);\n this.lbRecordCount.innerHTML = this.formatNumber(0);\n };\n __decorate$28([\n Autowired('paginationProxy')\n ], PaginationComp.prototype, \"paginationProxy\", void 0);\n __decorate$28([\n Autowired('rowNodeBlockLoader')\n ], PaginationComp.prototype, \"rowNodeBlockLoader\", void 0);\n __decorate$28([\n RefSelector('btFirst')\n ], PaginationComp.prototype, \"btFirst\", void 0);\n __decorate$28([\n RefSelector('btPrevious')\n ], PaginationComp.prototype, \"btPrevious\", void 0);\n __decorate$28([\n RefSelector('btNext')\n ], PaginationComp.prototype, \"btNext\", void 0);\n __decorate$28([\n RefSelector('btLast')\n ], PaginationComp.prototype, \"btLast\", void 0);\n __decorate$28([\n RefSelector('lbRecordCount')\n ], PaginationComp.prototype, \"lbRecordCount\", void 0);\n __decorate$28([\n RefSelector('lbFirstRowOnPage')\n ], PaginationComp.prototype, \"lbFirstRowOnPage\", void 0);\n __decorate$28([\n RefSelector('lbLastRowOnPage')\n ], PaginationComp.prototype, \"lbLastRowOnPage\", void 0);\n __decorate$28([\n RefSelector('lbCurrent')\n ], PaginationComp.prototype, \"lbCurrent\", void 0);\n __decorate$28([\n RefSelector('lbTotal')\n ], PaginationComp.prototype, \"lbTotal\", void 0);\n __decorate$28([\n PostConstruct\n ], PaginationComp.prototype, \"postConstruct\", null);\n return PaginationComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2u = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$29 = (undefined && undefined.__decorate) || function (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};\nvar LoadingType;\n(function (LoadingType) {\n LoadingType[LoadingType[\"Loading\"] = 0] = \"Loading\";\n LoadingType[LoadingType[\"NoRows\"] = 1] = \"NoRows\";\n})(LoadingType || (LoadingType = {}));\nvar OverlayWrapperComponent = /** @class */ (function (_super) {\n __extends$2u(OverlayWrapperComponent, _super);\n function OverlayWrapperComponent() {\n var _this = _super.call(this, OverlayWrapperComponent.TEMPLATE) || this;\n _this.inProgress = false;\n _this.destroyRequested = false;\n _this.manuallyDisplayed = false;\n return _this;\n }\n OverlayWrapperComponent.prototype.updateLayoutClasses = function (cssClass, params) {\n var overlayWrapperClassList = this.eOverlayWrapper.classList;\n overlayWrapperClassList.toggle(exports.LayoutCssClasses.AUTO_HEIGHT, params.autoHeight);\n overlayWrapperClassList.toggle(exports.LayoutCssClasses.NORMAL, params.normal);\n overlayWrapperClassList.toggle(exports.LayoutCssClasses.PRINT, params.print);\n };\n OverlayWrapperComponent.prototype.postConstruct = function () {\n this.createManagedBean(new LayoutFeature(this));\n this.setDisplayed(false);\n this.addManagedListener(this.eventService, Events.EVENT_ROW_DATA_CHANGED, this.onRowDataChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_ROW_DATA_UPDATED, this.onRowDataChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));\n if (this.gridOptionsWrapper.isRowModelDefault() && !this.gridOptionsWrapper.getRowData()) {\n this.showLoadingOverlay();\n }\n this.gridApi.registerOverlayWrapperComp(this);\n };\n OverlayWrapperComponent.prototype.setWrapperTypeClass = function (loadingType) {\n var overlayWrapperClassList = this.eOverlayWrapper.classList;\n overlayWrapperClassList.toggle('ag-overlay-loading-wrapper', loadingType === LoadingType.Loading);\n overlayWrapperClassList.toggle('ag-overlay-no-rows-wrapper', loadingType === LoadingType.NoRows);\n };\n OverlayWrapperComponent.prototype.showLoadingOverlay = function () {\n if (this.gridOptionsWrapper.isSuppressLoadingOverlay()) {\n return;\n }\n var params = {};\n var compDetails = this.userComponentFactory.getLoadingOverlayCompDetails(params);\n var promise = compDetails.newAgStackInstance();\n this.showOverlay(promise, LoadingType.Loading);\n };\n OverlayWrapperComponent.prototype.showNoRowsOverlay = function () {\n if (this.gridOptionsWrapper.isSuppressNoRowsOverlay()) {\n return;\n }\n var params = {};\n var compDetails = this.userComponentFactory.getNoRowsOverlayCompDetails(params);\n var promise = compDetails.newAgStackInstance();\n this.showOverlay(promise, LoadingType.NoRows);\n };\n OverlayWrapperComponent.prototype.showOverlay = function (workItem, type) {\n var _this = this;\n if (this.inProgress) {\n return;\n }\n this.setWrapperTypeClass(type);\n this.destroyActiveOverlay();\n this.inProgress = true;\n if (workItem) {\n workItem.then(function (comp) {\n _this.inProgress = false;\n _this.eOverlayWrapper.appendChild(comp.getGui());\n _this.activeOverlay = comp;\n if (_this.destroyRequested) {\n _this.destroyRequested = false;\n _this.destroyActiveOverlay();\n }\n });\n }\n this.manuallyDisplayed = this.columnModel.isReady() && !this.paginationProxy.isEmpty();\n this.setDisplayed(true);\n };\n OverlayWrapperComponent.prototype.destroyActiveOverlay = function () {\n if (this.inProgress) {\n this.destroyRequested = true;\n return;\n }\n if (!this.activeOverlay) {\n return;\n }\n this.activeOverlay = this.getContext().destroyBean(this.activeOverlay);\n clearElement(this.eOverlayWrapper);\n };\n OverlayWrapperComponent.prototype.hideOverlay = function () {\n this.manuallyDisplayed = false;\n this.destroyActiveOverlay();\n this.setDisplayed(false);\n };\n OverlayWrapperComponent.prototype.destroy = function () {\n this.destroyActiveOverlay();\n _super.prototype.destroy.call(this);\n };\n OverlayWrapperComponent.prototype.showOrHideOverlay = function () {\n var isEmpty = this.paginationProxy.isEmpty();\n var isSuppressNoRowsOverlay = this.gridOptionsWrapper.isSuppressNoRowsOverlay();\n if (isEmpty && !isSuppressNoRowsOverlay) {\n this.showNoRowsOverlay();\n }\n else {\n this.hideOverlay();\n }\n };\n OverlayWrapperComponent.prototype.onRowDataChanged = function () {\n this.showOrHideOverlay();\n };\n OverlayWrapperComponent.prototype.onNewColumnsLoaded = function () {\n // hide overlay if columns and rows exist, this can happen if columns are loaded after data.\n // this problem exists before of the race condition between the services (column controller in this case)\n // and the view (grid panel). if the model beans were all initialised first, and then the view beans second,\n // this race condition would not happen.\n if (this.columnModel.isReady() && !this.paginationProxy.isEmpty() && !this.manuallyDisplayed) {\n this.hideOverlay();\n }\n };\n // wrapping in outer div, and wrapper, is needed to center the loading icon\n // The idea for centering came from here: http://www.vanseodesign.com/css/vertical-centering/\n OverlayWrapperComponent.TEMPLATE = \"\\n
\\n
\\n
\\n
\\n
\";\n __decorate$29([\n Autowired('userComponentFactory')\n ], OverlayWrapperComponent.prototype, \"userComponentFactory\", void 0);\n __decorate$29([\n Autowired('paginationProxy')\n ], OverlayWrapperComponent.prototype, \"paginationProxy\", void 0);\n __decorate$29([\n Autowired('gridApi')\n ], OverlayWrapperComponent.prototype, \"gridApi\", void 0);\n __decorate$29([\n Autowired('columnModel')\n ], OverlayWrapperComponent.prototype, \"columnModel\", void 0);\n __decorate$29([\n RefSelector('eOverlayWrapper')\n ], OverlayWrapperComponent.prototype, \"eOverlayWrapper\", void 0);\n __decorate$29([\n PostConstruct\n ], OverlayWrapperComponent.prototype, \"postConstruct\", null);\n return OverlayWrapperComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2v = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2a = (undefined && undefined.__decorate) || function (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};\nvar RowPositionUtils = /** @class */ (function (_super) {\n __extends$2v(RowPositionUtils, _super);\n function RowPositionUtils() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n RowPositionUtils.prototype.getFirstRow = function () {\n var rowIndex = 0;\n var rowPinned;\n if (this.pinnedRowModel.getPinnedTopRowCount()) {\n rowPinned = Constants.PINNED_TOP;\n }\n else if (this.rowModel.getRowCount()) {\n rowPinned = null;\n rowIndex = this.paginationProxy.getPageFirstRow();\n }\n else if (this.pinnedRowModel.getPinnedBottomRowCount()) {\n rowPinned = Constants.PINNED_BOTTOM;\n }\n return rowPinned === undefined ? null : { rowIndex: rowIndex, rowPinned: rowPinned };\n };\n RowPositionUtils.prototype.getLastRow = function () {\n var rowIndex;\n var rowPinned = null;\n var pinnedBottomCount = this.pinnedRowModel.getPinnedBottomRowCount();\n var pinnedTopCount = this.pinnedRowModel.getPinnedTopRowCount();\n if (pinnedBottomCount) {\n rowPinned = Constants.PINNED_BOTTOM;\n rowIndex = pinnedBottomCount - 1;\n }\n else if (this.rowModel.getRowCount()) {\n rowPinned = null;\n rowIndex = this.paginationProxy.getPageLastRow();\n }\n else if (pinnedTopCount) {\n rowPinned = Constants.PINNED_TOP;\n rowIndex = pinnedTopCount - 1;\n }\n return rowIndex === undefined ? null : { rowIndex: rowIndex, rowPinned: rowPinned };\n };\n RowPositionUtils.prototype.getRowNode = function (gridRow) {\n switch (gridRow.rowPinned) {\n case Constants.PINNED_TOP:\n return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];\n case Constants.PINNED_BOTTOM:\n return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];\n default:\n return this.rowModel.getRow(gridRow.rowIndex);\n }\n };\n RowPositionUtils.prototype.sameRow = function (rowA, rowB) {\n // if both missing\n if (!rowA && !rowB) {\n return true;\n }\n // if only one missing\n if ((rowA && !rowB) || (!rowA && rowB)) {\n return false;\n }\n // otherwise compare (use == to compare rowPinned because it can be null or undefined)\n return rowA.rowIndex === rowB.rowIndex && rowA.rowPinned == rowB.rowPinned;\n };\n // tests if this row selection is before the other row selection\n RowPositionUtils.prototype.before = function (rowA, rowB) {\n switch (rowA.rowPinned) {\n case Constants.PINNED_TOP:\n // we we are floating top, and other isn't, then we are always before\n if (rowB.rowPinned !== Constants.PINNED_TOP) {\n return true;\n }\n break;\n case Constants.PINNED_BOTTOM:\n // if we are floating bottom, and the other isn't, then we are never before\n if (rowB.rowPinned !== Constants.PINNED_BOTTOM) {\n return false;\n }\n break;\n default:\n // if we are not floating, but the other one is floating...\n if (exists(rowB.rowPinned)) {\n return rowB.rowPinned !== Constants.PINNED_TOP;\n }\n break;\n }\n return rowA.rowIndex < rowB.rowIndex;\n };\n __decorate$2a([\n Autowired('rowModel')\n ], RowPositionUtils.prototype, \"rowModel\", void 0);\n __decorate$2a([\n Autowired('pinnedRowModel')\n ], RowPositionUtils.prototype, \"pinnedRowModel\", void 0);\n __decorate$2a([\n Autowired('paginationProxy')\n ], RowPositionUtils.prototype, \"paginationProxy\", void 0);\n RowPositionUtils = __decorate$2a([\n Bean('rowPositionUtils')\n ], RowPositionUtils);\n return RowPositionUtils;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2w = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2b = (undefined && undefined.__decorate) || function (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};\nvar CellPositionUtils = /** @class */ (function (_super) {\n __extends$2w(CellPositionUtils, _super);\n function CellPositionUtils() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CellPositionUtils.prototype.createId = function (cellPosition) {\n var rowIndex = cellPosition.rowIndex, rowPinned = cellPosition.rowPinned, column = cellPosition.column;\n return this.createIdFromValues(rowIndex, column, rowPinned);\n };\n CellPositionUtils.prototype.createIdFromValues = function (rowIndex, column, rowPinned) {\n return rowIndex + \".\" + (rowPinned == null ? 'null' : rowPinned) + \".\" + column.getId();\n };\n CellPositionUtils.prototype.equals = function (cellA, cellB) {\n var colsMatch = cellA.column === cellB.column;\n var floatingMatch = cellA.rowPinned === cellB.rowPinned;\n var indexMatch = cellA.rowIndex === cellB.rowIndex;\n return colsMatch && floatingMatch && indexMatch;\n };\n CellPositionUtils = __decorate$2b([\n Bean('cellPositionUtils')\n ], CellPositionUtils);\n return CellPositionUtils;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2x = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar UndoRedoAction = /** @class */ (function () {\n function UndoRedoAction(cellValueChanges) {\n this.cellValueChanges = cellValueChanges;\n }\n return UndoRedoAction;\n}());\nvar FillUndoRedoAction = /** @class */ (function (_super) {\n __extends$2x(FillUndoRedoAction, _super);\n function FillUndoRedoAction(cellValueChanges, initialRange, finalRange) {\n var _this = _super.call(this, cellValueChanges) || this;\n _this.initialRange = initialRange;\n _this.finalRange = finalRange;\n return _this;\n }\n return FillUndoRedoAction;\n}(UndoRedoAction));\nvar UndoRedoStack = /** @class */ (function () {\n function UndoRedoStack(maxStackSize) {\n this.actionStack = [];\n this.maxStackSize = maxStackSize ? maxStackSize : UndoRedoStack.DEFAULT_STACK_SIZE;\n this.actionStack = new Array(this.maxStackSize);\n }\n UndoRedoStack.prototype.pop = function () {\n return this.actionStack.pop();\n };\n UndoRedoStack.prototype.push = function (item) {\n var shouldAddActions = item.cellValueChanges && item.cellValueChanges.length > 0;\n if (!shouldAddActions) {\n return;\n }\n if (this.actionStack.length === this.maxStackSize) {\n this.actionStack.shift();\n }\n this.actionStack.push(item);\n };\n UndoRedoStack.prototype.clear = function () {\n this.actionStack = [];\n };\n UndoRedoStack.prototype.getCurrentStackSize = function () {\n return this.actionStack.length;\n };\n UndoRedoStack.DEFAULT_STACK_SIZE = 10;\n return UndoRedoStack;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2y = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2c = (undefined && undefined.__decorate) || function (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};\nvar UndoRedoService = /** @class */ (function (_super) {\n __extends$2y(UndoRedoService, _super);\n function UndoRedoService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cellValueChanges = [];\n _this.activeCellEdit = null;\n _this.activeRowEdit = null;\n _this.isPasting = false;\n _this.isFilling = false;\n _this.onCellValueChanged = function (event) {\n var eventCell = { column: event.column, rowIndex: event.rowIndex, rowPinned: event.rowPinned };\n var isCellEditing = _this.activeCellEdit !== null && _this.cellPositionUtils.equals(_this.activeCellEdit, eventCell);\n var isRowEditing = _this.activeRowEdit !== null && _this.rowPositionUtils.sameRow(_this.activeRowEdit, eventCell);\n var shouldCaptureAction = isCellEditing || isRowEditing || _this.isPasting || _this.isFilling;\n if (!shouldCaptureAction) {\n return;\n }\n var rowPinned = event.rowPinned, rowIndex = event.rowIndex, column = event.column, oldValue = event.oldValue, value = event.value;\n var cellValueChange = {\n rowPinned: rowPinned,\n rowIndex: rowIndex,\n columnId: column.getColId(),\n newValue: value,\n oldValue: oldValue\n };\n _this.cellValueChanges.push(cellValueChange);\n };\n _this.clearStacks = function () {\n _this.undoStack.clear();\n _this.redoStack.clear();\n };\n return _this;\n }\n UndoRedoService.prototype.init = function () {\n if (!this.gridOptionsWrapper.isUndoRedoCellEditing()) {\n return;\n }\n var undoRedoLimit = this.gridOptionsWrapper.getUndoRedoCellEditingLimit();\n if (undoRedoLimit <= 0) {\n return;\n }\n this.undoStack = new UndoRedoStack(undoRedoLimit);\n this.redoStack = new UndoRedoStack(undoRedoLimit);\n this.addRowEditingListeners();\n this.addCellEditingListeners();\n this.addPasteListeners();\n this.addFillListeners();\n this.addManagedListener(this.eventService, Events.EVENT_CELL_VALUE_CHANGED, this.onCellValueChanged);\n // undo / redo is restricted to actual editing so we clear the stacks when other operations are\n // performed that change the order of the row / cols.\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_GROUP_OPENED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PINNED, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VISIBLE, this.clearStacks);\n this.addManagedListener(this.eventService, Events.EVENT_ROW_DRAG_END, this.clearStacks);\n };\n UndoRedoService.prototype.getCurrentUndoStackSize = function () {\n return this.undoStack ? this.undoStack.getCurrentStackSize() : 0;\n };\n UndoRedoService.prototype.getCurrentRedoStackSize = function () {\n return this.redoStack ? this.redoStack.getCurrentStackSize() : 0;\n };\n UndoRedoService.prototype.undo = function () {\n if (!this.undoStack) {\n return;\n }\n var undoAction = this.undoStack.pop();\n if (!undoAction || !undoAction.cellValueChanges) {\n return;\n }\n this.processAction(undoAction, function (cellValueChange) { return cellValueChange.oldValue; });\n if (undoAction instanceof FillUndoRedoAction) {\n this.processRangeAndCellFocus(undoAction.cellValueChanges, undoAction.initialRange);\n }\n else {\n this.processRangeAndCellFocus(undoAction.cellValueChanges);\n }\n this.redoStack.push(undoAction);\n };\n UndoRedoService.prototype.redo = function () {\n if (!this.redoStack) {\n return;\n }\n var redoAction = this.redoStack.pop();\n if (!redoAction || !redoAction.cellValueChanges) {\n return;\n }\n this.processAction(redoAction, function (cellValueChange) { return cellValueChange.newValue; });\n if (redoAction instanceof FillUndoRedoAction) {\n this.processRangeAndCellFocus(redoAction.cellValueChanges, redoAction.finalRange);\n }\n else {\n this.processRangeAndCellFocus(redoAction.cellValueChanges);\n }\n this.undoStack.push(redoAction);\n };\n UndoRedoService.prototype.processAction = function (action, valueExtractor) {\n var _this = this;\n action.cellValueChanges.forEach(function (cellValueChange) {\n var rowIndex = cellValueChange.rowIndex, rowPinned = cellValueChange.rowPinned, columnId = cellValueChange.columnId;\n var rowPosition = { rowIndex: rowIndex, rowPinned: rowPinned };\n var currentRow = _this.getRowNode(rowPosition);\n // checks if the row has been filtered out\n if (!currentRow.displayed) {\n return;\n }\n currentRow.setDataValue(columnId, valueExtractor(cellValueChange));\n });\n };\n UndoRedoService.prototype.processRangeAndCellFocus = function (cellValueChanges, range) {\n var lastFocusedCell;\n if (range) {\n var startRow = range.startRow;\n var endRow = range.endRow;\n lastFocusedCell = {\n rowPinned: startRow.rowPinned,\n rowIndex: startRow.rowIndex,\n columnId: range.startColumn.getColId()\n };\n this.setLastFocusedCell(lastFocusedCell);\n var cellRangeParams = {\n rowStartIndex: startRow.rowIndex,\n rowStartPinned: startRow.rowPinned,\n rowEndIndex: endRow.rowIndex,\n rowEndPinned: endRow.rowPinned,\n columnStart: range.startColumn,\n columns: range.columns\n };\n this.gridApi.addCellRange(cellRangeParams);\n return;\n }\n var cellValueChange = cellValueChanges[0];\n var rowIndex = cellValueChange.rowIndex, rowPinned = cellValueChange.rowPinned;\n var rowPosition = { rowIndex: rowIndex, rowPinned: rowPinned };\n var row = this.getRowNode(rowPosition);\n lastFocusedCell = {\n rowPinned: cellValueChange.rowPinned,\n rowIndex: row.rowIndex,\n columnId: cellValueChange.columnId\n };\n this.setLastFocusedCell(lastFocusedCell);\n };\n UndoRedoService.prototype.setLastFocusedCell = function (lastFocusedCell) {\n var rowIndex = lastFocusedCell.rowIndex, columnId = lastFocusedCell.columnId, rowPinned = lastFocusedCell.rowPinned;\n this.gridApi.ensureIndexVisible(rowIndex);\n this.gridApi.ensureColumnVisible(columnId);\n if (ModuleRegistry.isRegistered(exports.ModuleNames.RangeSelectionModule)) {\n this.gridApi.clearRangeSelection();\n }\n this.focusService.setFocusedCell(rowIndex, columnId, rowPinned, true);\n };\n UndoRedoService.prototype.addRowEditingListeners = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_ROW_EDITING_STARTED, function (e) {\n _this.activeRowEdit = { rowIndex: e.rowIndex, rowPinned: e.rowPinned };\n });\n this.addManagedListener(this.eventService, Events.EVENT_ROW_EDITING_STOPPED, function () {\n var action = new UndoRedoAction(_this.cellValueChanges);\n _this.pushActionsToUndoStack(action);\n _this.activeRowEdit = null;\n });\n };\n UndoRedoService.prototype.addCellEditingListeners = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_CELL_EDITING_STARTED, function (e) {\n _this.activeCellEdit = { column: e.column, rowIndex: e.rowIndex, rowPinned: e.rowPinned };\n });\n this.addManagedListener(this.eventService, Events.EVENT_CELL_EDITING_STOPPED, function () {\n _this.activeCellEdit = null;\n var shouldPushAction = !_this.activeRowEdit && !_this.isPasting && !_this.isFilling;\n if (shouldPushAction) {\n var action = new UndoRedoAction(_this.cellValueChanges);\n _this.pushActionsToUndoStack(action);\n }\n });\n };\n UndoRedoService.prototype.addPasteListeners = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_PASTE_START, function () {\n _this.isPasting = true;\n });\n this.addManagedListener(this.eventService, Events.EVENT_PASTE_END, function () {\n var action = new UndoRedoAction(_this.cellValueChanges);\n _this.pushActionsToUndoStack(action);\n _this.isPasting = false;\n });\n };\n UndoRedoService.prototype.addFillListeners = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_FILL_START, function () {\n _this.isFilling = true;\n });\n this.addManagedListener(this.eventService, Events.EVENT_FILL_END, function (event) {\n var action = new FillUndoRedoAction(_this.cellValueChanges, event.initialRange, event.finalRange);\n _this.pushActionsToUndoStack(action);\n _this.isFilling = false;\n });\n };\n UndoRedoService.prototype.pushActionsToUndoStack = function (action) {\n this.undoStack.push(action);\n this.cellValueChanges = [];\n this.redoStack.clear();\n };\n UndoRedoService.prototype.getRowNode = function (gridRow) {\n switch (gridRow.rowPinned) {\n case Constants.PINNED_TOP:\n return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];\n case Constants.PINNED_BOTTOM:\n return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];\n default:\n return this.rowModel.getRow(gridRow.rowIndex);\n }\n };\n __decorate$2c([\n Autowired('focusService')\n ], UndoRedoService.prototype, \"focusService\", void 0);\n __decorate$2c([\n Autowired('gridApi')\n ], UndoRedoService.prototype, \"gridApi\", void 0);\n __decorate$2c([\n Autowired('rowModel')\n ], UndoRedoService.prototype, \"rowModel\", void 0);\n __decorate$2c([\n Autowired('pinnedRowModel')\n ], UndoRedoService.prototype, \"pinnedRowModel\", void 0);\n __decorate$2c([\n Autowired('cellPositionUtils')\n ], UndoRedoService.prototype, \"cellPositionUtils\", void 0);\n __decorate$2c([\n Autowired('rowPositionUtils')\n ], UndoRedoService.prototype, \"rowPositionUtils\", void 0);\n __decorate$2c([\n PostConstruct\n ], UndoRedoService.prototype, \"init\", null);\n UndoRedoService = __decorate$2c([\n Bean('undoRedoService')\n ], UndoRedoService);\n return UndoRedoService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2z = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2d = (undefined && undefined.__decorate) || function (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};\nvar HeaderPositionUtils = /** @class */ (function (_super) {\n __extends$2z(HeaderPositionUtils, _super);\n function HeaderPositionUtils() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HeaderPositionUtils.prototype.findHeader = function (focusedHeader, direction) {\n var nextColumn;\n var getGroupMethod;\n var getColMethod;\n if (focusedHeader.column instanceof ColumnGroup) {\n getGroupMethod = \"getDisplayedGroup\" + direction;\n nextColumn = this.columnModel[getGroupMethod](focusedHeader.column);\n }\n else {\n getColMethod = \"getDisplayedCol\" + direction;\n nextColumn = this.columnModel[getColMethod](focusedHeader.column);\n }\n if (nextColumn) {\n return {\n column: nextColumn,\n headerRowIndex: focusedHeader.headerRowIndex\n };\n }\n };\n HeaderPositionUtils.prototype.findColAtEdgeForHeaderRow = function (level, position) {\n var displayedColumns = this.columnModel.getAllDisplayedColumns();\n var column = displayedColumns[position === 'start' ? 0 : displayedColumns.length - 1];\n if (!column) {\n return;\n }\n var childContainer = this.ctrlsService.getHeaderRowContainerCtrl(column.getPinned());\n var type = childContainer.getRowType(level);\n if (type == exports.HeaderRowType.COLUMN_GROUP) {\n var columnGroup = this.columnModel.getColumnGroupAtLevel(column, level);\n return {\n headerRowIndex: level,\n column: columnGroup\n };\n }\n return {\n // if type==null, means the header level didn't exist\n headerRowIndex: type == null ? -1 : level,\n column: column\n };\n };\n __decorate$2d([\n Autowired('columnModel')\n ], HeaderPositionUtils.prototype, \"columnModel\", void 0);\n __decorate$2d([\n Autowired('ctrlsService')\n ], HeaderPositionUtils.prototype, \"ctrlsService\", void 0);\n HeaderPositionUtils = __decorate$2d([\n Bean('headerPositionUtils')\n ], HeaderPositionUtils);\n return HeaderPositionUtils;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$2e = (undefined && undefined.__decorate) || function (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};\nvar ColumnDefFactory = /** @class */ (function () {\n function ColumnDefFactory() {\n }\n ColumnDefFactory.prototype.buildColumnDefs = function (cols, rowGroupColumns, pivotColumns) {\n var _this = this;\n var res = [];\n var colGroupDefs = {};\n cols.forEach(function (col) {\n var colDef = _this.createDefFromColumn(col, rowGroupColumns, pivotColumns);\n var addToResult = true;\n var childDef = colDef;\n var pointer = col.getOriginalParent();\n while (pointer) {\n var parentDef = null;\n // we don't include padding groups, as the column groups provided\n // by application didn't have these. the whole point of padding groups\n // is to balance the column tree that the user provided.\n if (pointer.isPadding()) {\n pointer = pointer.getOriginalParent();\n continue;\n }\n // if colDef for this group already exists, use it\n var existingParentDef = colGroupDefs[pointer.getGroupId()];\n if (existingParentDef) {\n existingParentDef.children.push(childDef);\n // if we added to result, it would be the second time we did it\n addToResult = false;\n // we don't want to continue up the tree, as it has already been\n // done for this group\n break;\n }\n parentDef = _this.createDefFromGroup(pointer);\n if (parentDef) {\n parentDef.children = [childDef];\n colGroupDefs[parentDef.groupId] = parentDef;\n childDef = parentDef;\n pointer = pointer.getOriginalParent();\n }\n }\n if (addToResult) {\n res.push(childDef);\n }\n });\n return res;\n };\n ColumnDefFactory.prototype.createDefFromGroup = function (group) {\n var defCloned = deepCloneDefinition(group.getColGroupDef(), ['children']);\n if (defCloned) {\n defCloned.groupId = group.getGroupId();\n }\n return defCloned;\n };\n ColumnDefFactory.prototype.createDefFromColumn = function (col, rowGroupColumns, pivotColumns) {\n var colDefCloned = deepCloneDefinition(col.getColDef());\n colDefCloned.colId = col.getColId();\n colDefCloned.width = col.getActualWidth();\n colDefCloned.rowGroup = col.isRowGroupActive();\n colDefCloned.rowGroupIndex = col.isRowGroupActive() ? rowGroupColumns.indexOf(col) : null;\n colDefCloned.pivot = col.isPivotActive();\n colDefCloned.pivotIndex = col.isPivotActive() ? pivotColumns.indexOf(col) : null;\n colDefCloned.aggFunc = col.isValueActive() ? col.getAggFunc() : null;\n colDefCloned.hide = col.isVisible() ? undefined : true;\n colDefCloned.pinned = col.isPinned() ? col.getPinned() : null;\n colDefCloned.sort = col.getSort() ? col.getSort() : null;\n colDefCloned.sortIndex = col.getSortIndex() != null ? col.getSortIndex() : null;\n return colDefCloned;\n };\n ColumnDefFactory = __decorate$2e([\n Bean('columnDefFactory')\n ], ColumnDefFactory);\n return ColumnDefFactory;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$2f = (undefined && undefined.__decorate) || function (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};\nvar RowCssClassCalculator = /** @class */ (function () {\n function RowCssClassCalculator() {\n }\n RowCssClassCalculator.prototype.getInitialRowClasses = function (params) {\n var classes = [];\n if (exists(params.extraCssClass)) {\n classes.push(params.extraCssClass);\n }\n classes.push('ag-row');\n classes.push(params.rowFocused ? 'ag-row-focus' : 'ag-row-no-focus');\n if (params.fadeRowIn) {\n classes.push('ag-opacity-zero');\n }\n classes.push(params.rowIsEven ? 'ag-row-even' : 'ag-row-odd');\n if (params.rowNode.isRowPinned()) {\n classes.push('ag-row-pinned');\n }\n if (params.rowNode.isSelected()) {\n classes.push('ag-row-selected');\n }\n if (params.rowNode.footer) {\n classes.push('ag-row-footer');\n }\n classes.push('ag-row-level-' + params.rowLevel);\n if (params.rowNode.stub) {\n classes.push('ag-row-loading');\n }\n if (params.fullWidthRow) {\n classes.push('ag-full-width-row');\n }\n if (params.expandable) {\n classes.push('ag-row-group');\n classes.push(params.rowNode.expanded ? 'ag-row-group-expanded' : 'ag-row-group-contracted');\n }\n if (params.rowNode.dragging) {\n classes.push('ag-row-dragging');\n }\n pushAll(classes, this.processClassesFromGridOptions(params.rowNode));\n pushAll(classes, this.preProcessRowClassRules(params.rowNode));\n // we use absolute position unless we are doing print layout\n classes.push(params.printLayout ? 'ag-row-position-relative' : 'ag-row-position-absolute');\n if (params.firstRowOnPage) {\n classes.push('ag-row-first');\n }\n if (params.lastRowOnPage) {\n classes.push('ag-row-last');\n }\n if (params.fullWidthRow) {\n if (params.pinned === Constants.PINNED_LEFT) {\n classes.push('ag-cell-last-left-pinned');\n }\n if (params.pinned === Constants.PINNED_RIGHT) {\n classes.push('ag-cell-first-right-pinned');\n }\n }\n return classes;\n };\n RowCssClassCalculator.prototype.processClassesFromGridOptions = function (rowNode) {\n var res = [];\n var process = function (rowCls) {\n if (typeof rowCls === 'string') {\n res.push(rowCls);\n }\n else if (Array.isArray(rowCls)) {\n rowCls.forEach(function (e) { return res.push(e); });\n }\n };\n // part 1 - rowClass\n var rowClass = this.gridOptionsWrapper.getRowClass();\n if (rowClass) {\n if (typeof rowClass === 'function') {\n console.warn('AG Grid: rowClass should not be a function, please use getRowClass instead');\n return [];\n }\n process(rowClass);\n }\n // part 2 - rowClassFunc\n var rowClassFunc = this.gridOptionsWrapper.getRowClassFunc();\n if (rowClassFunc) {\n var params = {\n data: rowNode.data,\n node: rowNode,\n rowIndex: rowNode.rowIndex\n };\n var rowClassFuncResult = rowClassFunc(params);\n process(rowClassFuncResult);\n }\n return res;\n };\n RowCssClassCalculator.prototype.preProcessRowClassRules = function (rowNode) {\n var res = [];\n this.processRowClassRules(rowNode, function (className) {\n res.push(className);\n }, function (className) {\n // not catered for, if creating, no need\n // to remove class as it was never there\n });\n return res;\n };\n RowCssClassCalculator.prototype.processRowClassRules = function (rowNode, onApplicableClass, onNotApplicableClass) {\n var rowClassParams = {\n data: rowNode.data,\n node: rowNode,\n rowIndex: rowNode.rowIndex,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n this.stylingService.processClassRules(this.gridOptionsWrapper.rowClassRules(), rowClassParams, onApplicableClass, onNotApplicableClass);\n };\n RowCssClassCalculator.prototype.calculateRowLevel = function (rowNode) {\n if (rowNode.group) {\n return rowNode.level;\n }\n // if a leaf, and a parent exists, put a level of the parent, else put level of 0 for top level item\n return rowNode.parent ? (rowNode.parent.level + 1) : 0;\n };\n __decorate$2f([\n Autowired('stylingService')\n ], RowCssClassCalculator.prototype, \"stylingService\", void 0);\n __decorate$2f([\n Autowired('gridOptionsWrapper')\n ], RowCssClassCalculator.prototype, \"gridOptionsWrapper\", void 0);\n RowCssClassCalculator = __decorate$2f([\n Bean('rowCssClassCalculator')\n ], RowCssClassCalculator);\n return RowCssClassCalculator;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$2g = (undefined && undefined.__decorate) || function (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// this logic is used by both SSRM and CSRM\nvar RowNodeSorter = /** @class */ (function () {\n function RowNodeSorter() {\n }\n RowNodeSorter.prototype.doFullSort = function (rowNodes, sortOptions) {\n var mapper = function (rowNode, pos) { return ({ currentPos: pos, rowNode: rowNode }); };\n var sortedRowNodes = rowNodes.map(mapper);\n sortedRowNodes.sort(this.compareRowNodes.bind(this, sortOptions));\n return sortedRowNodes.map(function (item) { return item.rowNode; });\n };\n RowNodeSorter.prototype.compareRowNodes = function (sortOptions, sortedNodeA, sortedNodeB) {\n var nodeA = sortedNodeA.rowNode;\n var nodeB = sortedNodeB.rowNode;\n // Iterate columns, return the first that doesn't match\n for (var i = 0, len = sortOptions.length; i < len; i++) {\n var sortOption = sortOptions[i];\n var isInverted = sortOption.sort === Constants.SORT_DESC;\n var valueA = this.getValue(nodeA, sortOption.column);\n var valueB = this.getValue(nodeB, sortOption.column);\n var comparatorResult = void 0;\n var providedComparator = this.getComparator(sortOption, nodeA);\n if (providedComparator) {\n //if comparator provided, use it\n comparatorResult = providedComparator(valueA, valueB, nodeA, nodeB, isInverted);\n }\n else {\n //otherwise do our own comparison\n comparatorResult = _.defaultComparator(valueA, valueB, this.gridOptionsWrapper.isAccentedSort());\n }\n // user provided comparators can return 'NaN' if they don't correctly handle 'undefined' values, this\n // typically occurs when the comparator is used on a group row\n var validResult = !isNaN(comparatorResult);\n if (validResult && comparatorResult !== 0) {\n return sortOption.sort === Constants.SORT_ASC ? comparatorResult : comparatorResult * -1;\n }\n }\n // All matched, we make is so that the original sort order is kept:\n return sortedNodeA.currentPos - sortedNodeB.currentPos;\n };\n RowNodeSorter.prototype.getComparator = function (sortOption, rowNode) {\n var column = sortOption.column;\n // comparator on col get preference over everything else\n var comparatorOnCol = column.getColDef().comparator;\n if (comparatorOnCol != null) {\n return comparatorOnCol;\n }\n // if no comparator on col, see if we are showing a group, and if we are, get comparator from row group col\n if (rowNode.rowGroupColumn) {\n return rowNode.rowGroupColumn.getColDef().comparator;\n }\n if (!column.getColDef().showRowGroup) {\n return;\n }\n // if a 'field' is supplied on the autoGroupColumnDef we need to use the associated column comparator\n var groupLeafField = !rowNode.group && column.getColDef().field;\n if (!groupLeafField) {\n return;\n }\n var primaryColumn = this.columnModel.getPrimaryColumn(groupLeafField);\n if (!primaryColumn) {\n return;\n }\n return primaryColumn.getColDef().comparator;\n };\n RowNodeSorter.prototype.getValue = function (nodeA, column) {\n return this.valueService.getValue(column, nodeA, false, false);\n };\n __decorate$2g([\n Autowired('gridOptionsWrapper')\n ], RowNodeSorter.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$2g([\n Autowired('valueService')\n ], RowNodeSorter.prototype, \"valueService\", void 0);\n __decorate$2g([\n Autowired('columnModel')\n ], RowNodeSorter.prototype, \"columnModel\", void 0);\n RowNodeSorter = __decorate$2g([\n Bean('rowNodeSorter')\n ], RowNodeSorter);\n return RowNodeSorter;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2A = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2h = (undefined && undefined.__decorate) || function (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};\nvar CtrlsService = /** @class */ (function (_super) {\n __extends$2A(CtrlsService, _super);\n function CtrlsService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.ready = false;\n _this.readyCallbacks = [];\n return _this;\n }\n CtrlsService_1 = CtrlsService;\n CtrlsService.prototype.checkReady = function () {\n this.ready =\n this.gridCtrl != null\n && this.gridBodyCtrl != null\n && this.centerRowContainerCtrl != null\n && this.leftRowContainerCtrl != null\n && this.rightRowContainerCtrl != null\n && this.bottomCenterRowContainerCtrl != null\n && this.bottomLeftRowContainerCtrl != null\n && this.bottomRightRowContainerCtrl != null\n && this.topCenterRowContainerCtrl != null\n && this.topLeftRowContainerCtrl != null\n && this.topRightRowContainerCtrl != null\n && this.centerHeaderRowContainerCtrl != null\n && this.leftHeaderRowContainerCtrl != null\n && this.rightHeaderRowContainerCtrl != null\n && this.fakeHScrollCtrl != null\n && this.gridHeaderCtrl != null;\n if (this.ready) {\n var p_1 = this.createReadyParams();\n this.readyCallbacks.forEach(function (c) { return c(p_1); });\n this.readyCallbacks.length = 0;\n }\n };\n CtrlsService.prototype.whenReady = function (callback) {\n if (this.ready) {\n callback(this.createReadyParams());\n }\n else {\n this.readyCallbacks.push(callback);\n }\n };\n CtrlsService.prototype.createReadyParams = function () {\n return {\n centerRowContainerCtrl: this.centerRowContainerCtrl,\n leftRowContainerCtrl: this.leftRowContainerCtrl,\n rightRowContainerCtrl: this.rightRowContainerCtrl,\n bottomCenterRowContainerCtrl: this.bottomCenterRowContainerCtrl,\n bottomLeftRowContainerCtrl: this.bottomLeftRowContainerCtrl,\n bottomRightRowContainerCtrl: this.bottomRightRowContainerCtrl,\n topCenterRowContainerCtrl: this.topCenterRowContainerCtrl,\n topLeftRowContainerCtrl: this.topLeftRowContainerCtrl,\n topRightRowContainerCtrl: this.topRightRowContainerCtrl,\n centerHeaderRowContainerCtrl: this.centerHeaderRowContainerCtrl,\n leftHeaderRowContainerCtrl: this.leftHeaderRowContainerCtrl,\n rightHeaderRowContainerCtrl: this.rightHeaderRowContainerCtrl,\n fakeHScrollCtrl: this.fakeHScrollCtrl,\n gridBodyCtrl: this.gridBodyCtrl,\n gridCtrl: this.gridCtrl,\n gridHeaderCtrl: this.gridHeaderCtrl,\n };\n };\n CtrlsService.prototype.registerFakeHScrollCtrl = function (ctrl) {\n this.fakeHScrollCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerGridHeaderCtrl = function (gridHeaderCtrl) {\n this.gridHeaderCtrl = gridHeaderCtrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerCenterRowContainerCtrl = function (ctrl) {\n this.centerRowContainerCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerLeftRowContainerCtrl = function (ctrl) {\n this.leftRowContainerCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerRightRowContainerCtrl = function (ctrl) {\n this.rightRowContainerCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerTopCenterRowContainerCtrl = function (ctrl) {\n this.topCenterRowContainerCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerTopLeftRowContainerCon = function (ctrl) {\n this.topLeftRowContainerCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerTopRightRowContainerCtrl = function (ctrl) {\n this.topRightRowContainerCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerBottomCenterRowContainerCtrl = function (ctrl) {\n this.bottomCenterRowContainerCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerBottomLeftRowContainerCtrl = function (ctrl) {\n this.bottomLeftRowContainerCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerBottomRightRowContainerCtrl = function (ctrl) {\n this.bottomRightRowContainerCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerHeaderContainer = function (ctrl, pinned) {\n switch (pinned) {\n case Constants.PINNED_LEFT:\n this.leftHeaderRowContainerCtrl = ctrl;\n break;\n case Constants.PINNED_RIGHT:\n this.rightHeaderRowContainerCtrl = ctrl;\n break;\n default:\n this.centerHeaderRowContainerCtrl = ctrl;\n break;\n }\n this.checkReady();\n };\n CtrlsService.prototype.registerGridBodyCtrl = function (ctrl) {\n this.gridBodyCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.registerGridCtrl = function (ctrl) {\n this.gridCtrl = ctrl;\n this.checkReady();\n };\n CtrlsService.prototype.getFakeHScrollCtrl = function () {\n return this.fakeHScrollCtrl;\n };\n CtrlsService.prototype.getGridHeaderCtrl = function () {\n return this.gridHeaderCtrl;\n };\n CtrlsService.prototype.getGridCtrl = function () {\n return this.gridCtrl;\n };\n CtrlsService.prototype.getCenterRowContainerCtrl = function () {\n return this.centerRowContainerCtrl;\n };\n CtrlsService.prototype.getTopCenterRowContainerCtrl = function () {\n return this.topCenterRowContainerCtrl;\n };\n CtrlsService.prototype.getBottomCenterRowContainerCtrl = function () {\n return this.bottomCenterRowContainerCtrl;\n };\n CtrlsService.prototype.getGridBodyCtrl = function () {\n return this.gridBodyCtrl;\n };\n CtrlsService.prototype.getHeaderRowContainerCtrls = function () {\n return [this.leftHeaderRowContainerCtrl, this.rightHeaderRowContainerCtrl, this.centerHeaderRowContainerCtrl];\n };\n CtrlsService.prototype.getHeaderRowContainerCtrl = function (pinned) {\n switch (pinned) {\n case Constants.PINNED_LEFT: return this.leftHeaderRowContainerCtrl;\n case Constants.PINNED_RIGHT: return this.rightHeaderRowContainerCtrl;\n default: return this.centerHeaderRowContainerCtrl;\n }\n };\n var CtrlsService_1;\n CtrlsService.NAME = 'ctrlsService';\n CtrlsService = CtrlsService_1 = __decorate$2h([\n Bean(CtrlsService_1.NAME)\n ], CtrlsService);\n return CtrlsService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2B = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2i = (undefined && undefined.__decorate) || function (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};\nvar CtrlsFactory = /** @class */ (function (_super) {\n __extends$2B(CtrlsFactory, _super);\n function CtrlsFactory() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registry = {};\n return _this;\n }\n CtrlsFactory.prototype.register = function (meta) {\n this.registry[meta.controllerName] = meta.controllerClass;\n };\n CtrlsFactory.prototype.getInstance = function (name) {\n var ControllerClass = this.registry[name];\n if (ControllerClass == null) {\n return undefined;\n }\n return new ControllerClass();\n };\n CtrlsFactory = __decorate$2i([\n Bean('ctrlsFactory')\n ], CtrlsFactory);\n return CtrlsFactory;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2C = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2j = (undefined && undefined.__decorate) || function (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};\nvar FakeHScrollCtrl = /** @class */ (function (_super) {\n __extends$2C(FakeHScrollCtrl, _super);\n function FakeHScrollCtrl() {\n return _super.call(this) || this;\n }\n FakeHScrollCtrl.prototype.setComp = function (view, eGui, eViewport, eContainer) {\n this.view = view;\n this.eViewport = eViewport;\n this.eContainer = eContainer;\n this.eGui = eGui;\n this.addManagedListener(this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, this.onScrollVisibilityChanged.bind(this));\n this.onScrollVisibilityChanged();\n // When doing printing, this changes whether cols are pinned or not\n var spacerWidthsListener = this.setFakeHScrollSpacerWidths.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, spacerWidthsListener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, spacerWidthsListener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, spacerWidthsListener);\n this.setFakeHScrollSpacerWidths();\n if (this.invisibleScrollbar) {\n this.hideAndShowInvisibleScrollAsNeeded();\n this.addActiveListenerToggles();\n }\n this.ctrlsService.registerFakeHScrollCtrl(this);\n };\n FakeHScrollCtrl.prototype.addActiveListenerToggles = function () {\n var _this = this;\n var activateEvents = ['mouseenter', 'mousedown', 'touchstart'];\n var deactivateEvents = ['mouseleave', 'mouseup', 'touchend'];\n activateEvents.forEach(function (eventName) { return _this.addManagedListener(_this.eGui, eventName, function () { return _this.view.addOrRemoveCssClass('ag-scrollbar-active', true); }); });\n deactivateEvents.forEach(function (eventName) { return _this.addManagedListener(_this.eGui, eventName, function () { return _this.view.addOrRemoveCssClass('ag-scrollbar-active', false); }); });\n };\n FakeHScrollCtrl.prototype.postConstruct = function () {\n this.enableRtl = this.gridOptionsWrapper.isEnableRtl();\n this.invisibleScrollbar = isInvisibleScrollbar();\n };\n FakeHScrollCtrl.prototype.onScrollVisibilityChanged = function () {\n this.setScrollVisible();\n this.setFakeHScrollSpacerWidths();\n };\n FakeHScrollCtrl.prototype.hideAndShowInvisibleScrollAsNeeded = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_BODY_SCROLL, function (params) {\n if (params.direction === 'horizontal') {\n _this.view.addOrRemoveCssClass('ag-scrollbar-scrolling', true);\n }\n });\n this.addManagedListener(this.eventService, Events.EVENT_BODY_SCROLL_END, function () { return _this.view.addOrRemoveCssClass('ag-scrollbar-scrolling', false); });\n };\n FakeHScrollCtrl.prototype.setFakeHScrollSpacerWidths = function () {\n var vScrollShowing = this.scrollVisibleService.isVerticalScrollShowing();\n // we pad the right based on a) if cols are pinned to the right and\n // b) if v scroll is showing on the right (normal position of scroll)\n var rightSpacing = this.columnModel.getDisplayedColumnsRightWidth();\n var scrollOnRight = !this.enableRtl && vScrollShowing;\n var scrollbarWidth = this.gridOptionsWrapper.getScrollbarWidth();\n if (scrollOnRight) {\n rightSpacing += scrollbarWidth;\n }\n this.view.setRightSpacerFixedWidth(rightSpacing);\n this.view.includeRightSpacerScrollerCss('ag-scroller-corner', rightSpacing <= scrollbarWidth);\n // we pad the left based on a) if cols are pinned to the left and\n // b) if v scroll is showing on the left (happens in LTR layout only)\n var leftSpacing = this.columnModel.getDisplayedColumnsLeftWidth();\n var scrollOnLeft = this.enableRtl && vScrollShowing;\n if (scrollOnLeft) {\n leftSpacing += scrollbarWidth;\n }\n this.view.setLeftSpacerFixedWidth(leftSpacing);\n this.view.includeLeftSpacerScrollerCss('ag-scroller-corner', leftSpacing <= scrollbarWidth);\n };\n FakeHScrollCtrl.prototype.setScrollVisible = function () {\n var hScrollShowing = this.scrollVisibleService.isHorizontalScrollShowing();\n var invisibleScrollbar = this.invisibleScrollbar;\n var isSuppressHorizontalScroll = this.gridOptionsWrapper.isSuppressHorizontalScroll();\n var scrollbarWidth = hScrollShowing ? (this.gridOptionsWrapper.getScrollbarWidth() || 0) : 0;\n var adjustedScrollbarWidth = (scrollbarWidth === 0 && invisibleScrollbar) ? 15 : scrollbarWidth;\n var scrollContainerSize = !isSuppressHorizontalScroll ? adjustedScrollbarWidth : 0;\n this.view.addOrRemoveCssClass('ag-scrollbar-invisible', invisibleScrollbar);\n this.view.setHeight(scrollContainerSize);\n this.view.setViewportHeight(scrollContainerSize);\n this.view.setContainerHeight(scrollContainerSize);\n };\n FakeHScrollCtrl.prototype.getViewport = function () {\n return this.eViewport;\n };\n FakeHScrollCtrl.prototype.getContainer = function () {\n return this.eContainer;\n };\n __decorate$2j([\n Autowired('scrollVisibleService')\n ], FakeHScrollCtrl.prototype, \"scrollVisibleService\", void 0);\n __decorate$2j([\n Autowired('columnModel')\n ], FakeHScrollCtrl.prototype, \"columnModel\", void 0);\n __decorate$2j([\n Autowired('ctrlsService')\n ], FakeHScrollCtrl.prototype, \"ctrlsService\", void 0);\n __decorate$2j([\n PostConstruct\n ], FakeHScrollCtrl.prototype, \"postConstruct\", null);\n return FakeHScrollCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2D = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2k = (undefined && undefined.__decorate) || function (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};\nvar FakeHScrollComp = /** @class */ (function (_super) {\n __extends$2D(FakeHScrollComp, _super);\n function FakeHScrollComp() {\n return _super.call(this, FakeHScrollComp.TEMPLATE) || this;\n }\n FakeHScrollComp.prototype.postConstruct = function () {\n var _this = this;\n var compProxy = {\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n setHeight: function (height) { return setFixedHeight(_this.getGui(), height); },\n setContainerHeight: function (height) { return setFixedHeight(_this.eContainer, height); },\n setViewportHeight: function (height) { return setFixedHeight(_this.eViewport, height); },\n setRightSpacerFixedWidth: function (width) { return setFixedWidth(_this.eRightSpacer, width); },\n setLeftSpacerFixedWidth: function (width) { return setFixedWidth(_this.eLeftSpacer, width); },\n includeLeftSpacerScrollerCss: function (cssClass, include) {\n return _this.eLeftSpacer.classList.toggle(cssClass, include);\n },\n includeRightSpacerScrollerCss: function (cssClass, include) {\n return _this.eRightSpacer.classList.toggle(cssClass, include);\n },\n };\n var ctrl = this.createManagedBean(new FakeHScrollCtrl());\n ctrl.setComp(compProxy, this.getGui(), this.eViewport, this.eContainer);\n this.createManagedBean(new CenterWidthFeature(function (width) { return _this.eContainer.style.width = width + \"px\"; }));\n };\n FakeHScrollComp.TEMPLATE = \"
\\n
\\n
\\n
\\n
\\n
\\n
\";\n __decorate$2k([\n RefSelector('eLeftSpacer')\n ], FakeHScrollComp.prototype, \"eLeftSpacer\", void 0);\n __decorate$2k([\n RefSelector('eRightSpacer')\n ], FakeHScrollComp.prototype, \"eRightSpacer\", void 0);\n __decorate$2k([\n RefSelector('eViewport')\n ], FakeHScrollComp.prototype, \"eViewport\", void 0);\n __decorate$2k([\n RefSelector('eContainer')\n ], FakeHScrollComp.prototype, \"eContainer\", void 0);\n __decorate$2k([\n PostConstruct\n ], FakeHScrollComp.prototype, \"postConstruct\", null);\n return FakeHScrollComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2E = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2l = (undefined && undefined.__decorate) || function (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};\nvar PinnedWidthService = /** @class */ (function (_super) {\n __extends$2E(PinnedWidthService, _super);\n function PinnedWidthService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PinnedWidthService.prototype.postConstruct = function () {\n var listener = this.checkContainerWidths.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, listener);\n };\n PinnedWidthService.prototype.checkContainerWidths = function () {\n var printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n var newLeftWidth = printLayout ? 0 : this.columnModel.getDisplayedColumnsLeftWidth();\n var newRightWidth = printLayout ? 0 : this.columnModel.getDisplayedColumnsRightWidth();\n if (newLeftWidth != this.leftWidth) {\n this.leftWidth = newLeftWidth;\n this.eventService.dispatchEvent({ type: Events.EVENT_LEFT_PINNED_WIDTH_CHANGED });\n }\n if (newRightWidth != this.rightWidth) {\n this.rightWidth = newRightWidth;\n this.eventService.dispatchEvent({ type: Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED });\n }\n };\n PinnedWidthService.prototype.getPinnedRightWidth = function () {\n return this.rightWidth;\n };\n PinnedWidthService.prototype.getPinnedLeftWidth = function () {\n return this.leftWidth;\n };\n __decorate$2l([\n Autowired('columnModel')\n ], PinnedWidthService.prototype, \"columnModel\", void 0);\n __decorate$2l([\n PostConstruct\n ], PinnedWidthService.prototype, \"postConstruct\", null);\n PinnedWidthService = __decorate$2l([\n Bean('pinnedWidthService')\n ], PinnedWidthService);\n return PinnedWidthService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2F = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2m = (undefined && undefined.__decorate) || function (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};\nvar RowNodeEventThrottle = /** @class */ (function (_super) {\n __extends$2F(RowNodeEventThrottle, _super);\n function RowNodeEventThrottle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.events = [];\n return _this;\n }\n RowNodeEventThrottle.prototype.postConstruct = function () {\n if (this.rowModel.getType() == Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n this.clientSideRowModel = this.rowModel;\n }\n };\n // because the user can call rowNode.setExpanded() many times in one VM turn,\n // we throttle the calls to ClientSideRowModel using animationFrameService. this means for 100\n // row nodes getting expanded, we only update the CSRM once, and then we fire all events after\n // CSRM has updated.\n //\n // if we did not do this, then the user could call setExpanded on 100+ rows, causing the grid\n // to re-render 100+ times, which would be a performance lag.\n //\n // we use animationFrameService\n // rather than _.debounce() so this will get done if anyone flushes the animationFrameService\n // (eg user calls api.ensureRowVisible(), which in turn flushes ).\n RowNodeEventThrottle.prototype.dispatchExpanded = function (event) {\n var _this = this;\n // if not using CSRM, we don't debounce. otherwise this breaks the SSRM.\n if (this.clientSideRowModel == null) {\n this.eventService.dispatchEvent(event);\n return;\n }\n this.events.push(event);\n var func = function () {\n if (_this.clientSideRowModel) {\n _this.clientSideRowModel.onRowGroupOpened();\n }\n _this.events.forEach(function (e) { return _this.eventService.dispatchEvent(e); });\n _this.events = [];\n };\n if (this.dispatchExpandedDebounced == null) {\n this.dispatchExpandedDebounced = this.animationFrameService.debounce(func);\n }\n this.dispatchExpandedDebounced();\n };\n __decorate$2m([\n Autowired('animationFrameService')\n ], RowNodeEventThrottle.prototype, \"animationFrameService\", void 0);\n __decorate$2m([\n Autowired('rowModel')\n ], RowNodeEventThrottle.prototype, \"rowModel\", void 0);\n __decorate$2m([\n PostConstruct\n ], RowNodeEventThrottle.prototype, \"postConstruct\", null);\n RowNodeEventThrottle = __decorate$2m([\n Bean('rowNodeEventThrottle')\n ], RowNodeEventThrottle);\n return RowNodeEventThrottle;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __read$h = (undefined && undefined.__read) || function (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};\nvar __spread$d = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$h(arguments[i]));\n return ar;\n};\n// creates JavaScript vanilla Grid, including JavaScript (ag-stack) components, which can\n// be wrapped by the framework wrappers\nvar Grid = /** @class */ (function () {\n function Grid(eGridDiv, gridOptions, params) {\n if (!gridOptions) {\n console.error('AG Grid: no gridOptions provided to the grid');\n return;\n }\n this.gridOptions = gridOptions;\n new GridCoreCreator().create(eGridDiv, gridOptions, function (context) {\n var gridComp = new GridComp(eGridDiv);\n context.createBean(gridComp);\n }, undefined, params);\n }\n Grid.prototype.destroy = function () {\n if (this.gridOptions && this.gridOptions.api) {\n this.gridOptions.api.destroy();\n }\n };\n return Grid;\n}());\n// created services of grid only, no UI, so frameworks can use this if providing\n// their own UI\nvar GridCoreCreator = /** @class */ (function () {\n function GridCoreCreator() {\n }\n GridCoreCreator.prototype.create = function (eGridDiv, gridOptions, createUi, acceptChanges, params) {\n var _this = this;\n var debug = !!gridOptions.debug;\n var registeredModules = this.getRegisteredModules(params);\n var beanClasses = this.createBeansList(gridOptions.rowModelType, registeredModules);\n var providedBeanInstances = this.createProvidedBeans(eGridDiv, gridOptions, params);\n if (!beanClasses) {\n return;\n } // happens when no row model found\n var contextParams = {\n providedBeanInstances: providedBeanInstances,\n beanClasses: beanClasses,\n debug: debug\n };\n var logger = new Logger('AG Grid', function () { return gridOptions.debug; });\n var contextLogger = new Logger('Context', function () { return contextParams.debug; });\n var context = new Context(contextParams, contextLogger);\n var beans = context.getBean('beans');\n this.registerModuleUserComponents(beans, registeredModules);\n this.registerStackComponents(beans, registeredModules);\n this.registerControllers(beans, registeredModules);\n createUi(context);\n // we wait until the UI has finished initialising before setting in columns and rows\n beans.ctrlsService.whenReady(function () {\n _this.setColumnsAndData(beans);\n _this.dispatchGridReadyEvent(beans, gridOptions);\n var isEnterprise = ModuleRegistry.isRegistered(exports.ModuleNames.EnterpriseCoreModule);\n logger.log(\"initialised successfully, enterprise = \" + isEnterprise);\n });\n if (acceptChanges) {\n acceptChanges(context);\n }\n };\n GridCoreCreator.prototype.registerControllers = function (beans, registeredModules) {\n registeredModules.forEach(function (module) {\n if (module.controllers) {\n module.controllers.forEach(function (meta) { return beans.ctrlsFactory.register(meta); });\n }\n });\n };\n GridCoreCreator.prototype.registerStackComponents = function (beans, registeredModules) {\n var agStackComponents = this.createAgStackComponentsList(registeredModules);\n beans.agStackComponentsRegistry.setupComponents(agStackComponents);\n };\n GridCoreCreator.prototype.getRegisteredModules = function (params) {\n var passedViaConstructor = params ? params.modules : null;\n var registered = ModuleRegistry.getRegisteredModules();\n var allModules = [];\n var mapNames = {};\n // adds to list and removes duplicates\n function addModule(moduleBased, mod) {\n function addIndividualModule(currentModule) {\n if (!mapNames[currentModule.moduleName]) {\n mapNames[currentModule.moduleName] = true;\n allModules.push(currentModule);\n ModuleRegistry.register(currentModule, moduleBased);\n }\n }\n addIndividualModule(mod);\n if (mod.dependantModules) {\n mod.dependantModules.forEach(addModule.bind(null, moduleBased));\n }\n }\n if (passedViaConstructor) {\n passedViaConstructor.forEach(addModule.bind(null, true));\n }\n if (registered) {\n registered.forEach(addModule.bind(null, !ModuleRegistry.isPackageBased()));\n }\n return allModules;\n };\n GridCoreCreator.prototype.registerModuleUserComponents = function (beans, registeredModules) {\n var moduleUserComps = this.extractModuleEntity(registeredModules, function (module) { return module.userComponents ? module.userComponents : []; });\n moduleUserComps.forEach(function (compMeta) {\n beans.userComponentRegistry.registerDefaultComponent(compMeta.componentName, compMeta.componentClass);\n });\n };\n GridCoreCreator.prototype.createProvidedBeans = function (eGridDiv, gridOptions, params) {\n var frameworkOverrides = params ? params.frameworkOverrides : null;\n if (missing(frameworkOverrides)) {\n frameworkOverrides = new VanillaFrameworkOverrides();\n }\n var seed = {\n gridOptions: gridOptions,\n eGridDiv: eGridDiv,\n globalEventListener: params ? params.globalEventListener : null,\n frameworkOverrides: frameworkOverrides\n };\n if (params && params.providedBeanInstances) {\n Object.assign(seed, params.providedBeanInstances);\n }\n return seed;\n };\n GridCoreCreator.prototype.createAgStackComponentsList = function (registeredModules) {\n var components = [\n { componentName: 'AgCheckbox', componentClass: AgCheckbox },\n { componentName: 'AgRadioButton', componentClass: AgRadioButton },\n { componentName: 'AgToggleButton', componentClass: AgToggleButton },\n { componentName: 'AgInputTextField', componentClass: AgInputTextField },\n { componentName: 'AgInputTextArea', componentClass: AgInputTextArea },\n { componentName: 'AgInputNumberField', componentClass: AgInputNumberField },\n { componentName: 'AgInputRange', componentClass: AgInputRange },\n { componentName: 'AgSelect', componentClass: AgSelect },\n { componentName: 'AgSlider', componentClass: AgSlider },\n { componentName: 'AgAngleSelect', componentClass: AgAngleSelect },\n { componentName: 'AgColorPicker', componentClass: AgColorPicker },\n { componentName: 'AgGridBody', componentClass: GridBodyComp },\n { componentName: 'AgHeaderRoot', componentClass: GridHeaderComp },\n { componentName: 'AgPagination', componentClass: PaginationComp },\n { componentName: 'AgOverlayWrapper', componentClass: OverlayWrapperComponent },\n { componentName: 'AgGroupComponent', componentClass: AgGroupComponent },\n { componentName: 'AgPanel', componentClass: AgPanel },\n { componentName: 'AgDialog', componentClass: AgDialog },\n { componentName: 'AgRowContainer', componentClass: RowContainerComp },\n { componentName: 'AgFakeHorizontalScroll', componentClass: FakeHScrollComp }\n ];\n var moduleAgStackComps = this.extractModuleEntity(registeredModules, function (module) { return module.agStackComponents ? module.agStackComponents : []; });\n components = components.concat(moduleAgStackComps);\n return components;\n };\n GridCoreCreator.prototype.createBeansList = function (rowModelType, registeredModules) {\n var rowModelClass = this.getRowModelClass(rowModelType, registeredModules);\n if (!rowModelClass) {\n return;\n }\n // beans should only contain SERVICES, it should NEVER contain COMPONENTS\n var beans = [\n rowModelClass, Beans, RowPositionUtils, CellPositionUtils, HeaderPositionUtils,\n PaginationAutoPageSizeService, GridApi, UserComponentRegistry, AgComponentUtils,\n ComponentMetadataProvider, ResizeObserverService, UserComponentFactory,\n RowContainerHeightService, HorizontalResizeService,\n PinnedRowModel, DragService, DisplayedGroupCreator, EventService, GridOptionsWrapper,\n PopupService, SelectionService, FilterManager, ColumnModel, HeaderNavigationService,\n PaginationProxy, RowRenderer, ExpressionService, ColumnFactory, TemplateService,\n AlignedGridsService, NavigationService, ValueCache, ValueService, LoggerFactory,\n ColumnUtils, AutoWidthCalculator, StandardMenuFactory, DragAndDropService, ColumnApi,\n FocusService, MouseEventService, Environment, CellNavigationService, ValueFormatterService,\n StylingService, ScrollVisibleService, SortController, ColumnHoverService, ColumnAnimationService,\n SelectableService, AutoGroupColService, ChangeDetectionService, AnimationFrameService,\n UndoRedoService, AgStackComponentsRegistry, ColumnDefFactory,\n RowCssClassCalculator, RowNodeBlockLoader, RowNodeSorter, CtrlsService,\n PinnedWidthService, RowNodeEventThrottle, CtrlsFactory\n ];\n var moduleBeans = this.extractModuleEntity(registeredModules, function (module) { return module.beans ? module.beans : []; });\n beans.push.apply(beans, __spread$d(moduleBeans));\n // check for duplicates, as different modules could include the same beans that\n // they depend on, eg ClientSideRowModel in enterprise, and ClientSideRowModel in community\n var beansNoDuplicates = [];\n beans.forEach(function (bean) {\n if (beansNoDuplicates.indexOf(bean) < 0) {\n beansNoDuplicates.push(bean);\n }\n });\n return beansNoDuplicates;\n };\n GridCoreCreator.prototype.extractModuleEntity = function (moduleEntities, extractor) {\n return [].concat.apply([], __spread$d(moduleEntities.map(extractor)));\n };\n GridCoreCreator.prototype.setColumnsAndData = function (beans) {\n var columnDefs = beans.gridOptionsWrapper.getColumnDefs();\n beans.columnModel.setColumnDefs(columnDefs || [], \"gridInitializing\");\n beans.rowModel.start();\n };\n GridCoreCreator.prototype.dispatchGridReadyEvent = function (beans, gridOptions) {\n var readyEvent = {\n type: Events.EVENT_GRID_READY,\n api: gridOptions.api,\n columnApi: gridOptions.columnApi\n };\n beans.eventService.dispatchEvent(readyEvent);\n };\n GridCoreCreator.prototype.getRowModelClass = function (rowModelType, registeredModules) {\n // default to client side\n if (!rowModelType) {\n rowModelType = Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n }\n var rowModelClasses = {};\n registeredModules.forEach(function (module) {\n iterateObject(module.rowModels, function (key, value) {\n rowModelClasses[key] = value;\n });\n });\n var rowModelClass = rowModelClasses[rowModelType];\n if (exists(rowModelClass)) {\n return rowModelClass;\n }\n if (ModuleRegistry.isPackageBased()) {\n if ([Constants.ROW_MODEL_TYPE_VIEWPORT, Constants.ROW_MODEL_TYPE_SERVER_SIDE].includes(rowModelType))\n // If package based only the enterprise row models could be missing.\n console.error(\"AG Grid: Row Model \\\"\" + rowModelType + \"\\\" not found. Please ensure the package 'ag-grid-enterprise' is imported. Please see: https://www.ag-grid.com/javascript-grid/packages/\");\n else {\n console.error('AG Grid: could not find row model for rowModelType ' + rowModelType);\n }\n }\n else {\n if (rowModelType === Constants.ROW_MODEL_TYPE_INFINITE) {\n console.error(\"AG Grid: Row Model \\\"Infinite\\\" not found. Please ensure the \" + exports.ModuleNames.InfiniteRowModelModule + \" module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/\");\n }\n else if (rowModelType === Constants.ROW_MODEL_TYPE_VIEWPORT) {\n console.error(\"AG Grid: Row Model \\\"Viewport\\\" not found. Please ensure the AG Grid Enterprise Module \" + exports.ModuleNames.ViewportRowModelModule + \" module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/\");\n }\n else if (rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE) {\n console.error(\"AG Grid: Row Model \\\"Server Side\\\" not found. Please ensure the AG Grid Enterprise Module \" + exports.ModuleNames.ServerSideRowModelModule + \" module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/\");\n }\n else if (rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n console.error(\"AG Grid: Row Model \\\"Client Side\\\" not found. Please ensure the \" + exports.ModuleNames.ClientSideRowModelModule + \" module is registered. Please see: https://www.ag-grid.com/javascript-grid/modules/\");\n }\n else {\n console.error('AG Grid: could not find row model for rowModelType ' + rowModelType);\n }\n }\n };\n return GridCoreCreator;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction defaultGroupComparator(valueA, valueB, nodeA, nodeB, accentedCompare) {\n if (accentedCompare === void 0) { accentedCompare = false; }\n console.warn('AG Grid: Since ag-grid 11.0.0 defaultGroupComparator is not necessary. You can remove this from your colDef');\n var nodeAIsGroup = exists(nodeA) && nodeA.group;\n var nodeBIsGroup = exists(nodeB) && nodeB.group;\n var bothAreGroups = nodeAIsGroup && nodeBIsGroup;\n var bothAreNormal = !nodeAIsGroup && !nodeBIsGroup;\n if (bothAreGroups) {\n return defaultComparator(nodeA.key, nodeB.key, accentedCompare);\n }\n if (bothAreNormal) {\n return defaultComparator(valueA, valueB, accentedCompare);\n }\n if (nodeAIsGroup) {\n return 1;\n }\n return -1;\n}\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar BaseComponentWrapper = /** @class */ (function () {\n function BaseComponentWrapper() {\n }\n BaseComponentWrapper.prototype.wrap = function (OriginalConstructor, mandatoryMethodList, optionalMethodList, componentType) {\n var _this = this;\n if (optionalMethodList === void 0) { optionalMethodList = []; }\n var wrapper = this.createWrapper(OriginalConstructor, componentType);\n mandatoryMethodList.forEach((function (methodName) {\n _this.createMethod(wrapper, methodName, true);\n }));\n optionalMethodList.forEach((function (methodName) {\n _this.createMethod(wrapper, methodName, false);\n }));\n return wrapper;\n };\n BaseComponentWrapper.prototype.unwrap = function (comp) {\n return comp;\n };\n BaseComponentWrapper.prototype.createMethod = function (wrapper, methodName, mandatory) {\n wrapper.addMethod(methodName, this.createMethodProxy(wrapper, methodName, mandatory));\n };\n BaseComponentWrapper.prototype.createMethodProxy = function (wrapper, methodName, mandatory) {\n return function () {\n if (wrapper.hasMethod(methodName)) {\n return wrapper.callMethod(methodName, arguments);\n }\n if (mandatory) {\n console.warn('AG Grid: Framework component is missing the method ' + methodName + '()');\n }\n return null;\n };\n };\n return BaseComponentWrapper;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n(function (BarColumnLabelPlacement) {\n BarColumnLabelPlacement[\"InsideBase\"] = \"insideBase\";\n BarColumnLabelPlacement[\"InsideEnd\"] = \"insideEnd\";\n BarColumnLabelPlacement[\"Center\"] = \"center\";\n BarColumnLabelPlacement[\"OutsideEnd\"] = \"outsideEnd\";\n})(exports.BarColumnLabelPlacement || (exports.BarColumnLabelPlacement = {}));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v27.3.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar globalObj = typeof global === 'undefined' ? {} : global;\nglobalObj.HTMLElement = typeof HTMLElement === 'undefined' ? {} : HTMLElement;\nglobalObj.HTMLButtonElement = typeof HTMLButtonElement === 'undefined' ? {} : HTMLButtonElement;\nglobalObj.HTMLSelectElement = typeof HTMLSelectElement === 'undefined' ? {} : HTMLSelectElement;\nglobalObj.HTMLInputElement = typeof HTMLInputElement === 'undefined' ? {} : HTMLInputElement;\nglobalObj.Node = typeof Node === 'undefined' ? {} : Node;\nglobalObj.MouseEvent = typeof MouseEvent === 'undefined' ? {} : MouseEvent;\n\nvar __read$i = (undefined && undefined.__read) || function (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};\nvar __spread$e = (undefined && undefined.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$i(arguments[i]));\n return ar;\n};\nvar ClientSideNodeManager = /** @class */ (function () {\n function ClientSideNodeManager(rootNode, gridOptionsWrapper, eventService, columnModel, gridApi, columnApi, selectionService, beans) {\n this.nextId = 0;\n // when user is provide the id's, we also keep a map of ids to row nodes for convenience\n this.allNodesMap = {};\n this.rootNode = rootNode;\n this.gridOptionsWrapper = gridOptionsWrapper;\n this.eventService = eventService;\n this.columnModel = columnModel;\n this.gridApi = gridApi;\n this.columnApi = columnApi;\n this.beans = beans;\n this.selectionService = selectionService;\n this.rootNode.group = true;\n this.rootNode.level = -1;\n this.rootNode.id = ClientSideNodeManager.ROOT_NODE_ID;\n this.rootNode.allLeafChildren = [];\n this.rootNode.childrenAfterGroup = [];\n this.rootNode.childrenAfterSort = [];\n this.rootNode.childrenAfterAggFilter = [];\n this.rootNode.childrenAfterFilter = [];\n // if we make this class a bean, then can annotate postConstruct\n this.postConstruct();\n }\n // @PostConstruct - this is not a bean, so postConstruct called by constructor\n ClientSideNodeManager.prototype.postConstruct = function () {\n // func below doesn't have 'this' pointer, so need to pull out these bits\n this.suppressParentsInRowNodes = this.gridOptionsWrapper.isSuppressParentsInRowNodes();\n this.isRowMasterFunc = this.gridOptionsWrapper.getIsRowMasterFunc();\n this.doingTreeData = this.gridOptionsWrapper.isTreeData();\n this.doingMasterDetail = this.gridOptionsWrapper.isMasterDetail();\n };\n ClientSideNodeManager.prototype.getCopyOfNodesMap = function () {\n return _.cloneObject(this.allNodesMap);\n };\n ClientSideNodeManager.prototype.getRowNode = function (id) {\n return this.allNodesMap[id];\n };\n ClientSideNodeManager.prototype.setRowData = function (rowData) {\n var _this = this;\n if (typeof rowData === 'string') {\n console.warn('AG Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first');\n return;\n }\n var rootNode = this.rootNode;\n var sibling = this.rootNode.sibling;\n rootNode.childrenAfterFilter = null;\n rootNode.childrenAfterGroup = null;\n rootNode.childrenAfterAggFilter = null;\n rootNode.childrenAfterSort = null;\n rootNode.childrenMapped = null;\n rootNode.updateHasChildren();\n this.nextId = 0;\n this.allNodesMap = {};\n if (rowData) {\n // we use rootNode as the parent, however if using ag-grid-enterprise, the grouping stage\n // sets the parent node on each row (even if we are not grouping). so setting parent node\n // here is for benefit of ag-grid-community users\n rootNode.allLeafChildren = rowData.map(function (dataItem) { return _this.createNode(dataItem, _this.rootNode, ClientSideNodeManager.TOP_LEVEL); });\n }\n else {\n rootNode.allLeafChildren = [];\n rootNode.childrenAfterGroup = [];\n }\n if (sibling) {\n sibling.childrenAfterFilter = rootNode.childrenAfterFilter;\n sibling.childrenAfterGroup = rootNode.childrenAfterGroup;\n sibling.childrenAfterAggFilter = rootNode.childrenAfterAggFilter;\n sibling.childrenAfterSort = rootNode.childrenAfterSort;\n sibling.childrenMapped = rootNode.childrenMapped;\n sibling.allLeafChildren = rootNode.allLeafChildren;\n }\n };\n ClientSideNodeManager.prototype.updateRowData = function (rowDataTran, rowNodeOrder) {\n var rowNodeTransaction = {\n remove: [],\n update: [],\n add: []\n };\n var nodesToUnselect = [];\n this.executeRemove(rowDataTran, rowNodeTransaction, nodesToUnselect);\n this.executeUpdate(rowDataTran, rowNodeTransaction, nodesToUnselect);\n this.executeAdd(rowDataTran, rowNodeTransaction);\n this.updateSelection(nodesToUnselect);\n if (rowNodeOrder) {\n _.sortRowNodesByOrder(this.rootNode.allLeafChildren, rowNodeOrder);\n }\n return rowNodeTransaction;\n };\n ClientSideNodeManager.prototype.updateSelection = function (nodesToUnselect) {\n var selectionChanged = nodesToUnselect.length > 0;\n if (selectionChanged) {\n nodesToUnselect.forEach(function (rowNode) {\n rowNode.setSelected(false, false, true);\n });\n }\n // we do this regardless of nodes to unselect or not, as it's possible\n // a new node was inserted, so a parent that was previously selected (as all\n // children were selected) should not be tri-state (as new one unselected against\n // all other selected children).\n this.selectionService.updateGroupsFromChildrenSelections();\n if (selectionChanged) {\n var event_1 = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n };\n ClientSideNodeManager.prototype.executeAdd = function (rowDataTran, rowNodeTransaction) {\n var _this = this;\n var add = rowDataTran.add, addIndex = rowDataTran.addIndex;\n if (_.missingOrEmpty(add)) {\n return;\n }\n // create new row nodes for each data item\n var newNodes = add.map(function (item) { return _this.createNode(item, _this.rootNode, ClientSideNodeManager.TOP_LEVEL); });\n // add new row nodes to the root nodes 'allLeafChildren'\n var useIndex = typeof addIndex === 'number' && addIndex >= 0;\n var nodesBeforeIndex;\n var nodesAfterIndex;\n if (useIndex) {\n // new rows are inserted in one go by concatenating them in between the existing rows at the desired index.\n // this is much faster than splicing them individually into 'allLeafChildren' when there are large inserts.\n // allLeafChildren can be out of order, so we loop over all the Nodes to find the correct index that\n // represents the position `addIndex` intended to be.\n var allLeafChildren_1 = this.rootNode.allLeafChildren;\n // if addIndex is 0, it should always be added at the start of the array\n // there is no need to verify the order of node by nodeIndex.\n var normalizedAddIndex = addIndex === 0 ? 0 : (allLeafChildren_1.reduce(function (prevIdx, currNode, currIdx) {\n var _a;\n var rowIndex = currNode.rowIndex;\n var prevValueAtIndex = (_a = allLeafChildren_1[prevIdx]) === null || _a === void 0 ? void 0 : _a.rowIndex;\n var shouldUpdateIndex = rowIndex != null && prevValueAtIndex != null && rowIndex < addIndex && rowIndex > prevValueAtIndex;\n return shouldUpdateIndex ? currIdx : prevIdx;\n }, 0) + 1);\n nodesBeforeIndex = allLeafChildren_1.slice(0, normalizedAddIndex);\n nodesAfterIndex = allLeafChildren_1.slice(normalizedAddIndex, allLeafChildren_1.length);\n }\n else {\n nodesBeforeIndex = this.rootNode.allLeafChildren;\n nodesAfterIndex = [];\n }\n this.rootNode.allLeafChildren = __spread$e(nodesBeforeIndex, newNodes, nodesAfterIndex);\n if (this.rootNode.sibling) {\n this.rootNode.sibling.allLeafChildren = this.rootNode.allLeafChildren;\n }\n // add new row nodes to the transaction add items\n rowNodeTransaction.add = newNodes;\n };\n ClientSideNodeManager.prototype.executeRemove = function (rowDataTran, rowNodeTransaction, nodesToUnselect) {\n var _this = this;\n var remove = rowDataTran.remove;\n if (_.missingOrEmpty(remove)) {\n return;\n }\n var rowIdsRemoved = {};\n remove.forEach(function (item) {\n var rowNode = _this.lookupRowNode(item);\n if (!rowNode) {\n return;\n }\n // do delete - setting 'suppressFinishActions = true' to ensure EVENT_SELECTION_CHANGED is not raised for\n // each row node updated, instead it is raised once by the calling code if any selected nodes exist.\n if (rowNode.isSelected()) {\n nodesToUnselect.push(rowNode);\n }\n // so row renderer knows to fade row out (and not reposition it)\n rowNode.clearRowTopAndRowIndex();\n // NOTE: were we could remove from allLeaveChildren, however _.removeFromArray() is expensive, especially\n // if called multiple times (eg deleting lots of rows) and if allLeafChildren is a large list\n rowIdsRemoved[rowNode.id] = true;\n // _.removeFromArray(this.rootNode.allLeafChildren, rowNode);\n delete _this.allNodesMap[rowNode.id];\n rowNodeTransaction.remove.push(rowNode);\n });\n this.rootNode.allLeafChildren = this.rootNode.allLeafChildren.filter(function (rowNode) { return !rowIdsRemoved[rowNode.id]; });\n if (this.rootNode.sibling) {\n this.rootNode.sibling.allLeafChildren = this.rootNode.allLeafChildren;\n }\n };\n ClientSideNodeManager.prototype.executeUpdate = function (rowDataTran, rowNodeTransaction, nodesToUnselect) {\n var _this = this;\n var update = rowDataTran.update;\n if (_.missingOrEmpty(update)) {\n return;\n }\n update.forEach(function (item) {\n var rowNode = _this.lookupRowNode(item);\n if (!rowNode) {\n return;\n }\n rowNode.updateData(item);\n if (!rowNode.selectable && rowNode.isSelected()) {\n nodesToUnselect.push(rowNode);\n }\n _this.setMasterForRow(rowNode, item, ClientSideNodeManager.TOP_LEVEL, false);\n rowNodeTransaction.update.push(rowNode);\n });\n };\n ClientSideNodeManager.prototype.lookupRowNode = function (data) {\n var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();\n var rowNode;\n if (getRowIdFunc) {\n // find rowNode using id\n var id = getRowIdFunc({ data: data, level: 0 });\n rowNode = this.allNodesMap[id];\n if (!rowNode) {\n console.error(\"AG Grid: could not find row id=\" + id + \", data item was not found for this id\");\n return null;\n }\n }\n else {\n // find rowNode using object references\n rowNode = this.rootNode.allLeafChildren.find(function (node) { return node.data === data; });\n if (!rowNode) {\n console.error(\"AG Grid: could not find data item as object was not found\", data);\n console.error(\"Consider using getRowId to help the Grid find matching row data\");\n return null;\n }\n }\n return rowNode || null;\n };\n ClientSideNodeManager.prototype.createNode = function (dataItem, parent, level) {\n var node = new RowNode(this.beans);\n node.group = false;\n this.setMasterForRow(node, dataItem, level, true);\n if (parent && !this.suppressParentsInRowNodes) {\n node.parent = parent;\n }\n node.level = level;\n node.setDataAndId(dataItem, this.nextId.toString());\n if (this.allNodesMap[node.id]) {\n console.warn(\"AG Grid: duplicate node id '\" + node.id + \"' detected from getRowId callback, this could cause issues in your grid.\");\n }\n this.allNodesMap[node.id] = node;\n this.nextId++;\n return node;\n };\n ClientSideNodeManager.prototype.setMasterForRow = function (rowNode, data, level, setExpanded) {\n if (this.doingTreeData) {\n rowNode.setMaster(false);\n if (setExpanded) {\n rowNode.expanded = false;\n }\n }\n else {\n // this is the default, for when doing grid data\n if (this.doingMasterDetail) {\n // if we are doing master detail, then the\n // default is that everything can be a Master Row.\n if (this.isRowMasterFunc) {\n rowNode.setMaster(this.isRowMasterFunc(data));\n }\n else {\n rowNode.setMaster(true);\n }\n }\n else {\n rowNode.setMaster(false);\n }\n if (setExpanded) {\n var rowGroupColumns = this.columnModel.getRowGroupColumns();\n var numRowGroupColumns = rowGroupColumns ? rowGroupColumns.length : 0;\n // need to take row group into account when determining level\n var masterRowLevel = level + numRowGroupColumns;\n rowNode.expanded = rowNode.master ? this.isExpanded(masterRowLevel) : false;\n }\n }\n };\n ClientSideNodeManager.prototype.isExpanded = function (level) {\n var expandByDefault = this.gridOptionsWrapper.getGroupDefaultExpanded();\n if (expandByDefault === -1) {\n return true;\n }\n return level < expandByDefault;\n };\n ClientSideNodeManager.TOP_LEVEL = 0;\n ClientSideNodeManager.ROOT_NODE_ID = 'ROOT_NODE_ID';\n return ClientSideNodeManager;\n}());\n\nvar __extends$2G = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2n = (undefined && undefined.__decorate) || function (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};\nvar RecursionType;\n(function (RecursionType) {\n RecursionType[RecursionType[\"Normal\"] = 0] = \"Normal\";\n RecursionType[RecursionType[\"AfterFilter\"] = 1] = \"AfterFilter\";\n RecursionType[RecursionType[\"AfterFilterAndSort\"] = 2] = \"AfterFilterAndSort\";\n RecursionType[RecursionType[\"PivotNodes\"] = 3] = \"PivotNodes\";\n})(RecursionType || (RecursionType = {}));\nvar ClientSideRowModel = /** @class */ (function (_super) {\n __extends$2G(ClientSideRowModel, _super);\n function ClientSideRowModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ClientSideRowModel.prototype.init = function () {\n var refreshEverythingFunc = this.refreshModel.bind(this, { step: exports.ClientSideRowModelSteps.EVERYTHING });\n var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();\n var refreshEverythingAfterColsChangedFunc = this.refreshModel.bind(this, {\n step: exports.ClientSideRowModelSteps.EVERYTHING,\n afterColumnsChanged: true,\n keepRenderedRows: true,\n animate: animate\n });\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, refreshEverythingAfterColsChangedFunc);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, refreshEverythingFunc);\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VALUE_CHANGED, this.onValueChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, this.refreshModel.bind(this, { step: exports.ClientSideRowModelSteps.PIVOT }));\n this.addManagedListener(this.eventService, Events.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, refreshEverythingFunc);\n var refreshMapListener = this.refreshModel.bind(this, {\n step: exports.ClientSideRowModelSteps.MAP,\n keepRenderedRows: true,\n animate: animate\n });\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN, refreshMapListener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN, refreshMapListener);\n this.rootNode = new RowNode(this.beans);\n this.nodeManager = new ClientSideNodeManager(this.rootNode, this.gridOptionsWrapper, this.eventService, this.columnModel, this.gridApi, this.columnApi, this.selectionService, this.beans);\n };\n ClientSideRowModel.prototype.start = function () {\n var rowData = this.gridOptionsWrapper.getRowData();\n if (rowData) {\n this.setRowData(rowData);\n }\n };\n ClientSideRowModel.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {\n var atLeastOneChange;\n var res = false;\n // we do this multiple times as changing the row heights can also change the first and last rows,\n // so the first pass can make lots of rows smaller, which means the second pass we end up changing\n // more rows.\n do {\n atLeastOneChange = false;\n var rowAtStartPixel = this.getRowIndexAtPixel(startPixel);\n var rowAtEndPixel = this.getRowIndexAtPixel(endPixel);\n // keep check to current page if doing pagination\n var firstRow = Math.max(rowAtStartPixel, startLimitIndex);\n var lastRow = Math.min(rowAtEndPixel, endLimitIndex);\n for (var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++) {\n var rowNode = this.getRow(rowIndex);\n if (rowNode.rowHeightEstimated) {\n var rowHeight = this.gridOptionsWrapper.getRowHeightForNode(rowNode);\n rowNode.setRowHeight(rowHeight.height);\n atLeastOneChange = true;\n res = true;\n }\n }\n if (atLeastOneChange) {\n this.setRowTopAndRowIndex();\n }\n } while (atLeastOneChange);\n return res;\n };\n ClientSideRowModel.prototype.setRowTopAndRowIndex = function () {\n var defaultRowHeight = this.gridOptionsWrapper.getDefaultRowHeight();\n var nextRowTop = 0;\n // mapping displayed rows is not needed for this method, however it's used in\n // clearRowTopAndRowIndex(), and given we are looping through this.rowsToDisplay here,\n // we create the map here for performance reasons, so we don't loop a second time\n // in clearRowTopAndRowIndex()\n var displayedRowsMapped = new Set();\n // we don't estimate if doing fullHeight or autoHeight, as all rows get rendered all the time\n // with these two layouts.\n var allowEstimate = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_NORMAL;\n for (var i = 0; i < this.rowsToDisplay.length; i++) {\n var rowNode = this.rowsToDisplay[i];\n if (rowNode.id != null) {\n displayedRowsMapped.add(rowNode.id);\n }\n if (rowNode.rowHeight == null) {\n var rowHeight = this.gridOptionsWrapper.getRowHeightForNode(rowNode, allowEstimate, defaultRowHeight);\n rowNode.setRowHeight(rowHeight.height, rowHeight.estimated);\n }\n rowNode.setRowTop(nextRowTop);\n rowNode.setRowIndex(i);\n nextRowTop += rowNode.rowHeight;\n }\n return displayedRowsMapped;\n };\n ClientSideRowModel.prototype.clearRowTopAndRowIndex = function (changedPath, displayedRowsMapped) {\n var changedPathActive = changedPath.isActive();\n var clearIfNotDisplayed = function (rowNode) {\n if (rowNode && rowNode.id != null && !displayedRowsMapped.has(rowNode.id)) {\n rowNode.clearRowTopAndRowIndex();\n }\n };\n var recurse = function (rowNode) {\n clearIfNotDisplayed(rowNode);\n clearIfNotDisplayed(rowNode.detailNode);\n clearIfNotDisplayed(rowNode.sibling);\n if (rowNode.hasChildren()) {\n if (rowNode.childrenAfterGroup) {\n // if a changedPath is active, it means we are here because of a transaction update or\n // a change detection. neither of these impacts the open/closed state of groups. so if\n // a group is not open this time, it was not open last time. so we know all closed groups\n // already have their top positions cleared. so there is no need to traverse all the way\n // when changedPath is active and the rowNode is not expanded.\n var isRootNode = rowNode.level == -1; // we need to give special consideration for root node,\n // as expanded=undefined for root node\n var skipChildren = changedPathActive && !isRootNode && !rowNode.expanded;\n if (!skipChildren) {\n rowNode.childrenAfterGroup.forEach(recurse);\n }\n }\n }\n };\n recurse(this.rootNode);\n };\n // returns false if row was moved, otherwise true\n ClientSideRowModel.prototype.ensureRowsAtPixel = function (rowNodes, pixel, increment) {\n var _this = this;\n if (increment === void 0) { increment = 0; }\n var indexAtPixelNow = this.getRowIndexAtPixel(pixel);\n var rowNodeAtPixelNow = this.getRow(indexAtPixelNow);\n var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();\n if (rowNodeAtPixelNow === rowNodes[0]) {\n return false;\n }\n rowNodes.forEach(function (rowNode) {\n _.removeFromArray(_this.rootNode.allLeafChildren, rowNode);\n });\n rowNodes.forEach(function (rowNode, idx) {\n _.insertIntoArray(_this.rootNode.allLeafChildren, rowNode, Math.max(indexAtPixelNow + increment, 0) + idx);\n });\n this.refreshModel({\n step: exports.ClientSideRowModelSteps.EVERYTHING,\n keepRenderedRows: true,\n keepEditingRows: true,\n animate: animate\n });\n return true;\n };\n ClientSideRowModel.prototype.highlightRowAtPixel = function (rowNode, pixel) {\n var indexAtPixelNow = pixel != null ? this.getRowIndexAtPixel(pixel) : null;\n var rowNodeAtPixelNow = indexAtPixelNow != null ? this.getRow(indexAtPixelNow) : null;\n if (!rowNodeAtPixelNow || !rowNode || rowNodeAtPixelNow === rowNode || pixel == null) {\n if (this.lastHighlightedRow) {\n this.lastHighlightedRow.setHighlighted(null);\n this.lastHighlightedRow = null;\n }\n return;\n }\n var highlight = this.getHighlightPosition(pixel, rowNodeAtPixelNow);\n if (this.lastHighlightedRow && this.lastHighlightedRow !== rowNodeAtPixelNow) {\n this.lastHighlightedRow.setHighlighted(null);\n this.lastHighlightedRow = null;\n }\n rowNodeAtPixelNow.setHighlighted(highlight);\n this.lastHighlightedRow = rowNodeAtPixelNow;\n };\n ClientSideRowModel.prototype.getHighlightPosition = function (pixel, rowNode) {\n if (!rowNode) {\n var index = this.getRowIndexAtPixel(pixel);\n rowNode = this.getRow(index || 0);\n if (!rowNode) {\n return exports.RowHighlightPosition.Below;\n }\n }\n var rowTop = rowNode.rowTop, rowHeight = rowNode.rowHeight;\n return pixel - rowTop < rowHeight / 2 ? exports.RowHighlightPosition.Above : exports.RowHighlightPosition.Below;\n };\n ClientSideRowModel.prototype.getLastHighlightedRowNode = function () {\n return this.lastHighlightedRow;\n };\n ClientSideRowModel.prototype.isLastRowIndexKnown = function () {\n return true;\n };\n ClientSideRowModel.prototype.getRowCount = function () {\n if (this.rowsToDisplay) {\n return this.rowsToDisplay.length;\n }\n return 0;\n };\n ClientSideRowModel.prototype.getTopLevelRowCount = function () {\n var showingRootNode = this.rowsToDisplay && this.rowsToDisplay[0] === this.rootNode;\n if (showingRootNode) {\n return 1;\n }\n var filteredChildren = this.rootNode.childrenAfterAggFilter;\n return filteredChildren ? filteredChildren.length : 0;\n };\n ClientSideRowModel.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {\n var showingRootNode = this.rowsToDisplay && this.rowsToDisplay[0] === this.rootNode;\n if (showingRootNode) {\n return topLevelIndex;\n }\n var rowNode = this.rootNode.childrenAfterSort[topLevelIndex];\n if (this.gridOptionsWrapper.isGroupHideOpenParents()) {\n // if hideOpenParents, and this row open, then this row is now displayed at this index, first child is\n while (rowNode.expanded && rowNode.childrenAfterSort && rowNode.childrenAfterSort.length > 0) {\n rowNode = rowNode.childrenAfterSort[0];\n }\n }\n return rowNode.rowIndex;\n };\n ClientSideRowModel.prototype.getRowBounds = function (index) {\n if (_.missing(this.rowsToDisplay)) {\n return null;\n }\n var rowNode = this.rowsToDisplay[index];\n if (rowNode) {\n return {\n rowTop: rowNode.rowTop,\n rowHeight: rowNode.rowHeight\n };\n }\n return null;\n };\n ClientSideRowModel.prototype.onRowGroupOpened = function () {\n var animate = this.gridOptionsWrapper.isAnimateRows();\n this.refreshModel({ step: exports.ClientSideRowModelSteps.MAP, keepRenderedRows: true, animate: animate });\n };\n ClientSideRowModel.prototype.onFilterChanged = function (event) {\n if (event.afterDataChange) {\n return;\n }\n var animate = this.gridOptionsWrapper.isAnimateRows();\n var primaryOrQuickFilterChanged = event.columns.length === 0 || event.columns.some(function (col) { return col.isPrimary(); });\n var step = primaryOrQuickFilterChanged ? exports.ClientSideRowModelSteps.FILTER : exports.ClientSideRowModelSteps.FILTER_AGGREGATES;\n this.refreshModel({ step: step, keepRenderedRows: true, animate: animate });\n };\n ClientSideRowModel.prototype.onSortChanged = function () {\n var animate = this.gridOptionsWrapper.isAnimateRows();\n this.refreshModel({ step: exports.ClientSideRowModelSteps.SORT, keepRenderedRows: true, animate: animate, keepEditingRows: true });\n };\n ClientSideRowModel.prototype.getType = function () {\n return Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n };\n ClientSideRowModel.prototype.onValueChanged = function () {\n if (this.columnModel.isPivotActive()) {\n this.refreshModel({ step: exports.ClientSideRowModelSteps.PIVOT });\n }\n else {\n this.refreshModel({ step: exports.ClientSideRowModelSteps.AGGREGATE });\n }\n };\n ClientSideRowModel.prototype.createChangePath = function (rowNodeTransactions) {\n // for updates, if the row is updated at all, then we re-calc all the values\n // in that row. we could compare each value to each old value, however if we\n // did this, we would be calling the valueService twice, once on the old value\n // and once on the new value. so it's less valueGetter calls if we just assume\n // each column is different. that way the changedPath is used so that only\n // the impacted parent rows are recalculated, parents who's children have\n // not changed are not impacted.\n var noTransactions = _.missingOrEmpty(rowNodeTransactions);\n var changedPath = new ChangedPath(false, this.rootNode);\n if (noTransactions || this.gridOptionsWrapper.isTreeData()) {\n changedPath.setInactive();\n }\n return changedPath;\n };\n ClientSideRowModel.prototype.isSuppressModelUpdateAfterUpdateTransaction = function (params) {\n if (!this.gridOptionsWrapper.isSuppressModelUpdateAfterUpdateTransaction()) {\n return false;\n }\n // return true if we are only doing update transactions\n if (params.rowNodeTransactions == null) {\n return false;\n }\n var transWithAddsOrDeletes = params.rowNodeTransactions.filter(function (tx) {\n return (tx.add != null && tx.add.length > 0) || (tx.remove != null && tx.remove.length > 0);\n });\n var transactionsContainUpdatesOnly = transWithAddsOrDeletes == null || transWithAddsOrDeletes.length == 0;\n return transactionsContainUpdatesOnly;\n };\n ClientSideRowModel.prototype.refreshModel = function (params) {\n if (this.isSuppressModelUpdateAfterUpdateTransaction(params)) {\n return;\n }\n // this goes through the pipeline of stages. what's in my head is similar\n // to the diagram on this page:\n // http://commons.apache.org/sandbox/commons-pipeline/pipeline_basics.html\n // however we want to keep the results of each stage, hence we manually call\n // each step rather than have them chain each other.\n // fallthrough in below switch is on purpose,\n // eg if STEP_FILTER, then all steps below this\n // step get done\n // let start: number;\n // console.log('======= start =======');\n var changedPath = this.createChangePath(params.rowNodeTransactions);\n switch (params.step) {\n case exports.ClientSideRowModelSteps.EVERYTHING:\n this.doRowGrouping(params.groupState, params.rowNodeTransactions, params.rowNodeOrder, changedPath, !!params.afterColumnsChanged);\n case exports.ClientSideRowModelSteps.FILTER:\n this.doFilter(changedPath);\n case exports.ClientSideRowModelSteps.PIVOT:\n this.doPivot(changedPath);\n case exports.ClientSideRowModelSteps.AGGREGATE: // depends on agg fields\n this.doAggregate(changedPath);\n case exports.ClientSideRowModelSteps.FILTER_AGGREGATES:\n this.doFilterAggregates(changedPath);\n case exports.ClientSideRowModelSteps.SORT:\n this.doSort(params.rowNodeTransactions, changedPath);\n case exports.ClientSideRowModelSteps.MAP:\n this.doRowsToDisplay();\n }\n // set all row tops to null, then set row tops on all visible rows. if we don't\n // do this, then the algorithm below only sets row tops, old row tops from old rows\n // will still lie around\n var displayedNodesMapped = this.setRowTopAndRowIndex();\n this.clearRowTopAndRowIndex(changedPath, displayedNodesMapped);\n var event = {\n type: Events.EVENT_MODEL_UPDATED,\n api: this.gridApi,\n columnApi: this.columnApi,\n animate: params.animate,\n keepRenderedRows: params.keepRenderedRows,\n newData: params.newData,\n newPage: false\n };\n this.eventService.dispatchEvent(event);\n };\n ClientSideRowModel.prototype.isEmpty = function () {\n var rowsMissing = _.missing(this.rootNode.allLeafChildren) || this.rootNode.allLeafChildren.length === 0;\n return _.missing(this.rootNode) || rowsMissing || !this.columnModel.isReady();\n };\n ClientSideRowModel.prototype.isRowsToRender = function () {\n return _.exists(this.rowsToDisplay) && this.rowsToDisplay.length > 0;\n };\n ClientSideRowModel.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {\n // if lastSelectedNode is missing, we start at the first row\n var firstRowHit = !lastInRange;\n var lastRowHit = false;\n var lastRow;\n var result = [];\n var groupsSelectChildren = this.gridOptionsWrapper.isGroupSelectsChildren();\n this.forEachNodeAfterFilterAndSort(function (rowNode) {\n var lookingForLastRow = firstRowHit && !lastRowHit;\n // check if we need to flip the select switch\n if (!firstRowHit) {\n if (rowNode === lastInRange || rowNode === firstInRange) {\n firstRowHit = true;\n }\n }\n var skipThisGroupNode = rowNode.group && groupsSelectChildren;\n if (!skipThisGroupNode) {\n var inRange = firstRowHit && !lastRowHit;\n var childOfLastRow = rowNode.isParentOfNode(lastRow);\n if (inRange || childOfLastRow) {\n result.push(rowNode);\n }\n }\n if (lookingForLastRow) {\n if (rowNode === lastInRange || rowNode === firstInRange) {\n lastRowHit = true;\n if (rowNode === lastInRange) {\n lastRow = lastInRange;\n }\n else {\n lastRow = firstInRange;\n }\n }\n }\n });\n return result;\n };\n ClientSideRowModel.prototype.setDatasource = function (datasource) {\n console.error('AG Grid: should never call setDatasource on clientSideRowController');\n };\n ClientSideRowModel.prototype.getTopLevelNodes = function () {\n return this.rootNode ? this.rootNode.childrenAfterGroup : null;\n };\n ClientSideRowModel.prototype.getRootNode = function () {\n return this.rootNode;\n };\n ClientSideRowModel.prototype.getRow = function (index) {\n return this.rowsToDisplay[index];\n };\n ClientSideRowModel.prototype.isRowPresent = function (rowNode) {\n return this.rowsToDisplay.indexOf(rowNode) >= 0;\n };\n ClientSideRowModel.prototype.getRowIndexAtPixel = function (pixelToMatch) {\n if (this.isEmpty()) {\n return -1;\n }\n // do binary search of tree\n // http://oli.me.uk/2013/06/08/searching-javascript-arrays-with-a-binary-search/\n var bottomPointer = 0;\n var topPointer = this.rowsToDisplay.length - 1;\n // quick check, if the pixel is out of bounds, then return last row\n if (pixelToMatch <= 0) {\n // if pixel is less than or equal zero, it's always the first row\n return 0;\n }\n var lastNode = _.last(this.rowsToDisplay);\n if (lastNode.rowTop <= pixelToMatch) {\n return this.rowsToDisplay.length - 1;\n }\n while (true) {\n var midPointer = Math.floor((bottomPointer + topPointer) / 2);\n var currentRowNode = this.rowsToDisplay[midPointer];\n if (this.isRowInPixel(currentRowNode, pixelToMatch)) {\n return midPointer;\n }\n if (currentRowNode.rowTop < pixelToMatch) {\n bottomPointer = midPointer + 1;\n }\n else if (currentRowNode.rowTop > pixelToMatch) {\n topPointer = midPointer - 1;\n }\n }\n };\n ClientSideRowModel.prototype.isRowInPixel = function (rowNode, pixelToMatch) {\n var topPixel = rowNode.rowTop;\n var bottomPixel = rowNode.rowTop + rowNode.rowHeight;\n var pixelInRow = topPixel <= pixelToMatch && bottomPixel > pixelToMatch;\n return pixelInRow;\n };\n ClientSideRowModel.prototype.forEachLeafNode = function (callback) {\n if (this.rootNode.allLeafChildren) {\n this.rootNode.allLeafChildren.forEach(function (rowNode, index) { return callback(rowNode, index); });\n }\n };\n ClientSideRowModel.prototype.forEachNode = function (callback) {\n this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterGroup, callback, RecursionType.Normal, 0);\n };\n ClientSideRowModel.prototype.forEachNodeAfterFilter = function (callback) {\n this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterAggFilter, callback, RecursionType.AfterFilter, 0);\n };\n ClientSideRowModel.prototype.forEachNodeAfterFilterAndSort = function (callback) {\n this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterSort, callback, RecursionType.AfterFilterAndSort, 0);\n };\n ClientSideRowModel.prototype.forEachPivotNode = function (callback) {\n this.recursivelyWalkNodesAndCallback([this.rootNode], callback, RecursionType.PivotNodes, 0);\n };\n // iterates through each item in memory, and calls the callback function\n // nodes - the rowNodes to traverse\n // callback - the user provided callback\n // recursion type - need this to know what child nodes to recurse, eg if looking at all nodes, or filtered notes etc\n // index - works similar to the index in forEach in javascript's array function\n ClientSideRowModel.prototype.recursivelyWalkNodesAndCallback = function (nodes, callback, recursionType, index) {\n if (!nodes) {\n return index;\n }\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n callback(node, index++);\n // go to the next level if it is a group\n if (node.hasChildren()) {\n // depending on the recursion type, we pick a difference set of children\n var nodeChildren = null;\n switch (recursionType) {\n case RecursionType.Normal:\n nodeChildren = node.childrenAfterGroup;\n break;\n case RecursionType.AfterFilter:\n nodeChildren = node.childrenAfterAggFilter;\n break;\n case RecursionType.AfterFilterAndSort:\n nodeChildren = node.childrenAfterSort;\n break;\n case RecursionType.PivotNodes:\n // for pivot, we don't go below leafGroup levels\n nodeChildren = !node.leafGroup ? node.childrenAfterSort : null;\n break;\n }\n if (nodeChildren) {\n index = this.recursivelyWalkNodesAndCallback(nodeChildren, callback, recursionType, index);\n }\n }\n }\n return index;\n };\n // it's possible to recompute the aggregate without doing the other parts\n // + gridApi.recomputeAggregates()\n ClientSideRowModel.prototype.doAggregate = function (changedPath) {\n if (this.aggregationStage) {\n this.aggregationStage.execute({ rowNode: this.rootNode, changedPath: changedPath });\n }\n };\n ClientSideRowModel.prototype.doFilterAggregates = function (changedPath) {\n if (this.filterAggregatesStage) {\n this.filterAggregatesStage.execute({ rowNode: this.rootNode, changedPath: changedPath });\n }\n else {\n // If filterAggregatesStage is undefined, then so is the grouping stage, so all children should be on the rootNode.\n this.rootNode.childrenAfterAggFilter = this.rootNode.childrenAfterFilter;\n }\n };\n // + gridApi.expandAll()\n // + gridApi.collapseAll()\n ClientSideRowModel.prototype.expandOrCollapseAll = function (expand) {\n var usingTreeData = this.gridOptionsWrapper.isTreeData();\n var usingPivotMode = this.columnModel.isPivotActive();\n var recursiveExpandOrCollapse = function (rowNodes) {\n if (!rowNodes) {\n return;\n }\n rowNodes.forEach(function (rowNode) {\n var actionRow = function () {\n rowNode.expanded = expand;\n recursiveExpandOrCollapse(rowNode.childrenAfterGroup);\n };\n if (usingTreeData) {\n var hasChildren = _.exists(rowNode.childrenAfterGroup);\n if (hasChildren) {\n actionRow();\n }\n return;\n }\n if (usingPivotMode) {\n var notLeafGroup = !rowNode.leafGroup;\n if (notLeafGroup) {\n actionRow();\n }\n return;\n }\n var isRowGroup = rowNode.group;\n if (isRowGroup) {\n actionRow();\n }\n });\n };\n if (this.rootNode) {\n recursiveExpandOrCollapse(this.rootNode.childrenAfterGroup);\n }\n this.refreshModel({ step: exports.ClientSideRowModelSteps.MAP });\n var eventSource = expand ? 'expandAll' : 'collapseAll';\n var event = {\n api: this.gridApi,\n columnApi: this.columnApi,\n type: Events.EVENT_EXPAND_COLLAPSE_ALL,\n source: eventSource\n };\n this.eventService.dispatchEvent(event);\n };\n ClientSideRowModel.prototype.doSort = function (rowNodeTransactions, changedPath) {\n this.sortStage.execute({\n rowNode: this.rootNode,\n rowNodeTransactions: rowNodeTransactions,\n changedPath: changedPath\n });\n };\n ClientSideRowModel.prototype.doRowGrouping = function (groupState, rowNodeTransactions, rowNodeOrder, changedPath, afterColumnsChanged) {\n if (this.groupStage) {\n if (rowNodeTransactions) {\n this.groupStage.execute({\n rowNode: this.rootNode,\n rowNodeTransactions: rowNodeTransactions,\n rowNodeOrder: rowNodeOrder,\n changedPath: changedPath\n });\n }\n else {\n this.groupStage.execute({\n rowNode: this.rootNode,\n changedPath: changedPath,\n afterColumnsChanged: afterColumnsChanged\n });\n // set open/closed state on groups\n this.restoreGroupState(groupState);\n }\n if (this.gridOptionsWrapper.isGroupSelectsChildren()) {\n this.selectionService.updateGroupsFromChildrenSelections(changedPath);\n }\n }\n else {\n this.rootNode.childrenAfterGroup = this.rootNode.allLeafChildren;\n if (this.rootNode.sibling) {\n this.rootNode.sibling.childrenAfterGroup = this.rootNode.childrenAfterGroup;\n }\n this.rootNode.updateHasChildren();\n }\n };\n ClientSideRowModel.prototype.restoreGroupState = function (groupState) {\n if (!groupState) {\n return;\n }\n _.traverseNodesWithKey(this.rootNode.childrenAfterGroup, function (node, key) {\n // if the group was open last time, then open it this time. however\n // if was not open last time, then don't touch the group, so the 'groupDefaultExpanded'\n // setting will take effect.\n if (typeof groupState[key] === 'boolean') {\n node.expanded = groupState[key];\n }\n });\n };\n ClientSideRowModel.prototype.doFilter = function (changedPath) {\n this.filterStage.execute({ rowNode: this.rootNode, changedPath: changedPath });\n };\n ClientSideRowModel.prototype.doPivot = function (changedPath) {\n if (this.pivotStage) {\n this.pivotStage.execute({ rowNode: this.rootNode, changedPath: changedPath });\n }\n };\n ClientSideRowModel.prototype.getGroupState = function () {\n if (!this.rootNode.childrenAfterGroup || !this.gridOptionsWrapper.isRememberGroupStateWhenNewData()) {\n return null;\n }\n var result = {};\n _.traverseNodesWithKey(this.rootNode.childrenAfterGroup, function (node, key) { return result[key] = node.expanded; });\n return result;\n };\n ClientSideRowModel.prototype.getCopyOfNodesMap = function () {\n return this.nodeManager.getCopyOfNodesMap();\n };\n ClientSideRowModel.prototype.getRowNode = function (id) {\n // although id is typed a string, this could be called by the user, and they could have passed a number\n var idIsGroup = typeof id == 'string' && id.indexOf(RowNode.ID_PREFIX_ROW_GROUP) == 0;\n if (idIsGroup) {\n // only one users complained about getRowNode not working for groups, after years of\n // this working for normal rows. so have done quick implementation. if users complain\n // about performance, then GroupStage should store / manage created groups in a map,\n // which is a chunk of work.\n var res_1 = undefined;\n this.forEachNode(function (node) {\n if (node.id === id) {\n res_1 = node;\n }\n });\n return res_1;\n }\n return this.nodeManager.getRowNode(id);\n };\n // rows: the rows to put into the model\n ClientSideRowModel.prototype.setRowData = function (rowData) {\n // no need to invalidate cache, as the cache is stored on the rowNode,\n // so new rowNodes means the cache is wiped anyway.\n // remember group state, so we can expand groups that should be expanded\n var groupState = this.getGroupState();\n this.nodeManager.setRowData(rowData);\n // - clears selection\n this.selectionService.reset();\n // - updates filters\n this.filterManager.onNewRowsLoaded('rowDataUpdated');\n // this event kicks off:\n // - shows 'no rows' overlay if needed\n var rowDataChangedEvent = {\n type: Events.EVENT_ROW_DATA_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(rowDataChangedEvent);\n this.refreshModel({\n step: exports.ClientSideRowModelSteps.EVERYTHING,\n groupState: groupState,\n newData: true\n });\n };\n ClientSideRowModel.prototype.batchUpdateRowData = function (rowDataTransaction, callback) {\n var _this = this;\n if (this.applyAsyncTransactionsTimeout == null) {\n this.rowDataTransactionBatch = [];\n var waitMillis = this.gridOptionsWrapper.getAsyncTransactionWaitMillis();\n this.applyAsyncTransactionsTimeout = window.setTimeout(function () {\n _this.executeBatchUpdateRowData();\n }, waitMillis);\n }\n this.rowDataTransactionBatch.push({ rowDataTransaction: rowDataTransaction, callback: callback });\n };\n ClientSideRowModel.prototype.flushAsyncTransactions = function () {\n if (this.applyAsyncTransactionsTimeout != null) {\n clearTimeout(this.applyAsyncTransactionsTimeout);\n this.executeBatchUpdateRowData();\n }\n };\n ClientSideRowModel.prototype.executeBatchUpdateRowData = function () {\n var _this = this;\n this.valueCache.onDataChanged();\n var callbackFuncsBound = [];\n var rowNodeTrans = [];\n // The rowGroup stage uses rowNodeOrder if order was provided. if we didn't pass 'true' to\n // commonUpdateRowData, using addIndex would have no effect when grouping.\n var forceRowNodeOrder = false;\n if (this.rowDataTransactionBatch) {\n this.rowDataTransactionBatch.forEach(function (tranItem) {\n var rowNodeTran = _this.nodeManager.updateRowData(tranItem.rowDataTransaction, undefined);\n rowNodeTrans.push(rowNodeTran);\n if (tranItem.callback) {\n callbackFuncsBound.push(tranItem.callback.bind(null, rowNodeTran));\n }\n if (typeof tranItem.rowDataTransaction.addIndex === 'number') {\n forceRowNodeOrder = true;\n }\n });\n }\n this.commonUpdateRowData(rowNodeTrans, undefined, forceRowNodeOrder);\n // do callbacks in next VM turn so it's async\n if (callbackFuncsBound.length > 0) {\n window.setTimeout(function () {\n callbackFuncsBound.forEach(function (func) { return func(); });\n }, 0);\n }\n if (rowNodeTrans.length > 0) {\n var event_1 = {\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n type: Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED,\n results: rowNodeTrans\n };\n this.eventService.dispatchEvent(event_1);\n }\n this.rowDataTransactionBatch = null;\n this.applyAsyncTransactionsTimeout = undefined;\n };\n ClientSideRowModel.prototype.updateRowData = function (rowDataTran, rowNodeOrder) {\n this.valueCache.onDataChanged();\n var rowNodeTran = this.nodeManager.updateRowData(rowDataTran, rowNodeOrder);\n // if doing immutableData, addIndex is never present. however if doing standard transaction, and user\n // provided addIndex, then this is used in updateRowData. However if doing Enterprise, then the rowGroup\n // stage also uses the\n var forceRowNodeOrder = typeof rowDataTran.addIndex === 'number';\n this.commonUpdateRowData([rowNodeTran], rowNodeOrder, forceRowNodeOrder);\n return rowNodeTran;\n };\n ClientSideRowModel.prototype.createRowNodeOrder = function () {\n var suppressSortOrder = this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder();\n if (suppressSortOrder) {\n return;\n }\n var orderMap = {};\n if (this.rootNode && this.rootNode.allLeafChildren) {\n for (var index = 0; index < this.rootNode.allLeafChildren.length; index++) {\n var node = this.rootNode.allLeafChildren[index];\n orderMap[node.id] = index;\n }\n }\n return orderMap;\n };\n // common to updateRowData and batchUpdateRowData\n ClientSideRowModel.prototype.commonUpdateRowData = function (rowNodeTrans, rowNodeOrder, forceRowNodeOrder) {\n var animate = !this.gridOptionsWrapper.isSuppressAnimationFrame();\n if (forceRowNodeOrder) {\n rowNodeOrder = this.createRowNodeOrder();\n }\n this.refreshModel({\n step: exports.ClientSideRowModelSteps.EVERYTHING,\n rowNodeTransactions: rowNodeTrans,\n rowNodeOrder: rowNodeOrder,\n keepRenderedRows: true,\n keepEditingRows: true,\n animate: animate\n });\n var event = {\n type: Events.EVENT_ROW_DATA_UPDATED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n ClientSideRowModel.prototype.doRowsToDisplay = function () {\n this.rowsToDisplay = this.flattenStage.execute({ rowNode: this.rootNode });\n };\n ClientSideRowModel.prototype.onRowHeightChanged = function () {\n this.refreshModel({ step: exports.ClientSideRowModelSteps.MAP, keepRenderedRows: true, keepEditingRows: true });\n };\n ClientSideRowModel.prototype.resetRowHeights = function () {\n var atLeastOne = false;\n this.forEachNode(function (rowNode) {\n rowNode.setRowHeight(rowNode.rowHeight, true);\n // we keep the height each row is at, however we set estimated=true rather than clear the height.\n // this means the grid will not reset the row heights back to defaults, rather it will re-calc\n // the height for each row as the row is displayed. otherwise the scroll will jump when heights are reset.\n var detailNode = rowNode.detailNode;\n if (detailNode) {\n detailNode.setRowHeight(detailNode.rowHeight, true);\n }\n atLeastOne = true;\n });\n if (atLeastOne) {\n this.onRowHeightChanged();\n }\n };\n __decorate$2n([\n Autowired('columnModel')\n ], ClientSideRowModel.prototype, \"columnModel\", void 0);\n __decorate$2n([\n Autowired('selectionService')\n ], ClientSideRowModel.prototype, \"selectionService\", void 0);\n __decorate$2n([\n Autowired('filterManager')\n ], ClientSideRowModel.prototype, \"filterManager\", void 0);\n __decorate$2n([\n Autowired('valueCache')\n ], ClientSideRowModel.prototype, \"valueCache\", void 0);\n __decorate$2n([\n Autowired('columnApi')\n ], ClientSideRowModel.prototype, \"columnApi\", void 0);\n __decorate$2n([\n Autowired('gridApi')\n ], ClientSideRowModel.prototype, \"gridApi\", void 0);\n __decorate$2n([\n Autowired('animationFrameService')\n ], ClientSideRowModel.prototype, \"animationFrameService\", void 0);\n __decorate$2n([\n Autowired('beans')\n ], ClientSideRowModel.prototype, \"beans\", void 0);\n __decorate$2n([\n Autowired('filterStage')\n ], ClientSideRowModel.prototype, \"filterStage\", void 0);\n __decorate$2n([\n Autowired('sortStage')\n ], ClientSideRowModel.prototype, \"sortStage\", void 0);\n __decorate$2n([\n Autowired('flattenStage')\n ], ClientSideRowModel.prototype, \"flattenStage\", void 0);\n __decorate$2n([\n Optional('groupStage')\n ], ClientSideRowModel.prototype, \"groupStage\", void 0);\n __decorate$2n([\n Optional('aggregationStage')\n ], ClientSideRowModel.prototype, \"aggregationStage\", void 0);\n __decorate$2n([\n Optional('pivotStage')\n ], ClientSideRowModel.prototype, \"pivotStage\", void 0);\n __decorate$2n([\n Optional('filterAggregatesStage')\n ], ClientSideRowModel.prototype, \"filterAggregatesStage\", void 0);\n __decorate$2n([\n PostConstruct\n ], ClientSideRowModel.prototype, \"init\", null);\n ClientSideRowModel = __decorate$2n([\n Bean('rowModel')\n ], ClientSideRowModel);\n return ClientSideRowModel;\n}(BeanStub));\n\nvar __extends$2H = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2o = (undefined && undefined.__decorate) || function (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};\nvar FilterStage = /** @class */ (function (_super) {\n __extends$2H(FilterStage, _super);\n function FilterStage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FilterStage.prototype.execute = function (params) {\n var changedPath = params.changedPath;\n this.filterService.filter(changedPath);\n };\n __decorate$2o([\n Autowired('filterService')\n ], FilterStage.prototype, \"filterService\", void 0);\n FilterStage = __decorate$2o([\n Bean('filterStage')\n ], FilterStage);\n return FilterStage;\n}(BeanStub));\n\nvar __extends$2I = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2p = (undefined && undefined.__decorate) || function (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};\nvar SortStage = /** @class */ (function (_super) {\n __extends$2I(SortStage, _super);\n function SortStage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SortStage.prototype.execute = function (params) {\n var sortOptions = this.sortController.getSortOptions();\n var sortActive = _.exists(sortOptions) && sortOptions.length > 0;\n var deltaSort = sortActive\n && _.exists(params.rowNodeTransactions)\n // in time we can remove this check, so that delta sort is always\n // on if transactions are present. it's off for now so that we can\n // selectively turn it on and test it with some select users before\n // rolling out to everyone.\n && this.gridOptionsWrapper.isDeltaSort();\n var sortContainsGroupColumns = sortOptions.some(function (opt) { return !!opt.column.getColDef().showRowGroup; });\n this.sortService.sort(sortOptions, sortActive, deltaSort, params.rowNodeTransactions, params.changedPath, sortContainsGroupColumns);\n };\n __decorate$2p([\n Autowired('sortService')\n ], SortStage.prototype, \"sortService\", void 0);\n __decorate$2p([\n Autowired('sortController')\n ], SortStage.prototype, \"sortController\", void 0);\n __decorate$2p([\n Autowired('columnModel')\n ], SortStage.prototype, \"columnModel\", void 0);\n SortStage = __decorate$2p([\n Bean('sortStage')\n ], SortStage);\n return SortStage;\n}(BeanStub));\n\nvar __extends$2J = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2q = (undefined && undefined.__decorate) || function (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};\nvar FlattenStage = /** @class */ (function (_super) {\n __extends$2J(FlattenStage, _super);\n function FlattenStage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FlattenStage.prototype.execute = function (params) {\n var rootNode = params.rowNode;\n // even if not doing grouping, we do the mapping, as the client might\n // of passed in data that already has a grouping in it somewhere\n var result = [];\n // putting value into a wrapper so it's passed by reference\n var nextRowTop = { value: 0 };\n var skipLeafNodes = this.columnModel.isPivotMode();\n // if we are reducing, and not grouping, then we want to show the root node, as that\n // is where the pivot values are\n var showRootNode = skipLeafNodes && rootNode.leafGroup;\n var topList = showRootNode ? [rootNode] : rootNode.childrenAfterSort;\n this.recursivelyAddToRowsToDisplay(topList, result, nextRowTop, skipLeafNodes, 0);\n // we do not want the footer total if the gris is empty\n var atLeastOneRowPresent = result.length > 0;\n var includeGroupTotalFooter = !showRootNode\n // don't show total footer when showRootNode is true (i.e. in pivot mode and no groups)\n && atLeastOneRowPresent\n && this.gridOptionsWrapper.isGroupIncludeTotalFooter();\n if (includeGroupTotalFooter) {\n this.ensureFooterNodeExists(rootNode);\n this.addRowNodeToRowsToDisplay(rootNode.sibling, result, nextRowTop, 0);\n }\n return result;\n };\n FlattenStage.prototype.recursivelyAddToRowsToDisplay = function (rowsToFlatten, result, nextRowTop, skipLeafNodes, uiLevel) {\n if (_.missingOrEmpty(rowsToFlatten)) {\n return;\n }\n var hideOpenParents = this.gridOptionsWrapper.isGroupHideOpenParents();\n // these two are mutually exclusive, so if first set, we don't set the second\n var groupRemoveSingleChildren = this.gridOptionsWrapper.isGroupRemoveSingleChildren();\n var groupRemoveLowestSingleChildren = !groupRemoveSingleChildren && this.gridOptionsWrapper.isGroupRemoveLowestSingleChildren();\n for (var i = 0; i < rowsToFlatten.length; i++) {\n var rowNode = rowsToFlatten[i];\n // check all these cases, for working out if this row should be included in the final mapped list\n var isParent = rowNode.hasChildren();\n var isSkippedLeafNode = skipLeafNodes && !isParent;\n var isRemovedSingleChildrenGroup = groupRemoveSingleChildren &&\n isParent &&\n rowNode.childrenAfterGroup.length === 1;\n var isRemovedLowestSingleChildrenGroup = groupRemoveLowestSingleChildren &&\n isParent &&\n rowNode.leafGroup &&\n rowNode.childrenAfterGroup.length === 1;\n // hide open parents means when group is open, we don't show it. we also need to make sure the\n // group is expandable in the first place (as leaf groups are not expandable if pivot mode is on).\n // the UI will never allow expanding leaf groups, however the user might via the API (or menu option 'expand all')\n var neverAllowToExpand = skipLeafNodes && rowNode.leafGroup;\n var isHiddenOpenParent = hideOpenParents && rowNode.expanded && !rowNode.master && (!neverAllowToExpand);\n var thisRowShouldBeRendered = !isSkippedLeafNode && !isHiddenOpenParent &&\n !isRemovedSingleChildrenGroup && !isRemovedLowestSingleChildrenGroup;\n if (thisRowShouldBeRendered) {\n this.addRowNodeToRowsToDisplay(rowNode, result, nextRowTop, uiLevel);\n }\n // if we are pivoting, we never map below the leaf group\n if (skipLeafNodes && rowNode.leafGroup) {\n continue;\n }\n if (isParent) {\n var excludedParent = isRemovedSingleChildrenGroup || isRemovedLowestSingleChildrenGroup;\n // we traverse the group if it is expended, however we always traverse if the parent node\n // was removed (as the group will never be opened if it is not displayed, we show the children instead)\n if (rowNode.expanded || excludedParent) {\n // if the parent was excluded, then ui level is that of the parent\n var uiLevelForChildren = excludedParent ? uiLevel : uiLevel + 1;\n this.recursivelyAddToRowsToDisplay(rowNode.childrenAfterSort, result, nextRowTop, skipLeafNodes, uiLevelForChildren);\n // put a footer in if user is looking for it\n if (this.gridOptionsWrapper.isGroupIncludeFooter()) {\n this.ensureFooterNodeExists(rowNode);\n this.addRowNodeToRowsToDisplay(rowNode.sibling, result, nextRowTop, uiLevel);\n }\n }\n }\n else if (rowNode.master && rowNode.expanded) {\n var detailNode = this.createDetailNode(rowNode);\n this.addRowNodeToRowsToDisplay(detailNode, result, nextRowTop, uiLevel);\n }\n }\n };\n // duplicated method, it's also in floatingRowModel\n FlattenStage.prototype.addRowNodeToRowsToDisplay = function (rowNode, result, nextRowTop, uiLevel) {\n var isGroupMultiAutoColumn = this.gridOptionsWrapper.isGroupMultiAutoColumn();\n result.push(rowNode);\n rowNode.setUiLevel(isGroupMultiAutoColumn ? 0 : uiLevel);\n };\n FlattenStage.prototype.ensureFooterNodeExists = function (groupNode) {\n // only create footer node once, otherwise we have daemons and\n // the animate screws up with the daemons hanging around\n if (_.exists(groupNode.sibling)) {\n return;\n }\n var footerNode = new RowNode(this.beans);\n Object.keys(groupNode).forEach(function (key) {\n footerNode[key] = groupNode[key];\n });\n footerNode.footer = true;\n footerNode.setRowTop(null);\n footerNode.setRowIndex(null);\n // manually set oldRowTop to null so we discard any\n // previous information about its position.\n footerNode.oldRowTop = null;\n if (_.exists(footerNode.id)) {\n footerNode.id = 'rowGroupFooter_' + footerNode.id;\n }\n // get both header and footer to reference each other as siblings. this is never undone,\n // only overwritten. so if a group is expanded, then contracted, it will have a ghost\n // sibling - but that's fine, as we can ignore this if the header is contracted.\n footerNode.sibling = groupNode;\n groupNode.sibling = footerNode;\n };\n FlattenStage.prototype.createDetailNode = function (masterNode) {\n if (_.exists(masterNode.detailNode)) {\n return masterNode.detailNode;\n }\n var detailNode = new RowNode(this.beans);\n detailNode.detail = true;\n detailNode.selectable = false;\n detailNode.parent = masterNode;\n if (_.exists(masterNode.id)) {\n detailNode.id = 'detail_' + masterNode.id;\n }\n detailNode.data = masterNode.data;\n detailNode.level = masterNode.level + 1;\n masterNode.detailNode = detailNode;\n return detailNode;\n };\n __decorate$2q([\n Autowired('columnModel')\n ], FlattenStage.prototype, \"columnModel\", void 0);\n __decorate$2q([\n Autowired('beans')\n ], FlattenStage.prototype, \"beans\", void 0);\n FlattenStage = __decorate$2q([\n Bean('flattenStage')\n ], FlattenStage);\n return FlattenStage;\n}(BeanStub));\n\nvar __extends$2K = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2r = (undefined && undefined.__decorate) || function (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};\nvar SortService = /** @class */ (function (_super) {\n __extends$2K(SortService, _super);\n function SortService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SortService.prototype.init = function () {\n this.postSortFunc = this.gridOptionsWrapper.getPostSortFunc();\n };\n SortService.prototype.sort = function (sortOptions, sortActive, useDeltaSort, rowNodeTransactions, changedPath, sortContainsGroupColumns) {\n var _this = this;\n var groupMaintainOrder = this.gridOptionsWrapper.isGroupMaintainOrder();\n var groupColumnsPresent = this.columnModel.getAllGridColumns().some(function (c) { return c.isRowGroupActive(); });\n var allDirtyNodes = {};\n if (useDeltaSort && rowNodeTransactions) {\n allDirtyNodes = this.calculateDirtyNodes(rowNodeTransactions);\n }\n var isPivotMode = this.columnModel.isPivotMode();\n var callback = function (rowNode) {\n // we clear out the 'pull down open parents' first, as the values mix up the sorting\n _this.pullDownGroupDataForHideOpenParents(rowNode.childrenAfterAggFilter, true);\n // It's pointless to sort rows which aren't being displayed. in pivot mode we don't need to sort the leaf group children.\n var skipSortingPivotLeafs = isPivotMode && rowNode.leafGroup;\n // Javascript sort is non deterministic when all the array items are equals, ie Comparator always returns 0,\n // so to ensure the array keeps its order, add an additional sorting condition manually, in this case we\n // are going to inspect the original array position. This is what sortedRowNodes is for.\n var skipSortingGroups = groupMaintainOrder && groupColumnsPresent && !rowNode.leafGroup && !sortContainsGroupColumns;\n if (!sortActive || skipSortingGroups || skipSortingPivotLeafs) {\n // when 'groupMaintainOrder' is enabled we skip sorting groups unless we are sorting on group columns\n var childrenToBeSorted = rowNode.childrenAfterAggFilter.slice(0);\n if (groupMaintainOrder && rowNode.childrenAfterSort) {\n var indexedOrders_1 = rowNode.childrenAfterSort.reduce(function (acc, row, idx) {\n acc[row.id] = idx;\n return acc;\n }, {});\n childrenToBeSorted.sort(function (row1, row2) { return (indexedOrders_1[row1.id] || 0) - (indexedOrders_1[row2.id] || 0); });\n }\n rowNode.childrenAfterSort = childrenToBeSorted;\n }\n else if (useDeltaSort) {\n rowNode.childrenAfterSort = _this.doDeltaSort(rowNode, allDirtyNodes, changedPath, sortOptions);\n }\n else {\n rowNode.childrenAfterSort = _this.rowNodeSorter.doFullSort(rowNode.childrenAfterAggFilter, sortOptions);\n }\n if (rowNode.sibling) {\n rowNode.sibling.childrenAfterSort = rowNode.childrenAfterSort;\n }\n _this.updateChildIndexes(rowNode);\n if (_this.postSortFunc) {\n var params = { nodes: rowNode.childrenAfterSort };\n _this.postSortFunc(params);\n }\n };\n if (changedPath) {\n changedPath.forEachChangedNodeDepthFirst(callback);\n }\n this.updateGroupDataForHideOpenParents(changedPath);\n };\n SortService.prototype.calculateDirtyNodes = function (rowNodeTransactions) {\n var dirtyNodes = {};\n var addNodesFunc = function (rowNodes) {\n if (rowNodes) {\n rowNodes.forEach(function (rowNode) { return dirtyNodes[rowNode.id] = true; });\n }\n };\n // all leaf level nodes in the transaction were impacted\n if (rowNodeTransactions) {\n rowNodeTransactions.forEach(function (tran) {\n addNodesFunc(tran.add);\n addNodesFunc(tran.update);\n addNodesFunc(tran.remove);\n });\n }\n return dirtyNodes;\n };\n SortService.prototype.doDeltaSort = function (rowNode, allTouchedNodes, changedPath, sortOptions) {\n var _this = this;\n var unsortedRows = rowNode.childrenAfterAggFilter;\n var oldSortedRows = rowNode.childrenAfterSort;\n if (!oldSortedRows) {\n return this.rowNodeSorter.doFullSort(unsortedRows, sortOptions);\n }\n var untouchedRowsMap = {};\n var touchedRows = [];\n unsortedRows.forEach(function (row) {\n if (allTouchedNodes[row.id] || !changedPath.canSkip(row)) {\n touchedRows.push(row);\n }\n else {\n untouchedRowsMap[row.id] = true;\n }\n });\n var sortedUntouchedRows = oldSortedRows.filter(function (child) { return untouchedRowsMap[child.id]; });\n var mapNodeToSortedNode = function (rowNode, pos) { return ({ currentPos: pos, rowNode: rowNode }); };\n var sortedChangedRows = touchedRows\n .map(mapNodeToSortedNode)\n .sort(function (a, b) { return _this.rowNodeSorter.compareRowNodes(sortOptions, a, b); });\n return this.mergeSortedArrays(sortOptions, sortedChangedRows, sortedUntouchedRows.map(mapNodeToSortedNode)).map(function (_a) {\n var rowNode = _a.rowNode;\n return rowNode;\n });\n };\n // Merge two sorted arrays into each other\n SortService.prototype.mergeSortedArrays = function (sortOptions, arr1, arr2) {\n var res = [];\n var i = 0;\n var j = 0;\n // Traverse both array, adding them in order\n while (i < arr1.length && j < arr2.length) {\n // Check if current element of first\n // array is smaller than current element\n // of second array. If yes, store first\n // array element and increment first array\n // index. Otherwise do same with second array\n var compareResult = this.rowNodeSorter.compareRowNodes(sortOptions, arr1[i], arr2[j]);\n if (compareResult < 0) {\n res.push(arr1[i++]);\n }\n else {\n res.push(arr2[j++]);\n }\n }\n // add remaining from arr1\n while (i < arr1.length) {\n res.push(arr1[i++]);\n }\n // add remaining from arr2\n while (j < arr2.length) {\n res.push(arr2[j++]);\n }\n return res;\n };\n SortService.prototype.updateChildIndexes = function (rowNode) {\n if (_.missing(rowNode.childrenAfterSort)) {\n return;\n }\n var listToSort = rowNode.childrenAfterSort;\n for (var i = 0; i < listToSort.length; i++) {\n var child = listToSort[i];\n var firstChild = i === 0;\n var lastChild = i === rowNode.childrenAfterSort.length - 1;\n child.setFirstChild(firstChild);\n child.setLastChild(lastChild);\n child.setChildIndex(i);\n }\n };\n SortService.prototype.updateGroupDataForHideOpenParents = function (changedPath) {\n var _this = this;\n if (!this.gridOptionsWrapper.isGroupHideOpenParents()) {\n return;\n }\n if (this.gridOptionsWrapper.isTreeData()) {\n var msg_1 = \"AG Grid: The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them (as opposed to Row Grouping, which only has Aggregated Values at the group level).\";\n _.doOnce(function () { return console.warn(msg_1); }, 'sortService.hideOpenParentsWithTreeData');\n return false;\n }\n // recurse breadth first over group nodes after sort to 'pull down' group data to child groups\n var callback = function (rowNode) {\n _this.pullDownGroupDataForHideOpenParents(rowNode.childrenAfterSort, false);\n rowNode.childrenAfterSort.forEach(function (child) {\n if (child.hasChildren()) {\n callback(child);\n }\n });\n };\n if (changedPath) {\n changedPath.executeFromRootNode(function (rowNode) { return callback(rowNode); });\n }\n };\n SortService.prototype.pullDownGroupDataForHideOpenParents = function (rowNodes, clearOperation) {\n var _this = this;\n if (!this.gridOptionsWrapper.isGroupHideOpenParents() || _.missing(rowNodes)) {\n return;\n }\n rowNodes.forEach(function (childRowNode) {\n var groupDisplayCols = _this.columnModel.getGroupDisplayColumns();\n groupDisplayCols.forEach(function (groupDisplayCol) {\n var showRowGroup = groupDisplayCol.getColDef().showRowGroup;\n if (typeof showRowGroup !== 'string') {\n console.error('AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup');\n return;\n }\n var displayingGroupKey = showRowGroup;\n var rowGroupColumn = _this.columnModel.getPrimaryColumn(displayingGroupKey);\n var thisRowNodeMatches = rowGroupColumn === childRowNode.rowGroupColumn;\n if (thisRowNodeMatches) {\n return;\n }\n if (clearOperation) {\n // if doing a clear operation, we clear down the value for every possible group column\n childRowNode.setGroupValue(groupDisplayCol.getId(), undefined);\n }\n else {\n // if doing a set operation, we set only where the pull down is to occur\n var parentToStealFrom = childRowNode.getFirstChildOfFirstChild(rowGroupColumn);\n if (parentToStealFrom) {\n childRowNode.setGroupValue(groupDisplayCol.getId(), parentToStealFrom.key);\n }\n }\n });\n });\n };\n __decorate$2r([\n Autowired('columnModel')\n ], SortService.prototype, \"columnModel\", void 0);\n __decorate$2r([\n Autowired('rowNodeSorter')\n ], SortService.prototype, \"rowNodeSorter\", void 0);\n __decorate$2r([\n PostConstruct\n ], SortService.prototype, \"init\", null);\n SortService = __decorate$2r([\n Bean('sortService')\n ], SortService);\n return SortService;\n}(BeanStub));\n\nvar __extends$2L = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2s = (undefined && undefined.__decorate) || function (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};\nvar FilterService = /** @class */ (function (_super) {\n __extends$2L(FilterService, _super);\n function FilterService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FilterService.prototype.filter = function (changedPath) {\n var filterActive = this.filterManager.isColumnFilterPresent()\n || this.filterManager.isQuickFilterPresent()\n || this.gridOptionsWrapper.isExternalFilterPresent();\n this.filterNodes(filterActive, changedPath);\n };\n FilterService.prototype.filterNodes = function (filterActive, changedPath) {\n var _this = this;\n var filterCallback = function (rowNode, includeChildNodes) {\n // recursively get all children that are groups to also filter\n if (rowNode.hasChildren()) {\n // result of filter for this node. when filtering tree data, includeChildNodes = true when parent passes\n if (filterActive && !includeChildNodes) {\n rowNode.childrenAfterFilter = rowNode.childrenAfterGroup.filter(function (childNode) {\n // a group is included in the result if it has any children of it's own.\n // by this stage, the child groups are already filtered\n var passBecauseChildren = childNode.childrenAfterFilter && childNode.childrenAfterFilter.length > 0;\n // both leaf level nodes and tree data nodes have data. these get added if\n // the data passes the filter\n var passBecauseDataPasses = childNode.data\n && _this.filterManager.doesRowPassFilter({ rowNode: childNode });\n // note - tree data nodes pass either if a) they pass themselves or b) any children of that node pass\n return passBecauseChildren || passBecauseDataPasses;\n });\n }\n else {\n // if not filtering, the result is the original list\n rowNode.childrenAfterFilter = rowNode.childrenAfterGroup;\n }\n }\n else {\n rowNode.childrenAfterFilter = rowNode.childrenAfterGroup;\n }\n if (rowNode.sibling) {\n rowNode.sibling.childrenAfterFilter = rowNode.childrenAfterFilter;\n }\n };\n if (this.doingTreeDataFiltering()) {\n var treeDataDepthFirstFilter_1 = function (rowNode, alreadyFoundInParent) {\n // tree data filter traverses the hierarchy depth first and includes child nodes if parent passes\n // filter, and parent nodes will be include if any children exist.\n if (rowNode.childrenAfterGroup) {\n for (var i = 0; i < rowNode.childrenAfterGroup.length; i++) {\n var childNode = rowNode.childrenAfterGroup[i];\n // first check if current node passes filter before invoking child nodes\n var foundInParent = alreadyFoundInParent\n || _this.filterManager.doesRowPassFilter({ rowNode: childNode });\n if (childNode.childrenAfterGroup) {\n treeDataDepthFirstFilter_1(rowNode.childrenAfterGroup[i], foundInParent);\n }\n else {\n filterCallback(childNode, foundInParent);\n }\n }\n }\n filterCallback(rowNode, alreadyFoundInParent);\n };\n var treeDataFilterCallback = function (rowNode) { return treeDataDepthFirstFilter_1(rowNode, false); };\n changedPath.executeFromRootNode(treeDataFilterCallback);\n }\n else {\n var defaultFilterCallback = function (rowNode) { return filterCallback(rowNode, false); };\n changedPath.forEachChangedNodeDepthFirst(defaultFilterCallback, true);\n }\n };\n FilterService.prototype.doingTreeDataFiltering = function () {\n return this.gridOptionsWrapper.isTreeData() && !this.gridOptionsWrapper.isExcludeChildrenWhenTreeDataFiltering();\n };\n __decorate$2s([\n Autowired('filterManager')\n ], FilterService.prototype, \"filterManager\", void 0);\n FilterService = __decorate$2s([\n Bean(\"filterService\")\n ], FilterService);\n return FilterService;\n}(BeanStub));\n\nvar __extends$2M = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2t = (undefined && undefined.__decorate) || function (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};\nvar __read$j = (undefined && undefined.__read) || function (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};\nvar ImmutableService = /** @class */ (function (_super) {\n __extends$2M(ImmutableService, _super);\n function ImmutableService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ImmutableService.prototype.postConstruct = function () {\n if (this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n this.clientSideRowModel = this.rowModel;\n }\n };\n ImmutableService.prototype.isActive = function () {\n return this.gridOptionsWrapper.isImmutableData();\n };\n ImmutableService.prototype.setRowData = function (rowData) {\n var transactionAndMap = this.createTransactionForRowData(rowData);\n if (!transactionAndMap) {\n return;\n }\n var _a = __read$j(transactionAndMap, 2), transaction = _a[0], orderIdMap = _a[1];\n var nodeTransaction = this.clientSideRowModel.updateRowData(transaction, orderIdMap);\n // need to force updating of full width rows - note this wouldn't be necessary the full width cell comp listened\n // to the data change event on the row node and refreshed itself.\n if (nodeTransaction) {\n this.rowRenderer.refreshFullWidthRows(nodeTransaction.update);\n }\n // - shows 'no rows' overlay if needed\n var rowDataChangedEvent = {\n type: Events.EVENT_ROW_DATA_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(rowDataChangedEvent);\n };\n // converts the setRowData() command to a transaction\n ImmutableService.prototype.createTransactionForRowData = function (rowData) {\n if (_.missing(this.clientSideRowModel)) {\n console.error('AG Grid: ImmutableService only works with ClientSideRowModel');\n return;\n }\n var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();\n if (getRowIdFunc == null) {\n console.error('AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!');\n return;\n }\n // convert the data into a transaction object by working out adds, removes and updates\n var transaction = {\n remove: [],\n update: [],\n add: []\n };\n var existingNodesMap = this.clientSideRowModel.getCopyOfNodesMap();\n var suppressSortOrder = this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder();\n var orderMap = suppressSortOrder ? undefined : {};\n if (_.exists(rowData)) {\n // split all the new data in the following:\n // if new, push to 'add'\n // if update, push to 'update'\n // if not changed, do not include in the transaction\n rowData.forEach(function (data, index) {\n var id = getRowIdFunc({ data: data, level: 0 });\n var existingNode = existingNodesMap[id];\n if (orderMap) {\n orderMap[id] = index;\n }\n if (existingNode) {\n var dataHasChanged = existingNode.data !== data;\n if (dataHasChanged) {\n transaction.update.push(data);\n }\n // otherwise, if data not changed, we just don't include it anywhere, as it's not a delta\n // remove from list, so we know the item is not to be removed\n existingNodesMap[id] = undefined;\n }\n else {\n transaction.add.push(data);\n }\n });\n }\n // at this point, all rows that are left, should be removed\n _.iterateObject(existingNodesMap, function (id, rowNode) {\n if (rowNode) {\n transaction.remove.push(rowNode.data);\n }\n });\n return [transaction, orderMap];\n };\n __decorate$2t([\n Autowired('rowModel')\n ], ImmutableService.prototype, \"rowModel\", void 0);\n __decorate$2t([\n Autowired('rowRenderer')\n ], ImmutableService.prototype, \"rowRenderer\", void 0);\n __decorate$2t([\n Autowired('columnApi')\n ], ImmutableService.prototype, \"columnApi\", void 0);\n __decorate$2t([\n Autowired('gridApi')\n ], ImmutableService.prototype, \"gridApi\", void 0);\n __decorate$2t([\n PostConstruct\n ], ImmutableService.prototype, \"postConstruct\", null);\n ImmutableService = __decorate$2t([\n Bean('immutableService')\n ], ImmutableService);\n return ImmutableService;\n}(BeanStub));\n\nvar ClientSideRowModelModule = {\n moduleName: exports.ModuleNames.ClientSideRowModelModule,\n beans: [FilterStage, SortStage, FlattenStage, SortService, FilterService, ImmutableService],\n rowModels: { clientSide: ClientSideRowModel }\n};\n\nvar __extends$2N = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2u = (undefined && undefined.__decorate) || function (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};\nvar InfiniteBlock = /** @class */ (function (_super) {\n __extends$2N(InfiniteBlock, _super);\n function InfiniteBlock(id, parentCache, params) {\n var _this = _super.call(this, id) || this;\n _this.parentCache = parentCache;\n _this.params = params;\n // we don't need to calculate these now, as the inputs don't change,\n // however it makes the code easier to read if we work them out up front\n _this.startRow = id * params.blockSize;\n _this.endRow = _this.startRow + params.blockSize;\n return _this;\n }\n InfiniteBlock.prototype.postConstruct = function () {\n this.createRowNodes();\n };\n InfiniteBlock.prototype.getBlockStateJson = function () {\n return {\n id: '' + this.getId(),\n state: {\n blockNumber: this.getId(),\n startRow: this.getStartRow(),\n endRow: this.getEndRow(),\n pageStatus: this.getState()\n }\n };\n };\n InfiniteBlock.prototype.setDataAndId = function (rowNode, data, index) {\n // if there's no id and the rowNode was rendered before, it means this\n // was a placeholder rowNode and should not be recycled. Setting\n // `alreadyRendered` to `false` forces the rowRenderer to flush it.\n if (!rowNode.id && rowNode.alreadyRendered) {\n rowNode.alreadyRendered = false;\n }\n if (_.exists(data)) {\n // this means if the user is not providing id's we just use the\n // index for the row. this will allow selection to work (that is based\n // on index) as long user is not inserting or deleting rows,\n // or wanting to keep selection between server side sorting or filtering\n rowNode.setDataAndId(data, index.toString());\n }\n else {\n rowNode.setDataAndId(undefined, undefined);\n }\n };\n InfiniteBlock.prototype.loadFromDatasource = function () {\n var _this = this;\n var params = this.createLoadParams();\n if (_.missing(this.params.datasource.getRows)) {\n console.warn(\"AG Grid: datasource is missing getRows method\");\n return;\n }\n // put in timeout, to force result to be async\n window.setTimeout(function () {\n _this.params.datasource.getRows(params);\n }, 0);\n };\n InfiniteBlock.prototype.processServerFail = function () {\n // todo - this method has better handling in SSRM\n };\n InfiniteBlock.prototype.createLoadParams = function () {\n // PROBLEM . . . . when the user sets sort via colDef.sort, then this code\n // is executing before the sort is set up, so server is not getting the sort\n // model. need to change with regards order - so the server side request is\n // AFTER thus it gets the right sort model.\n var params = {\n startRow: this.getStartRow(),\n endRow: this.getEndRow(),\n successCallback: this.pageLoaded.bind(this, this.getVersion()),\n failCallback: this.pageLoadFailed.bind(this, this.getVersion()),\n sortModel: this.params.sortModel,\n filterModel: this.params.filterModel,\n context: this.gridOptionsWrapper.getContext()\n };\n return params;\n };\n InfiniteBlock.prototype.forEachNode = function (callback, sequence, rowCount) {\n var _this = this;\n this.rowNodes.forEach(function (rowNode, index) {\n var rowIndex = _this.startRow + index;\n if (rowIndex < rowCount) {\n callback(rowNode, sequence.next());\n }\n });\n };\n InfiniteBlock.prototype.getLastAccessed = function () {\n return this.lastAccessed;\n };\n InfiniteBlock.prototype.getRow = function (rowIndex, dontTouchLastAccessed) {\n if (dontTouchLastAccessed === void 0) { dontTouchLastAccessed = false; }\n if (!dontTouchLastAccessed) {\n this.lastAccessed = this.params.lastAccessedSequence.next();\n }\n var localIndex = rowIndex - this.startRow;\n return this.rowNodes[localIndex];\n };\n InfiniteBlock.prototype.getStartRow = function () {\n return this.startRow;\n };\n InfiniteBlock.prototype.getEndRow = function () {\n return this.endRow;\n };\n // creates empty row nodes, data is missing as not loaded yet\n InfiniteBlock.prototype.createRowNodes = function () {\n this.rowNodes = [];\n for (var i = 0; i < this.params.blockSize; i++) {\n var rowIndex = this.startRow + i;\n var rowNode = new RowNode(this.beans);\n rowNode.setRowHeight(this.params.rowHeight);\n rowNode.uiLevel = 0;\n rowNode.setRowIndex(rowIndex);\n rowNode.setRowTop(this.params.rowHeight * rowIndex);\n this.rowNodes.push(rowNode);\n }\n };\n InfiniteBlock.prototype.processServerResult = function (params) {\n var _this = this;\n this.rowNodes.forEach(function (rowNode, index) {\n var data = params.rowData ? params.rowData[index] : undefined;\n _this.setDataAndId(rowNode, data, _this.startRow + index);\n });\n var finalRowCount = params.rowCount != null && params.rowCount >= 0 ? params.rowCount : undefined;\n this.parentCache.pageLoaded(this, finalRowCount);\n };\n InfiniteBlock.prototype.destroyRowNodes = function () {\n this.rowNodes.forEach(function (rowNode) {\n // this is needed, so row render knows to fade out the row, otherwise it\n // sees row top is present, and thinks the row should be shown.\n rowNode.clearRowTopAndRowIndex();\n });\n };\n __decorate$2u([\n Autowired('beans')\n ], InfiniteBlock.prototype, \"beans\", void 0);\n __decorate$2u([\n PostConstruct\n ], InfiniteBlock.prototype, \"postConstruct\", null);\n __decorate$2u([\n PreDestroy\n ], InfiniteBlock.prototype, \"destroyRowNodes\", null);\n return InfiniteBlock;\n}(RowNodeBlock));\n\nvar __extends$2O = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2v = (undefined && undefined.__decorate) || function (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};\nvar __param$a = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar InfiniteCache = /** @class */ (function (_super) {\n __extends$2O(InfiniteCache, _super);\n function InfiniteCache(params) {\n var _this = _super.call(this) || this;\n _this.lastRowIndexKnown = false;\n _this.blocks = {};\n _this.blockCount = 0;\n _this.rowCount = params.initialRowCount;\n _this.params = params;\n return _this;\n }\n InfiniteCache.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('InfiniteCache');\n };\n // the rowRenderer will not pass dontCreatePage, meaning when rendering the grid,\n // it will want new pages in the cache as it asks for rows. only when we are inserting /\n // removing rows via the api is dontCreatePage set, where we move rows between the pages.\n InfiniteCache.prototype.getRow = function (rowIndex, dontCreatePage) {\n if (dontCreatePage === void 0) { dontCreatePage = false; }\n var blockId = Math.floor(rowIndex / this.params.blockSize);\n var block = this.blocks[blockId];\n if (!block) {\n if (dontCreatePage) {\n return undefined;\n }\n block = this.createBlock(blockId);\n }\n return block.getRow(rowIndex);\n };\n InfiniteCache.prototype.createBlock = function (blockNumber) {\n var newBlock = this.createBean(new InfiniteBlock(blockNumber, this, this.params));\n this.blocks[newBlock.getId()] = newBlock;\n this.blockCount++;\n this.purgeBlocksIfNeeded(newBlock);\n this.params.rowNodeBlockLoader.addBlock(newBlock);\n return newBlock;\n };\n // we have this on infinite row model only, not server side row model,\n // because for server side, it would leave the children in inconsistent\n // state - eg if a node had children, but after the refresh it had data\n // for a different row, then the children would be with the wrong row node.\n InfiniteCache.prototype.refreshCache = function () {\n var nothingToRefresh = this.blockCount == 0;\n if (nothingToRefresh) {\n this.purgeCache();\n return;\n }\n this.getBlocksInOrder().forEach(function (block) { return block.setStateWaitingToLoad(); });\n this.params.rowNodeBlockLoader.checkBlockToLoad();\n };\n InfiniteCache.prototype.destroyAllBlocks = function () {\n var _this = this;\n this.getBlocksInOrder().forEach(function (block) { return _this.destroyBlock(block); });\n };\n InfiniteCache.prototype.getRowCount = function () {\n return this.rowCount;\n };\n InfiniteCache.prototype.isLastRowIndexKnown = function () {\n return this.lastRowIndexKnown;\n };\n // block calls this, when page loaded\n InfiniteCache.prototype.pageLoaded = function (block, lastRow) {\n // if we are not active, then we ignore all events, otherwise we could end up getting the\n // grid to refresh even though we are no longer the active cache\n if (!this.isAlive()) {\n return;\n }\n this.logger.log(\"onPageLoaded: page = \" + block.getId() + \", lastRow = \" + lastRow);\n this.checkRowCount(block, lastRow);\n // we fire cacheUpdated even if the row count has not changed, as some items need updating even\n // if no new rows to render. for example the pagination panel has '?' as the total rows when loading\n // is underway, which would need to get updated when loading finishes.\n this.onCacheUpdated();\n };\n InfiniteCache.prototype.purgeBlocksIfNeeded = function (blockToExclude) {\n var _this = this;\n // we exclude checking for the page just created, as this has yet to be accessed and hence\n // the lastAccessed stamp will not be updated for the first time yet\n var blocksForPurging = this.getBlocksInOrder().filter(function (b) { return b != blockToExclude; });\n var lastAccessedComparator = function (a, b) { return b.getLastAccessed() - a.getLastAccessed(); };\n blocksForPurging.sort(lastAccessedComparator);\n // we remove (maxBlocksInCache - 1) as we already excluded the 'just created' page.\n // in other words, after the splice operation below, we have taken out the blocks\n // we want to keep, which means we are left with blocks that we can potentially purge\n var maxBlocksProvided = this.params.maxBlocksInCache > 0;\n var blocksToKeep = maxBlocksProvided ? this.params.maxBlocksInCache - 1 : null;\n var emptyBlocksToKeep = InfiniteCache.MAX_EMPTY_BLOCKS_TO_KEEP - 1;\n blocksForPurging.forEach(function (block, index) {\n var purgeBecauseBlockEmpty = block.getState() === InfiniteBlock.STATE_WAITING_TO_LOAD && index >= emptyBlocksToKeep;\n var purgeBecauseCacheFull = maxBlocksProvided ? index >= blocksToKeep : false;\n if (purgeBecauseBlockEmpty || purgeBecauseCacheFull) {\n // if the block currently has rows been displayed, then don't remove it either.\n // this can happen if user has maxBlocks=2, and blockSize=5 (thus 10 max rows in cache)\n // but the screen is showing 20 rows, so at least 4 blocks are needed.\n if (_this.isBlockCurrentlyDisplayed(block)) {\n return;\n }\n // don't want to loose keyboard focus, so keyboard navigation can continue. so keep focused blocks.\n if (_this.isBlockFocused(block)) {\n return;\n }\n // at this point, block is not needed, so burn baby burn\n _this.removeBlockFromCache(block);\n }\n });\n };\n InfiniteCache.prototype.isBlockFocused = function (block) {\n var focusedCell = this.focusService.getFocusCellToUseAfterRefresh();\n if (!focusedCell) {\n return false;\n }\n if (focusedCell.rowPinned != null) {\n return false;\n }\n var blockIndexStart = block.getStartRow();\n var blockIndexEnd = block.getEndRow();\n var hasFocus = focusedCell.rowIndex >= blockIndexStart && focusedCell.rowIndex < blockIndexEnd;\n return hasFocus;\n };\n InfiniteCache.prototype.isBlockCurrentlyDisplayed = function (block) {\n var startIndex = block.getStartRow();\n var endIndex = block.getEndRow() - 1;\n return this.rowRenderer.isRangeInRenderedViewport(startIndex, endIndex);\n };\n InfiniteCache.prototype.removeBlockFromCache = function (blockToRemove) {\n if (!blockToRemove) {\n return;\n }\n this.destroyBlock(blockToRemove);\n // we do not want to remove the 'loaded' event listener, as the\n // concurrent loads count needs to be updated when the load is complete\n // if the purged page is in loading state\n };\n InfiniteCache.prototype.checkRowCount = function (block, lastRow) {\n // if client provided a last row, we always use it, as it could change between server calls\n // if user deleted data and then called refresh on the grid.\n if (typeof lastRow === 'number' && lastRow >= 0) {\n this.rowCount = lastRow;\n this.lastRowIndexKnown = true;\n }\n else if (!this.lastRowIndexKnown) {\n // otherwise, see if we need to add some virtual rows\n var lastRowIndex = (block.getId() + 1) * this.params.blockSize;\n var lastRowIndexPlusOverflow = lastRowIndex + this.params.overflowSize;\n if (this.rowCount < lastRowIndexPlusOverflow) {\n this.rowCount = lastRowIndexPlusOverflow;\n }\n }\n };\n InfiniteCache.prototype.setRowCount = function (rowCount, lastRowIndexKnown) {\n this.rowCount = rowCount;\n // if undefined is passed, we do not set this value, if one of {true,false}\n // is passed, we do set the value.\n if (_.exists(lastRowIndexKnown)) {\n this.lastRowIndexKnown = lastRowIndexKnown;\n }\n // if we are still searching, then the row count must not end at the end\n // of a particular page, otherwise the searching will not pop into the\n // next page\n if (!this.lastRowIndexKnown) {\n if (this.rowCount % this.params.blockSize === 0) {\n this.rowCount++;\n }\n }\n this.onCacheUpdated();\n };\n InfiniteCache.prototype.forEachNodeDeep = function (callback) {\n var _this = this;\n var sequence = new NumberSequence();\n this.getBlocksInOrder().forEach(function (block) { return block.forEachNode(callback, sequence, _this.rowCount); });\n };\n InfiniteCache.prototype.getBlocksInOrder = function () {\n // get all page id's as NUMBERS (not strings, as we need to sort as numbers) and in descending order\n var blockComparator = function (a, b) { return a.getId() - b.getId(); };\n var blocks = _.getAllValuesInObject(this.blocks).sort(blockComparator);\n return blocks;\n };\n InfiniteCache.prototype.destroyBlock = function (block) {\n delete this.blocks[block.getId()];\n this.destroyBean(block);\n this.blockCount--;\n this.params.rowNodeBlockLoader.removeBlock(block);\n };\n // gets called 1) row count changed 2) cache purged 3) items inserted\n InfiniteCache.prototype.onCacheUpdated = function () {\n if (this.isAlive()) {\n // if the virtualRowCount is shortened, then it's possible blocks exist that are no longer\n // in the valid range. so we must remove these. this can happen if user explicitly sets\n // the virtual row count, or the datasource returns a result and sets lastRow to something\n // less than virtualRowCount (can happen if user scrolls down, server reduces dataset size).\n this.destroyAllBlocksPastVirtualRowCount();\n // this results in both row models (infinite and server side) firing ModelUpdated,\n // however server side row model also updates the row indexes first\n var event_1 = {\n type: Events.EVENT_STORE_UPDATED\n };\n this.eventService.dispatchEvent(event_1);\n }\n };\n InfiniteCache.prototype.destroyAllBlocksPastVirtualRowCount = function () {\n var _this = this;\n var blocksToDestroy = [];\n this.getBlocksInOrder().forEach(function (block) {\n var startRow = block.getId() * _this.params.blockSize;\n if (startRow >= _this.rowCount) {\n blocksToDestroy.push(block);\n }\n });\n if (blocksToDestroy.length > 0) {\n blocksToDestroy.forEach(function (block) { return _this.destroyBlock(block); });\n }\n };\n InfiniteCache.prototype.purgeCache = function () {\n var _this = this;\n this.getBlocksInOrder().forEach(function (block) { return _this.removeBlockFromCache(block); });\n this.lastRowIndexKnown = false;\n // if zero rows in the cache, we need to get the SSRM to start asking for rows again.\n // otherwise if set to zero rows last time, and we don't update the row count, then after\n // the purge there will still be zero rows, meaning the SSRM won't request any rows.\n // to kick things off, at least one row needs to be asked for.\n if (this.rowCount === 0) {\n this.rowCount = this.params.initialRowCount;\n }\n this.onCacheUpdated();\n };\n InfiniteCache.prototype.getRowNodesInRange = function (firstInRange, lastInRange) {\n var _this = this;\n var result = [];\n var lastBlockId = -1;\n var inActiveRange = false;\n var numberSequence = new NumberSequence();\n // if only one node passed, we start the selection at the top\n if (_.missing(firstInRange)) {\n inActiveRange = true;\n }\n var foundGapInSelection = false;\n this.getBlocksInOrder().forEach(function (block) {\n if (foundGapInSelection) {\n return;\n }\n if (inActiveRange && (lastBlockId + 1 !== block.getId())) {\n foundGapInSelection = true;\n return;\n }\n lastBlockId = block.getId();\n block.forEachNode(function (rowNode) {\n var hitFirstOrLast = rowNode === firstInRange || rowNode === lastInRange;\n if (inActiveRange || hitFirstOrLast) {\n result.push(rowNode);\n }\n if (hitFirstOrLast) {\n inActiveRange = !inActiveRange;\n }\n }, numberSequence, _this.rowCount);\n });\n // inActiveRange will be still true if we never hit the second rowNode\n var invalidRange = foundGapInSelection || inActiveRange;\n return invalidRange ? [] : result;\n };\n // this property says how many empty blocks should be in a cache, eg if scrolls down fast and creates 10\n // blocks all for loading, the grid will only load the last 2 - it will assume the blocks the user quickly\n // scrolled over are not needed to be loaded.\n InfiniteCache.MAX_EMPTY_BLOCKS_TO_KEEP = 2;\n __decorate$2v([\n Autowired('rowRenderer')\n ], InfiniteCache.prototype, \"rowRenderer\", void 0);\n __decorate$2v([\n Autowired(\"focusService\")\n ], InfiniteCache.prototype, \"focusService\", void 0);\n __decorate$2v([\n __param$a(0, Qualifier('loggerFactory'))\n ], InfiniteCache.prototype, \"setBeans\", null);\n __decorate$2v([\n PreDestroy\n ], InfiniteCache.prototype, \"destroyAllBlocks\", null);\n return InfiniteCache;\n}(BeanStub));\n\nvar __extends$2P = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2w = (undefined && undefined.__decorate) || function (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};\nvar InfiniteRowModel = /** @class */ (function (_super) {\n __extends$2P(InfiniteRowModel, _super);\n function InfiniteRowModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n InfiniteRowModel.prototype.getRowBounds = function (index) {\n return {\n rowHeight: this.rowHeight,\n rowTop: this.rowHeight * index\n };\n };\n // we don't implement as lazy row heights is not supported in this row model\n InfiniteRowModel.prototype.ensureRowHeightsValid = function (startPixel, endPixel, startLimitIndex, endLimitIndex) {\n return false;\n };\n InfiniteRowModel.prototype.init = function () {\n var _this = this;\n if (!this.gridOptionsWrapper.isRowModelInfinite()) {\n return;\n }\n this.rowHeight = this.gridOptionsWrapper.getRowHeightAsNumber();\n this.addEventListeners();\n this.addDestroyFunc(function () { return _this.destroyCache(); });\n this.verifyProps();\n };\n InfiniteRowModel.prototype.verifyProps = function () {\n if (this.gridOptionsWrapper.getInitialGroupOrderComparator() != null) {\n var message_1 = \"AG Grid: initialGroupOrderComparator cannot be used with Infinite Row Model. If using Infinite Row Model, then sorting is done on the server side, nothing to do with the client.\";\n _.doOnce(function () { return console.warn(message_1); }, 'IRM.InitialGroupOrderComparator');\n }\n };\n InfiniteRowModel.prototype.start = function () {\n this.setDatasource(this.gridOptionsWrapper.getDatasource());\n };\n InfiniteRowModel.prototype.destroyDatasource = function () {\n if (this.datasource) {\n this.getContext().destroyBean(this.datasource);\n this.rowRenderer.datasourceChanged();\n this.datasource = null;\n }\n };\n InfiniteRowModel.prototype.addEventListeners = function () {\n this.addManagedListener(this.eventService, Events.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onColumnEverything.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_STORE_UPDATED, this.onCacheUpdated.bind(this));\n };\n InfiniteRowModel.prototype.onFilterChanged = function () {\n this.reset();\n };\n InfiniteRowModel.prototype.onSortChanged = function () {\n this.reset();\n };\n InfiniteRowModel.prototype.onColumnEverything = function () {\n var resetRequired;\n // if cache params, we require reset only if sort model has changed. we don't need to check\n // for filter model, as the filter manager will fire an event when columns change that result\n // in the filter changing.\n if (this.cacheParams) {\n resetRequired = this.isSortModelDifferent();\n }\n else {\n // if no cacheParams, means first time creating the cache, so always create one\n resetRequired = true;\n }\n if (resetRequired) {\n this.reset();\n }\n };\n InfiniteRowModel.prototype.isSortModelDifferent = function () {\n return !_.jsonEquals(this.cacheParams.sortModel, this.sortController.getSortModel());\n };\n InfiniteRowModel.prototype.getType = function () {\n return Constants.ROW_MODEL_TYPE_INFINITE;\n };\n InfiniteRowModel.prototype.setDatasource = function (datasource) {\n this.destroyDatasource();\n this.datasource = datasource;\n // only reset if we have a valid datasource to working with\n if (datasource) {\n this.reset();\n }\n };\n InfiniteRowModel.prototype.isEmpty = function () {\n return !this.infiniteCache;\n };\n InfiniteRowModel.prototype.isRowsToRender = function () {\n return !!this.infiniteCache;\n };\n InfiniteRowModel.prototype.getNodesInRangeForSelection = function (firstInRange, lastInRange) {\n return this.infiniteCache ? this.infiniteCache.getRowNodesInRange(firstInRange, lastInRange) : [];\n };\n InfiniteRowModel.prototype.reset = function () {\n // important to return here, as the user could be setting filter or sort before\n // data-source is set\n if (!this.datasource) {\n return;\n }\n // if user is providing id's, then this means we can keep the selection between datasource hits,\n // as the rows will keep their unique id's even if, for example, server side sorting or filtering\n // is done.\n var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();\n var userGeneratingIds = getRowIdFunc != null;\n if (!userGeneratingIds) {\n this.selectionService.reset();\n }\n this.resetCache();\n var event = this.createModelUpdatedEvent();\n this.eventService.dispatchEvent(event);\n };\n InfiniteRowModel.prototype.createModelUpdatedEvent = function () {\n return {\n type: Events.EVENT_MODEL_UPDATED,\n api: this.gridApi,\n columnApi: this.columnApi,\n // not sure if these should all be false - noticed if after implementing,\n // maybe they should be true?\n newPage: false,\n newData: false,\n keepRenderedRows: true,\n animate: false\n };\n };\n InfiniteRowModel.prototype.resetCache = function () {\n // if not first time creating a cache, need to destroy the old one\n this.destroyCache();\n this.cacheParams = {\n // the user provided datasource\n datasource: this.datasource,\n // sort and filter model\n filterModel: this.filterManager.getFilterModel(),\n sortModel: this.sortController.getSortModel(),\n rowNodeBlockLoader: this.rowNodeBlockLoader,\n // properties - this way we take a snapshot of them, so if user changes any, they will be\n // used next time we create a new cache, which is generally after a filter or sort change,\n // or a new datasource is set\n initialRowCount: this.defaultIfInvalid(this.gridOptionsWrapper.getInfiniteInitialRowCount(), 1),\n maxBlocksInCache: this.gridOptionsWrapper.getMaxBlocksInCache(),\n rowHeight: this.gridOptionsWrapper.getRowHeightAsNumber(),\n // if user doesn't provide overflow, we use default overflow of 1, so user can scroll past\n // the current page and request first row of next page\n overflowSize: this.defaultIfInvalid(this.gridOptionsWrapper.getCacheOverflowSize(), 1),\n // page size needs to be 1 or greater. having it at 1 would be silly, as you would be hitting the\n // server for one page at a time. so the default if not specified is 100.\n blockSize: this.defaultIfInvalid(this.gridOptionsWrapper.getCacheBlockSize(), 100),\n // the cache could create this, however it is also used by the pages, so handy to create it\n // here as the settings are also passed to the pages\n lastAccessedSequence: new NumberSequence()\n };\n this.infiniteCache = this.createBean(new InfiniteCache(this.cacheParams));\n };\n InfiniteRowModel.prototype.defaultIfInvalid = function (value, defaultValue) {\n return value > 0 ? value : defaultValue;\n };\n InfiniteRowModel.prototype.destroyCache = function () {\n if (this.infiniteCache) {\n this.infiniteCache = this.destroyBean(this.infiniteCache);\n }\n };\n InfiniteRowModel.prototype.onCacheUpdated = function () {\n var event = this.createModelUpdatedEvent();\n this.eventService.dispatchEvent(event);\n };\n InfiniteRowModel.prototype.getRow = function (rowIndex) {\n if (!this.infiniteCache) {\n return undefined;\n }\n if (rowIndex >= this.infiniteCache.getRowCount()) {\n return undefined;\n }\n return this.infiniteCache.getRow(rowIndex);\n };\n InfiniteRowModel.prototype.getRowNode = function (id) {\n var result;\n this.forEachNode(function (rowNode) {\n if (rowNode.id === id) {\n result = rowNode;\n }\n });\n return result;\n };\n InfiniteRowModel.prototype.forEachNode = function (callback) {\n if (this.infiniteCache) {\n this.infiniteCache.forEachNodeDeep(callback);\n }\n };\n InfiniteRowModel.prototype.getTopLevelRowCount = function () {\n return this.getRowCount();\n };\n InfiniteRowModel.prototype.getTopLevelRowDisplayedIndex = function (topLevelIndex) {\n return topLevelIndex;\n };\n InfiniteRowModel.prototype.getRowIndexAtPixel = function (pixel) {\n if (this.rowHeight !== 0) { // avoid divide by zero error\n var rowIndexForPixel = Math.floor(pixel / this.rowHeight);\n var lastRowIndex = this.getRowCount() - 1;\n if (rowIndexForPixel > lastRowIndex) {\n return lastRowIndex;\n }\n return rowIndexForPixel;\n }\n return 0;\n };\n InfiniteRowModel.prototype.getRowCount = function () {\n return this.infiniteCache ? this.infiniteCache.getRowCount() : 0;\n };\n InfiniteRowModel.prototype.isRowPresent = function (rowNode) {\n var foundRowNode = this.getRowNode(rowNode.id);\n return !!foundRowNode;\n };\n InfiniteRowModel.prototype.refreshCache = function () {\n if (this.infiniteCache) {\n this.infiniteCache.refreshCache();\n }\n };\n InfiniteRowModel.prototype.purgeCache = function () {\n if (this.infiniteCache) {\n this.infiniteCache.purgeCache();\n }\n };\n // for iRowModel\n InfiniteRowModel.prototype.isLastRowIndexKnown = function () {\n if (this.infiniteCache) {\n return this.infiniteCache.isLastRowIndexKnown();\n }\n return false;\n };\n InfiniteRowModel.prototype.setRowCount = function (rowCount, lastRowIndexKnown) {\n if (this.infiniteCache) {\n this.infiniteCache.setRowCount(rowCount, lastRowIndexKnown);\n }\n };\n __decorate$2w([\n Autowired('filterManager')\n ], InfiniteRowModel.prototype, \"filterManager\", void 0);\n __decorate$2w([\n Autowired('sortController')\n ], InfiniteRowModel.prototype, \"sortController\", void 0);\n __decorate$2w([\n Autowired('selectionService')\n ], InfiniteRowModel.prototype, \"selectionService\", void 0);\n __decorate$2w([\n Autowired('gridApi')\n ], InfiniteRowModel.prototype, \"gridApi\", void 0);\n __decorate$2w([\n Autowired('columnApi')\n ], InfiniteRowModel.prototype, \"columnApi\", void 0);\n __decorate$2w([\n Autowired('rowRenderer')\n ], InfiniteRowModel.prototype, \"rowRenderer\", void 0);\n __decorate$2w([\n Autowired('rowNodeBlockLoader')\n ], InfiniteRowModel.prototype, \"rowNodeBlockLoader\", void 0);\n __decorate$2w([\n PostConstruct\n ], InfiniteRowModel.prototype, \"init\", null);\n __decorate$2w([\n PreDestroy\n ], InfiniteRowModel.prototype, \"destroyDatasource\", null);\n InfiniteRowModel = __decorate$2w([\n Bean('rowModel')\n ], InfiniteRowModel);\n return InfiniteRowModel;\n}(BeanStub));\n\nvar InfiniteRowModelModule = {\n moduleName: exports.ModuleNames.InfiniteRowModelModule,\n rowModels: { infinite: InfiniteRowModel }\n};\n\nvar BaseCreator = /** @class */ (function () {\n function BaseCreator() {\n }\n BaseCreator.prototype.setBeans = function (beans) {\n this.beans = beans;\n };\n BaseCreator.prototype.getFileName = function (fileName) {\n var extension = this.getDefaultFileExtension();\n if (fileName == null || !fileName.length) {\n fileName = this.getDefaultFileName();\n }\n return fileName.indexOf('.') === -1 ? fileName + \".\" + extension : fileName;\n };\n BaseCreator.prototype.getData = function (params) {\n var serializingSession = this.createSerializingSession(params);\n var data = this.beans.gridSerializer.serialize(serializingSession, params);\n return data;\n };\n return BaseCreator;\n}());\n\nvar BaseGridSerializingSession = /** @class */ (function () {\n function BaseGridSerializingSession(config) {\n this.groupColumns = [];\n var columnModel = config.columnModel, valueService = config.valueService, gridOptionsWrapper = config.gridOptionsWrapper, processCellCallback = config.processCellCallback, processHeaderCallback = config.processHeaderCallback, processGroupHeaderCallback = config.processGroupHeaderCallback, processRowGroupCallback = config.processRowGroupCallback;\n this.columnModel = columnModel;\n this.valueService = valueService;\n this.gridOptionsWrapper = gridOptionsWrapper;\n this.processCellCallback = processCellCallback;\n this.processHeaderCallback = processHeaderCallback;\n this.processGroupHeaderCallback = processGroupHeaderCallback;\n this.processRowGroupCallback = processRowGroupCallback;\n }\n BaseGridSerializingSession.prototype.prepare = function (columnsToExport) {\n this.groupColumns = columnsToExport.filter(function (col) { return !!col.getColDef().showRowGroup; });\n };\n BaseGridSerializingSession.prototype.extractHeaderValue = function (column) {\n var value = this.getHeaderName(this.processHeaderCallback, column);\n return value != null ? value : '';\n };\n BaseGridSerializingSession.prototype.extractRowCellValue = function (column, index, accumulatedRowIndex, type, node) {\n // we render the group summary text e.g. \"-> Parent -> Child\"...\n var groupIndex = this.gridOptionsWrapper.isGroupMultiAutoColumn() ? node.rowGroupIndex : 0;\n var renderGroupSummaryCell = \n // on group rows\n node && node.group\n && (\n // in the group column if groups appear in regular grid cells\n index === groupIndex && this.groupColumns.indexOf(column) !== -1\n // or the first cell in the row, if we're doing full width rows\n || (index === 0 && this.gridOptionsWrapper.isGroupUseEntireRow(this.columnModel.isPivotMode())));\n var valueForCell;\n if (renderGroupSummaryCell) {\n valueForCell = this.createValueForGroupNode(node);\n }\n else {\n valueForCell = this.valueService.getValue(column, node);\n }\n var value = this.processCell(accumulatedRowIndex, node, column, valueForCell, this.processCellCallback, type);\n return value != null ? value : '';\n };\n BaseGridSerializingSession.prototype.getHeaderName = function (callback, column) {\n if (callback) {\n return callback({\n column: column,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n });\n }\n return this.columnModel.getDisplayNameForColumn(column, 'csv', true);\n };\n BaseGridSerializingSession.prototype.createValueForGroupNode = function (node) {\n if (this.processRowGroupCallback) {\n return this.processRowGroupCallback({\n node: node,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext(),\n });\n }\n var keys = [node.key];\n if (!this.gridOptionsWrapper.isGroupMultiAutoColumn()) {\n while (node.parent) {\n node = node.parent;\n keys.push(node.key);\n }\n }\n return keys.reverse().join(' -> ');\n };\n BaseGridSerializingSession.prototype.processCell = function (accumulatedRowIndex, rowNode, column, value, processCellCallback, type) {\n if (processCellCallback) {\n return processCellCallback({\n accumulatedRowIndex: accumulatedRowIndex,\n column: column,\n node: rowNode,\n value: value,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext(),\n type: type\n });\n }\n return value != null ? value : '';\n };\n return BaseGridSerializingSession;\n}());\n\nvar Downloader = /** @class */ (function () {\n function Downloader() {\n }\n Downloader.download = function (fileName, content) {\n var win = document.defaultView || window;\n if (!win) {\n console.warn('AG Grid: There is no `window` associated with the current `document`');\n return;\n }\n var element = document.createElement('a');\n // @ts-ignore\n var url = win.URL.createObjectURL(content);\n element.setAttribute('href', url);\n element.setAttribute('download', fileName);\n element.style.display = 'none';\n document.body.appendChild(element);\n element.dispatchEvent(new MouseEvent('click', {\n bubbles: false,\n cancelable: true,\n view: win\n }));\n document.body.removeChild(element);\n win.setTimeout(function () {\n // @ts-ignore\n win.URL.revokeObjectURL(url);\n }, 0);\n };\n return Downloader;\n}());\n\nvar __extends$2Q = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar LINE_SEPARATOR = '\\r\\n';\nvar CsvSerializingSession = /** @class */ (function (_super) {\n __extends$2Q(CsvSerializingSession, _super);\n function CsvSerializingSession(config) {\n var _this = _super.call(this, config) || this;\n _this.isFirstLine = true;\n _this.result = '';\n var suppressQuotes = config.suppressQuotes, columnSeparator = config.columnSeparator;\n _this.suppressQuotes = suppressQuotes;\n _this.columnSeparator = columnSeparator;\n return _this;\n }\n CsvSerializingSession.prototype.addCustomContent = function (content) {\n var _this = this;\n if (!content) {\n return;\n }\n if (typeof content === 'string') {\n if (!/^\\s*\\n/.test(content)) {\n this.beginNewLine();\n }\n // replace whatever newlines are supplied with the style we're using\n content = content.replace(/\\r?\\n/g, LINE_SEPARATOR);\n this.result += content;\n }\n else {\n content.forEach(function (row) {\n _this.beginNewLine();\n row.forEach(function (cell, index) {\n if (index !== 0) {\n _this.result += _this.columnSeparator;\n }\n _this.result += _this.putInQuotes(cell.data.value || '');\n if (cell.mergeAcross) {\n _this.appendEmptyCells(cell.mergeAcross);\n }\n });\n });\n }\n };\n CsvSerializingSession.prototype.onNewHeaderGroupingRow = function () {\n this.beginNewLine();\n return {\n onColumn: this.onNewHeaderGroupingRowColumn.bind(this)\n };\n };\n CsvSerializingSession.prototype.onNewHeaderGroupingRowColumn = function (header, index, span) {\n if (index != 0) {\n this.result += this.columnSeparator;\n }\n this.result += this.putInQuotes(header);\n this.appendEmptyCells(span);\n };\n CsvSerializingSession.prototype.appendEmptyCells = function (count) {\n for (var i = 1; i <= count; i++) {\n this.result += this.columnSeparator + this.putInQuotes(\"\");\n }\n };\n CsvSerializingSession.prototype.onNewHeaderRow = function () {\n this.beginNewLine();\n return {\n onColumn: this.onNewHeaderRowColumn.bind(this)\n };\n };\n CsvSerializingSession.prototype.onNewHeaderRowColumn = function (column, index) {\n if (index != 0) {\n this.result += this.columnSeparator;\n }\n this.result += this.putInQuotes(this.extractHeaderValue(column));\n };\n CsvSerializingSession.prototype.onNewBodyRow = function () {\n this.beginNewLine();\n return {\n onColumn: this.onNewBodyRowColumn.bind(this)\n };\n };\n CsvSerializingSession.prototype.onNewBodyRowColumn = function (column, index, node) {\n if (index != 0) {\n this.result += this.columnSeparator;\n }\n this.result += this.putInQuotes(this.extractRowCellValue(column, index, index, Constants.EXPORT_TYPE_CSV, node));\n };\n CsvSerializingSession.prototype.putInQuotes = function (value) {\n if (this.suppressQuotes) {\n return value;\n }\n if (value === null || value === undefined) {\n return '\"\"';\n }\n var stringValue;\n if (typeof value === 'string') {\n stringValue = value;\n }\n else if (typeof value.toString === 'function') {\n stringValue = value.toString();\n }\n else {\n console.warn('AG Grid: unknown value type during csv conversion');\n stringValue = '';\n }\n // replace each \" with \"\" (ie two sets of double quotes is how to do double quotes in csv)\n var valueEscaped = stringValue.replace(/\"/g, \"\\\"\\\"\");\n return '\"' + valueEscaped + '\"';\n };\n CsvSerializingSession.prototype.parse = function () {\n return this.result;\n };\n CsvSerializingSession.prototype.beginNewLine = function () {\n if (!this.isFirstLine) {\n this.result += LINE_SEPARATOR;\n }\n this.isFirstLine = false;\n };\n return CsvSerializingSession;\n}(BaseGridSerializingSession));\n\nvar __extends$2R = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2x = (undefined && undefined.__decorate) || function (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};\nvar CsvCreator = /** @class */ (function (_super) {\n __extends$2R(CsvCreator, _super);\n function CsvCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CsvCreator.prototype.postConstruct = function () {\n this.setBeans({\n gridSerializer: this.gridSerializer,\n gridOptionsWrapper: this.gridOptionsWrapper\n });\n };\n CsvCreator.prototype.getMergedParams = function (params) {\n var baseParams = this.gridOptionsWrapper.getDefaultExportParams('csv');\n return Object.assign({}, baseParams, params);\n };\n CsvCreator.prototype.export = function (userParams) {\n if (this.isExportSuppressed()) {\n console.warn(\"AG Grid: Export cancelled. Export is not allowed as per your configuration.\");\n return '';\n }\n var mergedParams = this.getMergedParams(userParams);\n var data = this.getData(mergedParams);\n var packagedFile = new Blob([\"\\ufeff\", data], { type: 'text/plain' });\n Downloader.download(this.getFileName(mergedParams.fileName), packagedFile);\n return data;\n };\n CsvCreator.prototype.exportDataAsCsv = function (params) {\n return this.export(params);\n };\n CsvCreator.prototype.getDataAsCsv = function (params) {\n var mergedParams = this.getMergedParams(params);\n return this.getData(mergedParams);\n };\n CsvCreator.prototype.getDefaultFileName = function () {\n return 'export.csv';\n };\n CsvCreator.prototype.getDefaultFileExtension = function () {\n return 'csv';\n };\n CsvCreator.prototype.createSerializingSession = function (params) {\n var _a = this, columnModel = _a.columnModel, valueService = _a.valueService, gridOptionsWrapper = _a.gridOptionsWrapper;\n var _b = params, processCellCallback = _b.processCellCallback, processHeaderCallback = _b.processHeaderCallback, processGroupHeaderCallback = _b.processGroupHeaderCallback, processRowGroupCallback = _b.processRowGroupCallback, suppressQuotes = _b.suppressQuotes, columnSeparator = _b.columnSeparator;\n return new CsvSerializingSession({\n columnModel: columnModel,\n valueService: valueService,\n gridOptionsWrapper: gridOptionsWrapper,\n processCellCallback: processCellCallback || undefined,\n processHeaderCallback: processHeaderCallback || undefined,\n processGroupHeaderCallback: processGroupHeaderCallback || undefined,\n processRowGroupCallback: processRowGroupCallback || undefined,\n suppressQuotes: suppressQuotes || false,\n columnSeparator: columnSeparator || ','\n });\n };\n CsvCreator.prototype.isExportSuppressed = function () {\n return this.gridOptionsWrapper.isSuppressCsvExport();\n };\n __decorate$2x([\n Autowired('columnModel')\n ], CsvCreator.prototype, \"columnModel\", void 0);\n __decorate$2x([\n Autowired('valueService')\n ], CsvCreator.prototype, \"valueService\", void 0);\n __decorate$2x([\n Autowired('gridSerializer')\n ], CsvCreator.prototype, \"gridSerializer\", void 0);\n __decorate$2x([\n Autowired('gridOptionsWrapper')\n ], CsvCreator.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$2x([\n PostConstruct\n ], CsvCreator.prototype, \"postConstruct\", null);\n CsvCreator = __decorate$2x([\n Bean('csvCreator')\n ], CsvCreator);\n return CsvCreator;\n}(BaseCreator));\n\nvar __extends$2S = (undefined && undefined.__extends) || (function () {\n var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2y = (undefined && undefined.__decorate) || function (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(function (RowType) {\n RowType[RowType[\"HEADER_GROUPING\"] = 0] = \"HEADER_GROUPING\";\n RowType[RowType[\"HEADER\"] = 1] = \"HEADER\";\n RowType[RowType[\"BODY\"] = 2] = \"BODY\";\n})(exports.RowType || (exports.RowType = {}));\nvar GridSerializer = /** @class */ (function (_super) {\n __extends$2S(GridSerializer, _super);\n function GridSerializer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridSerializer.prototype.serialize = function (gridSerializingSession, params) {\n if (params === void 0) { params = {}; }\n var columnsToExport = this.getColumnsToExport(params.allColumns, params.columnKeys);\n var serializeChain = _.compose(\n // first pass, put in the header names of the cols\n this.prepareSession(columnsToExport), this.prependContent(params), this.exportColumnGroups(params, columnsToExport), this.exportHeaders(params, columnsToExport), this.processPinnedTopRows(params, columnsToExport), this.processRows(params, columnsToExport), this.processPinnedBottomRows(params, columnsToExport), this.appendContent(params));\n return serializeChain(gridSerializingSession).parse();\n };\n GridSerializer.prototype.processRow = function (gridSerializingSession, params, columnsToExport, node) {\n var _this = this;\n var rowSkipper = params.shouldRowBeSkipped || (function () { return false; });\n var gridOptionsWrapper = this.gridOptionsWrapper;\n var context = gridOptionsWrapper.getContext();\n var api = gridOptionsWrapper.getApi();\n var columnApi = gridOptionsWrapper.getColumnApi();\n var skipSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveSingleChildren();\n var hideOpenParents = gridOptionsWrapper.isGroupHideOpenParents();\n var skipLowestSingleChildrenGroup = gridOptionsWrapper.isGroupRemoveLowestSingleChildren();\n var isLeafNode = this.columnModel.isPivotMode() ? node.leafGroup : !node.group;\n var skipRowGroups = params.skipGroups || params.skipRowGroups;\n var shouldSkipLowestGroup = skipLowestSingleChildrenGroup && node.leafGroup;\n var shouldSkipCurrentGroup = node.allChildrenCount === 1 && (skipSingleChildrenGroup || shouldSkipLowestGroup);\n if (skipRowGroups && params.skipGroups) {\n _.doOnce(function () { return console.warn('AG Grid: Since v25.2 `skipGroups` has been renamed to `skipRowGroups`.'); }, 'gridSerializer-skipGroups');\n }\n var rowPosition = { rowIndex: node.rowIndex, rowPinned: node.rowPinned };\n if ((!isLeafNode && (params.skipRowGroups || shouldSkipCurrentGroup || hideOpenParents)) ||\n (params.onlySelected && !node.isSelected()) ||\n (params.rowNodes && !params.rowNodes.some(function (position) { return _this.rowPositionUtils.sameRow(position, rowPosition); })) ||\n (params.skipPinnedTop && node.rowPinned === 'top') ||\n (params.skipPinnedBottom && node.rowPinned === 'bottom')) {\n return;\n }\n // if we are in pivotMode, then the grid will show the root node only\n // if it's not a leaf group\n var nodeIsRootNode = node.level === -1;\n if (nodeIsRootNode && !node.leafGroup) {\n return;\n }\n var shouldRowBeSkipped = rowSkipper({ node: node, api: api, columnApi: columnApi, context: context });\n if (shouldRowBeSkipped) {\n return;\n }\n var rowAccumulator = gridSerializingSession.onNewBodyRow();\n columnsToExport.forEach(function (column, index) {\n rowAccumulator.onColumn(column, index, node);\n });\n if (params.getCustomContentBelowRow) {\n var content = params.getCustomContentBelowRow({ node: node, api: api, columnApi: columnApi, context: context });\n if (content) {\n gridSerializingSession.addCustomContent(content);\n }\n }\n };\n GridSerializer.prototype.appendContent = function (params) {\n return function (gridSerializingSession) {\n var appendContent = params.customFooter || params.appendContent;\n if (appendContent) {\n if (params.customFooter) {\n _.doOnce(function () { return console.warn('AG Grid: Since version 25.2.0 the `customFooter` param has been deprecated. Use `appendContent` instead.'); }, 'gridSerializer-customFooter');\n }\n gridSerializingSession.addCustomContent(appendContent);\n }\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.prependContent = function (params) {\n return function (gridSerializingSession) {\n var prependContent = params.customHeader || params.prependContent;\n if (prependContent) {\n if (params.customHeader) {\n _.doOnce(function () { return console.warn('AG Grid: Since version 25.2.0 the `customHeader` param has been deprecated. Use `prependContent` instead.'); }, 'gridSerializer-customHeader');\n }\n gridSerializingSession.addCustomContent(prependContent);\n }\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.prepareSession = function (columnsToExport) {\n return function (gridSerializingSession) {\n gridSerializingSession.prepare(columnsToExport);\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.exportColumnGroups = function (params, columnsToExport) {\n var _this = this;\n return function (gridSerializingSession) {\n if (!params.skipColumnGroupHeaders) {\n var groupInstanceIdCreator = new GroupInstanceIdCreator();\n var displayedGroups = _this.displayedGroupCreator.createDisplayedGroups(columnsToExport, _this.columnModel.getGridBalancedTree(), groupInstanceIdCreator, null);\n _this.recursivelyAddHeaderGroups(displayedGroups, gridSerializingSession, params.processGroupHeaderCallback);\n }\n else if (params.columnGroups) {\n _.doOnce(function () { return console.warn('AG Grid: Since v25.2 the `columnGroups` param has deprecated, and groups are exported by default.'); }, 'gridSerializer-columnGroups');\n }\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.exportHeaders = function (params, columnsToExport) {\n return function (gridSerializingSession) {\n if (!params.skipHeader && !params.skipColumnHeaders) {\n var gridRowIterator_1 = gridSerializingSession.onNewHeaderRow();\n columnsToExport.forEach(function (column, index) {\n gridRowIterator_1.onColumn(column, index, undefined);\n });\n }\n else if (params.skipHeader) {\n _.doOnce(function () { return console.warn('AG Grid: Since v25.2 the `skipHeader` param has been renamed to `skipColumnHeaders`.'); }, 'gridSerializer-skipHeader');\n }\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.processPinnedTopRows = function (params, columnsToExport) {\n var _this = this;\n return function (gridSerializingSession) {\n var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);\n _this.pinnedRowModel.forEachPinnedTopRow(processRow);\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.processRows = function (params, columnsToExport) {\n var _this = this;\n return function (gridSerializingSession) {\n // when in pivot mode, we always render cols on screen, never 'all columns'\n var rowModel = _this.rowModel;\n var rowModelType = rowModel.getType();\n var usingCsrm = rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n var usingSsrm = rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE;\n var onlySelectedNonStandardModel = !usingCsrm && params.onlySelected;\n var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);\n if (_this.columnModel.isPivotMode()) {\n if (usingCsrm) {\n rowModel.forEachPivotNode(processRow);\n }\n else {\n // must be enterprise, so we can just loop through all the nodes\n rowModel.forEachNode(processRow);\n }\n }\n else {\n // onlySelectedAllPages: user doing pagination and wants selected items from\n // other pages, so cannot use the standard row model as it won't have rows from\n // other pages.\n // onlySelectedNonStandardModel: if user wants selected in non standard row model\n // (eg viewport) then again RowModel cannot be used, so need to use selected instead.\n if (params.onlySelectedAllPages || onlySelectedNonStandardModel) {\n var selectedNodes = _this.selectionService.getSelectedNodes();\n selectedNodes.forEach(processRow);\n }\n else {\n // here is everything else - including standard row model and selected. we don't use\n // the selection model even when just using selected, so that the result is the order\n // of the rows appearing on the screen.\n if (usingCsrm) {\n rowModel.forEachNodeAfterFilterAndSort(processRow);\n }\n else if (usingSsrm) {\n rowModel.forEachNodeAfterFilterAndSort(processRow);\n }\n else {\n rowModel.forEachNode(processRow);\n }\n }\n }\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.processPinnedBottomRows = function (params, columnsToExport) {\n var _this = this;\n return function (gridSerializingSession) {\n var processRow = _this.processRow.bind(_this, gridSerializingSession, params, columnsToExport);\n _this.pinnedRowModel.forEachPinnedBottomRow(processRow);\n return gridSerializingSession;\n };\n };\n GridSerializer.prototype.getColumnsToExport = function (allColumns, columnKeys) {\n if (allColumns === void 0) { allColumns = false; }\n var isPivotMode = this.columnModel.isPivotMode();\n if (columnKeys && columnKeys.length) {\n return this.columnModel.getGridColumns(columnKeys);\n }\n if (allColumns && !isPivotMode) {\n // add auto group column for tree data\n var columns = this.gridOptionsWrapper.isTreeData()\n ? this.columnModel.getGridColumns([Constants.GROUP_AUTO_COLUMN_ID])\n : [];\n return columns.concat(this.columnModel.getAllPrimaryColumns() || []);\n }\n return this.columnModel.getAllDisplayedColumns();\n };\n GridSerializer.prototype.recursivelyAddHeaderGroups = function (displayedGroups, gridSerializingSession, processGroupHeaderCallback) {\n var directChildrenHeaderGroups = [];\n displayedGroups.forEach(function (columnGroupChild) {\n var columnGroup = columnGroupChild;\n if (!columnGroup.getChildren) {\n return;\n }\n columnGroup.getChildren().forEach(function (it) { return directChildrenHeaderGroups.push(it); });\n });\n if (displayedGroups.length > 0 && displayedGroups[0] instanceof ColumnGroup) {\n this.doAddHeaderHeader(gridSerializingSession, displayedGroups, processGroupHeaderCallback);\n }\n if (directChildrenHeaderGroups && directChildrenHeaderGroups.length > 0) {\n this.recursivelyAddHeaderGroups(directChildrenHeaderGroups, gridSerializingSession, processGroupHeaderCallback);\n }\n };\n GridSerializer.prototype.doAddHeaderHeader = function (gridSerializingSession, displayedGroups, processGroupHeaderCallback) {\n var _this = this;\n var gridRowIterator = gridSerializingSession.onNewHeaderGroupingRow();\n var columnIndex = 0;\n displayedGroups.forEach(function (columnGroupChild) {\n var columnGroup = columnGroupChild;\n var name;\n if (processGroupHeaderCallback) {\n name = processGroupHeaderCallback({\n columnGroup: columnGroup,\n api: _this.gridOptionsWrapper.getApi(),\n columnApi: _this.gridOptionsWrapper.getColumnApi(),\n context: _this.gridOptionsWrapper.getContext()\n });\n }\n else {\n name = _this.columnModel.getDisplayNameForColumnGroup(columnGroup, 'header');\n }\n var collapsibleGroupRanges = columnGroup.getLeafColumns().reduce(function (collapsibleGroups, currentColumn, currentIdx, arr) {\n var lastGroup = _.last(collapsibleGroups);\n var groupShow = currentColumn.getColumnGroupShow() === 'open';\n if (!groupShow) {\n if (lastGroup && lastGroup[1] == null) {\n lastGroup[1] = currentIdx - 1;\n }\n }\n else if (!lastGroup || lastGroup[1] != null) {\n lastGroup = [currentIdx];\n collapsibleGroups.push(lastGroup);\n }\n if (currentIdx === arr.length - 1 && lastGroup && lastGroup[1] == null) {\n lastGroup[1] = currentIdx;\n }\n return collapsibleGroups;\n }, []);\n gridRowIterator.onColumn(name || '', columnIndex++, columnGroup.getLeafColumns().length - 1, collapsibleGroupRanges);\n });\n };\n __decorate$2y([\n Autowired('displayedGroupCreator')\n ], GridSerializer.prototype, \"displayedGroupCreator\", void 0);\n __decorate$2y([\n Autowired('columnModel')\n ], GridSerializer.prototype, \"columnModel\", void 0);\n __decorate$2y([\n Autowired('rowModel')\n ], GridSerializer.prototype, \"rowModel\", void 0);\n __decorate$2y([\n Autowired('pinnedRowModel')\n ], GridSerializer.prototype, \"pinnedRowModel\", void 0);\n __decorate$2y([\n Autowired('selectionService')\n ], GridSerializer.prototype, \"selectionService\", void 0);\n __decorate$2y([\n Autowired('rowPositionUtils')\n ], GridSerializer.prototype, \"rowPositionUtils\", void 0);\n GridSerializer = __decorate$2y([\n Bean(\"gridSerializer\")\n ], GridSerializer);\n return GridSerializer;\n}(BeanStub));\n\nvar CsvExportModule = {\n moduleName: exports.ModuleNames.CsvExportModule,\n beans: [CsvCreator, GridSerializer]\n};\n\nvar LINE_SEPARATOR$1 = '\\r\\n';\nvar XmlFactory = /** @class */ (function () {\n function XmlFactory() {\n }\n XmlFactory.createHeader = function (headerElement) {\n if (headerElement === void 0) { headerElement = {}; }\n var headerStart = '';\n var keys = ['version'];\n if (!headerElement.version) {\n headerElement.version = \"1.0\";\n }\n if (headerElement.encoding) {\n keys.push('encoding');\n }\n if (headerElement.standalone) {\n keys.push('standalone');\n }\n var att = keys.map(function (key) { return key + \"=\\\"\" + headerElement[key] + \"\\\"\"; }).join(' ');\n return headerStart + \"xml \" + att + \" \" + headerEnd;\n };\n XmlFactory.createXml = function (xmlElement, booleanTransformer) {\n var _this = this;\n var props = '';\n if (xmlElement.properties) {\n if (xmlElement.properties.prefixedAttributes) {\n xmlElement.properties.prefixedAttributes.forEach(function (prefixedSet) {\n Object.keys(prefixedSet.map).forEach(function (key) {\n props += _this.returnAttributeIfPopulated(prefixedSet.prefix + key, prefixedSet.map[key], booleanTransformer);\n });\n });\n }\n if (xmlElement.properties.rawMap) {\n Object.keys(xmlElement.properties.rawMap).forEach(function (key) {\n props += _this.returnAttributeIfPopulated(key, xmlElement.properties.rawMap[key], booleanTransformer);\n });\n }\n }\n var result = '<' + xmlElement.name + props;\n if (!xmlElement.children && xmlElement.textNode == null) {\n return result + '/>' + LINE_SEPARATOR$1;\n }\n if (xmlElement.textNode != null) {\n return result + '>' + xmlElement.textNode + '' + LINE_SEPARATOR$1;\n }\n result += '>' + LINE_SEPARATOR$1;\n if (xmlElement.children) {\n xmlElement.children.forEach(function (it) {\n result += _this.createXml(it, booleanTransformer);\n });\n }\n return result + '' + LINE_SEPARATOR$1;\n };\n XmlFactory.returnAttributeIfPopulated = function (key, value, booleanTransformer) {\n if (!value && value !== '' && value !== 0) {\n return '';\n }\n var xmlValue = value;\n if ((typeof (value) === 'boolean')) {\n if (booleanTransformer) {\n xmlValue = booleanTransformer(value);\n }\n }\n return \" \" + key + \"=\\\"\" + xmlValue + \"\\\"\";\n };\n return XmlFactory;\n}());\n\nvar __values$3 = (undefined && undefined.__values) || function(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// table for crc calculation\n// from: https://referencesource.microsoft.com/#System/sys/System/IO/compression/Crc32Helper.cs,3b31978c7d7f7246,references\nvar crcTable = new Uint32Array([\n 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,\n 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,\n 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,\n 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,\n 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,\n 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,\n 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,\n 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,\n 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,\n 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,\n 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,\n 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,\n 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,\n 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,\n 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,\n 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,\n 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,\n 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,\n 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,\n 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,\n 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,\n 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,\n 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,\n 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,\n 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,\n 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,\n 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,\n 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,\n 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,\n 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,\n 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,\n 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,\n 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,\n 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,\n 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,\n 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,\n 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,\n 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,\n 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,\n 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,\n 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,\n 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,\n 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d\n]);\nvar ZipContainer = /** @class */ (function () {\n function ZipContainer() {\n }\n ZipContainer.addFolders = function (paths) {\n paths.forEach(this.addFolder.bind(this));\n };\n ZipContainer.addFolder = function (path) {\n this.folders.push({\n path: path,\n created: new Date(),\n isBase64: false\n });\n };\n ZipContainer.addFile = function (path, content, isBase64) {\n if (isBase64 === void 0) { isBase64 = false; }\n this.files.push({\n path: path,\n created: new Date(),\n content: content,\n isBase64: isBase64\n });\n };\n ZipContainer.getContent = function (mimeType) {\n if (mimeType === void 0) { mimeType = 'application/zip'; }\n var textOutput = this.buildFileStream();\n var uInt8Output = this.buildUint8Array(textOutput);\n this.clearStream();\n return new Blob([uInt8Output], { type: mimeType });\n };\n ZipContainer.clearStream = function () {\n this.folders = [];\n this.files = [];\n };\n ZipContainer.buildFileStream = function (fData) {\n var e_1, _a;\n if (fData === void 0) { fData = ''; }\n var totalFiles = this.folders.concat(this.files);\n var len = totalFiles.length;\n var foData = '';\n var lL = 0;\n var cL = 0;\n try {\n for (var totalFiles_1 = __values$3(totalFiles), totalFiles_1_1 = totalFiles_1.next(); !totalFiles_1_1.done; totalFiles_1_1 = totalFiles_1.next()) {\n var currentFile = totalFiles_1_1.value;\n var _b = this.getHeader(currentFile, lL), fileHeader = _b.fileHeader, folderHeader = _b.folderHeader, content = _b.content;\n lL += fileHeader.length + content.length;\n cL += folderHeader.length;\n fData += fileHeader + content;\n foData += folderHeader;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (totalFiles_1_1 && !totalFiles_1_1.done && (_a = totalFiles_1.return)) _a.call(totalFiles_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var foEnd = this.buildFolderEnd(len, cL, lL);\n return fData + foData + foEnd;\n };\n ZipContainer.getHeader = function (currentFile, offset) {\n var content = currentFile.content, path = currentFile.path, created = currentFile.created, isBase64 = currentFile.isBase64;\n var utf8_encode = _.utf8_encode, decToHex = _.decToHex;\n var utfPath = utf8_encode(path);\n var isUTF8 = utfPath !== path;\n var time = this.convertTime(created);\n var dt = this.convertDate(created);\n var extraFields = '';\n if (isUTF8) {\n var uExtraFieldPath = decToHex(1, 1) + decToHex(this.getFromCrc32Table(utfPath), 4) + utfPath;\n extraFields = \"\\x75\\x70\" + decToHex(uExtraFieldPath.length, 2) + uExtraFieldPath;\n }\n var _a = !content ? { size: 0, content: '' } : this.getConvertedContent(content, isBase64), size = _a.size, convertedContent = _a.content;\n var header = '\\x0A\\x00' +\n (isUTF8 ? '\\x00\\x08' : '\\x00\\x00') +\n '\\x00\\x00' +\n decToHex(time, 2) + // last modified time\n decToHex(dt, 2) + // last modified date\n decToHex(size ? this.getFromCrc32Table(convertedContent) : 0, 4) +\n decToHex(size, 4) + // compressed size\n decToHex(size, 4) + // uncompressed size\n decToHex(utfPath.length, 2) + // file name length\n decToHex(extraFields.length, 2); // extra field length\n var fileHeader = 'PK\\x03\\x04' + header + utfPath + extraFields;\n var folderHeader = 'PK\\x01\\x02' + // central header\n '\\x14\\x00' +\n header + // file header\n '\\x00\\x00' +\n '\\x00\\x00' +\n '\\x00\\x00' +\n (content ? '\\x00\\x00\\x00\\x00' : '\\x10\\x00\\x00\\x00') + // external file attributes\n decToHex(offset, 4) + // relative offset of local header\n utfPath + // file name\n extraFields; // extra field\n return { fileHeader: fileHeader, folderHeader: folderHeader, content: convertedContent || '' };\n };\n ZipContainer.getConvertedContent = function (content, isBase64) {\n if (isBase64 === void 0) { isBase64 = false; }\n if (isBase64) {\n content = content.split(';base64,')[1];\n }\n content = isBase64 ? atob(content) : content;\n return {\n size: content.length,\n content: content\n };\n };\n ZipContainer.buildFolderEnd = function (tLen, cLen, lLen) {\n var decToHex = _.decToHex;\n return 'PK\\x05\\x06' + // central folder end\n '\\x00\\x00' +\n '\\x00\\x00' +\n decToHex(tLen, 2) + // total number of entries in the central folder\n decToHex(tLen, 2) + // total number of entries in the central folder\n decToHex(cLen, 4) + // size of the central folder\n decToHex(lLen, 4) + // central folder start offset\n '\\x00\\x00';\n };\n ZipContainer.buildUint8Array = function (content) {\n var uint8 = new Uint8Array(content.length);\n for (var i = 0; i < uint8.length; i++) {\n uint8[i] = content.charCodeAt(i);\n }\n return uint8;\n };\n ZipContainer.getFromCrc32Table = function (content) {\n if (!content.length) {\n return 0;\n }\n var size = content.length;\n var iterable = new Uint8Array(size);\n for (var i = 0; i < size; i++) {\n iterable[i] = content.charCodeAt(i);\n }\n var crc = 0 ^ (-1);\n var j = 0;\n var k = 0;\n var l = 0;\n for (var i = 0; i < size; i++) {\n j = iterable[i];\n k = (crc ^ j) & 0xFF;\n l = crcTable[k];\n crc = (crc >>> 8) ^ l;\n }\n return crc ^ (-1);\n };\n ZipContainer.convertTime = function (date) {\n var time = date.getHours();\n time <<= 6;\n time = time | date.getMinutes();\n time <<= 5;\n time = time | date.getSeconds() / 2;\n return time;\n };\n ZipContainer.convertDate = function (date) {\n var dt = date.getFullYear() - 1980;\n dt <<= 4;\n dt = dt | (date.getMonth() + 1);\n dt <<= 5;\n dt = dt | date.getDate();\n return dt;\n };\n ZipContainer.folders = [];\n ZipContainer.files = [];\n return ZipContainer;\n}());\n\nModuleRegistry.register(ClientSideRowModelModule, false);\r\nModuleRegistry.register(InfiniteRowModelModule, false);\r\nModuleRegistry.register(CsvExportModule, false);\n\nexports.AbstractHeaderCellCtrl = AbstractHeaderCellCtrl;\nexports.AgAbstractField = AgAbstractField;\nexports.AgAngleSelect = AgAngleSelect;\nexports.AgCheckbox = AgCheckbox;\nexports.AgColorPicker = AgColorPicker;\nexports.AgDialog = AgDialog;\nexports.AgGroupComponent = AgGroupComponent;\nexports.AgInputNumberField = AgInputNumberField;\nexports.AgInputRange = AgInputRange;\nexports.AgInputTextArea = AgInputTextArea;\nexports.AgInputTextField = AgInputTextField;\nexports.AgMenuItemComponent = AgMenuItemComponent;\nexports.AgMenuList = AgMenuList;\nexports.AgMenuPanel = AgMenuPanel;\nexports.AgPanel = AgPanel;\nexports.AgPromise = AgPromise;\nexports.AgRadioButton = AgRadioButton;\nexports.AgSelect = AgSelect;\nexports.AgSlider = AgSlider;\nexports.AgStackComponentsRegistry = AgStackComponentsRegistry;\nexports.AgToggleButton = AgToggleButton;\nexports.AlignedGridsService = AlignedGridsService;\nexports.AnimateShowChangeCellRenderer = AnimateShowChangeCellRenderer;\nexports.AnimateSlideCellRenderer = AnimateSlideCellRenderer;\nexports.AnimationFrameService = AnimationFrameService;\nexports.AutoScrollService = AutoScrollService;\nexports.AutoWidthCalculator = AutoWidthCalculator;\nexports.Autowired = Autowired;\nexports.BaseComponentWrapper = BaseComponentWrapper;\nexports.BaseCreator = BaseCreator;\nexports.BaseGridSerializingSession = BaseGridSerializingSession;\nexports.Bean = Bean;\nexports.BeanStub = BeanStub;\nexports.Beans = Beans;\nexports.BodyDropPivotTarget = BodyDropPivotTarget;\nexports.BodyDropTarget = BodyDropTarget;\nexports.CellComp = CellComp;\nexports.CellCtrl = CellCtrl;\nexports.CellNavigationService = CellNavigationService;\nexports.CellPositionUtils = CellPositionUtils;\nexports.ChangedPath = ChangedPath;\nexports.CheckboxSelectionComponent = CheckboxSelectionComponent;\nexports.ColDefUtil = ColDefUtil;\nexports.Color = Color;\nexports.Column = Column;\nexports.ColumnApi = ColumnApi;\nexports.ColumnFactory = ColumnFactory;\nexports.ColumnGroup = ColumnGroup;\nexports.ColumnKeyCreator = ColumnKeyCreator;\nexports.ColumnModel = ColumnModel;\nexports.ColumnUtils = ColumnUtils;\nexports.Component = Component;\nexports.ComponentUtil = ComponentUtil;\nexports.Constants = Constants;\nexports.Context = Context;\nexports.CssClassApplier = CssClassApplier;\nexports.CssClassManager = CssClassManager;\nexports.CsvCreator = CsvCreator;\nexports.CsvExportModule = CsvExportModule;\nexports.CtrlsService = CtrlsService;\nexports.CustomTooltipFeature = CustomTooltipFeature;\nexports.DateFilter = DateFilter;\nexports.DisplayedGroupCreator = DisplayedGroupCreator;\nexports.Downloader = Downloader;\nexports.DragAndDropService = DragAndDropService;\nexports.DragService = DragService;\nexports.Environment = Environment;\nexports.EventService = EventService;\nexports.Events = Events;\nexports.ExpressionService = ExpressionService;\nexports.FilterManager = FilterManager;\nexports.FloatingFilterMapper = FloatingFilterMapper;\nexports.FocusService = FocusService;\nexports.Grid = Grid;\nexports.GridApi = GridApi;\nexports.GridBodyComp = GridBodyComp;\nexports.GridBodyCtrl = GridBodyCtrl;\nexports.GridComp = GridComp;\nexports.GridCoreCreator = GridCoreCreator;\nexports.GridCtrl = GridCtrl;\nexports.GridHeaderComp = GridHeaderComp;\nexports.GridHeaderCtrl = GridHeaderCtrl;\nexports.GridOptionsWrapper = GridOptionsWrapper;\nexports.GridSerializer = GridSerializer;\nexports.GroupCellRenderer = GroupCellRenderer;\nexports.GroupCellRendererCtrl = GroupCellRendererCtrl;\nexports.GroupInstanceIdCreator = GroupInstanceIdCreator;\nexports.HeaderCellCtrl = HeaderCellCtrl;\nexports.HeaderFilterCellComp = HeaderFilterCellComp;\nexports.HeaderFilterCellCtrl = HeaderFilterCellCtrl;\nexports.HeaderGroupCellCtrl = HeaderGroupCellCtrl;\nexports.HeaderNavigationService = HeaderNavigationService;\nexports.HeaderPositionUtils = HeaderPositionUtils;\nexports.HeaderRowComp = HeaderRowComp;\nexports.HeaderRowContainerComp = HeaderRowContainerComp;\nexports.HeaderRowContainerCtrl = HeaderRowContainerCtrl;\nexports.HeaderRowCtrl = HeaderRowCtrl;\nexports.HorizontalResizeService = HorizontalResizeService;\nexports.KeyCode = KeyCode;\nexports.LargeTextCellEditor = LargeTextCellEditor;\nexports.Logger = Logger;\nexports.LoggerFactory = LoggerFactory;\nexports.ManagedFocusFeature = ManagedFocusFeature;\nexports.ModuleRegistry = ModuleRegistry;\nexports.MouseEventService = MouseEventService;\nexports.MoveColumnFeature = MoveColumnFeature;\nexports.NavigationService = NavigationService;\nexports.NumberFilter = NumberFilter;\nexports.NumberSequence = NumberSequence;\nexports.Optional = Optional;\nexports.PaginationProxy = PaginationProxy;\nexports.PinnedRowModel = PinnedRowModel;\nexports.PopupComponent = PopupComponent;\nexports.PopupEditorWrapper = PopupEditorWrapper;\nexports.PopupSelectCellEditor = PopupSelectCellEditor;\nexports.PopupService = PopupService;\nexports.PopupTextCellEditor = PopupTextCellEditor;\nexports.PositionableFeature = PositionableFeature;\nexports.PostConstruct = PostConstruct;\nexports.PreConstruct = PreConstruct;\nexports.PreDestroy = PreDestroy;\nexports.PropertyKeys = PropertyKeys;\nexports.ProvidedColumnGroup = ProvidedColumnGroup;\nexports.ProvidedFilter = ProvidedFilter;\nexports.Qualifier = Qualifier;\nexports.QuerySelector = QuerySelector;\nexports.RefSelector = RefSelector;\nexports.ResizeObserverService = ResizeObserverService;\nexports.RowContainerComp = RowContainerComp;\nexports.RowContainerCtrl = RowContainerCtrl;\nexports.RowCtrl = RowCtrl;\nexports.RowNode = RowNode;\nexports.RowNodeBlock = RowNodeBlock;\nexports.RowNodeBlockLoader = RowNodeBlockLoader;\nexports.RowNodeSorter = RowNodeSorter;\nexports.RowPositionUtils = RowPositionUtils;\nexports.RowRenderer = RowRenderer;\nexports.ScalarFilter = ScalarFilter;\nexports.ScrollVisibleService = ScrollVisibleService;\nexports.SelectCellEditor = SelectCellEditor;\nexports.SelectableService = SelectableService;\nexports.SelectionService = SelectionService;\nexports.SetLeftFeature = SetLeftFeature;\nexports.SimpleFilter = SimpleFilter;\nexports.SortController = SortController;\nexports.StandardMenuFactory = StandardMenuFactory;\nexports.StylingService = StylingService;\nexports.TabGuardComp = TabGuardComp;\nexports.TabGuardCtrl = TabGuardCtrl;\nexports.TabbedLayout = TabbedLayout;\nexports.TemplateService = TemplateService;\nexports.TextCellEditor = TextCellEditor;\nexports.TextFilter = TextFilter;\nexports.TextFloatingFilter = TextFloatingFilter;\nexports.Timer = Timer;\nexports.TouchListener = TouchListener;\nexports.UserComponentFactory = UserComponentFactory;\nexports.UserComponentRegistry = UserComponentRegistry;\nexports.ValueCache = ValueCache;\nexports.ValueFormatterService = ValueFormatterService;\nexports.ValueService = ValueService;\nexports.VanillaFrameworkOverrides = VanillaFrameworkOverrides;\nexports.VirtualList = VirtualList;\nexports.XmlFactory = XmlFactory;\nexports.ZipContainer = ZipContainer;\nexports._ = _;\nexports.defaultGroupComparator = defaultGroupComparator;\nexports.getRowContainerTypeForName = getRowContainerTypeForName;\nexports.simpleHttpRequest = simpleHttpRequest;\nexports.stringToArray = stringToArray;\n","import { Component, ElementRef, Input, Renderer2 } from '@angular/core';\r\nimport * as ɵngcc0 from '@angular/core';\nvar AngularBillboardComponent = (function () {\r\n function AngularBillboardComponent(renderer, elementRef) {\r\n this.renderer = renderer;\r\n this.elementRef = elementRef;\r\n this.el = elementRef.nativeElement;\r\n }\r\n AngularBillboardComponent.prototype.ngOnInit = function () {\r\n this.renderer.appendChild(this.el, this.chart.element);\r\n };\nAngularBillboardComponent.ɵfac = function AngularBillboardComponent_Factory(t) { return new (t || AngularBillboardComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nAngularBillboardComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: AngularBillboardComponent, selectors: [[\"angular-billboard\"]], inputs: { chart: \"chart\" }, decls: 0, vars: 0, template: function AngularBillboardComponent_Template(rf, ctx) { }, encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AngularBillboardComponent, [{\n type: Component,\n args: [{\n selector: 'angular-billboard',\n template: ''\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }]; }, { chart: [{\n type: Input\n }] }); })();\r\n return AngularBillboardComponent;\r\n}());\r\nexport { AngularBillboardComponent };\r\n/** @nocollapse */\r\nAngularBillboardComponent.ctorParameters = function () { return [\r\n { type: Renderer2, },\r\n { type: ElementRef, },\r\n]; };\r\nAngularBillboardComponent.propDecorators = {\r\n 'chart': [{ type: Input },],\r\n};\r\n\n","import { Injectable } from '@angular/core';\r\nimport * as ɵngcc0 from '@angular/core';\nvar bb = require('billboard.js').bb; // import a module with no types\r\nvar AngularBillboardService = (function () {\r\n function AngularBillboardService() {\r\n }\r\n AngularBillboardService.prototype.generate = function () {\r\n var data = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n data[_i] = arguments[_i];\r\n }\r\n return data.map(function (options) { return bb.generate(options); });\r\n };\nAngularBillboardService.ɵfac = function AngularBillboardService_Factory(t) { return new (t || AngularBillboardService)(); };\nAngularBillboardService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: AngularBillboardService, factory: function (t) { return AngularBillboardService.ɵfac(t); } });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AngularBillboardService, [{\n type: Injectable\n }], function () { return []; }, null); })();\r\n return AngularBillboardService;\r\n}());\r\nexport { AngularBillboardService };\r\n/** @nocollapse */\r\nAngularBillboardService.ctorParameters = function () { return []; };\r\n\n","import { NgModule } from '@angular/core';\r\nimport { AngularBillboardComponent } from './angular-billboard.component';\r\nimport { AngularBillboardService } from './angular-billboard.service';\r\nimport * as ɵngcc0 from '@angular/core';\nvar AngularBillboardModule = (function () {\r\n function AngularBillboardModule() {\r\n }\nAngularBillboardModule.ɵfac = function AngularBillboardModule_Factory(t) { return new (t || AngularBillboardModule)(); };\nAngularBillboardModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: AngularBillboardModule });\nAngularBillboardModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [AngularBillboardService] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AngularBillboardModule, [{\n type: NgModule,\n args: [{\n declarations: [AngularBillboardComponent],\n providers: [AngularBillboardService],\n exports: [AngularBillboardComponent]\n }]\n }], function () { return []; }, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(AngularBillboardModule, { declarations: function () { return [AngularBillboardComponent]; }, exports: function () { return [AngularBillboardComponent]; } }); })();\r\n return AngularBillboardModule;\r\n}());\r\nexport { AngularBillboardModule };\r\n/** @nocollapse */\r\nAngularBillboardModule.ctorParameters = function () { return []; };\r\n\n","/*!\n * Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 1.12.12\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"d3-time-format\"), require(\"d3-selection\"), require(\"d3-transition\"), require(\"d3-axis\"), require(\"d3-scale\"), require(\"d3-brush\"), require(\"d3-dsv\"), require(\"d3-drag\"), require(\"d3-shape\"), require(\"d3-interpolate\"), require(\"d3-zoom\"), require(\"d3-ease\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3-time-format\", \"d3-selection\", \"d3-transition\", \"d3-axis\", \"d3-scale\", \"d3-brush\", \"d3-dsv\", \"d3-drag\", \"d3-shape\", \"d3-interpolate\", \"d3-zoom\", \"d3-ease\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"d3-time-format\"), require(\"d3-selection\"), require(\"d3-transition\"), require(\"d3-axis\"), require(\"d3-scale\"), require(\"d3-brush\"), require(\"d3-dsv\"), require(\"d3-drag\"), require(\"d3-shape\"), require(\"d3-interpolate\"), require(\"d3-zoom\"), require(\"d3-ease\")) : factory(root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function(__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__8__, __WEBPACK_EXTERNAL_MODULE__9__, __WEBPACK_EXTERNAL_MODULE__10__, __WEBPACK_EXTERNAL_MODULE__11__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__13__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(1);\nmodule.exports = __webpack_require__(14);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// extracted by mini-css-extract-plugin\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__2__;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__3__;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__4__;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__5__;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__6__;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__7__;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__8__;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__9__;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__10__;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__11__;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__12__;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__13__;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, \"bb\", function() { return /* binding */ bb; });\n\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\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}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js\nfunction _nonIterableRest() {\n 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}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\n\n\n\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js\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, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-time-format\",\"commonjs2\":\"d3-time-format\",\"amd\":\"d3-time-format\",\"root\":\"d3\"}\nvar external_commonjs_d3_time_format_commonjs2_d3_time_format_amd_d3_time_format_root_d3_ = __webpack_require__(2);\n\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-selection\",\"commonjs2\":\"d3-selection\",\"amd\":\"d3-selection\",\"root\":\"d3\"}\nvar external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(3);\n\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-transition\",\"commonjs2\":\"d3-transition\",\"amd\":\"d3-transition\",\"root\":\"d3\"}\nvar external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_root_d3_ = __webpack_require__(4);\n\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-axis\",\"commonjs2\":\"d3-axis\",\"amd\":\"d3-axis\",\"root\":\"d3\"}\nvar external_commonjs_d3_axis_commonjs2_d3_axis_amd_d3_axis_root_d3_ = __webpack_require__(5);\n\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-scale\",\"commonjs2\":\"d3-scale\",\"amd\":\"d3-scale\",\"root\":\"d3\"}\nvar external_commonjs_d3_scale_commonjs2_d3_scale_amd_d3_scale_root_d3_ = __webpack_require__(6);\n\n// CONCATENATED MODULE: ./src/config/classes.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n/**\n * CSS class names definition\n * @private\n */\n/* harmony default export */ var config_classes = ({\n arc: \"bb-arc\",\n arcLabelLine: \"bb-arc-label-line\",\n arcs: \"bb-arcs\",\n area: \"bb-area\",\n areas: \"bb-areas\",\n axis: \"bb-axis\",\n axisX: \"bb-axis-x\",\n axisXLabel: \"bb-axis-x-label\",\n axisY: \"bb-axis-y\",\n axisY2: \"bb-axis-y2\",\n axisY2Label: \"bb-axis-y2-label\",\n axisYLabel: \"bb-axis-y-label\",\n bar: \"bb-bar\",\n bars: \"bb-bars\",\n brush: \"bb-brush\",\n button: \"bb-button\",\n buttonZoomReset: \"bb-zoom-reset\",\n chart: \"bb-chart\",\n chartArc: \"bb-chart-arc\",\n chartArcs: \"bb-chart-arcs\",\n chartArcsBackground: \"bb-chart-arcs-background\",\n chartArcsGaugeMax: \"bb-chart-arcs-gauge-max\",\n chartArcsGaugeMin: \"bb-chart-arcs-gauge-min\",\n chartArcsGaugeUnit: \"bb-chart-arcs-gauge-unit\",\n chartArcsTitle: \"bb-chart-arcs-title\",\n chartArcsGaugeTitle: \"bb-chart-arcs-gauge-title\",\n chartBar: \"bb-chart-bar\",\n chartBars: \"bb-chart-bars\",\n chartLine: \"bb-chart-line\",\n chartLines: \"bb-chart-lines\",\n chartRadar: \"bb-chart-radar\",\n chartRadars: \"bb-chart-radars\",\n chartText: \"bb-chart-text\",\n chartTexts: \"bb-chart-texts\",\n circle: \"bb-circle\",\n circles: \"bb-circles\",\n colorPattern: \"bb-color-pattern\",\n colorScale: \"bb-colorscale\",\n defocused: \"bb-defocused\",\n dragarea: \"bb-dragarea\",\n empty: \"bb-empty\",\n eventRect: \"bb-event-rect\",\n eventRects: \"bb-event-rects\",\n eventRectsMultiple: \"bb-event-rects-multiple\",\n eventRectsSingle: \"bb-event-rects-single\",\n focused: \"bb-focused\",\n gaugeValue: \"bb-gauge-value\",\n grid: \"bb-grid\",\n gridLines: \"bb-grid-lines\",\n legendBackground: \"bb-legend-background\",\n legendItem: \"bb-legend-item\",\n legendItemEvent: \"bb-legend-item-event\",\n legendItemFocused: \"bb-legend-item-focused\",\n legendItemHidden: \"bb-legend-item-hidden\",\n legendItemPoint: \"bb-legend-item-point\",\n legendItemTile: \"bb-legend-item-tile\",\n level: \"bb-level\",\n levels: \"bb-levels\",\n line: \"bb-line\",\n lines: \"bb-lines\",\n region: \"bb-region\",\n regions: \"bb-regions\",\n selectedCircle: \"bb-selected-circle\",\n selectedCircles: \"bb-selected-circles\",\n shape: \"bb-shape\",\n shapes: \"bb-shapes\",\n stanfordElements: \"bb-stanford-elements\",\n stanfordLine: \"bb-stanford-line\",\n stanfordLines: \"bb-stanford-lines\",\n stanfordRegion: \"bb-stanford-region\",\n stanfordRegions: \"bb-stanford-regions\",\n target: \"bb-target\",\n text: \"bb-text\",\n texts: \"bb-texts\",\n title: \"bb-title\",\n tooltip: \"bb-tooltip\",\n tooltipContainer: \"bb-tooltip-container\",\n tooltipName: \"bb-tooltip-name\",\n xgrid: \"bb-xgrid\",\n xgridFocus: \"bb-xgrid-focus\",\n xgridLine: \"bb-xgrid-line\",\n xgridLines: \"bb-xgrid-lines\",\n xgrids: \"bb-xgrids\",\n ygrid: \"bb-ygrid\",\n ygridFocus: \"bb-ygrid-focus\",\n ygridLine: \"bb-ygrid-line\",\n ygridLines: \"bb-ygrid-lines\",\n ygrids: \"bb-ygrids\",\n zoomBrush: \"bb-zoom-brush\",\n zoomRect: \"bb-zoom-rect\",\n EXPANDED: \"_expanded_\",\n SELECTED: \"_selected_\",\n INCLUDED: \"_included_\",\n TextOverlapping: \"text-overlapping\"\n});\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js\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}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\n\n\n\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-brush\",\"commonjs2\":\"d3-brush\",\"amd\":\"d3-brush\",\"root\":\"d3\"}\nvar external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_ = __webpack_require__(7);\n\n// CONCATENATED MODULE: ./src/internals/browser.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n/**\n * Window object\n * @module\n * @ignore\n */\n\n/* eslint-disable no-new-func, no-undef */\nvar win = function () {\n var def = function (o) {\n return typeof o !== \"undefined\" && o;\n };\n\n return def(self) || def(window) || def(global) || def(globalThis) || Function(\"return this\")();\n}(),\n browser_doc = win && win.document;\n/* eslint-enable no-new-func, no-undef */\n\n\n\n// CONCATENATED MODULE: ./src/internals/util.js\n\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n * @ignore\n */\n\n\n\n\n\nvar isValue = function (v) {\n return v || v === 0;\n},\n isFunction = function (v) {\n return typeof v === \"function\";\n},\n isString = function (v) {\n return typeof v === \"string\";\n},\n isNumber = function (v) {\n return typeof v === \"number\";\n},\n isUndefined = function (v) {\n return typeof v === \"undefined\";\n},\n isDefined = function (v) {\n return typeof v !== \"undefined\";\n},\n isBoolean = function (v) {\n return typeof v === \"boolean\";\n},\n ceil10 = function (v) {\n return Math.ceil(v / 10) * 10;\n},\n asHalfPixel = function (n) {\n return Math.ceil(n) + .5;\n},\n diffDomain = function (d) {\n return d[1] - d[0];\n},\n isObjectType = function (v) {\n return _typeof(v) === \"object\";\n},\n isEmpty = function (o) {\n return isUndefined(o) || o === null || isString(o) && o.length === 0 || isObjectType(o) && !(o instanceof Date) && Object.keys(o).length === 0 || isNumber(o) && isNaN(o);\n},\n notEmpty = function (o) {\n return !isEmpty(o);\n},\n isArray = function (arr) {\n return arr && arr.constructor === Array;\n},\n isObject = function (obj) {\n return obj && !obj.nodeType && isObjectType(obj) && !isArray(obj);\n},\n getOption = function (options, key, defaultValue) {\n return isDefined(options[key]) ? options[key] : defaultValue;\n},\n util_hasValue = function (dict, value) {\n var found = !1;\n return Object.keys(dict).forEach(function (key) {\n return dict[key] === value && (found = !0);\n }), found;\n},\n callFn = function (fn) {\n for (var isFn = isFunction(fn), _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];\n\n return isFn && fn.call.apply(fn, args), isFn;\n},\n sanitise = function (str) {\n return isString(str) ? str.replace(//g, \">\") : str;\n},\n setTextValue = function (node, text) {\n var dy = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [-1, 1],\n toMiddle = !!(arguments.length > 3 && arguments[3] !== undefined) && arguments[3];\n if (node && isString(text)) if (text.indexOf(\"\\n\") === -1) node.text(text);else {\n var diff = [node.text(), text].map(function (v) {\n return v.replace(/[\\s\\n]/g, \"\");\n });\n\n if (diff[0] !== diff[1]) {\n var multiline = text.split(\"\\n\"),\n len = toMiddle ? multiline.length - 1 : 1;\n node.html(\"\"), multiline.forEach(function (v, i) {\n node.append(\"tspan\").attr(\"x\", 0).attr(\"dy\", \"\".concat(i === 0 ? dy[0] * len : dy[1], \"em\")).text(v);\n });\n }\n }\n},\n getRectSegList = function (path) {\n /*\n * seg1 ---------- seg2\n * | |\n * | |\n * | |\n * seg0 ---------- seg3\n * */\n var _path$getBBox = path.getBBox(),\n x = _path$getBBox.x,\n y = _path$getBBox.y,\n width = _path$getBBox.width,\n height = _path$getBBox.height;\n\n return [{\n x: x,\n y: y + height\n }, // seg0\n {\n x: x,\n y: y\n }, // seg1\n {\n x: x + width,\n y: y\n }, // seg2\n {\n x: x + width,\n y: y + height\n } // seg3\n ];\n},\n getPathBox = function (path) {\n var _path$getBoundingClie = path.getBoundingClientRect(),\n width = _path$getBoundingClie.width,\n height = _path$getBoundingClie.height,\n items = getRectSegList(path),\n x = items[0].x,\n y = Math.min(items[0].y, items[1].y);\n\n return {\n x: x,\n y: y,\n width: width,\n height: height\n };\n},\n getBrushSelection = function (ctx) {\n var selection = null,\n event = external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"],\n main = ctx.context || ctx.main;\n return event && event.constructor.name === \"BrushEvent\" ? selection = event.selection : main && (selection = main.select(\".\".concat(config_classes.brush)).node()) && (selection = Object(external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_[\"brushSelection\"])(selection)), selection;\n},\n getBoundingRect = function (node) {\n return node.rect || (node.rect = node.getBoundingClientRect());\n},\n getRandom = function () {\n var asStr = !(arguments.length > 0 && arguments[0] !== undefined) || arguments[0];\n return Math.random() + (asStr ? \"\" : 0);\n},\n brushEmpty = function (ctx) {\n var selection = getBrushSelection(ctx);\n return !selection || selection[0] === selection[1];\n},\n extend = function () {\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n source = arguments.length > 1 ? arguments[1] : undefined;\n\n for (var p in source) target[p] = source[p];\n\n return target;\n},\n capitalize = function (str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n},\n toArray = function (v) {\n return [].slice.call(v);\n},\n getCssRules = function (styleSheets) {\n var rules = [];\n return styleSheets.forEach(function (sheet) {\n try {\n sheet.cssRules && sheet.cssRules.length && (rules = rules.concat(toArray(sheet.cssRules)));\n } catch (e) {\n console.error(\"Error while reading rules from \".concat(sheet.href, \": \").concat(e.toString()));\n }\n }), rules;\n},\n getTranslation = function (node) {\n var transform = node ? node.transform : null,\n baseVal = transform && transform.baseVal;\n return baseVal && baseVal.numberOfItems ? baseVal.getItem(0).matrix : {\n a: 0,\n b: 0,\n c: 0,\n d: 0,\n e: 0,\n f: 0\n };\n},\n getUnique = function (data) {\n var isDate = data[0] instanceof Date,\n d = (isDate ? data.map(Number) : data).filter(function (v, i, self) {\n return self.indexOf(v) === i;\n });\n return isDate ? d.map(function (v) {\n return new Date(v);\n }) : d;\n},\n mergeArray = function (arr) {\n return arr && arr.length ? arr.reduce(function (p, c) {\n return p.concat(c);\n }) : [];\n},\n mergeObj = function (_mergeObj) {\n function mergeObj() {\n return _mergeObj.apply(this, arguments);\n }\n\n return mergeObj.toString = function () {\n return _mergeObj.toString();\n }, mergeObj;\n}(function (target) {\n for (var _len2 = arguments.length, objectN = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) objectN[_key2 - 1] = arguments[_key2];\n\n if (!objectN.length || objectN.length === 1 && !objectN[0]) return target;\n var source = objectN.shift();\n return isObject(target) && isObject(source) && Object.keys(source).forEach(function (key) {\n var value = source[key];\n isObject(value) ? (!target[key] && (target[key] = {}), target[key] = mergeObj(target[key], value)) : target[key] = isArray(value) ? value.concat() : value;\n }), mergeObj.apply(void 0, [target].concat(objectN));\n}),\n sortValue = function (data) {\n var fn,\n isAsc = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1];\n return data[0] instanceof Date ? fn = isAsc ? function (a, b) {\n return a - b;\n } : function (a, b) {\n return b - a;\n } : isAsc && !data.every(isNaN) ? fn = function (a, b) {\n return a - b;\n } : !isAsc && (fn = function (a, b) {\n return a > b && -1 || a < b && 1 || a === b && 0;\n }), data.concat().sort(fn);\n},\n getMinMax = function (type, data) {\n var res = data.filter(function (v) {\n return notEmpty(v);\n });\n return res.length ? isNumber(res[0]) ? res = Math[type].apply(Math, _toConsumableArray(res)) : res[0] instanceof Date && (res = sortValue(res, type === \"min\")[0]) : res = undefined, res;\n},\n getRange = function (start, end) {\n for (var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1, res = [], n = Math.max(0, Math.ceil((end - start) / step)) | 0, i = start; i < n; i++) res.push(start + i * step);\n\n return res;\n},\n emulateEvent = {\n mouse: function () {\n var getParams = function () {\n return {\n bubbles: !1,\n cancelable: !1,\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0\n };\n };\n\n try {\n return new MouseEvent(\"t\"), function (el, eventType) {\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getParams();\n el.dispatchEvent(new MouseEvent(eventType, params));\n };\n } catch (e) {\n // Polyfills DOM4 MouseEvent\n return function (el, eventType) {\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getParams(),\n mouseEvent = browser_doc.createEvent(\"MouseEvent\");\n mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count\n params.screenX, params.screenY, params.clientX, params.clientY, !1, !1, !1, !1, 0, null), el.dispatchEvent(mouseEvent);\n };\n }\n }(),\n touch: function touch(el, eventType, params) {\n var touchObj = new Touch(mergeObj({\n identifier: Date.now(),\n target: el,\n radiusX: 2.5,\n radiusY: 2.5,\n rotationAngle: 10,\n force: .5\n }, params));\n el.dispatchEvent(new TouchEvent(eventType, {\n cancelable: !0,\n bubbles: !0,\n shiftKey: !0,\n touches: [touchObj],\n targetTouches: [],\n changedTouches: [touchObj]\n }));\n }\n},\n tplProcess = function (tpl, data) {\n var res = tpl;\n\n for (var x in data) res = res.replace(new RegExp(\"{=\".concat(x, \"}\"), \"g\"), data[x]);\n\n return res;\n};\n\n\n// CONCATENATED MODULE: ./src/axis/AxisRendererHelper.js\n\n\n\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n * @ignore\n */\n\n\n\nvar AxisRendererHelper_AxisRendererHelper = /*#__PURE__*/function () {\n function AxisRendererHelper(owner) {\n _classCallCheck(this, AxisRendererHelper);\n\n var scale = Object(external_commonjs_d3_scale_commonjs2_d3_scale_amd_d3_scale_root_d3_[\"scaleLinear\"])(),\n config = owner.config,\n params = owner.params;\n this.owner = owner, this.config = config, this.scale = scale, (config.noTransition || !params.config.transition_duration) && (config.withoutTransition = !0), config.range = scale.rangeExtent ? scale.rangeExtent() : this.scaleExtent((params.orgXScale || scale).range());\n }\n /**\n * Compute a character dimension\n * @param {d3.selection} node\n * @return {{w: number, h: number}}\n * @private\n */\n\n\n return _createClass(AxisRendererHelper, [{\n key: \"getTickTransformSetter\",\n\n /**\n * Get tick transform setter function\n * @param {String} id Axis id\n * @private\n */\n value: function getTickTransformSetter(id) {\n var config = this.config,\n fn = id === \"x\" ? function (value) {\n return \"translate(\".concat(value + config.tickOffset, \",0)\");\n } : function (value) {\n return \"translate(0,\".concat(value, \")\");\n };\n return function (selection, scale) {\n selection.attr(\"transform\", function (d) {\n return fn(Math.ceil(scale(d)));\n });\n };\n }\n }, {\n key: \"scaleExtent\",\n value: function scaleExtent(domain) {\n var start = domain[0],\n stop = domain[domain.length - 1];\n return start < stop ? [start, stop] : [stop, start];\n }\n }, {\n key: \"generateTicks\",\n value: function generateTicks(scale, isYAxes) {\n var tickStepSize = this.owner.params.tickStepSize,\n ticks = [];\n // When 'axis[y|y2].tick.stepSize' option is set\n if (isYAxes && tickStepSize) for (var _scale$domain = scale.domain(), _scale$domain2 = _slicedToArray(_scale$domain, 2), start = _scale$domain2[0], end = _scale$domain2[1], interval = start; interval <= end;) ticks.push(interval), interval += tickStepSize;else if (scale.ticks) ticks = scale.ticks.apply(scale, _toConsumableArray(this.config.tickArguments || [])).map(function (v) {\n return (// round the tick value if is number\n isString(v) && isNumber(v) && !isNaN(v) && Math.round(v * 10) / 10 || v\n );\n });else {\n for (var domain = scale.domain(), i = Math.ceil(domain[0]); i < domain[1]; i++) ticks.push(i);\n\n ticks.length > 0 && ticks[0] > 0 && ticks.unshift(ticks[0] - (ticks[1] - ticks[0]));\n }\n return ticks;\n }\n }, {\n key: \"copyScale\",\n value: function copyScale() {\n var newScale = this.scale.copy();\n return newScale.domain().length || newScale.domain(this.scale.domain()), newScale;\n }\n }, {\n key: \"textFormatted\",\n value: function textFormatted(v) {\n var tickFormat = this.config.tickFormat,\n value = /\\d+\\.\\d+0{5,}\\d$/.test(v) ? +(v + \"\").replace(/0+\\d$/, \"\") : v,\n formatted = tickFormat ? tickFormat(value) : value; // to round float numbers from 'binary floating point'\n // https://en.wikipedia.org/wiki/Double-precision_floating-point_format\n // https://stackoverflow.com/questions/17849101/laymans-explanation-for-why-javascript-has-weird-floating-math-ieee-754-stand\n\n return isDefined(formatted) ? formatted : \"\";\n }\n }, {\n key: \"transitionise\",\n value: function transitionise(selection) {\n var config = this.config;\n return config.withoutTransition ? selection.interrupt() : selection.transition(config.transition);\n }\n }], [{\n key: \"getSizeFor1Char\",\n value: function getSizeFor1Char(node) {\n // default size for one character\n var size = {\n w: 5.5,\n h: 11.5\n };\n return node.empty() || node.select(\"text\").text(\"0\").call(function (el) {\n try {\n var _el$node$getBBox = el.node().getBBox(),\n width = _el$node$getBBox.width,\n height = _el$node$getBBox.height;\n\n width && height && (size.w = width, size.h = height);\n } catch (e) {} finally {\n el.text(\"\");\n }\n }), this.getSizeFor1Char = function () {\n return size;\n }, size;\n }\n }]), AxisRendererHelper;\n}();\n\n\n// CONCATENATED MODULE: ./src/axis/AxisRenderer.js\n\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n * @ignore\n */\n\n\n\n\nvar AxisRenderer_AxisRenderer = /*#__PURE__*/function () {\n function AxisRenderer() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, AxisRenderer);\n\n var config = {\n innerTickSize: 6,\n outerTickSize: params.outerTick ? 6 : 0,\n orient: \"bottom\",\n range: [],\n tickArguments: null,\n tickCentered: null,\n tickCulling: !0,\n tickFormat: null,\n tickLength: 9,\n tickOffset: 0,\n tickPadding: 3,\n tickValues: null,\n transition: null,\n noTransition: params.noTransition\n };\n config.tickLength = Math.max(config.innerTickSize, 0) + config.tickPadding, this.config = config, this.params = params, this.helper = new AxisRendererHelper_AxisRendererHelper(this);\n }\n /**\n * Create axis element\n * @param {d3.selection} g\n * @private\n */\n\n\n return _createClass(AxisRenderer, [{\n key: \"create\",\n value: function create(g) {\n var ctx = this,\n config = this.config,\n helper = this.helper,\n params = this.params,\n scale = helper.scale,\n orient = config.orient,\n splitTickText = this.splitTickText.bind(this),\n isLeftRight = /^(left|right)$/.test(orient),\n isTopBottom = /^(top|bottom)$/.test(orient),\n tickTransform = helper.getTickTransformSetter(isTopBottom ? \"x\" : \"y\"),\n axisPx = tickTransform === helper.axisX ? \"y\" : \"x\",\n sign = /^(top|left)$/.test(orient) ? -1 : 1,\n rotate = params.tickTextRotate;\n this.config.range = scale.rangeExtent ? scale.rangeExtent() : helper.scaleExtent((params.orgXScale || scale).range());\n var _config2 = config,\n innerTickSize = _config2.innerTickSize,\n tickLength = _config2.tickLength,\n range = _config2.range,\n name = params.name,\n tickTextPos = name && /^(x|y|y2)$/.test(name) ? params.config[\"axis_\".concat(name, \"_tick_text_position\")] : {\n x: 0,\n y: 0\n },\n prefix = name === \"subX\" ? \"subchart_axis_x\" : \"axis_\".concat(name),\n axisShow = params.config[\"\".concat(prefix, \"_show\")],\n tickShow = {\n tick: !!axisShow && params.config[\"\".concat(prefix, \"_tick_show\")],\n text: !!axisShow && params.config[\"\".concat(prefix, \"_tick_text_show\")]\n },\n $g = null; // // get the axis' tick position configuration\n\n g.each(function () {\n var g = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this),\n scale0 = this.__chart__ || scale,\n scale1 = helper.copyScale();\n $g = g, this.__chart__ = scale1, config.tickOffset = params.isCategory ? Math.ceil((scale1(1) - scale1(0)) / 2) : 0;\n // update selection - data join\n var path = g.selectAll(\".domain\").data([0]); // enter + update selection\n\n if (path.enter().append(\"path\").attr(\"class\", \"domain\").merge(helper.transitionise(path)).attr(\"d\", function () {\n var outerTickSized = config.outerTickSize * sign;\n return isTopBottom ? \"M\".concat(range[0], \",\").concat(outerTickSized, \"V0H\").concat(range[1], \"V\").concat(outerTickSized) : \"M\".concat(outerTickSized, \",\").concat(range[0], \"H0V\").concat(range[1], \"H\").concat(outerTickSized);\n }), tickShow.tick || tickShow.text) {\n // count of tick data in array\n var ticks = config.tickValues || helper.generateTicks(scale1, isLeftRight),\n tick = g.selectAll(\".tick\").data(ticks, scale1),\n tickEnter = tick.enter().insert(\"g\", \".domain\").attr(\"class\", \"tick\").style(\"opacity\", \"1\"),\n tickExit = tick.exit().remove(); // update selection\n\n tick = tickEnter.merge(tick), tickShow.tick && tickEnter.append(\"line\"), tickShow.text && tickEnter.append(\"text\");\n var sizeFor1Char = AxisRendererHelper_AxisRendererHelper.getSizeFor1Char(tick),\n counts = [],\n tspan = tick.select(\"text\").selectAll(\"tspan\").data(function (d, index) {\n var split = params.tickMultiline ? splitTickText(d, scale1, ticks, isLeftRight, sizeFor1Char.w) : isArray(helper.textFormatted(d)) ? helper.textFormatted(d).concat() : [helper.textFormatted(d)];\n return counts[index] = split.length, split.map(function (splitted) {\n return {\n index: index,\n splitted: splitted\n };\n });\n });\n tspan.exit().remove(), tspan = tspan.enter().append(\"tspan\").merge(tspan).text(function (d) {\n return d.splitted;\n }), tspan.attr(\"x\", isTopBottom ? 0 : tickLength * sign).attr(\"dx\", function () {\n var dx = 0;\n return /(top|bottom)/.test(orient) && rotate && (dx = 8 * Math.sin(Math.PI * (rotate / 180)) * (orient === \"top\" ? -1 : 1)), dx + (tickTextPos.x || 0);\n }()).attr(\"dy\", function (d, i) {\n var dy = 0;\n return orient !== \"top\" && (dy = sizeFor1Char.h, i === 0 && (dy = isLeftRight ? -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3) : tickTextPos.y === 0 ? \".71em\" : 0)), isNumber(dy) && tickTextPos.y ? dy + tickTextPos.y : dy || \".71em\";\n });\n var lineUpdate = tick.select(\"line\"),\n textUpdate = tick.select(\"text\");\n\n // Append for tooltip display\n if (tickEnter.select(\"line\").attr(\"\".concat(axisPx, \"2\"), innerTickSize * sign), tickEnter.select(\"text\").attr(axisPx, tickLength * sign), ctx.setTickLineTextPosition(lineUpdate, textUpdate), params.tickTitle) {\n var title = textUpdate.select(\"title\");\n (title.empty() ? textUpdate.append(\"title\") : title).text(function (index) {\n return params.tickTitle[index];\n });\n }\n\n if (scale1.bandwidth) {\n var x = scale1,\n dx = x.bandwidth() / 2;\n scale0 = function (d) {\n return x(d) + dx;\n }, scale1 = scale0;\n } else scale0.bandwidth ? scale0 = scale1 : tickTransform(tickExit, scale1);\n\n tickTransform(tickEnter, scale0), tickTransform(helper.transitionise(tick).style(\"opacity\", \"1\"), scale1);\n }\n }), this.g = $g;\n }\n /**\n * Get tick x/y coordinate\n * @return {{x: number, y: number}}\n * @private\n */\n\n }, {\n key: \"getTickXY\",\n value: function getTickXY() {\n var config = this.config,\n pos = {\n x: 0,\n y: 0\n };\n return this.params.isCategory && (pos.x = config.tickCentered ? 0 : config.tickOffset, pos.y = config.tickCentered ? config.tickOffset : 0), pos;\n }\n /**\n * Get tick size\n * @param d\n * @return {number}\n * @private\n */\n\n }, {\n key: \"getTickSize\",\n value: function getTickSize(d) {\n var scale = this.helper.scale,\n config = this.config,\n innerTickSize = config.innerTickSize,\n range = config.range,\n tickPosition = scale(d) + (config.tickCentered ? 0 : config.tickOffset);\n return range[0] < tickPosition && tickPosition < range[1] ? innerTickSize : 0;\n }\n /**\n * Set tick's line & text position\n * @param lineUpdate\n * @param textUpdate\n * @param scale\n * @private\n */\n\n }, {\n key: \"setTickLineTextPosition\",\n value: function setTickLineTextPosition(lineUpdate, textUpdate) {\n var tickPos = this.getTickXY(),\n _this$config = this.config,\n innerTickSize = _this$config.innerTickSize,\n orient = _this$config.orient,\n tickLength = _this$config.tickLength,\n tickOffset = _this$config.tickOffset,\n rotate = this.params.tickTextRotate,\n textAnchorForText = function (r) {\n var value = [\"start\", \"end\"];\n return orient === \"top\" && value.reverse(), r ? r > 0 ? value[0] : value[1] : \"middle\";\n },\n textTransform = function (r) {\n return r ? \"rotate(\".concat(r, \")\") : null;\n },\n yForText = function (r) {\n var r2 = r / (orient === \"bottom\" ? 15 : 23);\n return r ? 11.5 - 2.5 * r2 * (r > 0 ? 1 : -1) : tickLength;\n };\n\n orient === \"bottom\" ? (lineUpdate.attr(\"x1\", tickPos.x).attr(\"x2\", tickPos.x).attr(\"y2\", this.getTickSize.bind(this)), textUpdate.attr(\"x\", 0).attr(\"y\", yForText(rotate)).style(\"text-anchor\", textAnchorForText(rotate)).attr(\"transform\", textTransform(rotate))) : orient === \"top\" ? (lineUpdate.attr(\"x2\", 0).attr(\"y2\", -innerTickSize), textUpdate.attr(\"x\", 0).attr(\"y\", -yForText(rotate) * 2).style(\"text-anchor\", textAnchorForText(rotate)).attr(\"transform\", textTransform(rotate))) : orient === \"left\" ? (lineUpdate.attr(\"x2\", -innerTickSize).attr(\"y1\", tickPos.y).attr(\"y2\", tickPos.y), textUpdate.attr(\"x\", -tickLength).attr(\"y\", tickOffset).style(\"text-anchor\", \"end\")) : orient === \"right\" ? (lineUpdate.attr(\"x2\", innerTickSize).attr(\"y2\", 0), textUpdate.attr(\"x\", tickLength).attr(\"y\", 0).style(\"text-anchor\", \"start\")) : void 0;\n } // this should be called only when category axis\n\n }, {\n key: \"splitTickText\",\n value: function splitTickText(d, scale, ticks, isLeftRight, charWidth) {\n function split(splitted, text) {\n for (var subtext, spaceIndex, textWidth, i = 1; i < text.length; i++) // if text width gets over tick width, split by space index or current index\n if (text.charAt(i) === \" \" && (spaceIndex = i), subtext = text.substr(0, i + 1), textWidth = charWidth * subtext.length, tickWidth < textWidth) return split(splitted.concat(text.substr(0, spaceIndex || i)), text.slice(spaceIndex ? spaceIndex + 1 : i));\n\n return splitted.concat(text);\n }\n\n var params = this.params,\n tickText = this.helper.textFormatted(d),\n splitted = isString(tickText) && tickText.indexOf(\"\\n\") > -1 ? tickText.split(\"\\n\") : [];\n if (splitted.length) return splitted;\n if (isArray(tickText)) return tickText;\n var tickWidth = params.tickWidth;\n return (!tickWidth || tickWidth <= 0) && (tickWidth = isLeftRight ? 95 : params.isCategory ? Math.ceil(scale(ticks[1]) - scale(ticks[0])) - 12 : 110), split(splitted, tickText + \"\");\n }\n }, {\n key: \"scale\",\n value: function scale(x) {\n return arguments.length ? (this.helper.scale = x, this) : this.helper.scale;\n }\n }, {\n key: \"orient\",\n value: function orient(x) {\n return arguments.length ? (this.config.orient = x in {\n top: 1,\n right: 1,\n bottom: 1,\n left: 1\n } ? x + \"\" : \"bottom\", this) : this.config.orient;\n }\n }, {\n key: \"tickFormat\",\n value: function tickFormat(format) {\n return arguments.length ? (this.config.tickFormat = format, this) : this.config.tickFormat;\n }\n }, {\n key: \"tickCentered\",\n value: function tickCentered(isCentered) {\n var config = this.config;\n return arguments.length ? (config.tickCentered = isCentered, this) : config.tickCentered;\n }\n /**\n * Return tick's offset value.\n * The value will be set for 'category' axis type.\n * @return {number}\n * @private\n */\n\n }, {\n key: \"tickOffset\",\n value: function tickOffset() {\n return this.config.tickOffset;\n }\n /**\n * Get tick interval count\n * @private\n * @param {Number} size Total data size\n * @return {number}\n */\n\n }, {\n key: \"tickInterval\",\n value: function tickInterval(size) {\n var interval;\n if (this.params.isCategory) interval = this.config.tickOffset * 2;else {\n var length = this.g.select(\"path.domain\").node().getTotalLength() - this.config.outerTickSize * 2;\n interval = length / (size || this.g.selectAll(\"line\").size());\n }\n return interval === Infinity ? 0 : interval;\n }\n }, {\n key: \"ticks\",\n value: function ticks() {\n for (var config = this.config, _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n\n return args.length ? (config.tickArguments = toArray(args), this) : config.tickArguments;\n }\n }, {\n key: \"tickCulling\",\n value: function tickCulling(culling) {\n var config = this.config;\n return arguments.length ? (config.tickCulling = culling, this) : config.tickCulling;\n }\n }, {\n key: \"tickValues\",\n value: function tickValues(x) {\n var _this = this,\n config = this.config;\n\n if (isFunction(x)) config.tickValues = function () {\n return x(_this.helper.scale.domain());\n };else {\n if (!arguments.length) return config.tickValues;\n config.tickValues = x;\n }\n return this;\n }\n }, {\n key: \"setTransition\",\n value: function setTransition(t) {\n return this.config.transition = t, this;\n }\n }]), AxisRenderer;\n}();\n\n\n// CONCATENATED MODULE: ./src/axis/Axis.js\n\n\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\n\nvar isHorizontal = function ($$, forHorizontal) {\n var isRotated = $$.config.axis_rotated;\n return forHorizontal ? isRotated : !isRotated;\n},\n getAxisClassName = function (id) {\n return \"\".concat(config_classes.axis, \" \").concat(config_classes[\"axis\".concat(capitalize(id))]);\n};\n\nvar Axis_Axis = /*#__PURE__*/function () {\n function Axis(owner) {\n _classCallCheck(this, Axis), this.owner = owner, this.setOrient();\n }\n\n return _createClass(Axis, [{\n key: \"init\",\n value: function init() {\n var _this = this,\n $$ = this.owner,\n config = $$.config,\n isRotated = config.axis_rotated,\n main = $$.main,\n target = [\"x\", \"y\"];\n\n config.axis_y2_show && target.push(\"y2\"), $$.axesList = {}, target.forEach(function (v) {\n var classAxis = getAxisClassName(v),\n classLabel = config_classes[\"axis\".concat(v.toUpperCase(), \"Label\")];\n $$.axes[v] = main.append(\"g\").attr(\"class\", classAxis).attr(\"clip-path\", function () {\n var res = null;\n return v === \"x\" ? res = $$.clipPathForXAxis : v === \"y\" && config.axis_y_inner && (res = $$.clipPathForYAxis), res;\n }).attr(\"transform\", $$.getTranslate(v)).style(\"visibility\", config[\"axis_\".concat(v, \"_show\")] ? \"visible\" : \"hidden\"), $$.axes[v].append(\"text\").attr(\"class\", classLabel).attr(\"transform\", [\"rotate(-90)\", null][v === \"x\" ? +!isRotated : +isRotated]).style(\"text-anchor\", function () {\n return _this.textAnchorForAxisLabel(v);\n }), _this.generateAxes(v);\n });\n }\n /**\n * Set axis orient according option value\n * @private\n */\n\n }, {\n key: \"setOrient\",\n value: function setOrient() {\n var $$ = this.owner,\n config = $$.config,\n isRotated = config.axis_rotated,\n yInner = config.axis_y_inner,\n y2Inner = config.axis_y2_inner;\n $$.xOrient = isRotated ? \"left\" : \"bottom\", $$.yOrient = isRotated ? yInner ? \"top\" : \"bottom\" : yInner ? \"right\" : \"left\", $$.y2Orient = isRotated ? y2Inner ? \"bottom\" : \"top\" : y2Inner ? \"left\" : \"right\", $$.subXOrient = isRotated ? \"left\" : \"bottom\";\n }\n /**\n * Generate axes\n * It's used when axis' axes option is set\n * @param {String} id Axis id\n * @private\n */\n\n }, {\n key: \"generateAxes\",\n value: function generateAxes(id) {\n var d3Axis,\n $$ = this.owner,\n config = $$.config,\n axes = [],\n axesConfig = config[\"axis_\".concat(id, \"_axes\")],\n isRotated = config.axis_rotated;\n id === \"x\" ? d3Axis = isRotated ? external_commonjs_d3_axis_commonjs2_d3_axis_amd_d3_axis_root_d3_[\"axisLeft\"] : external_commonjs_d3_axis_commonjs2_d3_axis_amd_d3_axis_root_d3_[\"axisBottom\"] : id === \"y\" ? d3Axis = isRotated ? external_commonjs_d3_axis_commonjs2_d3_axis_amd_d3_axis_root_d3_[\"axisBottom\"] : external_commonjs_d3_axis_commonjs2_d3_axis_amd_d3_axis_root_d3_[\"axisLeft\"] : id === \"y2\" && (d3Axis = isRotated ? external_commonjs_d3_axis_commonjs2_d3_axis_amd_d3_axis_root_d3_[\"axisTop\"] : external_commonjs_d3_axis_commonjs2_d3_axis_amd_d3_axis_root_d3_[\"axisRight\"]), axesConfig.length && axesConfig.forEach(function (v) {\n var tick = v.tick || {},\n scale = $$[id].copy();\n v.domain && scale.domain(v.domain), axes.push(d3Axis(scale).ticks(tick.count).tickFormat(tick.format || function (x) {\n return x;\n }).tickValues(tick.values).tickSizeOuter(tick.outer === !1 ? 0 : 6));\n }), $$.axesList[id] = axes;\n }\n /**\n * Update axes nodes\n * @private\n */\n\n }, {\n key: \"updateAxes\",\n value: function updateAxes() {\n var $$ = this.owner,\n config = $$.config;\n Object.keys($$.axesList).forEach(function (id) {\n var axesConfig = config[\"axis_\".concat(id, \"_axes\")],\n scale = $$[id].copy(),\n range = scale.range();\n $$.axesList[id].forEach(function (v, i) {\n var axisRange = v.scale().range(); // adjust range value with the current\n // https://github.com/naver/billboard.js/issues/859\n\n range.every(function (v, i) {\n return v === axisRange[i];\n }) || v.scale().range(range);\n var className = \"\".concat(getAxisClassName(id), \"-\").concat(i + 1),\n g = $$.main.select(\".\".concat(className.replace(/\\s/, \".\")));\n g.empty() ? g = $$.main.append(\"g\").attr(\"class\", className).style(\"visibility\", config[\"axis_\".concat(id, \"_show\")] ? \"visible\" : \"hidden\").call(v) : (axesConfig[i].domain && scale.domain(axesConfig[i].domain), $$.xAxis.helper.transitionise(g).call(v.scale(scale))), g.attr(\"transform\", $$.getTranslate(id, i + 1));\n });\n });\n } // called from : updateScales() & getMaxTickWidth()\n\n }, {\n key: \"getAxis\",\n value: function getAxis(name, scale, outerTick, noTransition, noTickTextRotate) {\n var $$ = this.owner,\n config = $$.config,\n isX = /^(x|subX)$/.test(name),\n type = isX ? \"x\" : name,\n isCategory = isX && $$.isCategorized(),\n orient = $$[\"\".concat(name, \"Orient\")],\n tickFormat = isX ? $$.xAxisTickFormat : config[\"axis_\".concat(name, \"_tick_format\")],\n tickTextRotate = noTickTextRotate ? 0 : $$.getAxisTickRotate(type),\n tickValues = isX ? $$.xAxisTickValues : $$[\"\".concat(name, \"AxisTickValues\")],\n axisParams = mergeObj({\n outerTick: outerTick,\n noTransition: noTransition,\n config: config,\n name: name,\n tickTextRotate: tickTextRotate\n }, isX && {\n isCategory: isCategory,\n tickMultiline: config.axis_x_tick_multiline,\n tickWidth: config.axis_x_tick_width,\n tickTitle: isCategory && config.axis_x_tick_tooltip && $$.api.categories(),\n orgXScale: $$.x\n });\n isX || (axisParams.tickStepSize = config[\"axis_\".concat(type, \"_tick_stepSize\")]);\n var axis = new AxisRenderer_AxisRenderer(axisParams).scale(isX && $$.zoomScale || scale).orient(orient);\n isX && $$.isTimeSeries() && tickValues && !isFunction(tickValues) ? tickValues = tickValues.map(function (v) {\n return $$.parseDate(v);\n }) : !isX && $$.isTimeSeriesY() && (axis.ticks(config.axis_y_tick_time_value), tickValues = null), tickValues && axis.tickValues(tickValues), axis.tickFormat(tickFormat || !isX && $$.isStackNormalized() && function (x) {\n return \"\".concat(x, \"%\");\n }), isCategory && (axis.tickCentered(config.axis_x_tick_centered), isEmpty(config.axis_x_tick_culling) && (config.axis_x_tick_culling = !1));\n var tickCount = config[\"axis_\".concat(type, \"_tick_count\")];\n return tickCount && axis.ticks(tickCount), axis;\n }\n }, {\n key: \"updateXAxisTickValues\",\n value: function updateXAxisTickValues(targets, axis) {\n var values,\n $$ = this.owner,\n config = $$.config,\n fit = config.axis_x_tick_fit,\n count = config.axis_x_tick_count;\n return (fit || count && fit) && (values = $$.mapTargetsToUniqueXs(targets), $$.isCategorized() && count > values.length && (count = values.length), values = this.generateTickValues(values, count, $$.isTimeSeries())), axis ? axis.tickValues(values) : $$.xAxis && ($$.xAxis.tickValues(values), $$.subXAxis.tickValues(values)), values;\n }\n }, {\n key: \"getId\",\n value: function getId(id) {\n var config = this.owner.config;\n return id in config.data_axes ? config.data_axes[id] : \"y\";\n }\n }, {\n key: \"getXAxisTickFormat\",\n value: function getXAxisTickFormat() {\n var format,\n $$ = this.owner,\n config = $$.config,\n tickFormat = config.axis_x_tick_format,\n isTimeSeries = $$.isTimeSeries(),\n isCategorized = $$.isCategorized();\n return tickFormat ? isFunction(tickFormat) ? format = tickFormat : isTimeSeries && (format = function (date) {\n return date ? $$.axisTimeFormat(tickFormat)(date) : \"\";\n }) : format = isTimeSeries ? $$.defaultAxisTimeFormat : isCategorized ? $$.categoryName : function (v) {\n return v < 0 ? v.toFixed(0) : v;\n }, isFunction(format) ? function (v) {\n return format.apply($$, isCategorized ? [v, $$.categoryName(v)] : [v]);\n } : format;\n }\n }, {\n key: \"getTickValues\",\n value: function getTickValues(id) {\n var $$ = this.owner,\n tickValues = $$.config[\"axis_\".concat(id, \"_tick_values\")],\n axis = $$[\"\".concat(id, \"Axis\")];\n return (isFunction(tickValues) ? tickValues() : tickValues) || (axis ? axis.tickValues() : undefined);\n }\n }, {\n key: \"getLabelOptionByAxisId\",\n value: function getLabelOptionByAxisId(id) {\n return this.owner.config[\"axis_\".concat(id, \"_label\")];\n }\n }, {\n key: \"getLabelText\",\n value: function getLabelText(id) {\n var option = this.getLabelOptionByAxisId(id);\n return isString(option) ? option : option ? option.text : null;\n }\n }, {\n key: \"setLabelText\",\n value: function setLabelText(id, text) {\n var $$ = this.owner,\n config = $$.config,\n option = this.getLabelOptionByAxisId(id);\n isString(option) ? config[\"axis_\".concat(id, \"_label\")] = text : option && (option.text = text);\n }\n }, {\n key: \"getLabelPosition\",\n value: function getLabelPosition(id, defaultPosition) {\n var isRotated = this.owner.config.axis_rotated,\n option = this.getLabelOptionByAxisId(id),\n position = isObjectType(option) && option.position ? option.position : defaultPosition[+!isRotated],\n has = function (v) {\n return !!~position.indexOf(v);\n };\n\n return {\n isInner: has(\"inner\"),\n isOuter: has(\"outer\"),\n isLeft: has(\"left\"),\n isCenter: has(\"center\"),\n isRight: has(\"right\"),\n isTop: has(\"top\"),\n isMiddle: has(\"middle\"),\n isBottom: has(\"bottom\")\n };\n }\n }, {\n key: \"getAxisLabelPosition\",\n value: function getAxisLabelPosition(id) {\n return this.getLabelPosition(id, id === \"x\" ? [\"inner-top\", \"inner-right\"] : [\"inner-right\", \"inner-top\"]);\n }\n }, {\n key: \"getLabelPositionById\",\n value: function getLabelPositionById(id) {\n return this.getAxisLabelPosition(id);\n }\n }, {\n key: \"xForAxisLabel\",\n value: function xForAxisLabel(id) {\n var $$ = this.owner,\n position = this.getAxisLabelPosition(id),\n x = position.isMiddle ? -$$.height / 2 : 0;\n return isHorizontal($$, id !== \"x\") ? x = position.isLeft ? 0 : position.isCenter ? $$.width / 2 : $$.width : position.isBottom && (x = -$$.height), x;\n }\n }, {\n key: \"dxForAxisLabel\",\n value: function dxForAxisLabel(id) {\n var $$ = this.owner,\n position = this.getAxisLabelPosition(id),\n dx = position.isBottom ? \"0.5em\" : \"0\";\n return isHorizontal($$, id !== \"x\") ? dx = position.isLeft ? \"0.5em\" : position.isRight ? \"-0.5em\" : \"0\" : position.isTop && (dx = \"-0.5em\"), dx;\n }\n }, {\n key: \"textAnchorForAxisLabel\",\n value: function textAnchorForAxisLabel(id) {\n var $$ = this.owner,\n position = this.getAxisLabelPosition(id),\n anchor = position.isMiddle ? \"middle\" : \"end\";\n return isHorizontal($$, id !== \"x\") ? anchor = position.isLeft ? \"start\" : position.isCenter ? \"middle\" : \"end\" : position.isBottom && (anchor = \"start\"), anchor;\n }\n }, {\n key: \"dyForAxisLabel\",\n value: function dyForAxisLabel(id) {\n var dy,\n $$ = this.owner,\n config = $$.config,\n isRotated = config.axis_rotated,\n isInner = this.getAxisLabelPosition(id).isInner,\n tickRotate = config[\"axis_\".concat(id, \"_tick_rotate\")] ? $$.getHorizontalAxisHeight(id) : 0,\n maxTickWidth = this.getMaxTickWidth(id);\n\n if (id === \"x\") {\n var xHeight = config.axis_x_height;\n dy = isRotated ? isInner ? \"1.2em\" : -25 - maxTickWidth : isInner ? \"-0.5em\" : xHeight ? xHeight - 10 : tickRotate ? tickRotate - 10 : \"3em\";\n } else dy = {\n y: [\"-0.5em\", 10, \"3em\", \"1.2em\", 10],\n y2: [\"1.2em\", -20, \"-2.2em\", \"-0.5em\", 15]\n }[id], dy = isRotated ? isInner ? dy[0] : tickRotate ? tickRotate * (id === \"y2\" ? -1 : 1) - dy[1] : dy[2] : isInner ? dy[3] : (dy[4] + (config[\"axis_\".concat(id, \"_inner\")] ? 0 : maxTickWidth + dy[4])) * (id === \"y\" ? -1 : 1);\n\n return dy;\n }\n }, {\n key: \"getMaxTickWidth\",\n value: function getMaxTickWidth(id, withoutRecompute) {\n var $$ = this.owner,\n config = $$.config,\n currentTickMax = $$.currentMaxTickWidths[id],\n maxWidth = 0;\n if (withoutRecompute || !config[\"axis_\".concat(id, \"_show\")] || $$.filterTargetsToShow().length === 0) return currentTickMax.size;\n\n if ($$.svg) {\n var isYAxis = /^y2?$/.test(id),\n targetsToShow = $$.filterTargetsToShow($$.data.targets),\n scale = $$[id].copy().domain($$[\"get\".concat(isYAxis ? \"Y\" : \"X\", \"Domain\")](targetsToShow, id)),\n domain = scale.domain();\n // do not compute if domain is same\n if (domain[0] === domain[1] && domain.every(function (v) {\n return v > 0;\n }) || isArray(currentTickMax.domain) && currentTickMax.domain[0] === currentTickMax.domain[1]) return currentTickMax.size;\n currentTickMax.domain = domain;\n var axis = this.getAxis(id, scale, !1, !1, !0),\n tickCount = config[\"axis_\".concat(id, \"_tick_count\")],\n tickValues = config[\"axis_\".concat(id, \"_tick_values\")];\n !tickValues && tickCount && axis.tickValues(this.generateTickValues(domain, tickCount, isYAxis ? $$.isTimeSeriesY() : $$.isTimeSeries())), isYAxis || this.updateXAxisTickValues(targetsToShow, axis);\n var dummy = $$.selectChart.append(\"svg\").style(\"visibility\", \"hidden\").style(\"position\", \"fixed\").style(\"top\", \"0px\").style(\"left\", \"0px\");\n axis.create(dummy), dummy.selectAll(\"text\").each(function (d, i) {\n var currentTextWidth = this.getBoundingClientRect().width;\n maxWidth = Math.max(maxWidth, currentTextWidth), id === \"x\" && ($$.currentMaxTickWidths.x.ticks[i] = currentTextWidth);\n }), dummy.remove();\n }\n\n return maxWidth > 0 && (currentTickMax.size = maxWidth), currentTickMax.size;\n }\n }, {\n key: \"getXAxisTickTextY2Overflow\",\n value: function getXAxisTickTextY2Overflow(defaultPadding) {\n var $$ = this.owner,\n config = $$.config,\n xAxisTickRotate = $$.getAxisTickRotate(\"x\");\n\n if (($$.isCategorized() || $$.isTimeSeries()) && config.axis_x_tick_fit && !config.axis_x_tick_culling && !config.axis_x_tick_multiline && xAxisTickRotate > 0 && xAxisTickRotate < 90) {\n var widthWithoutCurrentPaddingLeft = $$.currentWidth - $$.getCurrentPaddingLeft(),\n maxOverflow = this.getXAxisTickMaxOverflow(xAxisTickRotate, widthWithoutCurrentPaddingLeft - defaultPadding),\n xAxisTickTextY2Overflow = Math.max(0, maxOverflow) + defaultPadding;\n // for display inconsistencies between browsers\n return Math.min(xAxisTickTextY2Overflow, widthWithoutCurrentPaddingLeft / 2);\n }\n\n return 0;\n }\n }, {\n key: \"getXAxisTickMaxOverflow\",\n value: function getXAxisTickMaxOverflow(xAxisTickRotate, widthWithoutCurrentPaddingLeft) {\n for (var $$ = this.owner, config = $$.config, isTimeSeries = $$.isTimeSeries(), tickTextWidths = $$.currentMaxTickWidths.x.ticks, tickCount = tickTextWidths.length, _this$x$padding = this.x.padding, left = _this$x$padding.left, right = _this$x$padding.right, maxOverflow = 0, remaining = tickCount - (isTimeSeries && config.axis_x_tick_fit ? .5 : 0), i = 0; i < tickCount; i++) {\n var tickIndex = i + 1,\n rotatedTickTextWidth = Math.cos(Math.PI * xAxisTickRotate / 180) * tickTextWidths[i],\n ticksBeforeTickText = tickIndex - (isTimeSeries ? 1 : .5) + left;\n\n // Skip ticks if there are no ticks before them\n if (!(ticksBeforeTickText <= 0)) {\n var tickLength = (widthWithoutCurrentPaddingLeft - rotatedTickTextWidth) / ticksBeforeTickText;\n maxOverflow = Math.max(maxOverflow, rotatedTickTextWidth - tickLength / 2 - ((remaining - tickIndex) * tickLength + right * tickLength));\n }\n }\n\n var tickOffset = 0;\n\n if (!isTimeSeries) {\n var scale = Object(external_commonjs_d3_scale_commonjs2_d3_scale_amd_d3_scale_root_d3_[\"scaleLinear\"])().domain([left * -1, $$.getXDomainMax($$.data.targets) + 1 + right]).range([0, widthWithoutCurrentPaddingLeft - maxOverflow]);\n tickOffset = Math.ceil((scale(1) - scale(0)) / 2);\n }\n\n return maxOverflow + tickOffset;\n }\n /**\n * Get x Axis padding\n * @param {Number} tickCount Tick count\n * @return {Object} Padding object values with 'left' & 'right' key\n * @private\n */\n\n }, {\n key: \"getXAxisPadding\",\n value: function getXAxisPadding(tickCount) {\n var $$ = this.owner,\n padding = $$.config.axis_x_padding;\n\n if (isEmpty(padding) ? padding = {\n left: 0,\n right: 0\n } : (padding.left = padding.left || 0, padding.right = padding.right || 0), $$.isTimeSeries()) {\n var firstX = +$$.getXDomainMin($$.data.targets),\n lastX = +$$.getXDomainMax($$.data.targets),\n timeDiff = lastX - firstX,\n range = timeDiff + padding.left + padding.right,\n relativeTickWidth = timeDiff / tickCount / range,\n left = padding.left / range / relativeTickWidth || 0,\n _right = padding.right / range / relativeTickWidth || 0;\n\n padding = {\n left: left,\n right: _right\n };\n }\n\n return padding;\n }\n }, {\n key: \"updateLabels\",\n value: function updateLabels(withTransition) {\n var _this2 = this,\n $$ = this.owner,\n labels = {\n x: $$.main.select(\".\".concat(config_classes.axisX, \" .\").concat(config_classes.axisXLabel)),\n y: $$.main.select(\".\".concat(config_classes.axisY, \" .\").concat(config_classes.axisYLabel)),\n y2: $$.main.select(\".\".concat(config_classes.axisY2, \" .\").concat(config_classes.axisY2Label))\n };\n\n Object.keys(labels).filter(function (id) {\n return !labels[id].empty();\n }).forEach(function (v) {\n var node = labels[v];\n (withTransition ? node.transition() : node).attr(\"x\", function () {\n return _this2.xForAxisLabel(v);\n }).attr(\"dx\", function () {\n return _this2.dxForAxisLabel(v);\n }).attr(\"dy\", function () {\n return _this2.dyForAxisLabel(v);\n }).text(function () {\n return _this2.getLabelText(v);\n });\n });\n }\n }, {\n key: \"getPadding\",\n value: function getPadding(padding, key, defaultValue, domainLength) {\n var p = isNumber(padding) ? padding : padding[key];\n return isValue(p) ? this.convertPixelsToAxisPadding(p, domainLength) : defaultValue;\n }\n }, {\n key: \"convertPixelsToAxisPadding\",\n value: function convertPixelsToAxisPadding(pixels, domainLength) {\n var $$ = this.owner,\n length = $$.config.axis_rotated ? $$.width : $$.height;\n return domainLength * (pixels / length);\n }\n }, {\n key: \"generateTickValues\",\n value: function generateTickValues(values, tickCount, forTimeSeries) {\n var tickValues = values;\n\n if (tickCount) {\n var targetCount = isFunction(tickCount) ? tickCount() : tickCount; // compute ticks according to tickCount\n\n if (targetCount === 1) tickValues = [values[0]];else if (targetCount === 2) tickValues = [values[0], values[values.length - 1]];else if (targetCount > 2) {\n var tickValue,\n isCategorized = this.owner.isCategorized(),\n count = targetCount - 2,\n start = values[0],\n end = values[values.length - 1];\n tickValues = [start];\n\n for (var i = 0; i < count; i++) tickValue = +start + (end - start) / (count + 1) * (i + 1), tickValues.push(forTimeSeries ? new Date(tickValue) : isCategorized ? Math.round(tickValue) : tickValue);\n\n tickValues.push(end);\n }\n }\n\n return forTimeSeries || (tickValues = tickValues.sort(function (a, b) {\n return a - b;\n })), tickValues;\n }\n }, {\n key: \"generateTransitions\",\n value: function generateTransitions(duration) {\n var $$ = this.owner,\n axes = $$.axes,\n _map = [\"x\", \"y\", \"y2\", \"subx\"].map(function (v) {\n var axis = axes[v];\n return axis && duration && (axis = axis.transition().duration(duration)), axis;\n }),\n _map2 = _slicedToArray(_map, 4),\n axisX = _map2[0],\n axisY = _map2[1],\n axisY2 = _map2[2],\n axisSubX = _map2[3];\n\n return {\n axisX: axisX,\n axisY: axisY,\n axisY2: axisY2,\n axisSubX: axisSubX\n };\n }\n }, {\n key: \"redraw\",\n value: function redraw(transitions, isHidden, isInit) {\n var $$ = this.owner,\n opacity = isHidden ? \"0\" : \"1\";\n [\"x\", \"y\", \"y2\", \"subX\"].forEach(function (id) {\n var axis = $$[\"\".concat(id, \"Axis\")];\n axis && (!isInit && (axis.config.withoutTransition = !$$.config.transition_duration), $$.axes[id.toLowerCase()].style(\"opacity\", opacity), axis.create(transitions[\"axis\".concat(capitalize(id))]));\n }), this.updateAxes();\n }\n /**\n * Redraw axis\n * @param {Object} targetsToShow targets data to be shown\n * @param {Object} wth\n * @param {Ojbect} transitions\n * @param {Object} flow\n * @private\n */\n\n }, {\n key: \"redrawAxis\",\n value: function redrawAxis(targetsToShow, wth, transitions, flow, isInit) {\n var xDomainForZoom,\n _this3 = this,\n $$ = this.owner,\n config = $$.config,\n hasZoom = !!$$.zoomScale;\n\n !hasZoom && $$.isCategorized() && targetsToShow.length === 0 && $$.x.domain([0, $$.axes.x.selectAll(\".tick\").size()]), $$.x && targetsToShow.length ? (!hasZoom && $$.updateXDomain(targetsToShow, wth.UpdateXDomain, wth.UpdateOrgXDomain, wth.TrimXDomain), !config.axis_x_tick_values && this.updateXAxisTickValues(targetsToShow)) : $$.xAxis && ($$.xAxis.tickValues([]), $$.subXAxis.tickValues([])), config.zoom_rescale && !flow && (xDomainForZoom = $$.x.orgDomain()), [\"y\", \"y2\"].forEach(function (key) {\n var axis = $$[key];\n\n if (axis) {\n var tickValues = config[\"axis_\".concat(key, \"_tick_values\")],\n tickCount = config[\"axis_\".concat(key, \"_tick_count\")];\n\n if (axis.domain($$.getYDomain(targetsToShow, key, xDomainForZoom)), !tickValues && tickCount) {\n var domain = axis.domain();\n $$[\"\".concat(key, \"Axis\")].tickValues(_this3.generateTickValues(domain, domain.every(function (v) {\n return v === 0;\n }) ? 1 : tickCount, $$.isTimeSeriesY()));\n }\n }\n }), this.redraw(transitions, $$.hasArcType(), isInit), this.updateLabels(wth.Transition), (wth.UpdateXDomain || wth.UpdateXAxis || wth.Y) && targetsToShow.length && this.setCulling(), wth.Y && ($$.subY && $$.subY.domain($$.getYDomain(targetsToShow, \"y\")), $$.subY2 && $$.subY2.domain($$.getYDomain(targetsToShow, \"y2\")));\n }\n /**\n * Set manual culling\n * @private\n */\n\n }, {\n key: \"setCulling\",\n value: function setCulling() {\n var $$ = this.owner,\n config = $$.config;\n [\"subx\", \"x\", \"y\", \"y2\"].forEach(function (type) {\n var axis = $$.axes[type],\n id = type === \"subx\" ? \"x\" : type,\n toCull = config[\"axis_\".concat(id, \"_tick_culling\")]; // subchart x axis should be aligned with x axis culling\n\n if (axis && toCull) {\n var intervalForCulling,\n tickText = axis.selectAll(\".tick text\"),\n tickValues = sortValue(tickText.data()),\n tickSize = tickValues.length,\n cullingMax = config[\"axis_\".concat(id, \"_tick_culling_max\")];\n\n if (tickSize) {\n for (var i = 1; i < tickSize; i++) if (tickSize / i < cullingMax) {\n intervalForCulling = i;\n break;\n }\n\n tickText.each(function (d) {\n this.style.display = tickValues.indexOf(d) % intervalForCulling ? \"none\" : \"block\";\n });\n } else tickText.style(\"display\", \"block\"); // set/unset x_axis_tick_clippath\n\n\n if (type === \"x\") {\n var clipPath = $$.clipXAxisTickMaxWidth ? $$.clipPathForXAxisTickTexts : null;\n $$.svg.selectAll(\".\".concat(config_classes.axisX, \" .tick text\")).attr(\"clip-path\", clipPath);\n }\n }\n });\n }\n }]), Axis;\n}();\n\n\n// CONCATENATED MODULE: ./src/internals/ChartInternal.js\n\n\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n * @ignore\n */\n\n\n\n\n\n\n\n/**\n * Internal chart class.\n * - Note: Instantiated internally, not exposed for public.\n * @class ChartInternal\n * @ignore\n * @private\n */\n\nvar ChartInternal_ChartInternal = /*#__PURE__*/function () {\n function ChartInternal(api) {\n _classCallCheck(this, ChartInternal);\n\n var $$ = this;\n $$.api = api, $$.config = $$.getOptions(), $$.data = {}, $$.cache = {}, $$.axes = {}, $$.rendered = !1;\n }\n\n return _createClass(ChartInternal, [{\n key: \"beforeInit\",\n value: function beforeInit() {\n var $$ = this;\n $$.callPluginHook(\"$beforeInit\"), callFn($$.config.onbeforeinit, $$, $$.api);\n }\n }, {\n key: \"afterInit\",\n value: function afterInit() {\n var $$ = this;\n $$.callPluginHook(\"$afterInit\"), callFn($$.config.onafterinit, $$, $$.api);\n }\n }, {\n key: \"init\",\n value: function init() {\n var $$ = this,\n config = $$.config;\n $$.initParams();\n var bindto = {\n element: config.bindto,\n classname: \"bb\"\n };\n isObject(config.bindto) && (bindto.element = config.bindto.element || \"#chart\", bindto.classname = config.bindto.classname || bindto.classname), $$.selectChart = isFunction(bindto.element.node) ? config.bindto.element : Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(bindto.element || []), $$.selectChart.empty() && ($$.selectChart = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(browser_doc.body.appendChild(browser_doc.createElement(\"div\")))), $$.selectChart.html(\"\").classed(bindto.classname, !0), $$.initToRender();\n }\n /**\n * Initialize the rendering process\n * @param {Boolean} forced Force to render process\n * @private\n */\n\n }, {\n key: \"initToRender\",\n value: function initToRender(forced) {\n var $$ = this,\n config = $$.config,\n target = $$.selectChart,\n isHidden = function () {\n return target.style(\"display\") === \"none\" || target.style(\"visibility\") === \"hidden\";\n },\n isLazy = config.render.lazy || isHidden(),\n MutationObserver = win.MutationObserver;\n\n if (isLazy && MutationObserver && config.render.observe !== !1 && !forced && new MutationObserver(function (mutation, observer) {\n isHidden() || (observer.disconnect(), !$$.rendered && $$.initToRender(!0));\n }).observe(target.node(), {\n attributes: !0,\n attributeFilter: [\"class\", \"style\"]\n }), !isLazy || forced) {\n var convertedData = $$.convertData(config, $$.initWithData);\n convertedData && $$.initWithData(convertedData), $$.afterInit();\n }\n }\n }, {\n key: \"initParams\",\n value: function initParams() {\n var _this = this,\n $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated;\n\n $$.datetimeId = \"bb-\".concat(+new Date()), $$.initClip(), $$.dragStart = null, $$.dragging = !1, $$.flowing = !1, $$.cancelClick = !1, $$.mouseover = !1, $$.transiting = !1, $$.color = $$.generateColor(), $$.levelColor = $$.generateLevelColor(), $$.point = $$.generatePoint(), $$.extraLineClasses = $$.generateExtraLineClass(), $$.dataTimeFormat = config.data_xLocaltime ? external_commonjs_d3_time_format_commonjs2_d3_time_format_amd_d3_time_format_root_d3_[\"timeParse\"] : external_commonjs_d3_time_format_commonjs2_d3_time_format_amd_d3_time_format_root_d3_[\"utcParse\"], $$.axisTimeFormat = config.axis_x_localtime ? external_commonjs_d3_time_format_commonjs2_d3_time_format_amd_d3_time_format_root_d3_[\"timeFormat\"] : external_commonjs_d3_time_format_commonjs2_d3_time_format_amd_d3_time_format_root_d3_[\"utcFormat\"];\n var isDragZoom = $$.config.zoom_enabled && $$.config.zoom_enabled.type === \"drag\";\n $$.defaultAxisTimeFormat = function (d) {\n var isZoomed = isDragZoom ? _this.zoomScale : _this.zoomScale && $$.x.orgDomain().toString() !== _this.zoomScale.domain().toString(),\n specifier = d.getMilliseconds() && \".%L\" || d.getSeconds() && \".:%S\" || d.getMinutes() && \"%I:%M\" || d.getHours() && \"%I %p\" || d.getDate() !== 1 && \"%b %d\" || isZoomed && d.getDate() === 1 && \"%b\\'%y\" || d.getMonth() && \"%-m/%-d\" || \"%Y\";\n return $$.axisTimeFormat(specifier)(d);\n }, $$.hiddenTargetIds = [], $$.hiddenLegendIds = [], $$.focusedTargetIds = [], $$.defocusedTargetIds = [], $$.isLegendRight = config.legend_position === \"right\", $$.isLegendInset = config.legend_position === \"inset\", $$.isLegendTop = config.legend_inset_anchor === \"top-left\" || config.legend_inset_anchor === \"top-right\", $$.isLegendLeft = config.legend_inset_anchor === \"top-left\" || config.legend_inset_anchor === \"bottom-left\", $$.legendStep = 0, $$.legendItemWidth = 0, $$.legendItemHeight = 0, $$.currentMaxTickWidths = {\n x: {\n size: 0,\n ticks: [],\n domain: \"\"\n },\n y: {\n size: 0,\n domain: \"\"\n },\n y2: {\n size: 0,\n domain: \"\"\n }\n }, $$.rotated_padding_left = 30, $$.rotated_padding_right = isRotated && !config.axis_x_show ? 0 : 30, $$.rotated_padding_top = 5, $$.withoutFadeIn = {}, $$.inputType = $$.convertInputType(), $$.axes.subx = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]);\n }\n }, {\n key: \"initWithData\",\n value: function initWithData(data) {\n var $$ = this,\n config = $$.config;\n\n if ($$.axis = new Axis_Axis($$), config.zoom_enabled && $$.initZoom(), $$.data.xs = {}, $$.data.targets = $$.convertDataToTargets(data), config.data_filter && ($$.data.targets = $$.data.targets.filter(config.data_filter)), config.data_hide && $$.addHiddenTargetIds(config.data_hide === !0 ? $$.mapToIds($$.data.targets) : config.data_hide), config.legend_hide && $$.addHiddenLegendIds(config.legend_hide === !0 ? $$.mapToIds($$.data.targets) : config.legend_hide), $$.updateSizes(), $$.updateScales(!0), $$.x && ($$.x.domain(sortValue($$.getXDomain($$.data.targets))), $$.subX.domain($$.x.domain()), $$.orgXDomain = $$.x.domain()), $$.y && ($$.y.domain($$.getYDomain($$.data.targets, \"y\")), $$.subY.domain($$.y.domain())), $$.y2 && ($$.y2.domain($$.getYDomain($$.data.targets, \"y2\")), $$.subY2 && $$.subY2.domain($$.y2.domain())), $$.svg = $$.selectChart.append(\"svg\").style(\"overflow\", \"hidden\").style(\"display\", \"block\"), config.interaction_enabled && $$.inputType) {\n var isTouch = $$.inputType === \"touch\";\n $$.svg.on(isTouch ? \"touchstart\" : \"mouseenter\", function () {\n return callFn(config.onover, $$, $$.api);\n }).on(isTouch ? \"touchend\" : \"mouseleave\", function () {\n return callFn(config.onout, $$, $$.api);\n });\n }\n\n config.svg_classname && $$.svg.attr(\"class\", config.svg_classname), $$.defs = $$.svg.append(\"defs\"), $$.clipChart = $$.appendClip($$.defs, $$.clipId), $$.clipXAxis = $$.appendClip($$.defs, $$.clipIdForXAxis), $$.clipYAxis = $$.appendClip($$.defs, $$.clipIdForYAxis), $$.clipGrid = $$.appendClip($$.defs, $$.clipIdForGrid), isFunction(config.color_tiles) && $$.patterns && $$.patterns.forEach(function (p) {\n return $$.defs.append(function () {\n return p.node;\n });\n }), $$.updateSvgSize(), $$.bindResize();\n // Define regions\n var main = $$.svg.append(\"g\").attr(\"transform\", $$.getTranslate(\"main\"));\n\n // data.onmin/max callback\n if ($$.main = main, config.subchart_show && $$.initSubchart(), $$.initTooltip && $$.initTooltip(), $$.initLegend && $$.initLegend(), $$.initTitle && $$.initTitle(), config.data_empty_label_text && main.append(\"text\").attr(\"class\", \"\".concat(config_classes.text, \" \").concat(config_classes.empty)).attr(\"text-anchor\", \"middle\") // horizontal centering of text at x position in all browsers.\n .attr(\"dominant-baseline\", \"middle\"), $$.initRegion(), config.clipPath || $$.axis.init(), main.append(\"g\").attr(\"class\", config_classes.chart).attr(\"clip-path\", $$.clipPath), $$.callPluginHook(\"$init\"), $$.initEventRect(), $$.initChartElements(), $$.initGrid(), main.insert(\"rect\", config.zoom_privileged ? null : \"g.\".concat(config_classes.regions)).attr(\"class\", config_classes.zoomRect).attr(\"width\", $$.width).attr(\"height\", $$.height).style(\"opacity\", \"0\").on(\"dblclick.zoom\", null), config.clipPath && $$.axis.init(), $$.updateTargets($$.data.targets), $$.updateDimension(), callFn(config.oninit, $$, $$.api), $$.setBackground(), $$.redraw({\n withTransition: !1,\n withTransform: !0,\n withUpdateXDomain: !0,\n withUpdateOrgXDomain: !0,\n withTransitionForAxis: !1,\n initializing: !0\n }), config.data_onmin || config.data_onmax) {\n var minMax = $$.getMinMaxData();\n callFn(config.data_onmin, $$, minMax.min), callFn(config.data_onmax, $$, minMax.max);\n } // export element of the chart\n\n\n $$.api.element = $$.selectChart.node(), $$.rendered = !0;\n }\n }, {\n key: \"initChartElements\",\n value: function initChartElements() {\n var $$ = this;\n [\"Bar\", \"Radar\", \"Line\", \"Bubble\", \"Arc\", \"Gauge\", \"Pie\"].forEach(function (v) {\n $$[\"init\".concat(v)]();\n }), notEmpty($$.config.data_labels) && $$.initText();\n }\n }, {\n key: \"setChartElements\",\n value: function setChartElements() {\n var $$ = this;\n $$.api.$ = {\n chart: $$.selectChart,\n svg: $$.svg,\n defs: $$.defs,\n main: $$.main,\n tooltip: $$.tooltip,\n legend: $$.legend,\n title: $$.title,\n grid: $$.grid,\n arc: $$.arcs,\n bar: {\n bars: $$.mainBar\n },\n line: {\n lines: $$.mainLine,\n areas: $$.mainArea,\n circles: $$.mainCircle\n },\n text: {\n texts: $$.mainText\n }\n };\n }\n /**\n * Set background element/image\n * @private\n */\n\n }, {\n key: \"setBackground\",\n value: function setBackground() {\n var $$ = this,\n bg = $$.config.background;\n\n if (notEmpty(bg)) {\n var element = $$.svg.select(\".\".concat(config_classes[$$.hasArcType() ? \"chart\" : \"regions\"])).insert(bg.imgUrl ? \"image\" : \"rect\", \":first-child\");\n bg.imgUrl ? element.attr(\"href\", bg.imgUrl) : bg.color && element.style(\"fill\", bg.color), element.attr(\"class\", bg[\"class\"] || null).attr(\"width\", \"100%\").attr(\"height\", \"100%\");\n }\n }\n }, {\n key: \"smoothLines\",\n value: function smoothLines(el, type) {\n type === \"grid\" && el.each(function () {\n var g = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this);\n [\"x1\", \"x2\", \"y1\", \"y2\"].forEach(function (v) {\n return g.attr(v, Math.ceil(g.attr(v)));\n });\n });\n }\n /**\n * Update size values\n * @param {Boolean} isInit If is called at initialization\n * @private\n */\n\n }, {\n key: \"updateSizes\",\n value: function updateSizes(isInit) {\n var $$ = this;\n isInit || $$.setContainerSize();\n var config = $$.config,\n isRotated = config.axis_rotated,\n hasArc = $$.hasArcType(),\n legend = {\n width: $$.legend ? $$.getLegendWidth() : 0,\n height: $$.legend ? $$.getLegendHeight() : 0\n },\n legendHeightForBottom = $$.isLegendRight || $$.isLegendInset ? 0 : legend.height,\n xAxisHeight = isRotated || hasArc ? 0 : $$.getHorizontalAxisHeight(\"x\"),\n subchartXAxisHeight = config.subchart_axis_x_show && config.subchart_axis_x_tick_text_show ? xAxisHeight : 30,\n subchartHeight = config.subchart_show && !hasArc ? config.subchart_size_height + subchartXAxisHeight : 0;\n $$.margin = isRotated ? {\n top: $$.getHorizontalAxisHeight(\"y2\") + $$.getCurrentPaddingTop(),\n right: hasArc ? 0 : $$.getCurrentPaddingRight(),\n bottom: $$.getHorizontalAxisHeight(\"y\") + legendHeightForBottom + $$.getCurrentPaddingBottom(),\n left: subchartHeight + (hasArc ? 0 : $$.getCurrentPaddingLeft())\n } : {\n top: 4 + $$.getCurrentPaddingTop(),\n // for top tick text\n right: hasArc ? 0 : $$.getCurrentPaddingRight(),\n bottom: xAxisHeight + subchartHeight + legendHeightForBottom + $$.getCurrentPaddingBottom(),\n left: hasArc ? 0 : $$.getCurrentPaddingLeft()\n }, $$.margin2 = isRotated ? {\n top: $$.margin.top,\n right: NaN,\n bottom: 20 + legendHeightForBottom,\n left: $$.rotated_padding_left\n } : {\n top: $$.currentHeight - subchartHeight - legendHeightForBottom,\n right: NaN,\n bottom: subchartXAxisHeight + legendHeightForBottom,\n left: $$.margin.left\n }, $$.margin3 = {\n top: 0,\n right: NaN,\n bottom: 0,\n left: 0\n }, $$.updateSizeForLegend && $$.updateSizeForLegend(legend), $$.width = $$.currentWidth - $$.margin.left - $$.margin.right, $$.height = $$.currentHeight - $$.margin.top - $$.margin.bottom, $$.width < 0 && ($$.width = 0), $$.height < 0 && ($$.height = 0), $$.width2 = isRotated ? $$.margin.left - $$.rotated_padding_left - $$.rotated_padding_right : $$.width, $$.height2 = isRotated ? $$.height : $$.currentHeight - $$.margin2.top - $$.margin2.bottom, $$.width2 < 0 && ($$.width2 = 0), $$.height2 < 0 && ($$.height2 = 0), $$.arcWidth = $$.width - ($$.isLegendRight ? legend.width + 10 : 0), $$.arcHeight = $$.height - ($$.isLegendRight ? 0 : 10), $$.hasType(\"gauge\") && !config.gauge_fullCircle && ($$.arcHeight += $$.height - $$.getGaugeLabelHeight()), $$.updateRadius && $$.updateRadius(), $$.isLegendRight && hasArc && ($$.margin3.left = $$.arcWidth / 2 + $$.radiusExpanded * 1.1), !hasArc && config.axis_x_show && config.axis_x_tick_autorotate && $$.updateXAxisTickClip();\n }\n /**\n * Update targeted element with given data\n * @param {Object} targets Data object formatted as 'target'\n * @private\n */\n\n }, {\n key: \"updateTargets\",\n value: function updateTargets(targets) {\n var $$ = this; // Text\n\n $$.updateTargetsForText(targets), $$.updateTargetsForBar(targets), $$.updateTargetsForLine(targets), $$.hasArcType(targets) && ($$.hasType(\"radar\") ? $$.updateTargetsForRadar(targets) : $$.updateTargetsForArc(targets)), $$.updateTargetsForSubchart && $$.updateTargetsForSubchart(targets), $$.showTargets();\n }\n /**\n * Display targeted elements\n * @private\n */\n\n }, {\n key: \"showTargets\",\n value: function showTargets() {\n var $$ = this;\n $$.svg.selectAll(\".\".concat(config_classes.target)).filter(function (d) {\n return $$.isTargetToShow(d.id);\n }).transition().duration($$.config.transition_duration).style(\"opacity\", \"1\");\n }\n }, {\n key: \"getWithOption\",\n value: function getWithOption(options) {\n var withOptions = {\n Y: !0,\n Subchart: !0,\n Transition: !0,\n EventRect: !0,\n Dimension: !0,\n TrimXDomain: !0,\n Transform: !1,\n UpdateXDomain: !1,\n UpdateOrgXDomain: !1,\n Legend: !1,\n UpdateXAxis: \"UpdateXDomain\",\n TransitionForExit: \"Transition\",\n TransitionForAxis: \"Transition\"\n };\n return Object.keys(withOptions).forEach(function (key) {\n var defVal = withOptions[key];\n isString(defVal) && (defVal = withOptions[defVal]), withOptions[key] = getOption(options, \"with\".concat(key), defVal);\n }), withOptions;\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n transitionsValue = arguments.length > 1 ? arguments[1] : undefined,\n $$ = this,\n main = $$.main,\n config = $$.config,\n targetsToShow = $$.filterTargetsToShow($$.data.targets),\n initializing = options.initializing,\n flow = options.flow,\n wth = $$.getWithOption(options),\n duration = wth.Transition ? config.transition_duration : 0,\n durationForExit = wth.TransitionForExit ? duration : 0,\n durationForAxis = wth.TransitionForAxis ? duration : 0,\n transitions = transitionsValue || $$.axis.generateTransitions(durationForAxis);\n $$.updateSizes(initializing), wth.Legend && config.legend_show ? $$.updateLegend($$.mapToIds($$.data.targets), options, transitions) : wth.Dimension && $$.updateDimension(!0), $$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing), $$.updateCircleY(), config.data_empty_label_text && main.select(\"text.\".concat(config_classes.text, \".\").concat(config_classes.empty)).attr(\"x\", $$.width / 2).attr(\"y\", $$.height / 2).text(config.data_empty_label_text).style(\"display\", targetsToShow.length ? \"none\" : null), $$.updateGrid(duration), $$.updateRegion(duration), $$.updateBar(durationForExit), $$.updateLine(durationForExit), $$.updateArea(durationForExit), $$.updateCircle(), $$.hasDataLabel() && $$.updateText(durationForExit), $$.redrawTitle && $$.redrawTitle(), $$.arcs && $$.redrawArc(duration, durationForExit, wth.Transform), $$.radars && $$.redrawRadar(durationForExit), $$.mainText && main.selectAll(\".\".concat(config_classes.selectedCircles)).filter($$.isBarType.bind($$)).selectAll(\"circle\").remove(), config.interaction_enabled && !flow && wth.EventRect && $$.bindZoomEvent(), initializing && $$.setChartElements(), $$.generateRedrawList(targetsToShow, flow, duration, wth.Subchart), $$.callPluginHook(\"$redraw\", options, duration);\n }\n /**\n * Generate redraw list\n * @param {Object} targets targets data to be shown\n * @param {Object} flow\n * @param {Object} duration\n * @param {Boolean} withSubchart whether or not to show subchart\n * @private\n */\n\n }, {\n key: \"generateRedrawList\",\n value: function generateRedrawList(targets, flow, duration, withSubchart) {\n var $$ = this,\n config = $$.config,\n shape = $$.getDrawShape();\n config.subchart_show && $$.redrawSubchart(withSubchart, duration, shape);\n // generate flow\n var flowFn = flow && $$.generateFlow({\n targets: targets,\n flow: flow,\n duration: flow.duration,\n shape: shape,\n xv: $$.xv.bind($$)\n }),\n isTransition = (duration || flowFn) && $$.isTabVisible(),\n redrawList = $$.getRedrawList(shape, flow, flowFn, isTransition),\n afterRedraw = flow || config.onrendered ? function () {\n flowFn && flowFn(), callFn(config.onrendered, $$, $$.api);\n } : null;\n if (afterRedraw) // Only use transition when current tab is visible.\n if (isTransition && redrawList.length) {\n // Wait for end of transitions for callback\n var waitForDraw = $$.generateWait(); // transition should be derived from one transition\n\n Object(external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_root_d3_[\"transition\"])().duration(duration).each(function () {\n redrawList.reduce(function (acc, t1) {\n return acc.concat(t1);\n }, []).forEach(function (t) {\n return waitForDraw.add(t);\n });\n }).call(waitForDraw, afterRedraw);\n } else $$.transiting || afterRedraw(); // update fadein condition\n\n $$.mapToIds($$.data.targets).forEach(function (id) {\n $$.withoutFadeIn[id] = !0;\n });\n }\n /**\n * Get the shape draw function\n * @return {Object}\n * @private\n */\n\n }, {\n key: \"getDrawShape\",\n value: function getDrawShape() {\n var $$ = this,\n isRotated = $$.config.axis_rotated,\n hasRadar = $$.hasType(\"radar\"),\n shape = {\n type: {},\n indices: {}\n };\n\n // setup drawer - MEMO: these must be called after axis updated\n if ($$.hasTypeOf(\"Line\") || $$.hasType(\"bubble\") || $$.hasType(\"scatter\")) {\n var indices = $$.getShapeIndices($$.isLineType);\n\n if (shape.indices.line = indices, shape.type.line = $$.generateDrawLine ? $$.generateDrawLine(indices, !1) : undefined, $$.hasTypeOf(\"Area\")) {\n var _indices = $$.getShapeIndices($$.isAreaType);\n\n shape.indices.area = _indices, shape.type.area = $$.generateDrawArea ? $$.generateDrawArea(_indices, !1) : undefined;\n }\n }\n\n if ($$.hasType(\"bar\")) {\n var _indices2 = $$.getShapeIndices($$.isBarType);\n\n shape.indices.bar = _indices2, shape.type.bar = $$.generateDrawBar ? $$.generateDrawBar(_indices2) : undefined;\n }\n\n return shape.pos = {\n xForText: $$.generateXYForText(shape.indices, !0),\n yForText: $$.generateXYForText(shape.indices, !1),\n // generate circle x/y functions depending on updated params\n cx: (hasRadar ? $$.radarCircleX : isRotated ? $$.circleY : $$.circleX).bind($$),\n cy: (hasRadar ? $$.radarCircleY : isRotated ? $$.circleX : $$.circleY).bind($$)\n }, shape;\n }\n }, {\n key: \"getRedrawList\",\n value: function getRedrawList(shape, flow, flowFn, isTransition) {\n var $$ = this,\n config = $$.config,\n hasArcType = $$.hasArcType(),\n _shape$pos = shape.pos,\n cx = _shape$pos.cx,\n cy = _shape$pos.cy,\n xForText = _shape$pos.xForText,\n yForText = _shape$pos.yForText,\n list = [];\n\n if (!hasArcType) {\n var _shape$type = shape.type,\n area = _shape$type.area,\n bar = _shape$type.bar,\n line = _shape$type.line;\n (config.grid_x_lines.length || config.grid_y_lines.length) && list.push($$.redrawGrid(isTransition)), config.regions.length && list.push($$.redrawRegion(isTransition)), $$.hasTypeOf(\"Line\") && (list.push($$.redrawLine(line, isTransition)), $$.hasTypeOf(\"Area\") && list.push($$.redrawArea(area, isTransition))), $$.hasType(\"bar\") && list.push($$.redrawBar(bar, isTransition)), flow || list.push($$.updateGridFocus());\n }\n\n return (!hasArcType || $$.hasType(\"radar\")) && (notEmpty(config.data_labels) && list.push($$.redrawText(xForText, yForText, flow, isTransition)), list.push($$.redrawCircle(cx, cy, isTransition, flowFn))), list;\n }\n }, {\n key: \"updateAndRedraw\",\n value: function updateAndRedraw() {\n var transitions,\n options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n $$ = this,\n config = $$.config;\n options.withTransition = getOption(options, \"withTransition\", !0), options.withTransform = getOption(options, \"withTransform\", !1), options.withLegend = getOption(options, \"withLegend\", !1), options.withUpdateXDomain = !0, options.withUpdateOrgXDomain = !0, options.withTransitionForExit = !1, options.withTransitionForTransform = getOption(options, \"withTransitionForTransform\", options.withTransition), options.withLegend && config.legend_show || (transitions = $$.axis.generateTransitions(options.withTransitionForAxis ? config.transition_duration : 0), $$.updateScales(), $$.updateSvgSize(), $$.transformAll(options.withTransitionForTransform, transitions)), $$.redraw(options, transitions);\n }\n }, {\n key: \"redrawWithoutRescale\",\n value: function redrawWithoutRescale() {\n this.redraw({\n withY: !1,\n withSubchart: !1,\n withEventRect: !1,\n withTransitionForAxis: !1\n });\n }\n }, {\n key: \"isTimeSeries\",\n value: function isTimeSeries() {\n return this.config.axis_x_type === \"timeseries\";\n }\n }, {\n key: \"isCategorized\",\n value: function isCategorized() {\n return this.config.axis_x_type.indexOf(\"category\") >= 0 || this.hasType(\"radar\");\n }\n }, {\n key: \"isCustomX\",\n value: function isCustomX() {\n var $$ = this,\n config = $$.config;\n return !$$.isTimeSeries() && (config.data_x || notEmpty(config.data_xs));\n }\n }, {\n key: \"isTimeSeriesY\",\n value: function isTimeSeriesY() {\n return this.config.axis_y_type === \"timeseries\";\n }\n }, {\n key: \"getTranslate\",\n value: function getTranslate(target) {\n var x,\n y,\n index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0,\n $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n hasGauge = $$.hasType(\"gauge\"),\n padding = 0;\n if (index && /^(x|y2?)$/.test(target) && (padding = $$.getAxisSize(target) * index), target === \"main\") x = asHalfPixel($$.margin.left), y = asHalfPixel($$.margin.top);else if (target === \"context\") x = asHalfPixel($$.margin2.left), y = asHalfPixel($$.margin2.top);else if (target === \"legend\") x = $$.margin3.left, y = $$.margin3.top + (hasGauge ? 10 : 0);else if (target === \"x\") x = isRotated ? -padding : 0, y = isRotated ? 0 : $$.height + padding;else if (target === \"y\") x = isRotated ? 0 : -padding, y = isRotated ? $$.height + padding : 0;else if (target === \"y2\") x = isRotated ? 0 : $$.width + padding, y = isRotated ? 1 - padding : 0;else if (target === \"subx\") x = 0, y = isRotated ? 0 : $$.height2;else if (target === \"arc\") x = $$.arcWidth / 2, y = $$.arcHeight / 2;else if (target === \"radar\") {\n var _$$$getRadarSize = $$.getRadarSize(),\n _$$$getRadarSize2 = _slicedToArray(_$$$getRadarSize, 1),\n width = _$$$getRadarSize2[0];\n\n x = $$.width / 2 - width, y = asHalfPixel($$.margin.top);\n }\n return \"translate(\".concat(x, \", \").concat(y, \")\");\n }\n }, {\n key: \"initialOpacity\",\n value: function initialOpacity(d) {\n return this.getBaseValue(d) !== null && this.withoutFadeIn[d.id] ? \"1\" : \"0\";\n }\n }, {\n key: \"initialOpacityForCircle\",\n value: function initialOpacityForCircle(d) {\n return this.getBaseValue(d) !== null && this.withoutFadeIn[d.id] ? this.opacityForCircle(d) : \"0\";\n }\n }, {\n key: \"opacityForCircle\",\n value: function opacityForCircle(d) {\n var opacity = this.config.point_show ? \"1\" : \"0\";\n return isValue(this.getBaseValue(d)) ? this.isBubbleType(d) || this.isScatterType(d) ? \"0.5\" : opacity : \"0\";\n }\n }, {\n key: \"opacityForText\",\n value: function opacityForText() {\n return this.hasDataLabel() ? \"1\" : \"0\";\n }\n /**\n * Get the zoom or unzoomed scaled value\n * @param {Date|Number|Object} d Data value\n * @private\n */\n\n }, {\n key: \"xx\",\n value: function xx(d) {\n var $$ = this,\n fn = $$.config.zoom_enabled && $$.zoomScale ? $$.zoomScale : this.x;\n return d ? fn(isValue(d.x) ? d.x : d) : null;\n }\n }, {\n key: \"xv\",\n value: function xv(d) {\n var $$ = this,\n value = $$.getBaseValue(d);\n return $$.isTimeSeries() ? value = $$.parseDate(value) : $$.isCategorized() && isString(value) && (value = $$.config.axis_x_categories.indexOf(value)), Math.ceil($$.x(value));\n }\n }, {\n key: \"yv\",\n value: function yv(d) {\n var $$ = this,\n yScale = d.axis && d.axis === \"y2\" ? $$.y2 : $$.y;\n return Math.ceil(yScale($$.getBaseValue(d)));\n }\n }, {\n key: \"subxx\",\n value: function subxx(d) {\n return d ? this.subX(d.x) : null;\n }\n }, {\n key: \"transformMain\",\n value: function transformMain(withTransition, transitions) {\n var xAxis,\n yAxis,\n y2Axis,\n $$ = this;\n transitions && transitions.axisX ? xAxis = transitions.axisX : (xAxis = $$.main.select(\".\".concat(config_classes.axisX)), withTransition && (xAxis = xAxis.transition())), transitions && transitions.axisY ? yAxis = transitions.axisY : (yAxis = $$.main.select(\".\".concat(config_classes.axisY)), withTransition && (yAxis = yAxis.transition())), transitions && transitions.axisY2 ? y2Axis = transitions.axisY2 : (y2Axis = $$.main.select(\".\".concat(config_classes.axisY2)), withTransition && (y2Axis = y2Axis.transition())), (withTransition ? $$.main.transition() : $$.main).attr(\"transform\", $$.getTranslate(\"main\")), xAxis.attr(\"transform\", $$.getTranslate(\"x\")), yAxis.attr(\"transform\", $$.getTranslate(\"y\")), y2Axis.attr(\"transform\", $$.getTranslate(\"y2\")), $$.main.select(\".\".concat(config_classes.chartArcs)).attr(\"transform\", $$.getTranslate(\"arc\"));\n }\n }, {\n key: \"transformAll\",\n value: function transformAll(withTransition, transitions) {\n var $$ = this;\n $$.transformMain(withTransition, transitions), $$.config.subchart_show && $$.transformContext(withTransition, transitions), $$.legend && $$.transformLegend(withTransition);\n }\n }, {\n key: \"updateSvgSize\",\n value: function updateSvgSize() {\n var $$ = this,\n brush = $$.svg.select(\".\".concat(config_classes.brush, \" .overlay\")),\n brushSize = {\n width: 0,\n height: 0\n };\n brush.size() && (brushSize.width = +brush.attr(\"width\"), brushSize.height = +brush.attr(\"height\")), $$.svg.attr(\"width\", $$.currentWidth).attr(\"height\", $$.currentHeight), $$.svg.selectAll([\"#\".concat($$.clipId), \"#\".concat($$.clipIdForGrid)]).select(\"rect\").attr(\"width\", $$.width).attr(\"height\", $$.height), $$.svg.select(\"#\".concat($$.clipIdForXAxis)).select(\"rect\").attr(\"x\", $$.getXAxisClipX.bind($$)).attr(\"y\", $$.getXAxisClipY.bind($$)).attr(\"width\", $$.getXAxisClipWidth.bind($$)).attr(\"height\", $$.getXAxisClipHeight.bind($$)), $$.svg.select(\"#\".concat($$.clipIdForYAxis)).select(\"rect\").attr(\"x\", $$.getYAxisClipX.bind($$)).attr(\"y\", $$.getYAxisClipY.bind($$)).attr(\"width\", $$.getYAxisClipWidth.bind($$)).attr(\"height\", $$.getYAxisClipHeight.bind($$)), $$.svg.select(\"#\".concat($$.clipIdForSubchart)).select(\"rect\").attr(\"width\", $$.width).attr(\"height\", brushSize.height), $$.svg.select(\".\".concat(config_classes.zoomRect)).attr(\"width\", $$.width).attr(\"height\", $$.height);\n }\n }, {\n key: \"updateDimension\",\n value: function updateDimension(withoutAxis) {\n var $$ = this;\n withoutAxis || ($$.xAxis && $$.config.axis_rotated ? ($$.xAxis.create($$.axes.x), $$.subXAxis.create($$.axes.subx)) : ($$.yAxis && $$.yAxis.create($$.axes.y), $$.y2Axis && $$.y2Axis.create($$.axes.y2))), $$.updateScales(withoutAxis), $$.updateSvgSize(), $$.transformAll(!1);\n }\n }, {\n key: \"bindResize\",\n value: function bindResize() {\n var $$ = this,\n config = $$.config,\n resizeFunction = $$.generateResize(),\n list = [];\n list.push(function () {\n return callFn(config.onresize, $$, $$.api);\n }), config.resize_auto && list.push(function () {\n return $$.api.flush(!1, !0);\n }), list.push(function () {\n return callFn(config.onresized, $$, $$.api);\n }), list.forEach(function (v) {\n return resizeFunction.add(v);\n }), win.addEventListener(\"resize\", $$.resizeFunction = resizeFunction);\n }\n }, {\n key: \"generateResize\",\n value: function generateResize() {\n function callResizeFn() {\n callResizeFn.timeout && (win.clearTimeout(callResizeFn.timeout), callResizeFn.timeout = null), callResizeFn.timeout = win.setTimeout(function () {\n fn.forEach(function (f) {\n return f();\n });\n }, 200);\n }\n\n var fn = [];\n return callResizeFn.add = function (f) {\n return fn.push(f);\n }, callResizeFn.remove = function (f) {\n return fn.splice(fn.indexOf(f), 1);\n }, callResizeFn;\n }\n }, {\n key: \"endall\",\n value: function endall(transition, callback) {\n var n = 0;\n transition.each(function () {\n return ++n;\n }).on(\"end\", function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n\n --n || callback.apply.apply(callback, [this].concat(args));\n });\n }\n }, {\n key: \"generateWait\",\n value: function generateWait() {\n var transitionsToWait = [],\n f = function (transition, callback) {\n function loop() {\n for (var t, done = 0, i = 0; t = transitionsToWait[i]; i++) {\n if (t === !0 || t.empty && t.empty()) {\n done++;\n continue;\n }\n\n try {\n t.transition();\n } catch (e) {\n done++;\n }\n }\n\n timer && clearTimeout(timer), done === transitionsToWait.length ? callback && callback() : timer = setTimeout(loop, 50);\n }\n\n var timer;\n loop();\n };\n\n return f.add = function (transition) {\n isArray(transition) ? transitionsToWait = transitionsToWait.concat(transition) : transitionsToWait.push(transition);\n }, f;\n }\n }, {\n key: \"parseDate\",\n value: function parseDate(date) {\n var parsedDate,\n $$ = this;\n return date instanceof Date ? parsedDate = date : isString(date) ? parsedDate = $$.dataTimeFormat($$.config.data_xFormat)(date) : isNumber(date) && !isNaN(date) && (parsedDate = new Date(+date)), (!parsedDate || isNaN(+parsedDate)) && console && console.error && console.error(\"Failed to parse x '\".concat(date, \"' to Date object\")), parsedDate;\n }\n }, {\n key: \"isTabVisible\",\n value: function isTabVisible() {\n return !browser_doc.hidden;\n }\n }, {\n key: \"convertInputType\",\n value: function convertInputType() {\n var $$ = this,\n config = $$.config,\n isMobile = !1;\n\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\n if (/Mobi/.test(win.navigator.userAgent) && config.interaction_inputType_touch) {\n // Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/\n var hasTouchPoints = win.navigator && \"maxTouchPoints\" in win.navigator && win.navigator.maxTouchPoints > 0,\n hasTouch = \"ontouchmove\" in win || win.DocumentTouch && browser_doc instanceof win.DocumentTouch; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js\n // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true\n\n isMobile = hasTouchPoints || hasTouch;\n }\n\n var hasMouse = config.interaction_inputType_mouse && !isMobile && \"onmouseover\" in win;\n return hasMouse && \"mouse\" || isMobile && \"touch\" || null;\n }\n /**\n * Call plugin hook\n * @param {String} phase The lifecycle phase\n * @private\n */\n\n }, {\n key: \"callPluginHook\",\n value: function callPluginHook(phase) {\n for (var _this2 = this, _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];\n\n this.config.plugins.forEach(function (v) {\n phase === \"$beforeInit\" && (v.$$ = _this2, _this2.api.plugins.push(v)), v[phase].apply(v, args);\n });\n }\n }]), ChartInternal;\n}();\n\n\n// CONCATENATED MODULE: ./src/internals/Chart.js\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n/**\n * Main chart class.\n * - Note: Instantiated via `bb.generate()`.\n * @class Chart\n * @example\n * var chart = bb.generate({\n * data: {\n * columns: [\n *\t [\"x\", \"2015-11-02\", \"2015-12-01\", \"2016-01-01\", \"2016-02-01\", \"2016-03-01\"],\n * \t [\"count1\", 11, 8, 7, 6, 5 ],\n *\t [\"count2\", 9, 3, 6, 2, 8 ]\n * ]}\n * }\n * @see {@link bb.generate} for the initialization.\n*/\n\n/**\n * Access instance's primary node elements\n * @member {Object} $\n * @property {Object} $\n * @property {d3.selection} $.chart Wrapper element\n * @property {d3.selection} $.svg Main svg element\n * @property {d3.selection} $.defs Definition element\n * @property {d3.selection} $.main Main grouping element\n * @property {d3.selection} $.tooltip Tooltip element\n * @property {d3.selection} $.legend Legend element\n * @property {d3.selection} $.title Title element\n * @property {d3.selection} $.grid Grid element\n * @property {d3.selection} $.arc Arc element\n * @property {Object} $.bar\n * @property {d3.selection} $.bar.bars Bar elements\n * @property {Object} $.line\n * @property {d3.selection} $.line.lines Line elements\n * @property {d3.selection} $.line.areas Areas elements\n * @property {d3.selection} $.line.circles Data point circle elements\n * @property {Object} $.text\n * @property {d3.selection} $.text.texts Data label text elements\n * @memberof Chart\n * @example\n * var chart = bb.generate({ ... });\n *\n * chart.$.chart; // wrapper element\n * chart.$.line.circles; // all data point circle elements\n */\n\nvar Chart_Chart = function Chart(config) {\n _classCallCheck(this, Chart);\n\n var $$ = new ChartInternal_ChartInternal(this);\n /**\n * Plugin instance array\n * @member {Array} plugins\n * @memberof Chart\n * @instance\n \t * @example\n * var chart = bb.generate({\n * ...\n * plugins: [\n * new bb.plugin.stanford({ ... }),\n * new PluginA()\n * ]\n * });\n *\n * chart.plugins; // [Stanford, PluginA] - instance array\n */\n\n // bind \"this\" to nested API\n this.plugins = [], this.internal = $$, $$.loadConfig(config), $$.beforeInit(config), $$.init(), function bindThis(fn, target, argThis) {\n Object.keys(fn).forEach(function (key) {\n target[key] = fn[key].bind(argThis), Object.keys(fn[key]).length && bindThis(fn[key], target[key], argThis);\n });\n }(Chart.prototype, this, this);\n};\n\n\n// CONCATENATED MODULE: ./src/config/Options.js\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n/**\n * Class to set options on generating chart.\n * - It's instantiated internally, not exposed for public.\n * @class Options\n * @see {@link bb.generate} to use these options on generating the chart\n */\nvar Options_Options = function Options() {\n return _classCallCheck(this, Options), {\n /**\n * Specify the CSS selector or the element which the chart will be set to. D3 selection object can be specified also.<br>\n * If other chart is set already, it will be replaced with the new one (only one chart can be set in one element).\n * - **NOTE:** In case of element doesn't exist or not specified, will add a `<div>` element to the body.\n * @name bindto\n * @memberof Options\n * @property {String|HTMLElement|d3.selection} bindto=#chart Specify the element where chart will be drawn.\n * @property {String|HTMLElement|d3.selection} bindto.element=#chart Specify the element where chart will be drawn.\n * @property {String} [bindto.classname=bb] Specify the class name of bind element.<br>\n * **NOTE:** When class name isn't `bb`, then you also need to update the default CSS to be rendered correctly.\n * @default #chart\n * @example\n * bindto: \"#myContainer\"\n *\n * // or HTMLElement\n * bindto: document.getElementById(\"myContainer\")\n *\n * // or D3 selection object\n * bindto: d3.select(\"#myContainer\")\n *\n * // or to change default classname\n * bindto: {\n * element: \"#chart\",\n * classname: \"bill-board\" // ex) <div id='chart' class='bill-board'>\n * }\n */\n bindto: \"#chart\",\n\n /**\n * Set chart background.\n * @name background\n * @memberof Options\n * @property {String} background.class Specify the class name for background element.\n * @property {String} background.color Specify the fill color for background element.<br>**NOTE:** Will be ignored if `imgUrl` option is set.\n * @property {String} background.imgUrl Specify the image url string for background.\n * @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.Background)\n * @example\n * background: {\n * class: \"myClass\",\n * color: \"red\",\n *\n * // Set image url for background.\n * // If specified, 'color' option will be ignored.\n * imgUrl: \"https://naver.github.io/billboard.js/img/logo/billboard.js.svg\",\n * }\n */\n background: {},\n\n /**\n * Set 'clip-path' attribute for chart element\n * - **NOTE:**\n * > When is false, chart node element is positioned after the axis node in DOM tree hierarchy.\n * > Is to make chart element positioned over axis element.\n * @name clipPath\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.clipPath)\n * @example\n * // don't set 'clip-path' attribute\n * clipPath: false\n */\n clipPath: !0,\n\n /**\n * Set svg element's class name\n * @name svg\n * @memberof Options\n * @type {Object}\n * @property {String} [svg.classname] class name for svg element\n * @example\n * svg: {\n * classname: \"test_class\"\n * }\n */\n svg_classname: undefined,\n\n /**\n * The desired size of the chart element.\n * If value is not specified, the width of the chart will be calculated by the size of the parent element it's appended to.\n * @name size\n * @memberof Options\n * @type {Object}\n * @property {Number} [size.width] width of the chart element\n * @property {Number} [size.height] height of the chart element\n * @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.ChartSize)\n * @example\n * size: {\n * width: 640,\n * height: 480\n * }\n */\n size_width: undefined,\n size_height: undefined,\n\n /**\n * The padding of the chart element.\n * @name padding\n * @memberof Options\n * @type {Object}\n * @property {Number} [padding.top] padding on the top of chart\n * @property {Number} [padding.right] padding on the right of chart\n * @property {Number} [padding.bottom] padding on the bottom of chart\n * @property {Number} [padding.left] padding on the left of chart\n * @example\n * padding: {\n * top: 20,\n * right: 20,\n * bottom: 20,\n * left: 20\n * }\n */\n padding_left: undefined,\n padding_right: undefined,\n padding_top: undefined,\n padding_bottom: undefined,\n\n /**\n * Set chart resize options\n * @name resize\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [resize.auto=true] Set chart resize automatically on viewport changes.\n * @example\n * resize: {\n * auto: false\n * }\n */\n resize_auto: !0,\n\n /**\n * Set zoom options\n * @name zoom\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [zoom.enabled=false] Enable zooming.\n * @property {String} [zoom.enabled.type='wheel'] Set zoom interaction type.\n * - **Available types:**\n * - wheel\n * - drag\n * @property {Boolean} [zoom.rescale=false] Enable to rescale after zooming.<br>\n * If true set, y domain will be updated according to the zoomed region.\n * @property {Array} [zoom.extent=[1, 10]] Change zoom extent.\n * @property {Number|Date} [zoom.x.min] Set x Axis minimum zoom range\n * @property {Number|Date} [zoom.x.max] Set x Axis maximum zoom range\n * @property {Function} [zoom.onzoomstart=undefined] Set callback that is called when zooming starts.<br>\n * Specified function receives the zoom event.\n * @property {Function} [zoom.onzoom=undefined] Set callback that is called when the chart is zooming.<br>\n * Specified function receives the zoomed domain.\n * @property {Function} [zoom.onzoomend=undefined] Set callback that is called when zooming ends.<br>\n * Specified function receives the zoomed domain.\n * @property {Boolean|Object} [zoom.resetButton=true] Set to display zoom reset button for 'drag' type zoom\n * @property {Function} [zoom.resetButton.onclick] Set callback when clicks the reset button. The callback will receive reset button element reference as argument.\n * @property {String} [zoom.resetButton.text='Reset Zoom'] Text value for zoom reset button.\n * @see [Demo:zoom](https://naver.github.io/billboard.js/demo/#Interaction.Zoom)\n * @see [Demo:drag zoom](https://naver.github.io/billboard.js/demo/#Interaction.DragZoom)\n * @example\n * zoom: {\n * enabled: {\n * type: \"drag\"\n * },\n * rescale: true,\n * extent: [1, 100] // enable more zooming\n * x: {\n * min: -1, // set min range\n * max: 10 // set max range\n * },\n * onzoomstart: function(event) { ... },\n * onzoom: function(domain) { ... },\n * onzoomend: function(domain) { ... },\n *\n * // show reset button when is zoomed-in\n * resetButton: true,\n *\n * resetButton: {\n * // onclick callback when reset button is clicked\n * onclick: function(button) {\n * button; // Reset button element reference\n * ...\n * },\n *\n * // customized text value for reset zoom button\n * text: \"Unzoom\"\n * }\n * }\n */\n zoom_enabled: undefined,\n zoom_extent: undefined,\n zoom_privileged: !1,\n zoom_rescale: !1,\n zoom_onzoom: undefined,\n zoom_onzoomstart: undefined,\n zoom_onzoomend: undefined,\n zoom_resetButton: !0,\n zoom_x_min: undefined,\n zoom_x_max: undefined,\n\n /**\n * Interaction options\n * @name interaction\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [interaction.enabled=true] Indicate if the chart should have interactions.<br>\n * If `false` is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled.\n * @property {Boolean} [interaction.brighten=true] Make brighter for the selected area (ex. 'pie' type data selected area)\n * @property {Boolean} [interaction.inputType.mouse=true] enable or disable mouse interaction\n * @property {Boolean} [interaction.inputType.touch=true] enable or disable touch interaction\n * @property {Boolean|Number} [interaction.inputType.touch.preventDefault=false] enable or disable to call event.preventDefault on touchstart & touchmove event. It's usually used to prevent document scrolling.\n * @see [Demo: touch.preventDefault](https://naver.github.io/billboard.js/demo/#Interaction.PreventScrollOnTouch)\n * @example\n * interaction: {\n * enabled: false,\n * brighten: false,\n * inputType: {\n * mouse: true,\n * touch: false\n *\n * // or declare preventDefault explicitly.\n * // In this case touch inputType is enabled by default\n * touch: {\n * preventDefault: true\n *\n * // or threshold pixel value (pixel moved from touchstart to touchmove)\n * preventDefault: 5\n * }\n * }\n * }\n */\n interaction_enabled: !0,\n interaction_brighten: !0,\n interaction_inputType_mouse: !0,\n interaction_inputType_touch: {},\n\n /**\n * Set a callback to execute when mouse/touch enters the chart.\n * @name onover\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * // @param {Chart} ctx - Instance itself\n * onover: function(ctx) {\n * ...\n * }\n */\n onover: undefined,\n\n /**\n * Set a callback to execute when mouse/touch leaves the chart.\n * @name onout\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * // @param {Chart} ctx - Instance itself\n * onout: function(ctx) {\n * ...\n * }\n */\n onout: undefined,\n\n /**\n * Set a callback to execute when user resizes the screen.\n * @name onresize\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * // @param {Chart} ctx - Instance itself\n * onresize: function(ctx) {\n * ...\n * }\n */\n onresize: undefined,\n\n /**\n * Set a callback to execute when screen resize finished.\n * @name onresized\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * // @param {Chart} ctx - Instance itself\n * onresized: function(ctx) {\n * ...\n * }\n */\n onresized: undefined,\n\n /**\n * Set a callback to execute before the chart is initialized\n * @name onbeforeinit\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * // @param {Chart} ctx - Instance itself\n * onbeforeinit: function(ctx) {\n * ...\n * }\n */\n onbeforeinit: undefined,\n\n /**\n * Set a callback to execute when the chart is initialized.\n * @name oninit\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * // @param {Chart} ctx - Instance itself\n * oninit: function(ctx) {\n * ...\n * }\n */\n oninit: undefined,\n\n /**\n * Set a callback to execute after the chart is initialized\n * @name onafterinit\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * // @param {Chart} ctx - Instance itself\n * onafterinit: function(ctx) {\n * ...\n * }\n */\n onafterinit: undefined,\n\n /**\n * Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed.\n * @name onrendered\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * // @param {Chart} ctx - Instance itself\n * onrendered: function(ctx) {\n * ...\n * }\n */\n onrendered: undefined,\n\n /**\n * Set duration of transition (in milliseconds) for chart animation.<br><br>\n * - **NOTE:** If `0 `or `null` set, transition will be skipped. So, this makes initial rendering faster especially in case you have a lot of data.\n * @name transition\n * @memberof Options\n * @type {Object}\n * @property {Number} [transition.duration=350] duration in milliseconds\n * @example\n * transition: {\n * duration: 500\n * }\n */\n transition_duration: 350,\n\n /**\n * Specify the key of x values in the data.<br><br>\n * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names.\n * @name data․x\n * @memberof Options\n * @type {String}\n * @default undefined\n * @example\n * data: {\n * x: \"date\"\n * }\n */\n data_x: undefined,\n\n /**\n * Specify the keys of the x values for each data.<br><br>\n * This option can be used if we want to show the data that has different x values.\n * @name data․xs\n * @memberof Options\n * @type {Object}\n * @default {}\n * @example\n * data: {\n * xs: {\n * data1: \"x1\",\n * data2: \"x2\"\n * }\n * }\n */\n data_xs: {},\n\n /**\n * Set a format specifier to parse string specifed as x.\n * @name data․xFormat\n * @memberof Options\n * @type {String}\n * @default %Y-%m-%d\n * @example\n * data: {\n * x: \"x\",\n * columns: [\n * [\"x\", \"01012019\", \"02012019\", \"03012019\"],\n * [\"data1\", 30, 200, 100]\n * ],\n * // Format specifier to parse as datetime for given 'x' string value\n * xFormat: \"%m%d%Y\"\n * },\n * axis: {\n * x: {\n * type: \"timeseries\"\n * }\n * }\n * @see [D3's time specifier](https://github.com/d3/d3-time-format#locale_format)\n */\n data_xFormat: \"%Y-%m-%d\",\n\n /**\n * Set localtime format to parse x axis.\n * @name data․xLocaltime\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @example\n * data: {\n * xLocaltime: false\n * }\n */\n data_xLocaltime: !0,\n\n /**\n * Sort on x axis.\n * @name data․xSort\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @example\n * data: {\n * xSort: false\n * }\n */\n data_xSort: !0,\n\n /**\n * Converts data id value\n * @name data․idConverter\n * @memberof Options\n * @type {Function}\n * @default function(id) { return id; }\n * @example\n * data: {\n * idConverter: function(id) {\n * // when id is 'data1', converts to be 'data2'\n * // 'data2' should be given as the initial data value\n * if (id === \"data1\") {\n * return \"data2\";\n * } else {\n * return id;\n * }\n * }\n * }\n */\n data_idConverter: function data_idConverter(id) {\n return id;\n },\n\n /**\n * Set custom data name.\n * @name data․names\n * @memberof Options\n * @type {Object}\n * @default {}\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataName)\n * @example\n * data: {\n * names: {\n * data1: \"Data Name 1\",\n * data2: \"Data Name 2\"\n * }\n * }\n */\n data_names: {},\n\n /**\n * Set custom data class.<br><br>\n * If this option is specified, the element g for the data has an additional class that has the prefix 'bb-target-' (eg. bb-target-additional-data1-class).\n * @name data․classes\n * @memberof Options\n * @type {Object}\n * @default {}\n * @example\n * data: {\n * classes: {\n * data1: \"additional-data1-class\",\n * data2: \"additional-data2-class\"\n * }\n * }\n */\n data_classes: {},\n\n /**\n * Set groups for the data for stacking.\n * @name data․groups\n * @memberof Options\n * @type {Array}\n * @default []\n * @example\n * data: {\n * groups: [\n * [\"data1\", \"data2\"],\n * [\"data3\"]\n * ]\n * }\n */\n data_groups: [],\n\n /**\n * Set y axis the data related to. y and y2 can be used.\n * - **NOTE:** If all data is related to one of the axes, the domain of axis without related data will be replaced by the domain from the axis with related data\n * @name data․axes\n * @memberof Options\n * @type {Object}\n * @default {}\n * @example\n * data: {\n * axes: {\n * data1: \"y\",\n * data2: \"y2\"\n * }\n * }\n */\n data_axes: {},\n\n /**\n * Set chart type at once.<br><br>\n * If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.<br><br>\n * **Available Values:**\n * - area\n * - area-line-range\n * - area-spline\n * - area-spline-range\n * - area-step\n * - bar\n * - bubble\n * - donut\n * - gauge\n * - line\n * - pie\n * - radar\n * - scatter\n * - spline\n * - step\n * @name data․type\n * @memberof Options\n * @type {String}\n * @default line\n * @example\n * data: {\n * type: \"bar\"\n * }\n */\n data_type: undefined,\n\n /**\n * Set chart type for each data.<br>\n * This setting overwrites data.type setting.\n * - **NOTE:** `radar` type can't be combined with other types.\n * @name data․types\n * @memberof Options\n * @type {Object}\n * @default {}\n * @example\n * data: {\n * types: {\n * data1: \"bar\",\n * data2: \"spline\"\n * }\n * }\n */\n data_types: {},\n\n /**\n * Set labels options\n * @name data․labels\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [data.labels=false] Show or hide labels on each data points\n * @property {Boolean} [data.labels.centered=false] Centerize labels on `bar` shape. (**NOTE:** works only for 'bar' type)\n * @property {Function} [data.labels.format] Set formatter function for data labels.<br>\n * The formatter function receives 4 arguments such as v, id, i, j and it must return a string that will be shown as the label. The arguments are:<br>\n * - `v` is the value of the data point where the label is shown.\n * - `id` is the id of the data where the label is shown.\n * - `i` is the index of the data point where the label is shown.\n * - `j` is the sub index of the data point where the label is shown.<br><br>\n * Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$'))\n \t * @property {String|Object} [data.labels.colors] Set label text colors.\n * @property {Object} [data.labels.position] Set each dataset position, relative the original.\n * @property {Number} [data.labels.position.x=0] x coordinate position, relative the original.\n * @property {Number} [data.labels.position.y=0] y coordinate position, relative the original.\n * @memberof Options\n * @type {Object}\n * @default {}\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataLabel)\n * @see [Demo: label colors](https://naver.github.io/billboard.js/demo/#Data.DataLabelColors)\n * @see [Demo: label format](https://naver.github.io/billboard.js/demo/#Data.DataLabelFormat)\n * @see [Demo: label overlap](https://naver.github.io/billboard.js/demo/#Data.DataLabelOverlap)\n * @see [Demo: label position](https://naver.github.io/billboard.js/demo/#Data.DataLabelPosition)\n * @example\n * data: {\n * labels: true,\n *\n * // or set specific options\n * labels: {\n * format: function(v, id, i, j) { ... },\n *\n * // it's possible to set for each data\n * format: {\n * data1: function(v, id, i, j) { ... },\n * ...\n * },\n *\n * // align text to center of the 'bar' shape (works only for 'bar' type)\n * centered: true,\n *\n * // apply for all label texts\n * colors: \"red\",\n *\n * // or set different colors per dataset\n * // for not specified dataset, will have the default color value\n * colors: {\n * data1: \"yellow\",\n * data3: \"green\"\n * },\n *\n * // set x, y coordinate position\n * position: {\n * x: -10,\n * y: 10\n * },\n *\n * // or set x, y coordinate position by each dataset\n * position: {\n * data1: {x: 5, y: 5},\n * data2: {x: 10, y: -20}\n * }\n * }\n * }\n */\n data_labels: {},\n data_labels_colors: undefined,\n data_labels_position: {},\n\n /**\n * This option changes the order of stacking data and pieces of pie/donut.\n * - If `null` specified, it will be the order the data loaded.\n * - If function specified, it will be used as [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)<br><br>\n *\n * **Available Values:**\n * - `desc`: In descending order\n * - `asc`: In ascending order\n * - `null`: It keeps the data load order\n * - `function(data1, data2) { ... }`: Array.sort compareFunction\n * @name data․order\n * @memberof Options\n * @type {String|Function|null}\n * @default desc\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataOrder)\n * @example\n * data: {\n * // in descending order (default)\n * order: \"desc\"\n *\n * // in ascending order\n * order: \"asc\"\n *\n * // keeps data input order\n * order: null\n *\n * // specifying sort function\n * order: function(a, b) {\n * // param data passed format\n * {\n * id: \"data1\", id_org: \"data1\", values: [\n * {x: 5, value: 250, id: \"data1\", index: 5, name: \"data1\"},\n * ...\n * ]\n * }\n * }\n * }\n */\n data_order: \"desc\",\n\n /**\n * Define regions for each data.<br>\n * The values must be an array for each data and it should include an object that has `start`, `end` and `style`.\n * - The object type should be as:\n * - start {Number}: Start data point number. If not set, the start will be the first data point.\n * - [end] {Number}: End data point number. If not set, the end will be the last data point.\n * - [style.dasharray=\"2 2\"] {Object}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area.\n * - **NOTE:** Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions.\n * @name data․regions\n * @memberof Options\n * @type {Object}\n * @default {}\n * @example\n * data: {\n * regions: {\n * data1: [{\n * start: 1,\n * end: 2,\n * style: {\n * dasharray: \"5 2\"\n * }\n * }, {\n * start: 3\n * }],\n * ...\n * }\n * }\n */\n data_regions: {},\n\n /**\n * Set color converter function.<br><br>\n * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').\n * @name data․color\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataColor)\n * @example\n * data: {\n * color: function(color, d) { ... }\n * }\n */\n data_color: undefined,\n\n /**\n * Set color for each data.\n * @name data․colors\n * @memberof Options\n * @type {Object}\n * @default {}\n * @example\n * data: {\n * colors: {\n * data1: \"#ff0000\",\n * data2: function(d) {\n * return \"#000\";\n * }\n * ...\n * }\n * }\n */\n data_colors: {},\n\n /**\n * Hide each data when the chart appears.<br><br>\n * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden.\n * @name data․hide\n * @memberof Options\n * @type {Boolean|Array}\n * @default false\n * @example\n * data: {\n * // all of data will be hidden\n * hide: true\n *\n * // specified data will be hidden\n * hide: [\"data1\", ...]\n * }\n */\n data_hide: !1,\n\n /**\n * Filter values to be shown\n * The data value is the same as the returned by `.data()`.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\n * @name data․filter\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * data: {\n * // filter for id value\n * filter: function(v) {\n * // v: [{id: \"data1\", id_org: \"data1\", values: [\n * // {x: 0, value: 130, id: \"data2\", index: 0}, ...]\n * // }, ...]\n * return v.id !== \"data1\";\n * }\n */\n data_filter: undefined,\n\n /**\n * Set the stacking to be normalized\n * - **NOTE:**\n * - For stacking, '[data.groups](#.data%25E2%2580%25A4groups)' option should be set\n * - y Axis will be set in percentage value (0 ~ 100%)\n * - Must have postive values\n * @name data․stack․normalize\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataStackNormalized)\n * @example\n * data: {\n * stack: {\n * normalize: true\n * }\n * }\n */\n data_stack_normalize: !1,\n\n /**\n * Set data selection enabled<br><br>\n * If this option is set true, we can select the data points and get/set its state of selection by API (e.g. select, unselect, selected).\n * @name data․selection․enabled\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataSelection)\n * @example\n * data: {\n * selection: {\n * enabled: true\n * }\n * }\n */\n data_selection_enabled: !1,\n\n /**\n * Set grouped selection enabled.<br><br>\n * If this option set true, multiple data points that have same x value will be selected by one selection.\n * @name data․selection․grouped\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * data: {\n * selection: {\n * grouped: true\n * }\n * }\n */\n data_selection_grouped: !1,\n\n /**\n * Set a callback for each data point to determine if it's selectable or not.<br><br>\n * The callback will receive d as an argument and it has some parameters like id, value, index. This callback should return boolean.\n * @name data․selection․isselectable\n * @memberof Options\n * @type {Function}\n * @default function() { return true; }\n * @example\n * data: {\n * selection: {\n * isselectable: function(d) { ... }\n * }\n * }\n */\n data_selection_isselectable: function data_selection_isselectable() {\n return !0;\n },\n\n /**\n * Set multiple data points selection enabled.<br><br>\n * If this option set true, multile data points can have the selected state at the same time. If false set, only one data point can have the selected state and the others will be unselected when the new data point is selected.\n * @name data․selection․multiple\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @example\n * data: {\n * selection: {\n * multiple: false\n * }\n * }\n */\n data_selection_multiple: !0,\n\n /**\n * Enable to select data points by dragging.\n * If this option set true, data points can be selected by dragging.\n * - **NOTE:** If this option set true, scrolling on the chart will be disabled because dragging event will handle the event.\n * @name data․selection․draggable\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * data: {\n * selection: {\n * draggable: true\n * }\n * }\n */\n data_selection_draggable: !1,\n\n /**\n * Set a callback for click event on each data point.<br><br>\n * This callback will be called when each data point clicked and will receive `d` and element as the arguments.\n * - `d` is the data clicked and element is the element clicked.\n * - `element` is the current interacting svg element.\n * - In this callback, `this` will be the Chart object.\n * @name data․onclick\n * @memberof Options\n * @type {Function}\n * @default function() {}\n * @example\n * data: {\n * onclick: function(d, element) {\n * // d - ex) {x: 4, value: 150, id: \"data1\", index: 4, name: \"data1\"}\n * // element - <circle>\n * ...\n * }\n * }\n */\n data_onclick: function data_onclick() {},\n\n /**\n * Set a callback for mouse/touch over event on each data point.<br><br>\n * This callback will be called when mouse cursor or via touch moves onto each data point and will receive `d` and `element` as the argument.\n * - `d` is the data where mouse cursor moves onto.\n * - `element` is the current interacting svg element.\n * - In this callback, `this` will be the Chart object.\n * @name data․onover\n * @memberof Options\n * @type {Function}\n * @default function() {}\n * @example\n * data: {\n * onover: function(d, element) {\n * // d - ex) {x: 4, value: 150, id: \"data1\", index: 4}\n * // element - <circle>\n * ...\n * }\n * }\n */\n data_onover: function data_onover() {},\n\n /**\n * Set a callback for mouse/touch out event on each data point.<br><br>\n * This callback will be called when mouse cursor or via touch moves out each data point and will receive `d` as the argument.\n * - `d` is the data where mouse cursor moves out.\n * - `element` is the current interacting svg element.\n * - In this callback, `this` will be the Chart object.\n * @name data․onout\n * @memberof Options\n * @type {Function}\n * @default function() {}\n * @example\n * data: {\n * onout: function(d, element) {\n * // d - ex) {x: 4, value: 150, id: \"data1\", index: 4}\n * // element - <circle>\n * ...\n * }\n * }\n */\n data_onout: function data_onout() {},\n\n /**\n * Set a callback for on data selection.\n * @name data․onselected\n * @memberof Options\n * @type {Function}\n * @default function() {}\n * @example\n * data: {\n * onselected: function(d, element) {\n * // d - ex) {x: 4, value: 150, id: \"data1\", index: 4, name: \"data1\"}\n * // element - <circle>\n * ...\n * }\n * }\n */\n data_onselected: function data_onselected() {},\n\n /**\n * Set a callback for on data un-selection.\n * @name data․onunselected\n * @memberof Options\n * @type {Function}\n * @default function() {}\n * @example\n * data: {\n * onunselected: function(d, element) {\n * // d - ex) {x: 4, value: 150, id: \"data1\", index: 4, name: \"data1\"}\n * // element - <circle>\n * ...\n * }\n * }\n */\n data_onunselected: function data_onunselected() {},\n\n /**\n * Set a callback for minimum data\n * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison\n * @name data․onmin\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.OnMinMaxCallback)\n * @example\n * onmin: function(data) {\n * // data - ex) [{x: 3, value: 400, id: \"data1\", index: 3}, ... ]\n * ...\n * }\n */\n data_onmin: undefined,\n\n /**\n * Set a callback for maximum data\n * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison\n * @name data․onmax\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.OnMinMaxCallback)\n * @example\n * onmax: function(data) {\n * // data - ex) [{x: 3, value: 400, id: \"data1\", index: 3}, ... ]\n * ...\n * }\n */\n data_onmax: undefined,\n\n /**\n * Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the \"file://\" protocol as the most browsers will block XMLHTTPRequests.\n * @name data․url\n * @memberof Options\n * @type {String}\n * @default undefined\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.LoadData)\n * @example\n * data: {\n * url: \"/data/test.csv\"\n * }\n */\n data_url: undefined,\n\n /**\n * XHR header value\n * - **NOTE:** Should be used with `data.url` option\n * @name data․headers\n * @memberof Options\n * @type {String}\n * @default undefined\n * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n * @example\n * data: {\n * url: \"/data/test.csv\",\n * headers: {\n * \"Content-Type\": \"text/xml\",\n * ...\n * }\n * }\n */\n data_headers: undefined,\n\n /**\n * Parse a JSON object for data. See also data.keys.\n * @name data․json\n * @memberof Options\n * @type {Object}\n * @default undefined\n * @see [data․keys](#.data%25E2%2580%25A4keys)\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.JSONData)\n * @example\n * data: {\n * json: [\n * {name: \"www.site1.com\", upload: 200, download: 200, total: 400},\n * {name: \"www.site2.com\", upload: 100, download: 300, total: 400},\n * {name: \"www.site3.com\", upload: 300, download: 200, total: 500},\n * {name: \"www.site4.com\", upload: 400, download: 100, total: 500}\n * ],\n * keys: {\n * // x: \"name\", // it's possible to specify 'x' when category axis\n * value: [\"upload\", \"download\"]\n * }\n * }\n */\n data_json: undefined,\n\n /**\n * Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.\n * @name data․rows\n * @memberof Options\n * @type {Array}\n * @default undefined\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.RowOrientedData)\n * @example\n * data: {\n * rows: [\n * [\"A\", \"B\", \"C\"],\n * [90, 120, 300],\n * [40, 160, 240],\n * [50, 200, 290],\n * [120, 160, 230],\n * [80, 130, 300],\n * [90, 220, 320]\n * ]\n * }\n *\n * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:\n * // - an array of [high, mid, low] data following the order\n * // - or an object with 'high', 'mid' and 'low' key value\n * data: {\n * rows: [\n * [\"data1\", \"data2\"],\n * [\n * // or {high:150, mid: 140, low: 110}, 120\n * [150, 140, 110], 120\n * ],\n * [[155, 130, 115], 55],\n * [[160, 135, 120], 60]\n * ],\n * types: {\n * data1: \"area-line-range\",\n * data2: \"line\"\n * }\n * }\n *\n * // for 'bubble' type, data can contain dimension value:\n * // - an array of [y, z] data following the order\n * // - or an object with 'y' and 'z' key value\n * // 'y' is for y axis coordination and 'z' is the bubble radius value\n * data: {\n * rows: [\n * [\"data1\", \"data2\"],\n * [\n * // or {y:10, z: 140}, 120\n * [10, 140], 120\n * ],\n * [[100, 30], 55],\n * [[50, 100], 60]\n * ],\n * types: {\n * data1: \"bubble\",\n * data2: \"line\"\n * }\n * }\n */\n data_rows: undefined,\n\n /**\n * Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.\n * @name data․columns\n * @memberof Options\n * @type {Array}\n * @default undefined\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.ColumnOrientedData)\n * @example\n * data: {\n * columns: [\n * [\"data1\", 30, 20, 50, 40, 60, 50],\n * [\"data2\", 200, 130, 90, 240, 130, 220],\n * [\"data3\", 300, 200, 160, 400, 250, 250]\n * ]\n * }\n *\n * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:\n * // - an array of [high, mid, low] data following the order\n * // - or an object with 'high', 'mid' and 'low' key value\n * data: {\n * columns: [\n * [\"data1\",\n * [150, 140, 110], // or {high:150, mid: 140, low: 110}\n * [150, 140, 110],\n * [150, 140, 110]\n * ]\n * ],\n * type: \"area-line-range\"\n * }\n *\n * // for 'bubble' type, data can contain dimension value:\n * // - an array of [y, z] data following the order\n * // - or an object with 'y' and 'z' key value\n * // 'y' is for y axis coordination and 'z' is the bubble radius value\n * data: {\n * columns: [\n * [\"data1\",\n * [10, 140], // or {y:10, z: 140}\n * [100, 30],\n * [50, 100]\n * ]\n * ],\n * type: \"bubble\"\n * }\n */\n data_columns: undefined,\n\n /**\n * Used if loading JSON via data.url.\n * - **Available Values:**\n * - json\n * - csv\n * - tsv\n * @name data․mimeType\n * @memberof Options\n * @type {String}\n * @default csv\n * @example\n * data: {\n * mimeType: \"json\"\n * }\n */\n data_mimeType: \"csv\",\n\n /**\n * Choose which JSON object keys correspond to desired data.\n * - **NOTE:** Only for JSON object given as array.\n * @name data․keys\n * @memberof Options\n * @type {String}\n * @default undefined\n * @example\n * data: {\n * json: [\n * {name: \"www.site1.com\", upload: 200, download: 200, total: 400},\n * {name: \"www.site2.com\", upload: 100, download: 300, total: 400},\n * {name: \"www.site3.com\", upload: 300, download: 200, total: 500},\n * {name: \"www.site4.com\", upload: 400, download: 100, total: 500}\n * ],\n * keys: {\n * // x: \"name\", // it's possible to specify 'x' when category axis\n * value: [\"upload\", \"download\"]\n * }\n * }\n */\n data_keys: undefined,\n\n /**\n * Set text label to be displayed when there's no data to show.\n * - ex. Toggling all visible data to not be shown, unloading all current data, etc.\n * @name data․empty․label․text\n * @memberof Options\n * @type {String}\n * @default \"\"\n * @example\n * data: {\n * empty: {\n * label: {\n * text: \"No Data\"\n * }\n * }\n * }\n */\n data_empty_label_text: \"\",\n\n /**\n * Set subchart options\n * @name subchart\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [subchart.show=false] Show sub chart on the bottom of the chart.\n * @property {Boolean} [subchart.axis.x.show=true] Show or hide x axis.\n * @property {Boolean} [subchart.axis.x.tick.show=true] Show or hide x axis tick line.\n * @property {Boolean} [subchart.axis.x.tick.text.show=true] Show or hide x axis tick text.\n * @property {Number} [subchart.size.height] Change the height of the subchart.\n * @property {Function} [subchart.onbrush] Set callback for brush event.<br>\n * Specified function receives the current zoomed x domain.\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Interaction.SubChart)\n * @example\n * subchart: {\n * axis: {\n * \tx: {\n * \t show: true,\n * \t tick: {\n * \t show: true,\n * \t text: {\n * \t show: false\n * \t }\n * \t }\n * \t}\n * },\n * show: true,\n * size: {\n * height: 20\n * },\n * onbrush: function(domain) { ... }\n * }\n */\n subchart_show: !1,\n subchart_size_height: 60,\n subchart_axis_x_show: !0,\n subchart_axis_x_tick_show: !0,\n subchart_axis_x_tick_text_show: !0,\n subchart_onbrush: function subchart_onbrush() {},\n\n /**\n * Set color of the data values\n * @name color\n * @memberof Options\n * @type {Object}\n * @property {String|Object|Function} [color.onover] Set the color value for each data point when mouse/touch onover event occurs.\n * @property {Array|null} [color.pattern=[]] Set custom color pattern. Passing `null` will not set a color for these elements, which requires the usage of custom CSS-based theming to work.\n * @property {Function} [color.tiles] if defined, allows use svg's patterns to fill data area. It should return an array of [SVGPatternElement](https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement).\n * - **NOTE:** The pattern element's id will be defined as `bb-colorize-pattern-$COLOR-VALUE`.<br>\n * ex. When color pattern value is `['red', '#fff']` and defined 2 patterns,then ids for pattern elements are:<br>\n * - `bb-colorize-pattern-red`\n * - `bb-colorize-pattern-fff`\n * @property {Object} [color.threshold] color threshold for gauge and tooltip color\n * @property {String} [color.threshold.unit] If set to `value`, the threshold will be based on the data value. Otherwise it'll be based on equation of the `threshold.max` option value.\n * @property {Array} [color.threshold.values] Threshold values for each steps\n * @property {Number} [color.threshold.max=100] The base value to determine threshold step value condition. When the given value is 15 and max 10, then the value for threshold is `15*100/10`.\n * @example\n * color: {\n * pattern: [\"#1f77b4\", \"#aec7e8\", ...],\n *\n * // Set colors' patterns\n * // it should return an array of SVGPatternElement\n * tiles: function() {\n * var pattern = document.createElementNS(\"http://www.w3.org/2000/svg\", \"pattern\");\n * var g = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n * var circle1 = document.createElementNS(\"http://www.w3.org/2000/svg\", \"circle\");\n *\n * pattern.setAttribute(\"patternUnits\", \"userSpaceOnUse\");\n * pattern.setAttribute(\"width\", \"32\");\n * pattern.setAttribute(\"height\", \"32\");\n *\n * g.style.fill = \"#000\";\n * g.style.opacity = \"0.2\";\n *\n * circle1.setAttribute(\"cx\", \"3\");\n * circle1.setAttribute(\"cy\", \"3\");\n * circle1.setAttribute(\"r\", \"3\");\n *\n * g.appendChild(circle1);\n * pattern.appendChild(g);\n *\n * return [pattern];\n * },\n *\n * // for threshold usage, pattern values should be set for each steps\n * pattern: [\"grey\", \"green\", \"yellow\", \"orange\", \"red\"],\n * threshold: {\n * unit: \"value\",\n *\n * // when value is 20 => 'green', value is 40 => 'orange' will be set.\n * values: [10, 20, 30, 40, 50],\n *\n * // the equation for max:\n * // - unit == 'value': max => 30\n * // - unit != 'value': max => value*100/30\n * max: 30\n * },\n *\n * // set all data to 'red'\n * onover: \"red\",\n *\n * // set different color for data\n * onover: {\n * data1: \"red\",\n * data2: \"yellow\"\n * },\n *\n * // will pass data object to the callback\n * onover: function(d) {\n * return d.id === \"data1\" ? \"red\" : \"green\";\n * }\n * }\n */\n color_pattern: [],\n color_tiles: undefined,\n color_threshold: {},\n color_onover: undefined,\n\n /**\n * Legend options\n * @name legend\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [legend.show=true] Show or hide legend.\n * @property {Boolean} [legend.hide=false] Hide legend\n * If true given, all legend will be hidden. If string or array given, only the legend that has the id will be hidden.\n * @property {String|HTMLElement} [legend.contents.bindto=undefined] Set CSS selector or element reference to bind legend items.\n * @property {String|Function} [legend.contents.template=undefined] Set item's template.<br>\n * - If set `string` value, within template the 'color' and 'title' can be replaced using template-like syntax string:\n * - {=COLOR}: data color value\n * - {=TITLE}: data title value\n * - If set `function` value, will pass following arguments to the given function:\n * - title {String}: data's id value\n * - color {String}: color string\n * - data {Array}: data array\n * @property {String} [legend.position=bottom] Change the position of legend.<br>\n * Available values are: `bottom`, `right` and `inset` are supported.\n * @property {Object} [legend.inset={anchor: 'top-left',x: 10,y: 0,step: undefined}] Change inset legend attributes.<br>\n * This option accepts object that has the keys `anchor`, `x`, `y` and `step`.\n * - **anchor** decides the position of the legend:\n * - top-left\n * - top-right\n * - bottom-left\n * - bottom-right\n * - **x** and **y**:\n * - set the position of the legend based on the anchor.\n * - **step**:\n * - defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).\n * @property {Boolean} [legend.equally=false] Set to all items have same width size.\n * @property {Boolean} [legend.padding=0] Set padding value\n * @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item.\n * @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.\n * @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.\n * @property {Number} [legend.item.tile.width=10] Set width of item tile element\n * @property {Number} [legend.item.tile.height=10] Set height of item tile element\n * @property {Boolean} [legend.usePoint=false] Whether to use custom points in legend.\n * @see [Demo: position](https://naver.github.io/billboard.js/demo/#Legend.LegendPosition)\n * @see [Demo: contents.template](https://naver.github.io/billboard.js/demo/#Legend.LegendTemplate1)\n * @see [Demo: usePoint](https://naver.github.io/billboard.js/demo/#Legend.usePoint)\n * @example\n * legend: {\n * show: true,\n * hide: true,\n * //or hide: \"data1\"\n * //or hide: [\"data1\", \"data2\"]\n * contents: {\n * bindto: \"#legend\", // <ul id='legend'></ul>\n *\n * // will be as: <li style='background-color:#1f77b4'>data1</li>\n * template: \"<li style='background-color:{=COLOR}'>{=TITLE}</li>\"\n *\n * // or using function\n * template: function(id, color, data) {\n * // if you want omit some legend, return falsy value\n * if (title !== \"data1\") {\n * return \"<li style='background-color:\"+ color +\">\"+ title +\"</li>\";\n * }\n * }\n * },\n * position: \"bottom\", // bottom, right, inset\n * inset: {\n * anchor: \"top-right\" // top-left, top-right, bottom-left, bottom-right\n * x: 20,\n * y: 10,\n * step: 2\n * },\n * equally: false,\n * padding: 10,\n * item: {\n * onclick: function(id) { ... },\n * onover: function(id) { ... },\n * onout: function(id) { ... },\n *\n * // set tile's size\n * tile: {\n * width: 20,\n * height: 15\n * }\n * },\n * usePoint: true\n * }\n */\n legend_show: !0,\n legend_hide: !1,\n legend_contents_bindto: undefined,\n legend_contents_template: undefined,\n legend_position: \"bottom\",\n legend_inset_anchor: \"top-left\",\n legend_inset_x: 10,\n legend_inset_y: 0,\n legend_inset_step: undefined,\n legend_item_onclick: undefined,\n legend_item_onover: undefined,\n legend_item_onout: undefined,\n legend_equally: !1,\n legend_padding: 0,\n legend_item_tile_width: 10,\n legend_item_tile_height: 10,\n legend_usePoint: !1,\n\n /**\n * Switch x and y axis position.\n * @name axis․rotated\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * axis: {\n * rotated: true\n * }\n */\n axis_rotated: !1,\n\n /**\n * Set clip-path attribute for x axis element\n * @name axis․x․clipPath\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @see [Demo]()\n * @example\n * // don't set 'clip-path' attribute\n * clipPath: false\n */\n axis_x_clipPath: !0,\n\n /**\n * Show or hide x axis.\n * @name axis․x․show\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @example\n * axis: {\n * x: {\n * show: false\n * }\n * }\n */\n axis_x_show: !0,\n\n /**\n * Set type of x axis.<br><br>\n * **Available Values:**\n * - timeseries\n * - category\n * - indexed\n * @name axis․x․type\n * @memberof Options\n * @type {String}\n * @default indexed\n * @see [Demo: indexed](https://naver.github.io/billboard.js/demo/#Chart.AreaChart)\n * @see [Demo: timeseries](https://naver.github.io/billboard.js/demo/#Chart.TimeseriesChart)\n * @see [Demo: category](https://naver.github.io/billboard.js/demo/#Data.CategoryData)\n * @example\n * axis: {\n * x: {\n * type: \"timeseries\"\n * }\n * }\n */\n axis_x_type: \"indexed\",\n\n /**\n * Set how to treat the timezone of x values.<br>\n * If true, treat x value as localtime. If false, convert to UTC internally.\n * @name axis․x․localtime\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @example\n * axis: {\n * x: {\n * localtime: false\n * }\n * }\n */\n axis_x_localtime: !0,\n\n /**\n * Set category names on category axis.\n * This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.\n * @name axis․x․categories\n * @memberof Options\n * @type {Array}\n * @default []\n * @example\n * axis: {\n * x: {\n * categories: [\"Category 1\", \"Category 2\", ...]\n * }\n * }\n */\n axis_x_categories: [],\n\n /**\n * centerize ticks on category axis.\n * @name axis․x․tick․centered\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * axis: {\n * x: {\n * tick: {\n * centered: true\n * }\n * }\n * }\n */\n axis_x_tick_centered: !1,\n\n /**\n * A function to format tick value. Format string is also available for timeseries data.\n * @name axis․x․tick․format\n * @memberof Options\n * @type {Function|String}\n * @default undefined\n * @see [D3's time specifier](https://github.com/d3/d3-time-format#locale_format)\n * @example\n * axis: {\n * x: {\n * tick: {\n * // for timeseries, a 'datetime' object is given as parameter\n * format: function(x) {\n * return x.getFullYear();\n * }\n *\n * // for category, index(Number) and categoryName(String) are given as parameter\n * format: function(index, categoryName) {\n * return categoryName.substr(0, 10);\n * },\n *\n * // for timeseries format specifier\n * format: \"%Y-%m-%d %H:%M:%S\"\n * }\n * }\n * }\n */\n axis_x_tick_format: undefined,\n\n /**\n * Setting for culling ticks.<br><br>\n * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>\n * We can change the number of ticks to be shown by axis.x.tick.culling.max.\n * @name axis․x․tick․culling\n * @memberof Options\n * @type {Boolean}\n * @default\n * - true for indexed axis and timeseries axis\n * - false for category axis\n * @example\n * axis: {\n * x: {\n * tick: {\n * culling: false\n * }\n * }\n * }\n */\n axis_x_tick_culling: {},\n\n /**\n * The number of tick texts will be adjusted to less than this value.\n * @name axis․x․tick․culling․max\n * @memberof Options\n * @type {Number}\n * @default 10\n * @example\n * axis: {\n * x: {\n * tick: {\n * culling: {\n * max: 5\n * }\n * }\n * }\n * }\n */\n axis_x_tick_culling_max: 10,\n\n /**\n * The number of x axis ticks to show.<br><br>\n * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).\n * @name axis․x․tick․count\n * @memberof Options\n * @type {Number}\n * @default undefined\n * @example\n * axis: {\n * x: {\n * tick: {\n * count: 5\n * }\n * }\n * }\n */\n axis_x_tick_count: undefined,\n\n /**\n * Show or hide x axis tick line.\n * @name axis․x․tick․show\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n * @example\n * axis: {\n * x: {\n * tick: {\n * show: false\n * }\n * }\n * }\n */\n axis_x_tick_show: !0,\n\n /**\n * Show or hide x axis tick text.\n * @name axis․x․tick․text․show\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n * @example\n * axis: {\n * x: {\n * tick: {\n * text: {\n * show: false\n * }\n * }\n * }\n * }\n */\n axis_x_tick_text_show: !0,\n\n /**\n * Set the x Axis tick text's position relatively its original position\n * @name axis․x․tick․text․position\n * @memberof Options\n * @type {Object}\n * @default {x: 0, y:0}\n * @example\n * axis: {\n * x: {\n * tick: {\n * text: {\n * position: {\n * x: 10,\n * y: 10\n * }\n * }\n * }\n * }\n * }\n */\n axis_x_tick_text_position: {\n x: 0,\n y: 0\n },\n\n /**\n * Fit x axis ticks.\n * - **true**: ticks will be positioned nicely to have same intervals.\n * - **false**: ticks will be positioned according to x value of the data points.\n * @name axis․x․tick․fit\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickFitting)\n * @see [Demo: for timeseries zoom](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickTimeseries)\n * @example\n * axis: {\n * x: {\n * tick: {\n * fit: false\n * }\n * }\n * }\n */\n axis_x_tick_fit: !0,\n\n /**\n * Set the x values of ticks manually.<br><br>\n * If this option is provided, the position of the ticks will be determined based on those values.<br>\n * This option works with `timeseries` data and the x values will be parsed accoding to the type of the value and data.xFormat option.\n * @name axis․x․tick․values\n * @memberof Options\n * @type {Array|Function}\n * @default null\n * @example\n * axis: {\n * x: {\n * tick: {\n * values: [1, 2, 4, 8, 16, 32, ...],\n *\n * // an Array value should be returned\n * values: function() {\n * \treturn [ ... ];\n * }\n * }\n * }\n * }\n */\n axis_x_tick_values: null,\n\n /**\n * Rotate x axis tick text if there is not enough space for 'category' and 'timeseries' type axis.\n * - **NOTE:** The conditions where `autorotate` is enabled are:\n * - axis.x.type='category' or 'timeseries\n * - axis.x.tick.multiline=false\n * - axis.x.tick.culling=false\n * - axis.x.tick.fit=true\n * @name axis․x․tick․autorotate\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickAutorotate)\n * @example\n * axis: {\n * x: {\n * tick: {\n * rotate: 15,\n * autorotate: true,\n * multiline: false,\n * culling: false,\n * fit: true\n * }\n * }\n * }\n */\n axis_x_tick_autorotate: !1,\n\n /**\n * Rotate x axis tick text.\n * - If you set negative value, it will rotate to opposite direction.\n * - Applied when [`axis.rotated`](#.axis%25E2%2580%25A4rotated) option is `false`.\n * - As long as `axis_x_tick_fit` is set to `true` it will calculate an overflow for the y2 axis and add this value to the right padding.\n * @name axis․x․tick․rotate\n * @memberof Options\n * @type {Number}\n * @default 0\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.RotateXAxisTickText)\n * @example\n * axis: {\n * x: {\n * tick: {\n * rotate: 60\n * }\n * }\n * }\n */\n axis_x_tick_rotate: 0,\n\n /**\n * Show x axis outer tick.\n * @name axis․x․tick․outer\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @example\n * axis: {\n * x: {\n * tick: {\n * outer: false\n * }\n * }\n * }\n */\n axis_x_tick_outer: !0,\n\n /**\n * Set tick text to be multiline\n * - **NOTE:**\n * > When x tick text contains `\\n`, it's used as line break and 'axis.x.tick.width' option is ignored.\n * @name axis․x․tick․multiline\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickMultiline)\n * @example\n * axis: {\n * x: {\n * tick: {\n * multiline: false\n * }\n * }\n * }\n * @example\n * // example of line break with '\\n'\n * // In this case, 'axis.x.tick.width' is ignored\n * data: {\n * x: \"x\",\n * columns: [\n * [\"x\", \"long\\ntext\", \"Another\\nLong\\nText\"],\n * ...\n * ],\n * }\n */\n axis_x_tick_multiline: !0,\n\n /**\n * Set tick width\n * - **NOTE:**\n * > When x tick text contains `\\n`, this option is ignored.\n * @name axis․x․tick․width\n * @memberof Options\n * @type {Number}\n * @default null\n * @example\n * axis: {\n * x: {\n * tick: {\n * width: 50\n * }\n * }\n * }\n */\n axis_x_tick_width: null,\n\n /**\n * Set to display system tooltip(via 'title' attribute) for tick text\n * - **NOTE:** Only available for category axis type (`axis.x.type='category'`)\n * @name axis․x․tick․tooltip\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * axis: {\n * x: {\n * tick: {\n * tooltip: true\n * }\n * }\n * }\n */\n axis_x_tick_tooltip: !1,\n\n /**\n * Set max value of x axis range.\n * @name axis․x․max\n * @memberof Options\n * @property {Number} max Set the max value\n * @property {Boolean} [max.fit=false] When specified `max.value` is greater than the bound data value, setting `true` will make x axis max to be fitted to the bound data max value.\n * - **NOTE:** If the bound data max value is greater than the `max.value`, the x axis max will be limited as the given `max.value`.\n * @property {Number} [max.value] Set the max value\n * @example\n * axis: {\n * x: {\n * max: 100,\n *\n * max: {\n * // 'fit=true' will make x axis max to be limited as the bound data value max when 'max.value' is greater.\n * // - when bound data max is '10' and max.value: '100' ==> x axis max will be '10'\n * // - when bound data max is '1000' and max.value: '100' ==> x axis max will be '100'\n * fit: true,\n * value: 100\n * }\n * }\n * }\n */\n axis_x_max: undefined,\n\n /**\n * Set min value of x axis range.\n * @name axis․x․min\n * @memberof Options\n * @property {Number} min Set the min value\n * @property {Boolean} [min.fit=false] When specified `min.value` is lower than the bound data value, setting `true` will make x axis min to be fitted to the bound data min value.\n * - **NOTE:** If the bound data min value is lower than the `min.value`, the x axis min will be limited as the given `min.value`.\n * @property {Number} [min.value] Set the min value\n * @example\n * axis: {\n * x: {\n * min: -100,\n *\n * min: {\n * // 'fit=true' will make x axis min to be limited as the bound data value min when 'min.value' is lower.\n * // - when bound data min is '-10' and min.value: '-100' ==> x axis min will be '-10'\n * // - when bound data min is '-1000' and min.value: '-100' ==> x axis min will be '-100'\n * fit: true,\n * value: -100\n * }\n * }\n * }\n */\n axis_x_min: undefined,\n\n /**\n * Set padding for x axis.<br><br>\n * If this option is set, the range of x axis will increase/decrease according to the values.\n * If no padding is needed in the rage of x axis, 0 should be set.\n * - **NOTE:**\n * The padding values aren't based on pixels. It differs according axis types<br>\n * - **category:** The unit of tick value\n * ex. the given value `1`, is same as the width of 1 tick width\n * - **timeseries:** Numeric time value\n * ex. the given value `1000*60*60*24`, which is numeric time equivalent of a day, is same as the width of 1 tick width\n * @name axis․x․padding\n * @memberof Options\n * @type {Object|Number}\n * @default {}\n * @example\n * axis: {\n * x: {\n * padding: {\n * // when axis type is 'category'\n * left: 1, // set left padding width of equivalent value of a tick's width\n * right: 0.5 // set right padding width as half of equivalent value of tick's width\n *\n * // when axis type is 'timeseries'\n * left: 1000*60*60*24, // set left padding width of equivalent value of a day tick's width\n * right: 1000*60*60*12 // set right padding width as half of equivalent value of a day tick's width\n * },\n *\n * // or set both values at once.\n * padding: 10\n * }\n * }\n */\n axis_x_padding: {},\n\n /**\n * Set height of x axis.<br><br>\n * The height of x axis can be set manually by this option. If you need more space for x axis, please use this option for that. The unit is pixel.\n * @name axis․x․height\n * @memberof Options\n * @type {Number}\n * @default undefined\n * @example\n * axis: {\n * x: {\n * height: 20\n * }\n * }\n */\n axis_x_height: undefined,\n\n /**\n * Set default extent for subchart and zoom. This can be an array or function that returns an array.\n * @name axis․x․extent\n * @memberof Options\n * @type {Array|Function}\n * @default undefined\n * @example\n * axis: {\n * x: {\n * // extent range as a pixel value\n * extent: [0, 200],\n *\n * // when axis is 'timeseries', parsable datetime string\n * extent: [\"2019-03-01\", \"2019-03-05\"],\n *\n * // return extent value\n * extent: function(domain, scale) {\n * \t var extent = domain.map(function(v) {\n * \t return scale(v);\n * \t });\n *\n * \t // it should return a format of array\n * \t // ex) [0, 584]\n * \t return extent;\n * }\n * }\n * }\n */\n axis_x_extent: undefined,\n\n /**\n * Set label on x axis.<br><br>\n * You can set x axis label and change its position by this option.\n * `string` and `object` can be passed and we can change the poisiton by passing object that has position key.<br>\n * Available position differs according to the axis direction (vertical or horizontal).\n * If string set, the position will be the default.\n *\n * - **If it's horizontal axis:**\n * - inner-right [default]\n * - inner-center\n * - inner-left\n * - outer-right\n * - outer-center\n * - outer-left\n * - **If it's vertical axis:**\n * - inner-top [default]\n * - inner-middle\n * - inner-bottom\n * - outer-top\n * - outer-middle\n * - outer-bottom\n * @name axis․x․label\n * @memberof Options\n * @type {String|Object}\n * @default undefined\n * @example\n * axis: {\n * x: {\n * label: \"Your X Axis\"\n * }\n * }\n *\n * axis: {\n * x: {\n * label: {\n * text: \"Your X Axis\",\n * position: \"outer-center\"\n * }\n * }\n * }\n */\n axis_x_label: {},\n\n /**\n * Set additional axes for x Axis.\n * - **NOTE:** Axis' scale is based on x Axis value if domain option isn't set.\n *\n * Each axis object should consist with following options:\n *\n * | Name | Type | Default | Description |\n * | --- | --- | --- | --- |\n * | domain | Array | - | Set the domain value |\n * | tick.outer | Boolean | true | Show outer tick |\n * | tick.format | Function | - | Set formatter for tick text |\n * | tick.count | Number | - | Set the number of y axis ticks |\n * | tick.values | Array | - | Set tick values manually |\n * @name axis․x․axes\n * @memberof Options\n * @type {Array}\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.MultiAxes)\n * @see [Demo: Domain](https://naver.github.io/billboard.js/demo/#Axis.MultiAxesDomain)\n * @example\n * x: {\n * axes: [\n * {\n * // if set, will not be correlated with the main x Axis domain value\n \t * domain: [0, 1000],\n * tick: {\n * outer: false,\n * format: function(x) {\n * return x + \"%\";\n * },\n * count: 2,\n * values: [10, 20, 30]\n * }\n * },\n * ...\n * ]\n * }\n */\n axis_x_axes: [],\n\n /**\n * Set clip-path attribute for y axis element\n * - **NOTE**: `clip-path` attribute for y Axis is set only when `axis.y.inner` option is true.\n * @name axis․y․clipPath\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @example\n * // don't set 'clip-path' attribute\n * clipPath: false\n */\n axis_y_clipPath: !0,\n\n /**\n * Show or hide y axis.\n * @name axis․y․show\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @example\n * axis: {\n * y: {\n * show: false\n * }\n * }\n */\n axis_y_show: !0,\n\n /**\n * Set type of y axis.<br><br>\n * **Available Values:**\n * - timeseries\n * - indexed\n * @name axis․y․type\n * @memberof Options\n * @type {String}\n * @default \"indexed\"\n * @example\n * axis: {\n * y: {\n * type: \"timeseries\"\n * }\n * }\n */\n axis_y_type: undefined,\n\n /**\n * Set max value of y axis.\n * - **NOTE:** Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).\n * @name axis․y․max\n * @memberof Options\n * @type {Number}\n * @default undefined\n * @example\n * axis: {\n * y: {\n * max: 1000\n * }\n * }\n */\n axis_y_max: undefined,\n\n /**\n * Set min value of y axis.\n * - **NOTE:**\n * Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).\n * @name axis․y․min\n * @memberof Options\n * @type {Number}\n * @default undefined\n * @example\n * axis: {\n * y: {\n * min: 1000\n * }\n * }\n */\n axis_y_min: undefined,\n\n /**\n * Change the direction of y axis.<br><br>\n * If true set, the direction will be from the top to the bottom.\n * @name axis․y․inverted\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * axis: {\n * y: {\n * inverted: true\n * }\n * }\n */\n axis_y_inverted: !1,\n\n /**\n * Set center value of y axis.\n * @name axis․y․center\n * @memberof Options\n * @type {Number}\n * @default undefined\n * @example\n * axis: {\n * y: {\n * center: 0\n * }\n * }\n */\n axis_y_center: undefined,\n\n /**\n * Show y axis inside of the chart.\n * @name axis․y․inner\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * axis: {\n * y: {\n * inner: true\n * }\n * }\n */\n axis_y_inner: !1,\n\n /**\n * Set label on y axis.<br><br>\n * You can set y axis label and change its position by this option. This option works in the same way as [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label).\n * @name axis․y․label\n * @memberof Options\n * @type {String|Object}\n * @default {}\n * @see [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label) for position string value.\n * @example\n * axis: {\n * y: {\n * label: \"Your Y Axis\"\n * }\n * }\n *\n * axis: {\n * y: {\n * label: {\n * text: \"Your Y Axis\",\n * position: \"outer-middle\"\n * }\n * }\n * }\n */\n axis_y_label: {},\n\n /**\n * Set formatter for y axis tick text.<br><br>\n * This option accepts d3.format object as well as a function you define.\n * @name axis․y․tick․format\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * axis: {\n * y: {\n * tick: {\n * format: function(x) {\n * return x.getFullYear();\n * }\n * }\n * }\n * }\n */\n axis_y_tick_format: undefined,\n\n /**\n * Setting for culling ticks.<br><br>\n * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>\n * We can change the number of ticks to be shown by axis.y.tick.culling.max.\n * @name axis․y․tick․culling\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * axis: {\n * y: {\n * tick: {\n * culling: false\n * }\n * }\n * }\n */\n axis_y_tick_culling: !1,\n\n /**\n * The number of tick texts will be adjusted to less than this value.\n * @name axis․y․tick․culling․max\n * @memberof Options\n * @type {Number}\n * @default 5\n * @example\n * axis: {\n * y: {\n * tick: {\n * culling: {\n * max: 5\n * }\n * }\n * }\n * }\n */\n axis_y_tick_culling_max: 5,\n\n /**\n * Show y axis outer tick.\n * @name axis․y․tick․outer\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @example\n * axis: {\n * y: {\n * tick: {\n * outer: false\n * }\n * }\n * }\n */\n axis_y_tick_outer: !0,\n\n /**\n * Set y axis tick values manually.\n * @name axis․y․tick․values\n * @memberof Options\n * @type {Array|Function}\n * @default null\n * @example\n * axis: {\n * y: {\n * tick: {\n * values: [100, 1000, 10000],\n *\n * // an Array value should be returned\n * values: function() {\n * \treturn [ ... ];\n * }\n * }\n * }\n * }\n */\n axis_y_tick_values: null,\n\n /**\n * Rotate y axis tick text.\n * - If you set negative value, it will rotate to opposite direction.\n * - Applied when [`axis.rotated`](#.axis%25E2%2580%25A4rotated) option is `true`.\n * @name axis․y․tick․rotate\n * @memberof Options\n * @type {Number}\n * @default 0\n * @example\n * axis: {\n * y: {\n * tick: {\n * rotate: 60\n * }\n * }\n * }\n */\n axis_y_tick_rotate: 0,\n\n /**\n * Set the number of y axis ticks.<br><br>\n * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.\n * @name axis․y․tick․count\n * @memberof Options\n * @type {Number}\n * @default undefined\n * @example\n * axis: {\n * y: {\n * tick: {\n * count: 5\n * }\n * }\n * }\n */\n axis_y_tick_count: undefined,\n\n /**\n * Show or hide y axis tick line.\n * @name axis․y․tick․show\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n * @example\n * axis: {\n * y: {\n * tick: {\n * show: false\n * }\n * }\n * }\n */\n axis_y_tick_show: !0,\n\n /**\n * Set axis tick step(interval) size.\n * - **NOTE:** Will be ignored if `axis.y.tick.count` or `axis.y.tick.values` options are set.\n * @name axis․y․tick․stepSize\n * @memberof Options\n * @type {Number}\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.StepSizeForYAxis)\n * @example\n * axis: {\n * y: {\n * tick: {\n * // tick value will step as indicated interval value.\n * // ex) 'stepSize=15' ==> [0, 15, 30, 45, 60]\n * stepSize: 15\n * }\n * }\n * }\n */\n axis_y_tick_stepSize: null,\n\n /**\n * Show or hide y axis tick text.\n * @name axis․y․tick․text․show\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n * @example\n * axis: {\n * y: {\n * tick: {\n * text: {\n * show: false\n * }\n * }\n * }\n * }\n */\n axis_y_tick_text_show: !0,\n\n /**\n * Set the y Axis tick text's position relatively its original position\n * @name axis․y․tick․text․position\n * @memberof Options\n * @type {Object}\n * @default {x: 0, y:0}\n * @example\n * axis: {\n * y: {\n * tick: {\n * text: {\n * position: {\n * x: 10,\n * y: 10\n * }\n * }\n * }\n * }\n * }\n */\n axis_y_tick_text_position: {\n x: 0,\n y: 0\n },\n\n /**\n * Set the number of y axis ticks.<br><br>\n * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.\n * @name axis․y․tick․time\n * @memberof Options\n * @private\n * @type {Object}\n * @property {Function} [time.value] D3's time interval function (https://github.com/d3/d3-time#intervals)\n * @example\n * axis: {\n * y: {\n * tick: {\n * time: {\n * // ticks at 15-minute intervals\n * // https://github.com/d3/d3-scale/blob/master/README.md#time_ticks\n * value: d3.timeMinute.every(15)\n * }\n * }\n * }\n * }\n */\n // @TODO: not fully implemented yet\n axis_y_tick_time_value: undefined,\n\n /**\n * Set padding for y axis.<br><br>\n * You can set padding for y axis to create more space on the edge of the axis.\n * This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.\n *\n * - **NOTE:**\n * - Given values are translated relative to the y Axis domain value for padding\n * - For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom.\n * @name axis․y․padding\n * @memberof Options\n * @type {Object|Number}\n * @default {}\n * @example\n * axis: {\n * y: {\n * padding: {\n * top: 0,\n * bottom: 0\n * },\n *\n * // or set both values at once.\n * padding: 10\n * }\n * }\n */\n axis_y_padding: {},\n\n /**\n * Set default range of y axis.<br><br>\n * This option set the default value for y axis when there is no data on init.\n * @name axis․y․default\n * @memberof Options\n * @type {Array}\n * @default undefined\n * @example\n * axis: {\n * y: {\n * default: [0, 1000]\n * }\n * }\n */\n axis_y_default: undefined,\n\n /**\n * Set additional axes for y Axis.\n * - **NOTE:** Axis' scale is based on y Axis value if domain option isn't set.\n *\n * Each axis object should consist with following options:\n *\n * | Name | Type | Default | Description |\n * | --- | --- | --- | --- |\n * | domain | Array | - | Set the domain value |\n * | tick.outer | Boolean | true | Show outer tick |\n * | tick.format | Function | - | Set formatter for tick text |\n * | tick.count | Number | - | Set the number of y axis ticks |\n * | tick.values | Array | - | Set tick values manually |\n * @name axis․y․axes\n * @memberof Options\n * @type {Array}\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.MultiAxes)\n * @see [Demo: Domain](https://naver.github.io/billboard.js/demo/#Axis.MultiAxesDomain)\n * @example\n * y: {\n * axes: [\n * {\n * // if set, will not be correlated with the main y Axis domain value\n * domain: [0, 1000],\n * tick: {\n * outer: false,\n * format: function(x) {\n * return x + \"%\";\n * },\n * count: 2,\n * values: [10, 20, 30]\n * }\n * },\n * ...\n * ]\n * }\n */\n axis_y_axes: [],\n\n /**\n * Show or hide y2 axis.\n * - **NOTE**:\n * - When set to `false` will not generate y2 axis node. In this case, all 'y2' axis related functionality won't work properly.\n * - If need to use 'y2' related options while y2 isn't visible, set the value `true` and control visibility by css display property.\n * @name axis․y2․show\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * axis: {\n * y2: {\n * show: true\n * }\n * }\n */\n axis_y2_show: !1,\n\n /**\n * Set max value of y2 axis.\n * @name axis․y2․max\n * @memberof Options\n * @type {Number}\n * @default undefined\n * @example\n * axis: {\n * y2: {\n * max: 1000\n * }\n * }\n */\n axis_y2_max: undefined,\n\n /**\n * Set min value of y2 axis.\n * @name axis․y2․min\n * @memberof Options\n * @type {Number}\n * @default undefined\n * @example\n * axis: {\n * y2: {\n * min: -1000\n * }\n * }\n */\n axis_y2_min: undefined,\n\n /**\n * Change the direction of y2 axis.<br><br>\n * If true set, the direction will be from the top to the bottom.\n * @name axis․y2․inverted\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * axis: {\n * y2: {\n * inverted: true\n * }\n * }\n */\n axis_y2_inverted: !1,\n\n /**\n * Set center value of y2 axis.\n * @name axis․y2․center\n * @memberof Options\n * @type {Number}\n * @default undefined\n * @example\n * axis: {\n * y2: {\n * center: 0\n * }\n * }\n */\n axis_y2_center: undefined,\n\n /**\n * Show y2 axis inside of the chart.\n * @name axis․y2․inner\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * axis: {\n * y2: {\n * inner: true\n * }\n * }\n */\n axis_y2_inner: !1,\n\n /**\n * Set label on y2 axis.<br><br>\n * You can set y2 axis label and change its position by this option. This option works in the same way as [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label).\n * @name axis․y2․label\n * @memberof Options\n * @type {String|Object}\n * @default {}\n * @see [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label) for position string value.\n * @example\n * axis: {\n * y2: {\n * label: \"Your Y2 Axis\"\n * }\n * }\n *\n * axis: {\n * y2: {\n * label: {\n * text: \"Your Y2 Axis\",\n * position: \"outer-middle\"\n * }\n * }\n * }\n */\n axis_y2_label: {},\n\n /**\n * Set formatter for y2 axis tick text.<br><br>\n * This option works in the same way as axis.y.format.\n * @name axis․y2․tick․format\n * @memberof Options\n * @type {Function}\n * @default undefined\n * @example\n * axis: {\n * y2: {\n * tick: {\n * format: d3.format(\"$,\")\n * //or format: function(d) { return \"$\" + d; }\n * }\n * }\n * }\n */\n axis_y2_tick_format: undefined,\n\n /**\n * Setting for culling ticks.<br><br>\n * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>\n * We can change the number of ticks to be shown by axis.y.tick.culling.max.\n * @name axis․y2․tick․culling\n * @memberof Options\n * @type {Boolean}\n * @default false\n * @example\n * axis: {\n * y2: {\n * tick: {\n * culling: false\n * }\n * }\n * }\n */\n axis_y2_tick_culling: !1,\n\n /**\n * The number of tick texts will be adjusted to less than this value.\n * @name axis․y2․tick․culling․max\n * @memberof Options\n * @type {Number}\n * @default 5\n * @example\n * axis: {\n * y2: {\n * tick: {\n * culling: {\n * max: 5\n * }\n * }\n * }\n * }\n */\n axis_y2_tick_culling_max: 5,\n\n /**\n * Show or hide y2 axis outer tick.\n * @name axis․y2․tick․outer\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @example\n * axis: {\n * y2: {\n * tick: {\n * outer: false\n * }\n * }\n * }\n */\n axis_y2_tick_outer: !0,\n\n /**\n * Set y2 axis tick values manually.\n * @name axis․y2․tick․values\n * @memberof Options\n * @type {Array|Function}\n * @default null\n * @example\n * axis: {\n * y2: {\n * tick: {\n * values: [100, 1000, 10000],\n *\n * // an Array value should be returned\n * values: function() {\n * \treturn [ ... ];\n * }\n * }\n * }\n * }\n */\n axis_y2_tick_values: null,\n\n /**\n * Rotate y2 axis tick text.\n * - If you set negative value, it will rotate to opposite direction.\n * - Applied when [`axis.rotated`](#.axis%25E2%2580%25A4rotated) option is `true`.\n * @name axis․y2․tick․rotate\n * @memberof Options\n * @type {Number}\n * @default 0\n * @example\n * axis: {\n * y2: {\n * tick: {\n * rotate: 60\n * }\n * }\n * }\n */\n axis_y2_tick_rotate: 0,\n\n /**\n * Set the number of y2 axis ticks.\n * - **NOTE:** This works in the same way as axis.y.tick.count.\n * @name axis․y2․tick․count\n * @memberof Options\n * @type {Number}\n * @default undefined\n * @example\n * axis: {\n * y2: {\n * tick: {\n * count: 5\n * }\n * }\n * }\n */\n axis_y2_tick_count: undefined,\n\n /**\n * Show or hide y2 axis tick line.\n * @name axis․y2․tick․show\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n * @example\n * axis: {\n * y2: {\n * tick: {\n * show: false\n * }\n * }\n * }\n */\n axis_y2_tick_show: !0,\n\n /**\n * Set axis tick step(interval) size.\n * - **NOTE:** Will be ignored if `axis.y2.tick.count` or `axis.y2.tick.values` options are set.\n * @name axis․y2․tick․stepSize\n * @memberof Options\n * @type {Number}\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.StepSizeForYAxis)\n * @example\n * axis: {\n * y2: {\n * tick: {\n * // tick value will step as indicated interval value.\n * // ex) 'stepSize=15' ==> [0, 15, 30, 45, 60]\n * stepSize: 15\n * }\n * }\n * }\n */\n axis_y2_tick_stepSize: null,\n\n /**\n * Show or hide y2 axis tick text.\n * @name axis․y2․tick․text․show\n * @memberof Options\n * @type {Boolean}\n * @default true\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n * @example\n * axis: {\n * y2: {\n * tick: {\n * text: {\n * show: false\n * }\n * }\n * }\n * }\n */\n axis_y2_tick_text_show: !0,\n\n /**\n * Set the y2 Axis tick text's position relatively its original position\n * @name axis․y2․tick․text․position\n * @memberof Options\n * @type {Object}\n * @default {x: 0, y:0}\n * @example\n * axis: {\n * y2: {\n * tick: {\n * text: {\n * position: {\n * x: 10,\n * y: 10\n * }\n * }\n * }\n * }\n * }\n */\n axis_y2_tick_text_position: {\n x: 0,\n y: 0\n },\n\n /**\n * Set padding for y2 axis.<br><br>\n * You can set padding for y2 axis to create more space on the edge of the axis.\n * This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.\n *\n * - **NOTE:**\n * - Given values are translated relative to the y2 Axis domain value for padding\n * - For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom.\n * @name axis․y2․padding\n * @memberof Options\n * @type {Object|Number}\n * @default {}\n * @example\n * axis: {\n * y2: {\n * padding: {\n * top: 100,\n * bottom: 100\n * }\n *\n * // or set both values at once.\n * padding: 10\n * }\n */\n axis_y2_padding: {},\n\n /**\n * Set default range of y2 axis.<br><br>\n * This option set the default value for y2 axis when there is no data on init.\n * @name axis․y2․default\n * @memberof Options\n * @type {Array}\n * @default undefined\n * @example\n * axis: {\n * y2: {\n * default: [0, 1000]\n * }\n * }\n */\n axis_y2_default: undefined,\n\n /**\n * Set additional axes for y2 Axis.\n * - **NOTE:** Axis' scale is based on y2 Axis value if domain option isn't set.\n *\n * Each axis object should consist with following options:\n *\n * | Name | Type | Default | Description |\n * | --- | --- | --- | --- |\n * | domain | Array | - | Set the domain value |\n * | tick.outer | Boolean | true | Show outer tick |\n * | tick.format | Function | - | Set formatter for tick text |\n * | tick.count | Number | - | Set the number of y axis ticks |\n * | tick.values | Array | - | Set tick values manually |\n * @name axis․y2․axes\n * @memberof Options\n * @type {Array}\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.MultiAxes)\n * @see [Demo: Domain](https://naver.github.io/billboard.js/demo/#Axis.MultiAxesDomain)\n * @example\n * y2: {\n * axes: [\n * {\n * // if set, will not be correlated with the main y2 Axis domain value\n * domain: [0, 1000],\n * tick: {\n * outer: false,\n * format: function(x) {\n * return x + \"%\";\n * },\n * count: 2,\n * values: [10, 20, 30]\n * }\n * },\n * ...\n * ]\n * }\n */\n axis_y2_axes: [],\n\n /**\n * Set related options\n * @name grid\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [front=false] Set 'grid & focus lines' to be positioned over grid lines and chart elements.\n * @property {Boolean} [x.show=false] Show grids along x axis.\n * @property {Array} [x.lines=[]] Show additional grid lines along x axis.<br>\n * This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available.\n * If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer.\n * @property {Boolean} [y.show=false] Show grids along x axis.\n * @property {Array} [y.lines=[]] Show additional grid lines along y axis.<br>\n * This option accepts array including object that has value, text, position and class.\n * @property {Number} [y.ticks=10] Number of y grids to be shown.\n * @property {Boolean} [focus.edge=false] Show edged focus grid line.<br>**NOTE:** Available when [`tooltip.grouped=false`](#.tooltip) option is set.\n * @property {Boolean} [focus.show=true] Show grid line when focus.\n * @property {Boolean} [focus.y=false] Show y coordinate focus grid line.<br>**NOTE:** Available when [`tooltip.grouped=false`](#.tooltip) option is set.\n * @property {Boolean} [lines.front=true] Set grid lines to be positioned over chart elements.\n * @default undefined\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Grid.GridLines)\n * @see [Demo: X Grid Lines](https://naver.github.io/billboard.js/demo/#Grid.OptionalXGridLines)\n * @see [Demo: Y Grid Lines](https://naver.github.io/billboard.js/demo/#Grid.OptionalYGridLines)\n * @example\n * grid: {\n * x: {\n * show: true,\n * lines: [\n * {value: 2, text: \"Label on 2\"},\n * {value: 5, text: \"Label on 5\", class: \"label-5\"},\n * {value: 6, text: \"Label on 6\", position: \"start\"}\n * ]\n * },\n * y: {\n * show: true,\n * lines: [\n * {value: 100, text: \"Label on 100\"},\n * {value: 200, text: \"Label on 200\", class: \"label-200\"},\n * {value: 300, text: \"Label on 300\", position: 'middle'}\n * ],\n * ticks: 5\n * },\n * front: true,\n * focus: {\n * show: false,\n *\n * // Below options are available when 'tooltip.grouped=false' option is set\n * edge: true,\n * y: true\n * },\n * lines: {\n * front: false\n * }\n * }\n */\n grid_x_show: !1,\n grid_x_type: \"tick\",\n grid_x_lines: [],\n grid_y_show: !1,\n grid_y_lines: [],\n grid_y_ticks: 10,\n grid_focus_edge: !1,\n grid_focus_show: !0,\n grid_focus_y: !1,\n grid_front: !1,\n grid_lines_front: !0,\n\n /**\n * Set point options\n * @name point\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [point.show=true] Whether to show each point in line.\n * @property {Number|Function} [point.r=2.5] The radius size of each point.\n * - **NOTE:** Disabled for 'bubble' type\n * @property {Boolean} [point.focus.expand.enabled=true] Whether to expand each point on focus.\n * @property {Number} [point.focus.expand.r=point.r*1.75] The radius size of each point on focus.\n * - **NOTE:** For 'bubble' type, the default is `bubbleSize*1.15`\n * @property {Number} [point.sensitivity=10] The senstivity value for interaction boundary.\n * @property {Number} [point.select.r=point.r*4] The radius size of each point on selected.\n * @property {String} [point.type=\"circle\"] The type of point to be drawn\n * - **NOTE:**\n * - If chart has 'bubble' type, only circle can be used.\n * - For IE, non circle point expansions are not supported due to lack of transform support.\n * - **Available Values:**\n * - circle\n * - rectangle\n * @property {Array} [point.pattern=[]] The type of point or svg shape as string, to be drawn for each line\n * - **NOTE:**\n * - This is an `experimental` feature and can have some unexpected behaviors.\n * - If chart has 'bubble' type, only circle can be used.\n * - For IE, non circle point expansions are not supported due to lack of transform support.\n * - **Available Values:**\n * - circle\n * - rectangle\n * - svg shape tag interpreted as string<br>\n * (ex. `<polygon points='2.5 0 0 5 5 5'></polygon>`)\n * @see [Demo: point type](https://naver.github.io/billboard.js/demo/#Point.RectanglePoints)\n * @example\n * point: {\n * show: false,\n * r: 5,\n *\n * // or customize the radius\n * r: function(d) {\n * ...\n * return r;\n * },\n *\n * focus: {\n * expand: {\n * enabled: true,\n * r: 1\n * }\n * },\n * select: {\n * r: 3\n * },\n *\n * // having lower value, means how closer to be for interaction\n * sensitivity: 3,\n *\n * // valid values are \"circle\" or \"rectangle\"\n * type: \"rectangle\",\n *\n * // or indicate as pattern\n \t * pattern: [\n \t * \"circle\",\n \t * \"rectangle\",\n \t * \"<polygon points='0 6 4 0 -4 0'></polygon>\"\n \t * ],\n * }\n */\n point_show: !0,\n point_r: 2.5,\n point_sensitivity: 10,\n point_focus_expand_enabled: !0,\n point_focus_expand_r: undefined,\n point_pattern: [],\n point_select_r: undefined,\n point_type: \"circle\",\n\n /**\n * Set line options\n * @name line\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [line.connectNull=false] Set if null data point will be connected or not.<br>\n * If true set, the region of null data will be connected without any data point. If false set, the region of null data will not be connected and get empty.\n * @property {Array} [line.classes=undefined] If set, used to set a css class on each line.\n * @property {Boolean} [line.step.type=step] Change step type for step chart.<br>\n * **Available values:**\n * - step\n * - step-before\n * - step-after\n * @property {Boolean|Array} [line.point=true] Set to false to not draw points on linecharts. Or pass an array of line ids to draw points for.\n * @property {Boolean} [line.zerobased=false] Set if min or max value will be 0 on line chart.\n * @example\n * line: {\n * connectNull: true,\n * classes: [\n * \"line-class1\",\n * \"line-class2\"\n * ],\n * step: {\n * type: \"step-after\"\n * },\n *\n * // hide all data points ('point.show=false' also has similar effect)\n * point: false,\n *\n * // show data points for only indicated datas\n * point: [\n * \"data1\", \"data3\"\n * ],\n *\n * zerobased: false\n * }\n */\n line_connectNull: !1,\n line_step_type: \"step\",\n line_zerobased: !1,\n line_classes: undefined,\n line_point: !0,\n\n /**\n \t* Set scatter options\n \t* @name scatter\n \t* @memberof Options\n \t* @type {Object}\n \t* @property {Boolean} [scatter.zerobased=false] Set if min or max value will be 0 on scatter chart.\n \t* @example\n \t* scatter: {\n \t* connectNull: true,\n \t* step: {\n \t* type: \"step-after\"\n \t* },\n \t*\n \t* // hide all data points ('point.show=false' also has similar effect)\n \t* point: false,\n \t*\n \t* // show data points for only indicated datas\n \t* point: [\n \t* \"data1\", \"data3\"\n \t* ],\n \t*\n \t* zerobased: false\n \t* }\n \t*/\n scatter_zerobased: !1,\n\n /**\n * Set bar options\n * @name bar\n * @memberof Options\n * @type {Object}\n * @property {Number} [bar.padding=0] The padding pixel value between each bar.\n * @property {Number} [bar.radius] Set the radius of bar edge in pixel.\n * - **NOTE:** Works only for non-stacked bar\n * @property {Number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width.\n \t * @property {Number} [bar.sensitivity=2] The senstivity offset value for interaction boundary.\n * @property {Number} [bar.width] Change the width of bar chart.\n * @property {Number} [bar.width.ratio=0.6] Change the width of bar chart by ratio.\n * @property {Number} [bar.width.max] The maximum width value for ratio.\n * @property {Number} [bar.width.dataname] Change the width of bar for indicated dataset only.\n * - **NOTE:**\n * - Works only for non-stacked bar\n * - Bars are centered accoding its total width value\n * @property {Number} [bar.width.dataname.ratio=0.6] Change the width of bar chart by ratio.\n * @property {Number} [bar.width.dataname.max] The maximum width value for ratio.\n * @property {Boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.\n * @see [Demo: bar padding](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarPadding)\n * @see [Demo: bar radius](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarRadius)\n * @see [Demo: bar width](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidth)\n * @see [Demo: bar width variant](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidthVariant)\n * @example\n * bar: {\n * padding: 1,\n *\n * // the 'radius' option can be used only for non-stacking bars\n * radius: 10,\n * // or\n * radius: {\n * ratio: 0.5\n * }\n *\n * // will not have offset between each bar elements for interaction\n * sensitivity: 0,\n *\n * width: 10,\n *\n * // or\n * width: {\n * ratio: 0.2,\n * max: 20\n * },\n *\n * // or specify width per dataset\n * width: {\n * data1: 20,\n * data2: {\n * ratio: 0.2,\n * max: 20\n * }\n * },\n *\n * zerobased: false\n * }\n */\n bar_padding: 0,\n bar_radius: undefined,\n bar_radius_ratio: undefined,\n bar_sensitivity: 2,\n bar_width: undefined,\n bar_width_ratio: .6,\n bar_width_max: undefined,\n bar_zerobased: !0,\n\n /**\n * Set bubble options\n * @name bubble\n * @memberof Options\n * @type {Object}\n * @property {Number|Function} [bubble.maxR=35] Set the max bubble radius value\n * @property {Boolean} [bubble.zerobased=false] Set if min or max value will be 0 on bubble chart.\n * @example\n * bubble: {\n * // ex) If 100 is the highest value among data bound, the representation bubble of 100 will have radius of 50.\n * // And the lesser will have radius relatively from tha max value.\n * maxR: 50,\n *\n * // or set radius callback\n * maxR: function(d) {\n * // ex. of d param - {x: Fri Oct 06 2017 00:00:00 GMT+0900, value: 80, id: \"data2\", index: 5}\n * ...\n * return Math.sqrt(d.value * 2);\n * },\n * zerobased: false\n * }\n */\n bubble_maxR: 35,\n bubble_zerobased: !1,\n\n /**\n * Set area options\n * @name area\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [area.zerobased=true] Set if min or max value will be 0 on area chart.\n * @property {Boolean} [area.above=false] Set background area above the data chart line.\n * @property {Boolean|Object} [area.linearGradient=false] Set the linear gradient on area.<br><br>\n * Or customize by giving below object value:\n * - x {Array}: `x1`, `x2` value\n * - y {Array}: `y1`, `y2` value\n * - stops {Array}: Each item should be having `[offset, stop-color, stop-opacity]` values.\n * @see [MDN's <linearGradient>](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient), [<stop>](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/stop)\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Chart.AreaChart)\n * @see [Demo: above](https://naver.github.io/billboard.js/demo/#AreaChartOptions.Above)\n * @see [Demo: linearGradient](https://naver.github.io/billboard.js/demo/#AreaChartOptions.LinearGradient)\n * @example\n * area: {\n * zerobased: false,\n * above: true,\n *\n * // will generate follwing linearGradient:\n * // <linearGradient x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n * // <stop offset=\"0\" stop-color=\"$DATA_COLOR\" stop-opacity=\"1\"></stop>\n * // <stop offset=\"1\" stop-color=\"$DATA_COLOR\" stop-opacity=\"0\"></stop>\n * // </linearGradient>\n * linearGradient: true,\n *\n * // Or customized gradient\n * linearGradient: {\n * \tx: [0, 0], // x1, x2 attributes\n * \ty: [0, 0], // y1, y2 attributes\n * \tstops: [\n * \t // offset, stop-color, stop-opacity\n * \t [0, \"#7cb5ec\", 1],\n *\n * \t // setting 'null' for stop-color, will set its original data color\n * \t [0.5, null, 0],\n *\n * \t // setting 'function' for stop-color, will pass data id as argument.\n * \t // It should return color string or null value\n * \t [1, function(id) { return id === \"data1\" ? \"red\" : \"blue\"; }, 0],\n * \t]\n * }\n * }\n */\n area_zerobased: !0,\n area_above: !1,\n area_linearGradient: !1,\n\n /**\n * Set pie options\n * @name pie\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [pie.label.show=true] Show or hide label on each pie piece.\n * @property {Function} [pie.label.format] Set formatter for the label on each pie piece.\n * @property {Number} [pie.label.threshold=0.05] Set threshold to show/hide labels.\n * @property {Number|Function} [pie.label.ratio=undefined] Set ratio of labels position.\n * @property {Boolean|Object} [pie.expand=true] Enable or disable expanding pie pieces.\n * @property {Number} [pie.expand.rate=0.98] Set expand rate.\n * @property {Number} [pie.expand.duration=50] Set expand transition time in ms.\n * @property {Number|Object} [pie.innerRadius=0] Sets the inner radius of pie arc.\n * @property {Number} [pie.padAngle=0] Set padding between data.\n * @property {Number} [pie.padding=0] Sets the gap between pie arcs.\n \t * @property {Number} [donut.startingAngle=0] Set starting angle where data draws.\n * @example\n * pie: {\n * label: {\n * show: false,\n * format: function(value, ratio, id) {\n * return d3.format(\"$\")(value);\n *\n * // to multiline, return with '\\n' character\n * // return value +\"%\\nLine1\\n2Line2\";\n * },\n * threshold: 0.1,\n *\n * // set ratio callback. Should return ratio value\n * ratio: function(d, radius, h) {\n * ...\n * return ratio;\n * },\n * // or set ratio number\n * ratio: 0.5\n * },\n *\n * // disable expand transition for interaction\n * expand: false,\n *\n * expand: {\n * \t// set duration of expand transition to 500ms.\n * duration: 500,\n *\n * \t// set expand area rate\n * rate: 1\n * },\n *\n * innerRadius: 0,\n *\n * // set different innerRadius for each data\n * innerRadius: {\n * \tdata1: 10,\n * \tdata2: 0\n * }\n *\n * padAngle: 0.1,\n * padding: 0,\n * startingAngle: 1\n * }\n */\n pie_label_show: !0,\n pie_label_format: undefined,\n pie_label_threshold: .05,\n pie_label_ratio: undefined,\n pie_expand: {},\n pie_expand_rate: .98,\n pie_expand_duration: 50,\n pie_innerRadius: 0,\n pie_padAngle: 0,\n pie_padding: 0,\n pie_startingAngle: 0,\n\n /**\n * Set plugins\n * @name plugins\n * @memberof Options\n * @type {Array}\n * @example\n * plugins: [\n * new bb.plugin.stanford({ ... }),\n * new PluginA(),\n * ...\n * ]\n */\n plugins: [],\n\n /**\n * Set gauge options\n * @name gauge\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [gauge.fullCircle=false] Show full circle as donut. When set to 'true', the max label will not be showed due to start and end points are same location.\n * @property {Boolean} [gauge.label.show=true] Show or hide label on gauge.\n * @property {Function} [gauge.label.format] Set formatter for the label on gauge. Label text can be multilined with `\\n` character.\n * @property {Function} [gauge.label.extents] Set customized min/max label text.\n * @property {Boolean} [gauge.expand=true] Enable or disable expanding gauge.\n \t * @property {Number} [gauge.expand.rate=0.98] Set expand rate.\n * @property {Number} [gauge.expand.duration=50] Set the expand transition time in milliseconds.\n * @property {Number} [gauge.min=0] Set min value of the gauge.\n * @property {Number} [gauge.max=100] Set max value of the gauge.\n * @property {Number} [gauge.startingAngle=-1 * Math.PI / 2] Set starting angle where data draws.\n * @property {String} [gauge.title=\"\"] Set title of gauge chart. Use `\\n` character to enter line break.\n * @property {String} [gauge.units] Set units of the gauge.\n * @property {Number} [gauge.width] Set width of gauge chart.\n * @property {String} [gauge.type=\"single\"] Set type of gauge to be displayed.<br><br>\n * **Available Values:**\n * - single\n * - multi\n * @property {String} [gauge.arcs.minWidth=5] Set minimal width of gauge arcs until the innerRadius disappears.\n * @example\n * gauge: {\n * fullCircle: false,\n * label: {\n * show: false,\n * format: function(value, ratio) {\n * return value;\n *\n * // to multiline, return with '\\n' character\n * // return value +\"%\\nLine1\\n2Line2\";\n * },\n * extents: function(value, isMax) {\n \t * return (isMax ? \"Max:\" : \"Min:\") + value;\n * }\n * },\n *\n * // disable expand transition for interaction\n * expand: false,\n *\n * expand: {\n * \t// set duration of expand transition to 500ms.\n * duration: 500,\n *\n * \t// set expand area rate\n * rate: 1\n * },\n *\n * min: -100,\n * max: 200,\n * type: \"single\" // or 'multi'\n * title: \"Title Text\",\n * units: \"%\",\n * width: 10,\n * arcs: {\n * minWidth: 5\n * }\n * }\n */\n gauge_fullCircle: !1,\n gauge_label_show: !0,\n gauge_label_format: undefined,\n gauge_min: 0,\n gauge_max: 100,\n gauge_type: \"single\",\n gauge_startingAngle: -1 * Math.PI / 2,\n gauge_label_extents: undefined,\n gauge_title: \"\",\n gauge_units: undefined,\n gauge_width: undefined,\n gauge_arcs_minWidth: 5,\n gauge_expand: {},\n gauge_expand_rate: .98,\n gauge_expand_duration: 50,\n\n /**\n * Set donut options\n * @name donut\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [donut.label.show=true] Show or hide label on each donut piece.\n * @property {Function} [donut.label.format] Set formatter for the label on each donut piece.\n * @property {Number} [donut.label.threshold=0.05] Set threshold to show/hide labels.\n * @property {Number|Function} [donut.label.ratio=undefined] Set ratio of labels position.\n * @property {Boolean} [donut.expand=true] Enable or disable expanding donut pieces.\n * @property {Number} [donut.expand.rate=0.98] Set expand rate.\n * @property {Number} [donut.expand.duration=50] Set expand transition time in ms.\n * @property {Number} [donut.width] Set width of donut chart.\n * @property {String} [donut.title=\"\"] Set title of donut chart. Use `\\n` character to enter line break.\n * @property {Number} [donut.padAngle=0] Set padding between data.\n * @property {Number} [donut.startingAngle=0] Set starting angle where data draws.\n * @example\n * donut: {\n * label: {\n * show: false,\n * format: function(value, ratio, id) {\n * return d3.format(\"$\")(value);\n *\n * // to multiline, return with '\\n' character\n * // return value +\"%\\nLine1\\n2Line2\";\n * },\n * threshold: 0.1,\n *\n * // set ratio callback. Should return ratio value\n * ratio: function(d, radius, h) {\n * \t...\n * \treturn ratio;\n * },\n * // or set ratio number\n * ratio: 0.5\n * },\n *\n * // disable expand transition for interaction\n * expand: false,\n *\n * expand: {\n * \t// set duration of expand transition to 500ms.\n * duration: 500,\n *\n * \t// set expand area rate\n * rate: 1\n * },\n *\n * width: 10,\n * padAngle: 0.2,\n * startingAngle: 1,\n * title: \"Donut Title\"\n *\n * // title with line break\n * title: \"Title1\\nTitle2\"\n * }\n */\n donut_label_show: !0,\n donut_label_format: undefined,\n donut_label_threshold: .05,\n donut_label_ratio: undefined,\n donut_width: undefined,\n donut_title: \"\",\n donut_expand: {},\n donut_expand_rate: .98,\n donut_expand_duration: 50,\n donut_padAngle: 0,\n donut_startingAngle: 0,\n\n /**\n * Set spline options\n * - **Available interpolation type values:**\n * - basis (d3.curveBasis)\n * - basis-closed (d3.curveBasisClosed)\n * - basis-open (d3.curveBasisOpen)\n * - bundle (d3.curveBundle)\n * - cardinal (d3.curveCardinal)\n * - cardinal-closed (d3.curveCardinalClosed)\n * - cardinal-open (d3.curveCardinalOpen)\n * - catmull-rom (d3.curveCatmullRom)\n * - catmull-rom-closed (d3.curveCatmullRomClosed)\n * - catmull-rom-open (d3.curveCatmullRomOpen)\n * - monotone-x (d3.curveMonotoneX)\n * - monotone-y (d3.curveMonotoneY)\n * - natural (d3.curveNatural)\n * - linear-closed (d3.curveLinearClosed)\n * - linear (d3.curveLinear)\n * - step (d3.curveStep)\n * - step-after (d3.curveStepAfter)\n * - step-before (d3.curveStepBefore)\n * @name spline\n * @memberof Options\n * @type {Object}\n * @property {String} [spline.interpolation.type=\"cardinal\"]\n * @see [Interpolation (d3 v4)](http://bl.ocks.org/emmasaunders/c25a147970def2b02d8c7c2719dc7502)\n * @example\n * spline: {\n * interpolation: {\n * type: \"cardinal\"\n * }\n * }\n */\n spline_interpolation_type: \"cardinal\",\n\n /**\n * Set radar options\n * - **NOTE:**\n * > When x tick text contains `\\n`, it's used as line break.\n * @name radar\n * @memberof Options\n * @type {Object}\n * @property {Number} [radar.axis.max=undefined] The max value of axis. If not given, it'll take the max value from the given data.\n * @property {Boolean} [radar.axis.line.show=true] Show or hide axis line.\n * @property {Number} [radar.axis.text.position.x=0] x coordinate position, relative the original.\n * @property {NUmber} [radar.axis.text.position.y=0] y coordinate position, relative the original.\n * @property {Boolean} [radar.axis.text.show=true] Show or hide axis text.\n * @property {Boolean} [radar.direction.clockwise=false] Set the direction to be drawn.\n * @property {Number} [radar.level.depth=3] Set the level depth.\n * @property {Boolean} [radar.level.show=true] Show or hide level.\n * @property {Function} [radar.level.text.format=(x) => (x % 1 === 0 ? x : x.toFixed(2))] Set format function for the level value.\n * @property {Boolean} [radar.level.text.show=true] Show or hide level text.\n * @property {Number} [radar.size.ratio=0.87] Set size ratio.\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Chart.RadarChart)\n * @see [Demo: radar axis](https://naver.github.io/billboard.js/demo/#RadarChartOptions.RadarAxis)\n * @see [Demo: radar level](https://naver.github.io/billboard.js/demo/#RadarChartOptions.RadarLevel)\n * @see [Demo: radar size](https://naver.github.io/billboard.js/demo/#RadarChartOptions.RadarSize)\n * @see [Demo: radar axis multiline](https://naver.github.io/billboard.js/demo/#RadarChartOptions.RadarAxisMultiline)\n * @example\n * radar: {\n * axis: {\n * max: 50,\n * line: {\n * show: false\n * },\n * text: {\n * position: {\n * \tx: 0,\n * \ty: 0\n * },\n * show: false\n * }\n * },\n * direction: {\n * clockwise: true\n * },\n * level: {\n * show: false,\n * text: {\n * format: function(x) {\n * return x + \"%\";\n * },\n * show: true\n * }\n * },\n * size: {\n * ratio: 0.7\n * }\n * }\n */\n radar_axis_max: undefined,\n radar_axis_line_show: !0,\n radar_axis_text_show: !0,\n radar_axis_text_position: {},\n radar_level_depth: 3,\n radar_level_show: !0,\n radar_level_text_format: function radar_level_text_format(x) {\n return x % 1 === 0 ? x : x.toFixed(2);\n },\n radar_level_text_show: !0,\n radar_size_ratio: .87,\n radar_direction_clockwise: !1,\n\n /**\n * Control the render timing\n * @name render\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [render.lazy=true] Make to not render at initialization (enabled by default when bind element's visibility is hidden).\n * @property {Boolean} [render.observe=true] Observe bind element's visibility(`display` or `visiblity` inline css property or class value) & render when is visible automatically (for IEs, only works IE11+). When set to **false**, call [`.flush()`](./Chart.html#flush) to render.\n * @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.LazyRender)\n * @example\n * render: {\n * lazy: true,\n * observe: true\n * }\n *\n * @example\n *\t// <!-- render.lazy will detect visibility defined -->\n * // (a) <div id='chart' class='hide'></div>\n * // (b) <div id='chart' style='display:none'></div>\n *\n * // render.lazy enabled by default when element is hidden\n * var chart = bb.generate({ ... });\n *\n * // chart will be rendered automatically when element's visibility changes\n * // Note: works only for inlined css property or class attribute changes\n * document.getElementById('chart').classList.remove('hide') // (a)\n * document.getElementById('chart').style.display = 'block'; // (b)\n *\n * @example\n *\t// chart won't be rendered and not observing bind element's visiblity changes\n * var chart = bb.generate({\n * render: {\n * lazy: true,\n * observe: false\n * }\n * });\n *\n * // call at any point when you want to render\n * chart.flush();\n */\n render: {},\n\n /**\n * Show rectangles inside the chart.<br><br>\n * This option accepts array including object that has axis, start, end and class.\n * The keys start, end and class are optional.\n * axis must be x, y or y2. start and end should be the value where regions start and end.\n * If not specified, the edge values will be used.\n * If timeseries x axis, date string, Date object and unixtime integer can be used.\n * If class is set, the region element will have it as class.\n * @name regions\n * @memberof Options\n * @type {Array}\n * @default []\n * @example\n * regions: [\n * {\n * axis: \"x\",\n * start: 1,\n * end: 4,\n * class: \"region-1-4\"\n * }\n * ]\n */\n regions: [],\n\n /**\n * Tooltip options\n * @name tooltip\n * @memberof Options\n * @type {Object}\n * @property {Boolean} [tooltip.show=true] Show or hide tooltip.\n * @property {Boolean} [tooltip.doNotHide=false] Make tooltip keep showing not hiding on interaction.\n * @property {Boolean} [tooltip.grouped=true] Set if tooltip is grouped or not for the data points.\n * - **NOTE:** The overlapped data points will be displayed as grouped even if set false.\n * @property {Boolean} [tooltip.linked=false] Set if tooltips on all visible charts with like x points are shown together when one is shown.\n * @property {String} [tooltip.linked.name=\"\"] Groping name for linked tooltip.<br>If specified, linked tooltip will be groped interacting to be worked only with the same name.\n * @property {Function} [tooltip.format.title] Set format for the title of tooltip.<br>\n * Specified function receives x of the data point to show.\n * @property {Function} [tooltip.format.name] Set format for the name of each data in tooltip.<br>\n * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.\n * @property {Function} [tooltip.format.value] Set format for the value of each data in tooltip.<br>\n * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.\n * If undefined returned, the row of that value will be skipped.\n * @property {Function} [tooltip.position] Set custom position function for the tooltip.<br>\n * This option can be used to modify the tooltip position by returning object that has top and left.\n * @property {Function|Object} [tooltip.contents] Set custom HTML for the tooltip.<br>\n * Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points.\n * @property {String|HTMLElement} [tooltip.contents.bindto=undefined] Set CSS selector or element reference to bind tooltip.\n * - **NOTE:** When is specified, will not be updating tooltip's position.\n * @property {String} [tooltip.contents.template=undefined] Set tooltip's template.<br><br>\n * Within template, below syntax will be replaced using template-like syntax string:\n * - **{{ ... }}**: the doubly curly brackets indicate loop block for data rows.\n * - **{=CLASS_TOOLTIP}**: default tooltip class name `bb-tooltip`.\n * - **{=CLASS_TOOLTIP_NAME}**: default tooltip data class name (ex. `bb-tooltip-name-data1`)\n * - **{=TITLE}**: title value.\n * - **{=COLOR}**: data color.\n * - **{=VALUE}**: data value.\n * @property {Object} [tooltip.contents.text=undefined] Set additional text content within data loop, using template syntax.\n * - **NOTE:** It should contain `{ key: Array, ... }` value\n * - 'key' name is used as substitution within template as '{=KEY}'\n * - The value array length should match with the data length\n * @property {Boolean} [tooltip.init.show=false] Show tooltip at the initialization.\n * @property {Number} [tooltip.init.x=0] Set x Axis index to be shown at the initialization.\n * @property {Object} [tooltip.init.position={top: \"0px\",left: \"50px\"}] Set the position of tooltip at the initialization.\n * @property {Function} [tooltip.onshow] Set a callback that will be invoked before the tooltip is shown.\n * @property {Function} [tooltip.onhide] Set a callback that will be invoked before the tooltip is hidden.\n * @property {Function} [tooltip.onshown] Set a callback that will be invoked after the tooltip is shown\n * @property {Function} [tooltip.onhidden] Set a callback that will be invoked after the tooltip is hidden.\n * @property {String|Function|null} [tooltip.order=null] Set tooltip data display order.<br><br>\n * **Available Values:**\n * - `desc`: In descending data value order\n * - `asc`: In ascending data value order\n * - `null`: It keeps the data display order<br>\n * **NOTE:** When `data.groups` is set, the order will follow as the stacked graph order.<br>\n * If want to order as data bound, set any value rather than asc, desc or null. (ex. empty string \"\")\n * - `function(data1, data2) { ... }`: [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)\n * @see [Demo: Hide Tooltip](https://naver.github.io/billboard.js/demo/#Tooltip.HideTooltip)\n * @see [Demo: Tooltip Grouping](https://naver.github.io/billboard.js/demo/#Tooltip.TooltipGrouping)\n * @see [Demo: Tooltip Format](https://naver.github.io/billboard.js/demo/#Tooltip.TooltipFormat)\n * @see [Demo: Linked Tooltip](https://naver.github.io/billboard.js/demo/#Tooltip.LinkedTooltips)\n * @see [Demo: Tooltip Template](https://naver.github.io/billboard.js/demo/#Tooltip.TooltipTemplate)\n * @example\n * tooltip: {\n * show: true,\n * doNotHide: true,\n * grouped: false,\n * format: {\n * title: function(x) { return \"Data \" + x; },\n * name: function(name, ratio, id, index) { return name; },\n * value: function(value, ratio, id, index) { return ratio; }\n * },\n * position: function(data, width, height, element) {\n * \t// return with unit or without. If the value is number, is treated as 'px'.\n * \treturn {top: \"10%\", left: 20} // top:10%; left: 20px;\n \t\t * },\n \t\t * contents: function(d, defaultTitleFormat, defaultValueFormat, color) {\n \t\t * return ... // formatted html as you want\n \t\t * },\n *\n * // specify tooltip contents using template\n * // - example of HTML returned:\n * // <ul class=\"bb-tooltip\">\n * // <li class=\"bb-tooltip-name-data1\"><span>250</span><br><span style=\"color:#00c73c\">data1</span></li>\n * // <li class=\"bb-tooltip-name-data2\"><span>50</span><br><span style=\"color:#fa7171\">data2</span></li>\n * // </ul>\n * contents: {\n * \tbindto: \"#tooltip\",\n * \ttemplate: '<ul class={=CLASS_TOOLTIP}>{{' +\n * \t\t\t'<li class=\"{=CLASS_TOOLTIP_NAME}\"><span>{=VALUE}</span><br>' +\n * \t\t\t'<span style=color:{=COLOR}>{=NAME}</span></li>' +\n * \t\t'}}</ul>'\n * }\n *\n * // with additional text value\n * // - example of HTML returned:\n * // <ul class=\"bb-tooltip\">\n * // <li class=\"bb-tooltip-name-data1\"><span>250</span><br>comment1<span style=\"color:#00c73c\">data1</span>text1</li>\n * // <li class=\"bb-tooltip-name-data2\"><span>50</span><br>comment2<span style=\"color:#fa7171\">data2</span>text2</li>\n * // </ul>\n * contents: {\n * \tbindto: \"#tooltip\",\n * \ttext: {\n * \t\t// a) 'key' name is used as substitution within template as '{=KEY}'\n * \t\t// b) the length should match with the data length\n * \t\tVAR1: [\"text1\", \"text2\"],\n * \t\tVAR2: [\"comment1\", \"comment2\"],\n * \t},\n * \ttemplate: '<ul class={=CLASS_TOOLTIP}>{{' +\n * \t\t\t'<li class=\"{=CLASS_TOOLTIP_NAME}\"><span>{=VALUE}</span>{=VAR2}<br>' +\n * \t\t\t'<span style=color:{=COLOR}>{=NAME}</span>{=VAR1}</li>' +\n * \t\t'}}</ul>'\n * }\n \t\t *\n \t\t * // sort tooltip data value display in ascending order\n \t\t * order: \"asc\",\n \t\t *\n * // specifying sort function\n * order: function(a, b) {\n * // param data passed format\n * {x: 5, value: 250, id: \"data1\", index: 5, name: \"data1\"}\n * ...\n * },\n *\n * // show at the initialization\n * init: {\n * show: true,\n * x: 2,\n * position: {\n * top: \"150px\",\n * left: \"250px\"\n * }\n * },\n *\n * // fires prior tooltip is shown\n * onshow: function(ctx, selectedData) {\n * \tctx; // current chart instance\n *\n * \t// current dataset selected\n * \t// ==> [{x: 4, value: 150, id: \"data2\", index: 4, name: \"data2\"}, ...]\n * \tselectedData;\n * },\n *\n * // fires prior tooltip is hidden\n * onhide: function(ctx, selectedData) {\n * \tctx; // current chart instance\n *\n * \t// current dataset selected\n * \t// ==> [{x: 4, value: 150, id: \"data2\", index: 4, name: \"data2\"}, ...]\n * \tselectedData;\n * },\n *\n * // fires after tooltip is shown\n * onshown: function(ctx, selectedData) {\n * \tctx; // current chart instance\n *\n * \t// current dataset selected\n * \t// ==> [{x: 4, value: 150, id: \"data2\", index: 4, name: \"data2\"}, ...]\n * \tselectedData;\n * },\n *\n * // fires after tooltip is hidden\n * onhidden: function(ctx, selectedData) {\n * \tctx; // current chart instance\n *\n * \t// current dataset selected\n * \t// ==> [{x: 4, value: 150, id: \"data2\", index: 4, name: \"data2\"}, ...]\n * \tselectedData;\n * },\n *\n * // Link any tooltips when multiple charts are on the screen where same x coordinates are available\n * // Useful for timeseries correlation\n * linked: true,\n *\n * // Specify name to interact those with the same name only.\n * linked: {\n * name: \"some-group\"\n * }\n * }\n */\n tooltip_show: !0,\n tooltip_doNotHide: !1,\n tooltip_grouped: !0,\n tooltip_format_title: undefined,\n tooltip_format_name: undefined,\n tooltip_format_value: undefined,\n tooltip_position: undefined,\n tooltip_contents: {},\n tooltip_init_show: !1,\n tooltip_init_x: 0,\n tooltip_init_position: {\n top: \"0px\",\n left: \"50px\"\n },\n tooltip_linked: !1,\n tooltip_linked_name: \"\",\n tooltip_onshow: function tooltip_onshow() {},\n tooltip_onhide: function tooltip_onhide() {},\n tooltip_onshown: function tooltip_onshown() {},\n tooltip_onhidden: function tooltip_onhidden() {},\n tooltip_order: null,\n\n /**\n * Set title options\n * @name title\n * @memberof Options\n * @type {Object}\n * @property {String} [title.text] Title text. If contains `\\n`, it's used as line break allowing multiline title.\n * @property {Number} [title.padding.top=0] Top padding value.\n * @property {Number} [title.padding.right=0] Right padding value.\n * @property {Number} [title.padding.bottom=0] Bottom padding value.\n * @property {Number} [title.padding.left=0] Left padding value.\n * @property {String} [title.position=center] Available values are: 'center', 'right' and 'left'.\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Title.MultilinedTitle)\n * @example\n * title: {\n * text: \"Title Text\",\n *\n * // or Multiline title text\n * text: \"Main title text\\nSub title text\",\n *\n * padding: {\n * top: 10,\n * right: 10,\n * bottom: 10,\n * left: 10\n * },\n * position: \"center\"\n * }\n */\n title_text: undefined,\n title_padding: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n title_position: \"center\"\n };\n};\n\n\n// CONCATENATED MODULE: ./src/config/config.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n getOptions: function getOptions() {\n return new Options_Options();\n },\n\n /**\n * Load configuration option\n * @param {Object} config User's generation config value\n * @private\n */\n loadConfig: function loadConfig(config) {\n var target,\n keys,\n read,\n thisConfig = this.config,\n find = function () {\n var key = keys.shift();\n return key && target && isObjectType(target) && key in target ? (target = target[key], find()) : key ? undefined : target;\n };\n\n Object.keys(thisConfig).forEach(function (key) {\n target = config, keys = key.split(\"_\"), read = find(), isDefined(read) && (thisConfig[key] = read);\n });\n }\n});\n// CONCATENATED MODULE: ./src/internals/scale.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n getScale: function getScale(min, max, forTimeseries) {\n return (forTimeseries ? Object(external_commonjs_d3_scale_commonjs2_d3_scale_amd_d3_scale_root_d3_[\"scaleTime\"])() : Object(external_commonjs_d3_scale_commonjs2_d3_scale_amd_d3_scale_root_d3_[\"scaleLinear\"])()).range([min, max]);\n },\n\n /**\n * Get x Axis scale function\n * @param {Number} min\n * @param {Number} max\n * @param {Number} domain\n * @param {Function} offset The offset getter to be sum\n * @return {Function} scale\n * @private\n */\n getX: function getX(min, max, domain, offset) {\n var $$ = this,\n scale = $$.zoomScale || $$.getScale(min, max, $$.isTimeSeries());\n return $$.getCustomizedScale(domain ? scale.domain(domain) : scale, offset);\n },\n\n /**\n * Get y Axis scale function\n * @param {Number} min\n * @param {Number} max\n * @param {Number} domain\n * @return {Function} scale\n * @private\n */\n getY: function getY(min, max, domain) {\n var scale = this.getScale(min, max, this.isTimeSeriesY());\n return domain && scale.domain(domain), scale;\n },\n\n /**\n * Get customized scale\n * @param {d3.scaleLinear|d3.scaleTime} scaleValue\n * @param {Function} offsetValue Offset getter to be sum\n * @return {} scale\n * @private\n */\n getCustomizedScale: function getCustomizedScale(scaleValue, offsetValue) {\n var $$ = this,\n offset = offsetValue || function () {\n return $$.xAxis.tickOffset();\n },\n scale = function (d, raw) {\n var v = scaleValue(d) + offset();\n return raw ? v : Math.ceil(v);\n };\n\n // copy original scale methods\n for (var key in scaleValue) scale[key] = scaleValue[key];\n\n return scale.orgDomain = function () {\n return scaleValue.domain();\n }, scale.orgScale = function () {\n return scaleValue;\n }, $$.isCategorized() && (scale.domain = function (domainValue) {\n var domain = domainValue;\n return arguments.length ? (scaleValue.domain(domain), scale) : (domain = this.orgDomain(), [domain[0], domain[1] + 1]);\n }), scale;\n },\n getYScale: function getYScale(id) {\n return this.axis.getId(id) === \"y2\" ? this.y2 : this.y;\n },\n getSubYScale: function getSubYScale(id) {\n return this.axis.getId(id) === \"y2\" ? this.subY2 : this.subY;\n },\n\n /**\n * Update scale\n * @private\n * @param {Boolean} isInit - param is given at the init rendering\n */\n updateScales: function updateScales(isInit) {\n var updateXDomain = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1],\n $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated;\n $$.xMin = isRotated ? 1 : 0, $$.xMax = isRotated ? $$.height : $$.width, $$.yMin = isRotated ? 0 : $$.height, $$.yMax = isRotated ? $$.width : 1, $$.subXMin = $$.xMin, $$.subXMax = $$.xMax, $$.subYMin = isRotated ? 0 : $$.height2, $$.subYMax = isRotated ? $$.width2 : 1;\n // update scales\n // x Axis\n var xDomain = updateXDomain && $$.x && $$.x.orgDomain(),\n xSubDomain = updateXDomain && $$.orgXDomain;\n // y Axis\n // update for arc\n $$.x = $$.getX($$.xMin, $$.xMax, xDomain, function () {\n return $$.xAxis.tickOffset();\n }), $$.subX = $$.getX($$.xMin, $$.xMax, xSubDomain, function (d) {\n return d % 1 ? 0 : $$.subXAxis.tickOffset();\n }), $$.xAxisTickFormat = $$.axis.getXAxisTickFormat(), $$.xAxisTickValues = $$.axis.getTickValues(\"x\"), $$.xAxis = $$.axis.getAxis(\"x\", $$.x, config.axis_x_tick_outer, isInit), $$.subXAxis = $$.axis.getAxis(\"subX\", $$.subX, config.axis_x_tick_outer, isInit), $$.y = $$.getY($$.yMin, $$.yMax, $$.y ? $$.y.domain() : config.axis_y_default), $$.subY = $$.getY($$.subYMin, $$.subYMax, $$.subY ? $$.subY.domain() : config.axis_y_default), $$.yAxisTickValues = $$.axis.getTickValues(\"y\"), $$.yAxis = $$.axis.getAxis(\"y\", $$.y, config.axis_y_tick_outer, isInit), config.axis_y2_show && ($$.y2 = $$.getY($$.yMin, $$.yMax, $$.y2 ? $$.y2.domain() : config.axis_y2_default), $$.subY2 = $$.getY($$.subYMin, $$.subYMax, $$.subY2 ? $$.subY2.domain() : config.axis_y2_default), $$.y2AxisTickValues = $$.axis.getTickValues(\"y2\"), $$.y2Axis = $$.axis.getAxis(\"y2\", $$.y2, config.axis_y2_tick_outer, isInit)), $$.updateArc && $$.updateArc();\n }\n});\n// CONCATENATED MODULE: ./src/internals/domain.js\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n getYDomainMinMax: function getYDomainMinMax(targets, type) {\n var $$ = this,\n config = $$.config,\n isMin = type === \"min\",\n dataGroups = config.data_groups,\n ids = $$.mapToIds(targets),\n ys = $$.getValuesAsIdKeyed(targets);\n return dataGroups.length > 0 && function () {\n for (var idsInGroup, _ret, hasValue = $$[\"has\".concat(isMin ? \"Negative\" : \"Positive\", \"ValueInTargets\")](targets), _loop = function (j, _idsInGroup) {\n if (_idsInGroup = _idsInGroup.filter(function (v) {\n return ids.indexOf(v) >= 0;\n }), _idsInGroup.length === 0) return idsInGroup = _idsInGroup, \"continue\";\n var baseId = _idsInGroup[0],\n baseAxisId = $$.axis.getId(baseId);\n hasValue && ys[baseId] && (ys[baseId] = ys[baseId].map(function (v) {\n return (isMin ? v < 0 : v > 0) ? v : 0;\n }));\n\n for (var id, _ret2, _loop2 = function (k, id) {\n if (!ys[id]) return \"continue\";\n var axisId = $$.axis.getId(id);\n ys[id].forEach(function (v, i) {\n var val = +v,\n meetCondition = isMin ? val > 0 : val < 0;\n axisId !== baseAxisId || hasValue && meetCondition || (ys[baseId][i] += val);\n });\n }, k = 1; id = _idsInGroup[k]; k++) _ret2 = _loop2(k, id), _ret2 === \"continue\";\n\n idsInGroup = _idsInGroup;\n }, j = 0; idsInGroup = dataGroups[j]; j++) _ret = _loop(j, idsInGroup), _ret === \"continue\";\n }(), getMinMax(type, Object.keys(ys).map(function (key) {\n return getMinMax(type, ys[key]);\n }));\n },\n getYDomainMin: function getYDomainMin(targets) {\n return this.getYDomainMinMax(targets, \"min\");\n },\n getYDomainMax: function getYDomainMax(targets) {\n return this.getYDomainMinMax(targets, \"max\");\n },\n\n /**\n * Check if hidden targets bound to the given axis id\n * @return {Boolean}\n * @private\n */\n isHiddenTargetWithYDomain: function isHiddenTargetWithYDomain(id) {\n var $$ = this;\n return $$.hiddenTargetIds.some(function (v) {\n return $$.axis.getId(v) === id;\n });\n },\n getYDomain: function getYDomain(targets, axisId, xDomain) {\n var $$ = this,\n config = $$.config,\n pfx = \"axis_\".concat(axisId);\n if ($$.isStackNormalized()) return [0, 100];\n var targetsByAxisId = targets.filter(function (t) {\n return $$.axis.getId(t.id) === axisId;\n }),\n yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId;\n if (yTargets.length === 0) return $$.isHiddenTargetWithYDomain(axisId) ? $$[axisId].domain() : axisId === \"y2\" ? $$.y.domain() : // When all data bounds to y2, y Axis domain is called prior y2.\n // So, it needs to call to get y2 domain here\n $$.getYDomain(targets, \"y2\", xDomain);\n var yMin = config[\"\".concat(pfx, \"_min\")],\n yMax = config[\"\".concat(pfx, \"_max\")],\n yDomainMin = $$.getYDomainMin(yTargets),\n yDomainMax = $$.getYDomainMax(yTargets),\n center = config[\"\".concat(pfx, \"_center\")],\n isZeroBased = [\"area\", \"bar\", \"bubble\", \"line\", \"scatter\"].some(function (v) {\n return $$.hasType(v, yTargets) && config[\"\".concat(v, \"_zerobased\")];\n }),\n isInverted = config[\"\".concat(pfx, \"_inverted\")],\n showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated,\n showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated;\n yDomainMin = isValue(yMin) ? yMin : isValue(yMax) ? yDomainMin < yMax ? yDomainMin : yMax - 10 : yDomainMin, yDomainMax = isValue(yMax) ? yMax : isValue(yMin) ? yMin < yDomainMax ? yDomainMax : yMin + 10 : yDomainMax, isNaN(yDomainMin) && (yDomainMin = 0), isNaN(yDomainMax) && (yDomainMax = yDomainMin), yDomainMin === yDomainMax && (yDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0);\n var isAllPositive = yDomainMin >= 0 && yDomainMax >= 0,\n isAllNegative = yDomainMin <= 0 && yDomainMax <= 0;\n (isValue(yMin) && isAllPositive || isValue(yMax) && isAllNegative) && (isZeroBased = !1), isZeroBased && (isAllPositive && (yDomainMin = 0), isAllNegative && (yDomainMax = 0));\n var domainLength = Math.abs(yDomainMax - yDomainMin),\n padding = {\n top: domainLength * .1,\n bottom: domainLength * .1\n };\n\n if (isDefined(center)) {\n var yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax));\n yDomainMax = center + yDomainAbs, yDomainMin = center - yDomainAbs;\n } // add padding for data label\n\n\n if (showHorizontalDataLabel) {\n var diff = diffDomain($$.y.range()),\n ratio = $$.getDataLabelLength(yDomainMin, yDomainMax, \"width\").map(function (v) {\n return v / diff;\n });\n [\"bottom\", \"top\"].forEach(function (v, i) {\n padding[v] += domainLength * (ratio[i] / (1 - ratio[0] - ratio[1]));\n });\n } else if (showVerticalDataLabel) {\n var lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, \"height\");\n [\"bottom\", \"top\"].forEach(function (v, i) {\n padding[v] += $$.axis.convertPixelsToAxisPadding(lengths[i], domainLength);\n });\n } // if padding is set, the domain will be updated relative the current domain value\n // ex) $$.height=300, padding.top=150, domainLength=4 --> domain=6\n\n\n var p = config[\"\".concat(pfx, \"_padding\")];\n notEmpty(p) && [\"bottom\", \"top\"].forEach(function (v) {\n padding[v] = $$.axis.getPadding(p, v, padding[v], domainLength);\n }), isZeroBased && (isAllPositive && (padding.bottom = yDomainMin), isAllNegative && (padding.top = -yDomainMax));\n var domain = [yDomainMin - padding.bottom, yDomainMax + padding.top];\n return isInverted ? domain.reverse() : domain;\n },\n getXDomainMinMax: function getXDomainMinMax(targets, type) {\n var $$ = this,\n configValue = $$.config[\"axis_x_\".concat(type)],\n dataValue = getMinMax(type, targets.map(function (t) {\n return getMinMax(type, t.values.map(function (v) {\n return v.x;\n }));\n })),\n value = isObject(configValue) ? configValue.value : configValue;\n return value = isDefined(value) && $$.isTimeSeries() ? $$.parseDate(value) : value, isObject(configValue) && configValue.fit && (type === \"min\" && value < dataValue || type === \"max\" && value > dataValue) && (value = undefined), isDefined(value) ? value : dataValue;\n },\n getXDomainMin: function getXDomainMin(targets) {\n return this.getXDomainMinMax(targets, \"min\");\n },\n getXDomainMax: function getXDomainMax(targets) {\n return this.getXDomainMinMax(targets, \"max\");\n },\n getXDomainPadding: function getXDomainPadding(domain) {\n var maxDataCount,\n padding,\n $$ = this,\n config = $$.config,\n diff = domain[1] - domain[0],\n xPadding = config.axis_x_padding;\n $$.isCategorized() ? padding = 0 : $$.hasType(\"bar\") ? (maxDataCount = $$.getMaxDataCount(), padding = maxDataCount > 1 ? diff / (maxDataCount - 1) / 2 : .5) : padding = diff * .01;\n var left = padding,\n right = padding;\n return isObject(xPadding) && notEmpty(xPadding) ? (left = isValue(xPadding.left) ? xPadding.left : padding, right = isValue(xPadding.right) ? xPadding.right : padding) : isNumber(config.axis_x_padding) && (left = xPadding, right = xPadding), {\n left: left,\n right: right\n };\n },\n getXDomain: function getXDomain(targets) {\n var $$ = this,\n xDomain = [$$.getXDomainMin(targets), $$.getXDomainMax(targets)],\n _xDomain2 = _slicedToArray(xDomain, 2),\n firstX = _xDomain2[0],\n lastX = _xDomain2[1],\n padding = $$.getXDomainPadding(xDomain),\n min = 0,\n max = 0;\n\n return firstX - lastX !== 0 || $$.isCategorized() || ($$.isTimeSeries() ? (firstX = new Date(firstX.getTime() * .5), lastX = new Date(lastX.getTime() * 1.5)) : (firstX = firstX === 0 ? 1 : firstX * .5, lastX = lastX === 0 ? -1 : lastX * 1.5)), (firstX || firstX === 0) && (min = $$.isTimeSeries() ? new Date(firstX.getTime() - padding.left) : firstX - padding.left), (lastX || lastX === 0) && (max = $$.isTimeSeries() ? new Date(lastX.getTime() + padding.right) : lastX + padding.right), [min, max];\n },\n updateXDomain: function updateXDomain(targets, withUpdateXDomain, withUpdateOrgXDomain, withTrim, domain) {\n var $$ = this,\n config = $$.config,\n zoomEnabled = config.zoom_enabled;\n\n if (withUpdateOrgXDomain && ($$.x.domain(domain || sortValue($$.getXDomain(targets))), $$.orgXDomain = $$.x.domain(), zoomEnabled && $$.zoom.updateScaleExtent(), $$.subX.domain($$.x.domain()), $$.brush && $$.brush.scale($$.subX)), withUpdateXDomain) {\n var domainValue = domain || !$$.brush || brushEmpty($$) ? $$.orgXDomain : getBrushSelection($$).map($$.subX.invert);\n $$.x.domain(domainValue), zoomEnabled && $$.zoom.updateScaleExtent();\n } // Trim domain when too big by zoom mousemove event\n\n\n return withTrim && $$.x.domain($$.trimXDomain($$.x.orgDomain())), $$.x.domain();\n },\n trimXDomain: function trimXDomain(domain) {\n var zoomDomain = this.getZoomDomain(),\n _zoomDomain = _slicedToArray(zoomDomain, 2),\n min = _zoomDomain[0],\n max = _zoomDomain[1];\n\n return domain[0] <= min && (domain[1] = +domain[1] + (min - domain[0]), domain[0] = min), max <= domain[1] && (domain[0] = +domain[0] - (domain[1] - max), domain[1] = max), domain;\n }\n});\n// CONCATENATED MODULE: ./src/data/data.js\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n isX: function isX(key) {\n var $$ = this,\n config = $$.config,\n dataKey = config.data_x && key === config.data_x,\n existValue = notEmpty(config.data_xs) && util_hasValue(config.data_xs, key);\n return dataKey || existValue;\n },\n isNotX: function isNotX(key) {\n return !this.isX(key);\n },\n isStackNormalized: function isStackNormalized() {\n var config = this.config;\n return config.data_stack_normalize && this.isGrouped();\n },\n isGrouped: function isGrouped(id) {\n var groups = this.config.data_groups;\n return id ? groups.some(function (v) {\n return v.indexOf(id) >= 0 && v.length > 1;\n }) : groups.length > 0;\n },\n getXKey: function getXKey(id) {\n var $$ = this,\n config = $$.config;\n return config.data_x ? config.data_x : notEmpty(config.data_xs) ? config.data_xs[id] : null;\n },\n getXValuesOfXKey: function getXValuesOfXKey(key, targets) {\n var xValues,\n $$ = this,\n ids = targets && notEmpty(targets) ? $$.mapToIds(targets) : [];\n return ids.forEach(function (id) {\n $$.getXKey(id) === key && (xValues = $$.data.xs[id]);\n }), xValues;\n },\n\n /**\n * Get index number based on given x Axis value\n * @param {Date|Number|String} x x Axis to be compared\n * @param {Array} basedX x Axis list to be based on\n * @return {Number} index number\n * @private\n */\n getIndexByX: function getIndexByX(x, basedX) {\n var $$ = this;\n return basedX ? basedX.indexOf(isString(x) ? x : +x) : ($$.filterByX($$.data.targets, x)[0] || {\n index: null\n }).index;\n },\n getXValue: function getXValue(id, i) {\n var $$ = this;\n return id in $$.data.xs && $$.data.xs[id] && isValue($$.data.xs[id][i]) ? $$.data.xs[id][i] : i;\n },\n getOtherTargetXs: function getOtherTargetXs() {\n var $$ = this,\n idsForX = Object.keys($$.data.xs);\n return idsForX.length ? $$.data.xs[idsForX[0]] : null;\n },\n getOtherTargetX: function getOtherTargetX(index) {\n var xs = this.getOtherTargetXs();\n return xs && index < xs.length ? xs[index] : null;\n },\n addXs: function addXs(xs) {\n var $$ = this;\n Object.keys(xs).forEach(function (id) {\n $$.config.data_xs[id] = xs[id];\n });\n },\n isMultipleX: function isMultipleX() {\n return notEmpty(this.config.data_xs) || !this.config.data_xSort || this.hasType(\"bubble\") || this.hasType(\"scatter\");\n },\n addName: function addName(data) {\n var name,\n $$ = this;\n return data && (name = $$.config.data_names[data.id], data.name = name === undefined ? data.id : name), data;\n },\n getAllValuesOnIndex: function getAllValuesOnIndex(index) {\n var $$ = this;\n return $$.filterTargetsToShow($$.data.targets).map(function (t) {\n return $$.addName($$.getValueOnIndex(t.values, index));\n });\n },\n getValueOnIndex: function getValueOnIndex(values, index) {\n var valueOnIndex = values.filter(function (v) {\n return v.index === index;\n });\n return valueOnIndex.length ? valueOnIndex[0] : null;\n },\n updateTargetX: function updateTargetX(targets, x) {\n var $$ = this;\n targets.forEach(function (t) {\n t.values.forEach(function (v, i) {\n v.x = $$.generateTargetX(x[i], t.id, i);\n }), $$.data.xs[t.id] = x;\n });\n },\n updateTargetXs: function updateTargetXs(targets, xs) {\n var $$ = this;\n targets.forEach(function (t) {\n xs[t.id] && $$.updateTargetX([t], xs[t.id]);\n });\n },\n generateTargetX: function generateTargetX(rawX, id, index) {\n var $$ = this,\n x = $$.isCategorized() ? index : rawX || index;\n return $$.isTimeSeries() ? x = rawX ? $$.parseDate(rawX) : $$.parseDate($$.getXValue(id, index)) : $$.isCustomX() && !$$.isCategorized() && (x = isValue(rawX) ? +rawX : $$.getXValue(id, index)), x;\n },\n cloneTarget: function cloneTarget(target) {\n return {\n id: target.id,\n id_org: target.id_org,\n values: target.values.map(function (d) {\n return {\n x: d.x,\n value: d.value,\n id: d.id\n };\n })\n };\n },\n updateXs: function updateXs(values) {\n values.length && (this.xs = values.map(function (v) {\n return v.x;\n }));\n },\n getPrevX: function getPrevX(i) {\n var x = this.xs[i - 1];\n return isDefined(x) ? x : null;\n },\n getNextX: function getNextX(i) {\n var x = this.xs[i + 1];\n return isDefined(x) ? x : null;\n },\n\n /**\n * Get base value isAreaRangeType\n * @param data Data object\n * @return {Number}\n * @private\n */\n getBaseValue: function getBaseValue(data) {\n var $$ = this,\n value = data.value;\n return value && ($$.isAreaRangeType(data) ? value = $$.getAreaRangeData(data, \"mid\") : $$.isBubbleZType(data) && (value = $$.getBubbleZData(value, \"y\"))), value;\n },\n\n /**\n * Get min/max value from the data\n * @private\n * @param {Array} data array data to be evaluated\n * @return {{min: {Number}, max: {Number}}}\n */\n getMinMaxValue: function getMinMaxValue(data) {\n var min,\n max,\n getBaseValue = this.getBaseValue.bind(this);\n return (data || this.data.targets.map(function (t) {\n return t.values;\n })).forEach(function (v, i) {\n var value = v.map(getBaseValue).filter(isNumber);\n min = Math.min.apply(Math, [i ? min : Infinity].concat(_toConsumableArray(value))), max = Math.max.apply(Math, [i ? max : -Infinity].concat(_toConsumableArray(value)));\n }), {\n min: min,\n max: max\n };\n },\n\n /**\n * Get the min/max data\n * @private\n * @return {{min: Array, max: Array}}\n */\n getMinMaxData: function getMinMaxData() {\n var $$ = this,\n cacheKey = \"$minMaxData\",\n minMaxData = $$.getCache(cacheKey);\n\n if (!minMaxData) {\n var data = $$.data.targets.map(function (t) {\n return t.values;\n }),\n minMax = $$.getMinMaxValue(data),\n min = [],\n max = [];\n // update the cached data\n data.forEach(function (v) {\n var minData = $$.getFilteredDataByValue(v, minMax.min),\n maxData = $$.getFilteredDataByValue(v, minMax.max);\n minData.length && (min = min.concat(minData)), maxData.length && (max = max.concat(maxData));\n }), $$.addCache(cacheKey, minMaxData = {\n min: min,\n max: max\n });\n }\n\n return minMaxData;\n },\n\n /**\n * Get sum of data per index\n * @private\n * @return {Array}\n */\n getTotalPerIndex: function getTotalPerIndex() {\n var $$ = this,\n sum = $$.getCache(\"$totalPerIndex\");\n return $$.isStackNormalized() && !sum && (sum = [], $$.data.targets.forEach(function (row) {\n row.values.forEach(function (v, i) {\n sum[i] || (sum[i] = 0), sum[i] += isNumber(v.value) ? v.value : 0;\n });\n })), sum;\n },\n\n /**\n * Get total data sum\n * @param {boolean} subtractHidden Subtract hidden data from total\n * @return {Number}\n \t * @private\n */\n getTotalDataSum: function getTotalDataSum(subtractHidden) {\n var $$ = this,\n cacheKey = \"$totalDataSum\",\n total = $$.getCache(cacheKey);\n\n if (!isNumber(total)) {\n var sum = mergeArray($$.data.targets.map(function (t) {\n return t.values;\n })).map(function (v) {\n return v.value;\n }).reduce(function (p, c) {\n return p + c;\n });\n $$.addCache(cacheKey, total = sum);\n }\n\n return subtractHidden && (total -= $$.getHiddenTotalDataSum()), total;\n },\n\n /**\n * Get total hidden data sum\n * @return {Number}\n \t * @private\n */\n getHiddenTotalDataSum: function getHiddenTotalDataSum() {\n var $$ = this,\n api = $$.api,\n hiddenTargetIds = $$.hiddenTargetIds,\n total = 0;\n return hiddenTargetIds.length && (total = api.data.values.bind(api)(hiddenTargetIds).reduce(function (p, c) {\n return p + c;\n })), total;\n },\n\n /**\n * Get filtered data by value\n * @param {Object} data\n * @param {Number} value\n * @return {Array} filtered array data\n * @private\n */\n getFilteredDataByValue: function getFilteredDataByValue(data, value) {\n var _this = this;\n\n return data.filter(function (t) {\n return _this.getBaseValue(t) === value;\n });\n },\n\n /**\n * Return the max length of the data\n * @return {Number} max data length\n * @private\n */\n getMaxDataCount: function getMaxDataCount() {\n return Math.max.apply(Math, _toConsumableArray(this.data.targets.map(function (t) {\n return t.values.length;\n })));\n },\n getMaxDataCountTarget: function getMaxDataCountTarget() {\n var target = this.filterTargetsToShow() || [],\n length = target.length;\n return length > 1 ? (target = target.map(function (t) {\n return t.values;\n }).reduce(function (a, b) {\n return a.concat(b);\n }).map(function (v) {\n return v.x;\n }), target = sortValue(getUnique(target)).map(function (x, index) {\n return {\n x: x,\n index: index\n };\n })) : length && (target = target[0].values), target;\n },\n mapToIds: function mapToIds(targets) {\n return targets.map(function (d) {\n return d.id;\n });\n },\n mapToTargetIds: function mapToTargetIds(ids) {\n var $$ = this;\n return ids ? isArray(ids) ? ids.concat() : [ids] : $$.mapToIds($$.data.targets);\n },\n hasTarget: function hasTarget(targets, id) {\n var ids = this.mapToIds(targets);\n\n for (var val, i = 0; val = ids[i]; i++) if (val === id) return !0;\n\n return !1;\n },\n isTargetToShow: function isTargetToShow(targetId) {\n return this.hiddenTargetIds.indexOf(targetId) < 0;\n },\n isLegendToShow: function isLegendToShow(targetId) {\n return this.hiddenLegendIds.indexOf(targetId) < 0;\n },\n filterTargetsToShow: function filterTargetsToShow(targets) {\n var $$ = this;\n return (targets || $$.data.targets).filter(function (t) {\n return $$.isTargetToShow(t.id);\n });\n },\n mapTargetsToUniqueXs: function mapTargetsToUniqueXs(targets) {\n var $$ = this,\n xs = [];\n return targets && targets.length && (xs = getUnique(mergeArray(targets.map(function (t) {\n return t.values.map(function (v) {\n return +v.x;\n });\n }))), xs = $$.isTimeSeries() ? xs.map(function (x) {\n return new Date(+x);\n }) : xs.map(function (x) {\n return +x;\n })), sortValue(xs);\n },\n addHiddenTargetIds: function addHiddenTargetIds(targetIds) {\n this.hiddenTargetIds = this.hiddenTargetIds.concat(targetIds);\n },\n removeHiddenTargetIds: function removeHiddenTargetIds(targetIds) {\n this.hiddenTargetIds = this.hiddenTargetIds.filter(function (id) {\n return targetIds.indexOf(id) < 0;\n });\n },\n addHiddenLegendIds: function addHiddenLegendIds(targetIds) {\n this.hiddenLegendIds = this.hiddenLegendIds.concat(targetIds);\n },\n removeHiddenLegendIds: function removeHiddenLegendIds(targetIds) {\n this.hiddenLegendIds = this.hiddenLegendIds.filter(function (id) {\n return targetIds.indexOf(id) < 0;\n });\n },\n getValuesAsIdKeyed: function getValuesAsIdKeyed(targets) {\n var $$ = this,\n ys = {},\n isMultipleX = $$.isMultipleX(),\n xs = isMultipleX ? $$.mapTargetsToUniqueXs(targets).map(function (v) {\n return isString(v) ? v : +v;\n }) : null;\n return targets.forEach(function (t) {\n var data = [];\n t.values.forEach(function (v) {\n var value = v.value;\n isArray(value) ? data.push.apply(data, _toConsumableArray(value)) : isObject(value) && \"high\" in value ? data.push.apply(data, _toConsumableArray(Object.values(value))) : $$.isBubbleZType(v) ? data.push($$.getBubbleZData(value, \"y\")) : isMultipleX ? data[$$.getIndexByX(v.x, xs)] = value : data.push(value);\n }), ys[t.id] = data;\n }), ys;\n },\n checkValueInTargets: function checkValueInTargets(targets, checker) {\n var values,\n ids = Object.keys(targets);\n\n for (var i = 0; i < ids.length; i++) {\n values = targets[ids[i]].values;\n\n for (var j = 0; j < values.length; j++) if (checker(values[j].value)) return !0;\n }\n\n return !1;\n },\n hasMultiTargets: function hasMultiTargets() {\n return this.filterTargetsToShow().length > 1;\n },\n hasNegativeValueInTargets: function hasNegativeValueInTargets(targets) {\n return this.checkValueInTargets(targets, function (v) {\n return v < 0;\n });\n },\n hasPositiveValueInTargets: function hasPositiveValueInTargets(targets) {\n return this.checkValueInTargets(targets, function (v) {\n return v > 0;\n });\n },\n _checkOrder: function _checkOrder(type) {\n var config = this.config,\n order = config.data_order;\n return isString(order) && order.toLowerCase() === type;\n },\n isOrderDesc: function isOrderDesc() {\n return this._checkOrder(\"desc\");\n },\n isOrderAsc: function isOrderAsc() {\n return this._checkOrder(\"asc\");\n },\n\n /**\n * Sort targets data\n * @param {Array} targetsValue\n * @return {Array}\n * @private\n */\n orderTargets: function orderTargets(targetsValue) {\n var $$ = this,\n config = $$.config,\n targets = _toConsumableArray(targetsValue),\n orderAsc = $$.isOrderAsc(),\n orderDesc = $$.isOrderDesc();\n\n // TODO: accept name array for order\n return orderAsc || orderDesc ? targets.sort(function (t1, t2) {\n var reducer = function (p, c) {\n return p + Math.abs(c.value);\n },\n t1Sum = t1.values.reduce(reducer, 0),\n t2Sum = t2.values.reduce(reducer, 0);\n\n return orderAsc ? t2Sum - t1Sum : t1Sum - t2Sum;\n }) : isFunction(config.data_order) && targets.sort(config.data_order), targets;\n },\n filterByX: function filterByX(targets, x) {\n return mergeArray(targets.map(function (t) {\n return t.values;\n })).filter(function (v) {\n return v.x - x === 0;\n });\n },\n filterRemoveNull: function filterRemoveNull(data) {\n var _this2 = this;\n\n return data.filter(function (d) {\n return isValue(_this2.getBaseValue(d));\n });\n },\n filterByXDomain: function filterByXDomain(targets, xDomain) {\n return targets.map(function (t) {\n return {\n id: t.id,\n id_org: t.id_org,\n values: t.values.filter(function (v) {\n return xDomain[0] <= v.x && v.x <= xDomain[1];\n })\n };\n });\n },\n hasDataLabel: function hasDataLabel() {\n var dataLabels = this.config.data_labels;\n return isBoolean(dataLabels) && dataLabels || isObjectType(dataLabels) && notEmpty(dataLabels);\n },\n getDataLabelLength: function getDataLabelLength(min, max, key) {\n var $$ = this,\n lengths = [0, 0];\n return $$.selectChart.select(\"svg\").selectAll(\".dummy\").data([min, max]).enter().append(\"text\").text(function (d) {\n return $$.dataLabelFormat(d.id)(d);\n }).each(function (d, i) {\n lengths[i] = this.getBoundingClientRect()[key] * 1.3;\n }).remove(), lengths;\n },\n isNoneArc: function isNoneArc(d) {\n return this.hasTarget(this.data.targets, d.id);\n },\n isArc: function isArc(d) {\n return \"data\" in d && this.hasTarget(this.data.targets, d.data.id);\n },\n findSameXOfValues: function findSameXOfValues(values, index) {\n var i,\n targetX = values[index].x,\n sames = [];\n\n for (i = index - 1; i >= 0 && !(targetX !== values[i].x); i--) sames.push(values[i]);\n\n for (i = index; i < values.length && !(targetX !== values[i].x); i++) sames.push(values[i]);\n\n return sames;\n },\n findClosestFromTargets: function findClosestFromTargets(targets, pos) {\n var $$ = this,\n candidates = targets.map(function (target) {\n return $$.findClosest(target.values, pos);\n });\n // map to array of closest points of each target\n // decide closest point and return\n return $$.findClosest(candidates, pos);\n },\n findClosest: function findClosest(values, pos) {\n var closest,\n $$ = this,\n data = values.filter(function (v) {\n return v && isValue(v.value);\n }),\n minDist = $$.config.point_sensitivity;\n return data.filter(function (v) {\n return $$.isBarType(v.id);\n }).forEach(function (v) {\n var shape = $$.main.select(\".\".concat(config_classes.bars).concat($$.getTargetSelectorSuffix(v.id), \" .\").concat(config_classes.bar, \"-\").concat(v.index)).node();\n !closest && $$.isWithinBar(shape) && (closest = v);\n }), data.filter(function (v) {\n return !$$.isBarType(v.id);\n }).forEach(function (v) {\n var d = $$.dist(v, pos);\n d < minDist && (minDist = d, closest = v);\n }), closest;\n },\n dist: function dist(data, pos) {\n var $$ = this,\n isRotated = $$.config.axis_rotated,\n xIndex = isRotated ? 1 : 0,\n yIndex = isRotated ? 0 : 1,\n y = $$.circleY(data, data.index),\n x = ($$.zoomScale || $$.x)(data.x);\n return Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2));\n },\n\n /**\n * Convert data for step type\n * @param {Array} values Object data values\n * @return {Array}\n * @private\n */\n convertValuesToStep: function convertValuesToStep(values) {\n var $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n stepType = config.line_step_type,\n isCategorized = $$.isCategorized(),\n converted = isArray(values) ? values.concat() : [values];\n if (!isRotated && !isCategorized) return values; // insert & append cloning first/last value to be fully rendered covering on each gap sides\n\n var id = converted[0].id,\n x = converted[0].x - 1,\n value = converted[0].value; // insert\n\n return isCategorized && converted.unshift({\n x: x,\n value: value,\n id: id\n }), stepType === \"step-after\" && converted.unshift({\n x: x - 1,\n value: value,\n id: id\n }), x = converted.length - 1, value = converted[x].value, isCategorized && converted.push({\n x: x,\n value: value,\n id: id\n }), stepType === \"step-before\" && converted.push({\n x: x + 1,\n value: value,\n id: id\n }), converted;\n },\n convertValuesToRange: function convertValuesToRange(values) {\n var converted = isArray(values) ? values.concat() : [values],\n ranges = [];\n return converted.forEach(function (range) {\n var x = range.x,\n id = range.id;\n ranges.push({\n x: x,\n id: id,\n value: range.value[0]\n }), ranges.push({\n x: x,\n id: id,\n value: range.value[2]\n });\n }), ranges;\n },\n updateDataAttributes: function updateDataAttributes(name, attrs) {\n var $$ = this,\n config = $$.config,\n current = config[\"data_\".concat(name)];\n return isUndefined(attrs) ? current : (Object.keys(attrs).forEach(function (id) {\n current[id] = attrs[id];\n }), $$.redraw({\n withLegend: !0\n }), current);\n },\n getAreaRangeData: function getAreaRangeData(d, type) {\n var value = d.value;\n\n if (isArray(value)) {\n var index = [\"high\", \"mid\", \"low\"].indexOf(type);\n return index === -1 ? null : value[index];\n }\n\n return value[type];\n },\n\n /**\n * Get ratio value\n * @param {String} type Ratio for given type\n * @param {Object} d Data value object\n * @param {Boolean} asPercent Convert the return as percent or not\n * @return {Number} Ratio value\n * @private\n */\n getRatio: function getRatio(type, d, asPercent) {\n var $$ = this,\n config = $$.config,\n api = $$.api,\n ratio = 0;\n if (d && api.data.shown.call(api).length) if (ratio = d.ratio || d.value, type === \"arc\") ratio = $$.pie.padAngle()() ? d.value / $$.getTotalDataSum(!0) : (d.endAngle - d.startAngle) / (Math.PI * ($$.hasType(\"gauge\") && !config.gauge_fullCircle ? 1 : 2));else if (type === \"index\") {\n var dataValues = api.data.values.bind(api),\n total = this.getTotalPerIndex();\n\n if ($$.hiddenTargetIds.length) {\n var hiddenSum = dataValues($$.hiddenTargetIds, !1);\n hiddenSum.length && (hiddenSum = hiddenSum.reduce(function (acc, curr) {\n return acc.map(function (v, i) {\n return (isNumber(v) ? v : 0) + curr[i];\n });\n }), total = total.map(function (v, i) {\n return v - hiddenSum[i];\n }));\n }\n\n d.ratio = isNumber(d.value) && total && total[d.index] > 0 ? d.value / total[d.index] : 0, ratio = d.ratio;\n } else type === \"radar\" && (ratio = parseFloat(Math.max(d.value, 0)) / $$.maxValue * config.radar_size_ratio);\n return asPercent && ratio ? ratio * 100 : ratio;\n },\n\n /**\n * Sort data index to be aligned with x axis.\n * @param {Array} tickValues Tick array values\n * @private\n */\n updateDataIndexByX: function updateDataIndexByX(tickValues) {\n var $$ = this,\n tickValueMap = tickValues.reduce(function (out, tick, index) {\n return out[+tick.x] = index, out;\n }, {});\n $$.data.targets.forEach(function (t) {\n t.values.forEach(function (value, valueIndex) {\n var index = tickValueMap[+value.x];\n index === undefined && (index = valueIndex), value.index = index;\n });\n });\n }\n});\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-dsv\",\"commonjs2\":\"d3-dsv\",\"amd\":\"d3-dsv\",\"root\":\"d3\"}\nvar external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_ = __webpack_require__(8);\n\n// CONCATENATED MODULE: ./src/data/data.convert.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n/**\n * Convert CSV/TSV data\n * @param {Object} parser Parser object\n * @param {Object} xsv Data\n * @private\n * @return {Object}\n */\n\nvar convertCsvTsvToData = function (parser, xsv) {\n var d,\n rows = parser.rows(xsv);\n return rows.length === 1 ? (d = [{}], rows[0].forEach(function (id) {\n d[0][id] = null;\n })) : d = parser.parse(xsv), d;\n};\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Convert data according its type\n * @param {Object} args data object\n * @param {Function} [callback] callback for url(XHR) type loading\n * @return {Object}\n * @private\n */\n convertData: function convertData(args, callback) {\n var data,\n $$ = this;\n if (args.bindto ? (data = {}, [\"url\", \"mimeType\", \"headers\", \"keys\", \"json\", \"keys\", \"rows\", \"columns\"].forEach(function (v) {\n var key = \"data_\".concat(v);\n key in args && (data[v] = args[key]);\n })) : data = args, data.url && callback) $$.convertUrlToData(data.url, data.mimeType, data.headers, data.keys, callback);else if (data.json) data = $$.convertJsonToData(data.json, data.keys);else if (data.rows) data = $$.convertRowsToData(data.rows);else if (data.columns) data = $$.convertColumnsToData(data.columns);else if (args.bindto) throw Error(\"url or json or rows or columns is required.\");\n return isArray(data) && data;\n },\n\n /**\n * Convert URL data\n * @param {String} url Remote URL\n * @param {String} mimeType MIME type string: json | csv | tsv\n * @param {Object} headers Header object\n * @param {Object} keys Key object\n * @param {Function} done Callback function\n * @private\n */\n convertUrlToData: function convertUrlToData(url) {\n var _this = this,\n mimeType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"csv\",\n headers = arguments.length > 2 ? arguments[2] : undefined,\n keys = arguments.length > 3 ? arguments[3] : undefined,\n done = arguments.length > 4 ? arguments[4] : undefined,\n req = new XMLHttpRequest();\n\n req.open(\"GET\", url), headers && Object.keys(headers).forEach(function (key) {\n req.setRequestHeader(key, headers[key]);\n }), req.onreadystatechange = function () {\n if (req.readyState === 4) if (req.status === 200) {\n var response = req.responseText;\n response && done.call(_this, _this[\"convert\".concat(capitalize(mimeType), \"ToData\")](mimeType === \"json\" ? JSON.parse(response) : response, keys));\n } else throw new Error(\"\".concat(url, \": Something went wrong loading!\"));\n }, req.send();\n },\n convertCsvToData: function convertCsvToData(xsv) {\n return convertCsvTsvToData({\n rows: external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_[\"csvParseRows\"],\n parse: external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_[\"csvParse\"]\n }, xsv);\n },\n convertTsvToData: function convertTsvToData(tsv) {\n return convertCsvTsvToData({\n rows: external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_[\"tsvParseRows\"],\n parse: external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_[\"tsvParse\"]\n }, tsv);\n },\n convertJsonToData: function convertJsonToData(json, keysParam) {\n var targetKeys,\n data,\n _this2 = this,\n config = this.config,\n newRows = [];\n\n if (isArray(json)) {\n var keys = keysParam || config.data_keys;\n keys.x ? (targetKeys = keys.value.concat(keys.x), config.data_x = keys.x) : targetKeys = keys.value, newRows.push(targetKeys), json.forEach(function (o) {\n var newRow = targetKeys.map(function (key) {\n // convert undefined to null because undefined data will be removed in convertDataToTargets()\n var v = _this2.findValueInJson(o, key);\n\n return isUndefined(v) && (v = null), v;\n });\n newRows.push(newRow);\n }), data = this.convertRowsToData(newRows);\n } else Object.keys(json).forEach(function (key) {\n var tmp = json[key].concat();\n tmp.unshift(key), newRows.push(tmp);\n }), data = this.convertColumnsToData(newRows);\n\n return data;\n },\n findValueInJson: function findValueInJson(object, path) {\n if (object[path] !== undefined) return object[path];\n var convertedPath = path.replace(/\\[(\\w+)\\]/g, \".$1\"),\n pathArray = convertedPath.replace(/^\\./, \"\").split(\".\"),\n target = object; // convert indexes to properties (replace [] with .)\n\n return pathArray.some(function (k) {\n return !(target = target && k in target ? target[k] : undefined);\n }), target;\n },\n convertRowsToData: function convertRowsToData(rows) {\n var keys = rows[0],\n newRows = [];\n return rows.forEach(function (row, i) {\n if (i > 0) {\n var newRow = {};\n row.forEach(function (v, j) {\n if (isUndefined(v)) throw new Error(\"Source data is missing a component at (\".concat(i, \", \").concat(j, \")!\"));\n newRow[keys[j]] = v;\n }), newRows.push(newRow);\n }\n }), newRows;\n },\n convertColumnsToData: function convertColumnsToData(columns) {\n var newRows = [];\n return columns.forEach(function (col, i) {\n var key = col[0];\n col.forEach(function (v, j) {\n if (j > 0) {\n if (isUndefined(newRows[j - 1]) && (newRows[j - 1] = {}), isUndefined(v)) throw new Error(\"Source data is missing a component at (\".concat(i, \", \").concat(j, \")!\"));\n newRows[j - 1][key] = v;\n }\n });\n }), newRows;\n },\n convertDataToTargets: function convertDataToTargets(data, appendXs) {\n var xsData,\n _this3 = this,\n $$ = this,\n config = $$.config,\n isTimeSeries = $$.isTimeSeries(),\n dataKeys = Object.keys(data[0] || {}),\n ids = dataKeys.length ? dataKeys.filter($$.isNotX, $$) : [],\n xs = dataKeys.length ? dataKeys.filter($$.isX, $$) : [];\n\n ids.forEach(function (id) {\n var xKey = _this3.getXKey(id);\n\n _this3.isCustomX() || isTimeSeries ? xs.indexOf(xKey) >= 0 ? xsData = (appendXs && $$.data.xs[id] || []).concat(data.map(function (d) {\n return d[xKey];\n }).filter(isValue).map(function (rawX, i) {\n return $$.generateTargetX(rawX, id, i);\n })) : config.data_x ? xsData = _this3.getOtherTargetXs() : notEmpty(config.data_xs) && (xsData = $$.getXValuesOfXKey(xKey, $$.data.targets)) : xsData = data.map(function (d, i) {\n return i;\n }), xsData && (_this3.data.xs[id] = xsData);\n }), ids.forEach(function (id) {\n if (!_this3.data.xs[id]) throw new Error(\"x is not defined for id = \\\"\".concat(id, \"\\\".\"));\n });\n // convert to target\n var targets = ids.map(function (id, index) {\n var convertedId = config.data_idConverter(id),\n xKey = $$.getXKey(id),\n isCategorized = $$.isCustomX() && $$.isCategorized(),\n hasCategory = isCategorized && data.map(function (v) {\n return v.x;\n }).every(function (v) {\n return config.axis_x_categories.indexOf(v) > -1;\n });\n return {\n id: convertedId,\n id_org: id,\n values: data.map(function (d, i) {\n var x,\n rawX = d[xKey],\n value = d[id];\n return value = value === null || isNaN(value) || isObject(value) ? isArray(value) || isObject(value) ? value : null : +value, isCategorized && index === 0 && !isUndefined(rawX) ? (!hasCategory && index === 0 && i === 0 && (config.axis_x_categories = []), x = config.axis_x_categories.indexOf(rawX), x === -1 && (x = config.axis_x_categories.length, config.axis_x_categories.push(rawX))) : x = $$.generateTargetX(rawX, id, i), (isUndefined(value) || $$.data.xs[id].length <= i) && (x = undefined), {\n x: x,\n value: value,\n id: convertedId\n };\n }).filter(function (v) {\n return isDefined(v.x);\n })\n };\n }); // finish targets\n\n return targets.forEach(function (t) {\n config.data_xSort && (t.values = t.values.sort(function (v1, v2) {\n var x1 = v1.x || v1.x === 0 ? v1.x : Infinity,\n x2 = v2.x || v2.x === 0 ? v2.x : Infinity;\n return x1 - x2;\n })), t.values.forEach(function (v, i) {\n return v.index = i;\n }), $$.data.xs[t.id].sort(function (v1, v2) {\n return v1 - v2;\n });\n }), $$.hasNegativeValue = $$.hasNegativeValueInTargets(targets), $$.hasPositiveValue = $$.hasPositiveValueInTargets(targets), config.data_type && $$.setTargetType($$.mapToIds(targets).filter(function (id) {\n return !(id in config.data_types);\n }), config.data_type), targets.forEach(function (d) {\n return $$.addCache(d.id_org, d, !0);\n }), targets;\n }\n});\n// CONCATENATED MODULE: ./src/data/data.load.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n load: function load(rawTargets, args) {\n var $$ = this,\n targets = rawTargets;\n // Set targets\n // Redraw with new targets\n targets && (args.filter && (targets = targets.filter(args.filter)), (args.type || args.types) && targets.forEach(function (t) {\n var type = args.types && args.types[t.id] || args.type;\n $$.setTargetType(t.id, type);\n }), $$.data.targets.forEach(function (d) {\n for (var i = 0; i < targets.length; i++) if (d.id === targets[i].id) {\n d.values = targets[i].values, targets.splice(i, 1);\n break;\n }\n }), $$.data.targets = $$.data.targets.concat(targets)), $$.updateTargets($$.data.targets), $$.redraw({\n withUpdateOrgXDomain: !0,\n withUpdateXDomain: !0,\n withLegend: !0\n }), args.done && args.done();\n },\n loadFromArgs: function loadFromArgs(args) {\n var $$ = this; // prevent load when chart is already destroyed\n\n if ($$.config) {\n $$.resetCache();\n var data = args.data || $$.convertData(args, function (d) {\n return $$.load($$.convertDataToTargets(d), args);\n });\n data && $$.load($$.convertDataToTargets(data), args);\n } // reset internally cached data\n\n },\n unload: function unload(rawTargetIds, customDoneCb) {\n var $$ = this,\n done = customDoneCb,\n targetIds = rawTargetIds;\n // If no target, call done and return\n return $$.resetCache(), done || (done = function () {}), targetIds = targetIds.filter(function (id) {\n return $$.hasTarget($$.data.targets, id);\n }), targetIds && targetIds.length !== 0 ? void ($$.svg.selectAll(targetIds.map(function (id) {\n return $$.selectorTarget(id);\n })).transition().style(\"opacity\", \"0\").remove().call($$.endall, done), targetIds.forEach(function (id) {\n $$.withoutFadeIn[id] = !1, $$.legend && $$.legend.selectAll(\".\".concat(config_classes.legendItem).concat($$.getTargetSelectorSuffix(id))).remove(), $$.data.targets = $$.data.targets.filter(function (t) {\n return t.id !== id;\n });\n })) : void done();\n }\n});\n// CONCATENATED MODULE: ./src/internals/category.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Category Name\n * @private\n * @param {Number} index\n * @returns {String} gategory Name\n */\n categoryName: function categoryName(i) {\n var config = this.config;\n return i < config.axis_x_categories.length ? config.axis_x_categories[i] : i;\n }\n});\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-drag\",\"commonjs2\":\"d3-drag\",\"amd\":\"d3-drag\",\"root\":\"d3\"}\nvar external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack_require__(9);\n\n// CONCATENATED MODULE: ./src/interactions/interaction.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Initialize the area that detects the event.\n * Add a container for the zone that detects the event.\n * @private\n */\n initEventRect: function initEventRect() {\n var $$ = this;\n $$.main.select(\".\".concat(config_classes.chart)).append(\"g\").attr(\"class\", config_classes.eventRects).style(\"fill-opacity\", \"0\");\n },\n\n /**\n * Redraws the area that detects the event.\n * @private\n */\n redrawEventRect: function redrawEventRect() {\n var eventRectUpdate,\n $$ = this,\n config = $$.config,\n isMultipleX = $$.isMultipleX(),\n zoomEnabled = config.zoom_enabled,\n eventRects = $$.main.select(\".\".concat(config_classes.eventRects)).style(\"cursor\", zoomEnabled && zoomEnabled.type !== \"drag\" ? config.axis_rotated ? \"ns-resize\" : \"ew-resize\" : null).classed(config_classes.eventRectsMultiple, isMultipleX).classed(config_classes.eventRectsSingle, !isMultipleX);\n if (eventRects.selectAll(\".\".concat(config_classes.eventRect)).remove(), $$.eventRect = eventRects.selectAll(\".\".concat(config_classes.eventRect)), isMultipleX) eventRectUpdate = $$.eventRect.data([0]), eventRectUpdate = $$.generateEventRectsForMultipleXs(eventRectUpdate.enter()).merge(eventRectUpdate);else {\n // Set data and update $$.eventRect\n var xAxisTickValues = $$.getMaxDataCountTarget(); // update data's index value to be alinged with the x Axis\n\n $$.updateDataIndexByX(xAxisTickValues), $$.updateXs(xAxisTickValues), $$.updatePointClass(!0), eventRects.datum(xAxisTickValues), $$.eventRect = eventRects.selectAll(\".\".concat(config_classes.eventRect)), eventRectUpdate = $$.eventRect.data(function (d) {\n return d;\n }), eventRectUpdate.exit().remove(), eventRectUpdate = $$.generateEventRectsForSingleX(eventRectUpdate.enter()).merge(eventRectUpdate);\n }\n $$.eventRect = eventRectUpdate, $$.updateEventRect(eventRectUpdate), $$.inputType !== \"touch\" || $$.svg.on(\"touchstart.eventRect\") || $$.hasArcType() || $$.bindTouchOnEventRect(isMultipleX);\n },\n bindTouchOnEventRect: function bindTouchOnEventRect(isMultipleX) {\n var startPx,\n $$ = this,\n config = $$.config,\n getEventRect = function () {\n var touch = external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"].changedTouches[0];\n return Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(browser_doc.elementFromPoint(touch.clientX, touch.clientY));\n },\n getIndex = function (eventRect) {\n var index = eventRect && eventRect.attr(\"class\") && eventRect.attr(\"class\").replace(new RegExp(\"(\".concat(config_classes.eventRect, \"-?|s)\"), \"g\"), \"\") * 1;\n return (isNaN(index) || index === null) && (index = -1), index;\n },\n selectRect = function (context) {\n if (isMultipleX) $$.selectRectForMultipleXs(context);else {\n var eventRect = getEventRect(),\n index = getIndex(eventRect);\n $$.callOverOutForTouch(index), index === -1 ? $$.unselectRect() : $$.selectRectForSingle(context, eventRect, index);\n }\n },\n preventDefault = config.interaction_inputType_touch.preventDefault,\n isPrevented = isBoolean(preventDefault) && preventDefault || !1,\n preventThreshold = !isNaN(preventDefault) && preventDefault || null,\n preventEvent = function (event) {\n var eventType = event.type,\n touch = event.changedTouches[0],\n currentXY = touch[\"client\".concat(config.axis_rotated ? \"Y\" : \"X\")];\n eventType === \"touchstart\" ? isPrevented ? event.preventDefault() : preventThreshold !== null && (startPx = currentXY) : eventType === \"touchmove\" && (isPrevented || startPx === !0 || preventThreshold !== null && Math.abs(startPx - currentXY) >= preventThreshold) && (startPx = !0, event.preventDefault());\n };\n\n // bind touch events\n $$.svg.on(\"touchstart.eventRect touchmove.eventRect\", function () {\n var eventRect = getEventRect(),\n event = external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"];\n\n if (!eventRect.empty() && eventRect.classed(config_classes.eventRect)) {\n // if touch points are > 1, means doing zooming interaction. In this case do not execute tooltip codes.\n if ($$.dragging || $$.flowing || $$.hasArcType() || event.touches.length > 1) return;\n preventEvent(event), selectRect(this);\n } else $$.unselectRect(), $$.callOverOutForTouch();\n }, !0).on(\"touchend.eventRect\", function () {\n var eventRect = getEventRect();\n !eventRect.empty() && eventRect.classed(config_classes.eventRect) && ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) && $$.cancelClick && ($$.cancelClick = !1);\n }, !0);\n },\n\n /**\n * Updates the location and size of the eventRect.\n * @private\n * @param {Object} d3.select(CLASS.eventRects) object.\n */\n updateEventRect: function updateEventRect(eventRectUpdate) {\n var x,\n y,\n w,\n h,\n $$ = this,\n config = $$.config,\n xScale = $$.zoomScale || $$.x,\n eventRectData = eventRectUpdate || $$.eventRect.data(),\n isRotated = config.axis_rotated;\n if ($$.isMultipleX()) // TODO: rotated not supported yet\n x = 0, y = 0, w = $$.width, h = $$.height;else {\n var rectW, rectX;\n if ($$.isCategorized()) rectW = $$.getEventRectWidth(), rectX = function (d) {\n return xScale(d.x) - rectW / 2;\n };else {\n var getPrevNextX = function (d) {\n var index = d.index;\n return {\n prev: $$.getPrevX(index),\n next: $$.getNextX(index)\n };\n };\n\n rectW = function (d) {\n var x = getPrevNextX(d); // if there this is a single data point make the eventRect full width (or height)\n\n return x.prev === null && x.next === null ? isRotated ? $$.height : $$.width : (x.prev === null && (x.prev = xScale.domain()[0]), x.next === null && (x.next = xScale.domain()[1]), Math.max(0, (xScale(x.next) - xScale(x.prev)) / 2));\n }, rectX = function (d) {\n var x = getPrevNextX(d),\n thisX = d.x;\n // if there this is a single data point position the eventRect at 0\n return x.prev === null && x.next === null ? 0 : (x.prev === null && (x.prev = xScale.domain()[0]), (xScale(thisX) + xScale(x.prev)) / 2);\n };\n }\n x = isRotated ? 0 : rectX, y = isRotated ? rectX : 0, w = isRotated ? $$.width : rectW, h = isRotated ? rectW : $$.height;\n }\n eventRectData.attr(\"class\", $$.classEvent.bind($$)).attr(\"x\", x).attr(\"y\", y).attr(\"width\", w).attr(\"height\", h);\n },\n selectRectForSingle: function selectRectForSingle(context, eventRect, index) {\n var $$ = this,\n config = $$.config,\n isSelectionEnabled = config.data_selection_enabled,\n isSelectionGrouped = config.data_selection_grouped,\n isTooltipGrouped = config.tooltip_grouped,\n selectedData = $$.getAllValuesOnIndex(index);\n isTooltipGrouped && ($$.showTooltip(selectedData, context), $$.showGridFocus(selectedData), !isSelectionEnabled || isSelectionGrouped) || $$.main.selectAll(\".\".concat(config_classes.shape, \"-\").concat(index)).each(function () {\n Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).classed(config_classes.EXPANDED, !0), isSelectionEnabled && eventRect.style(\"cursor\", isSelectionGrouped ? \"pointer\" : null), isTooltipGrouped || ($$.hideGridFocus(), $$.hideTooltip(), !isSelectionGrouped && $$.expandCirclesBars(index));\n }).filter(function (d) {\n return $$.isWithinShape(this, d);\n }).call(function (selected) {\n var d = selected.data();\n isSelectionEnabled && (isSelectionGrouped || config.data_selection_isselectable(d)) && eventRect.style(\"cursor\", \"pointer\"), isTooltipGrouped || ($$.showTooltip(d, context), $$.showGridFocus(d), $$.unexpandCircles(), selected.each(function (d) {\n return $$.expandCirclesBars(index, d.id);\n }));\n });\n },\n expandCirclesBars: function expandCirclesBars(index, id, reset) {\n var $$ = this,\n config = $$.config;\n config.point_focus_expand_enabled && $$.expandCircles(index, id, reset), $$.expandBars(index, id, reset);\n },\n selectRectForMultipleXs: function selectRectForMultipleXs(context) {\n var $$ = this,\n config = $$.config,\n targetsToShow = $$.filterTargetsToShow($$.data.targets);\n\n // do nothing when dragging\n if (!($$.dragging || $$.hasArcType(targetsToShow))) {\n var mouse = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(context),\n closest = $$.findClosestFromTargets(targetsToShow, mouse);\n if ($$.mouseover && (!closest || closest.id !== $$.mouseover.id) && (config.data_onout.call($$.api, $$.mouseover), $$.mouseover = undefined), !closest) return void $$.unselectRect();\n var sameXData = $$.isBubbleType(closest) || $$.isScatterType(closest) || !config.tooltip_grouped ? [closest] : $$.filterByX(targetsToShow, closest.x),\n selectedData = sameXData.map(function (d) {\n return $$.addName(d);\n }); // show tooltip when cursor is close to some point\n\n $$.showTooltip(selectedData, context), $$.expandCirclesBars(closest.index, closest.id, !0), $$.showGridFocus(selectedData), ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) && ($$.svg.select(\".\".concat(config_classes.eventRect)).style(\"cursor\", \"pointer\"), !$$.mouseover && (config.data_onover.call($$.api, closest), $$.mouseover = closest));\n }\n },\n\n /**\n * Unselect EventRect.\n * @private\n */\n unselectRect: function unselectRect() {\n var $$ = this;\n $$.svg.select(\".\".concat(config_classes.eventRect)).style(\"cursor\", null), $$.hideGridFocus(), $$.hideTooltip(), $$._handleLinkedCharts(!1), $$.unexpandCircles(), $$.unexpandBars();\n },\n\n /**\n * Handle data.onover/out callback options\n * @param {Boolean} isOver\n * @param {Number|Object} d\n * @private\n */\n setOverOut: function setOverOut(isOver, d) {\n var $$ = this,\n config = $$.config,\n isArc = isObject(d);\n\n // Call event handler\n if (isArc || d !== -1) {\n var callback = config[isOver ? \"data_onover\" : \"data_onout\"].bind($$.api);\n if (config.color_onover && $$.setOverColor(isOver, d, isArc), isArc) callback(d, $$.main.select(\".\".concat(config_classes.arc).concat($$.getTargetSelectorSuffix(d.id))).node());else if (!config.tooltip_grouped) {\n var callee = $$.setOverOut,\n last = callee.last || [],\n shape = $$.main.selectAll(\".\".concat(config_classes.shape, \"-\").concat(d)).filter(function (d) {\n return $$.isWithinShape(this, d);\n });\n shape.each(function (d) {\n var _this = this;\n\n (last.length === 0 || last.every(function (v) {\n return v !== _this;\n })) && (callback(d, this), last.push(this));\n }), last.length > 0 && shape.empty() && (callback = config.data_onout.bind($$.api), last.forEach(function (v) {\n return callback(Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(v).datum(), v);\n }), last = []), callee.last = last;\n } else isOver && $$.expandCirclesBars(d, null, !0), $$.isMultipleX() || $$.main.selectAll(\".\".concat(config_classes.shape, \"-\").concat(d)).each(function (d) {\n callback(d, this);\n });\n }\n },\n\n /**\n * Call data.onover/out callback for touch event\n * @param {Number|Object} d target index or data object for Arc type\n * @private\n */\n callOverOutForTouch: function callOverOutForTouch(d) {\n var $$ = this,\n callee = $$.callOverOutForTouch,\n last = callee.last;\n (isObject(d) && last ? d.id !== last.id : d !== last) && ((last || isNumber(last)) && $$.setOverOut(!1, last), (d || isNumber(d)) && $$.setOverOut(!0, d), callee.last = d);\n },\n\n /**\n * Return draggable selection function\n * @return {Function}\n * @private\n */\n getDraggableSelection: function getDraggableSelection() {\n var $$ = this,\n config = $$.config;\n return config.interaction_enabled && config.data_selection_draggable && $$.drag ? Object(external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_[\"drag\"])().on(\"drag\", function () {\n $$.drag(Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(this));\n }).on(\"start\", function () {\n $$.dragstart(Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(this));\n }).on(\"end\", function () {\n $$.dragend();\n }) : function () {};\n },\n\n /**\n * Create eventRect for each data on the x-axis.\n * Register touch and drag events.\n * @private\n * @param {Object} d3.select(CLASS.eventRects) object.\n * @returns {Object} d3.select(CLASS.eventRects) object.\n */\n generateEventRectsForSingleX: function generateEventRectsForSingleX(eventRectEnter) {\n var $$ = this,\n config = $$.config,\n rect = eventRectEnter.append(\"rect\").attr(\"class\", $$.classEvent.bind($$)).style(\"cursor\", config.data_selection_enabled && config.data_selection_grouped ? \"pointer\" : null).on(\"click\", function (d) {\n $$.clickHandlerForSingleX.bind(this)(d, $$);\n }).call($$.getDraggableSelection());\n return $$.inputType === \"mouse\" && rect.on(\"mouseover\", function (d) {\n $$.dragging || $$.flowing || $$.hasArcType() || $$.config.tooltip_grouped && $$.setOverOut(!0, d.index);\n }).on(\"mousemove\", function (d) {\n // do nothing while dragging/flowing\n if (!($$.dragging || $$.flowing || $$.hasArcType())) {\n var index = d.index,\n eventRect = $$.svg.select(\".\".concat(config_classes.eventRect, \"-\").concat(index));\n $$.isStepType(d) && $$.config.line_step_type === \"step-after\" && Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(this)[0] < $$.x($$.getXValue(d.id, index)) && (index -= 1), index === -1 ? $$.unselectRect() : $$.selectRectForSingle(this, eventRect, index), $$.config.tooltip_grouped || $$.setOverOut(index !== -1, d.index);\n }\n }).on(\"mouseout\", function (d) {\n !$$.config || $$.hasArcType() || ($$.unselectRect(), $$.setOverOut(!1, d.index));\n }), rect;\n },\n clickHandlerForSingleX: function clickHandlerForSingleX(d, ctx) {\n var $$ = ctx,\n config = $$.config;\n if ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) return void ($$.cancelClick && ($$.cancelClick = !1));\n var index = d.index;\n $$.main.selectAll(\".\".concat(config_classes.shape, \"-\").concat(index)).each(function (d2) {\n (config.data_selection_grouped || $$.isWithinShape(this, d2)) && ($$.toggleShape(this, d2, index), config.data_onclick.call($$.api, d2, this));\n });\n },\n\n /**\n * Create an eventRect,\n * Register touch and drag events.\n * @private\n * @param {Object} d3.select(CLASS.eventRects) object.\n * @returns {Object} d3.select(CLASS.eventRects) object.\n */\n generateEventRectsForMultipleXs: function generateEventRectsForMultipleXs(eventRectEnter) {\n var $$ = this,\n rect = eventRectEnter.append(\"rect\").attr(\"x\", 0).attr(\"y\", 0).attr(\"width\", $$.width).attr(\"height\", $$.height).attr(\"class\", config_classes.eventRect).on(\"click\", function () {\n $$.clickHandlerForMultipleXS.bind(this)($$);\n }).call($$.getDraggableSelection());\n return $$.inputType === \"mouse\" && rect.on(\"mouseover mousemove\", function () {\n $$.selectRectForMultipleXs(this);\n }).on(\"mouseout\", function () {\n !$$.config || $$.hasArcType() || $$.unselectRect();\n }), rect;\n },\n clickHandlerForMultipleXS: function clickHandlerForMultipleXS(ctx) {\n var $$ = ctx,\n config = $$.config,\n targetsToShow = $$.filterTargetsToShow($$.data.targets);\n\n if (!$$.hasArcType(targetsToShow)) {\n var mouse = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(this),\n closest = $$.findClosestFromTargets(targetsToShow, mouse);\n !closest || ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) && $$.main.selectAll(\".\".concat(config_classes.shapes).concat($$.getTargetSelectorSuffix(closest.id))).selectAll(\".\".concat(config_classes.shape, \"-\").concat(closest.index)).each(function () {\n (config.data_selection_grouped || $$.isWithinShape(this, closest)) && ($$.toggleShape(this, closest, closest.index), config.data_onclick.call($$.api, closest, this));\n });\n } // select if selection enabled\n\n },\n\n /**\n * Dispatch a mouse event.\n * @private\n * @param {String} type event type\n * @param {Number} index Index of eventRect\n * @param {Array} mouse x and y coordinate value\n */\n dispatchEvent: function dispatchEvent(type, index, mouse) {\n var $$ = this,\n isMultipleX = $$.isMultipleX(),\n selector = \".\".concat(isMultipleX ? config_classes.eventRect : \"\".concat(config_classes.eventRect, \"-\").concat(index)),\n eventRect = $$.main.select(selector).node(),\n _eventRect$getBoundin = eventRect.getBoundingClientRect(),\n width = _eventRect$getBoundin.width,\n left = _eventRect$getBoundin.left,\n top = _eventRect$getBoundin.top,\n x = left + (mouse ? mouse[0] : 0) + (isMultipleX || $$.config.axis_rotated ? 0 : width / 2),\n y = top + (mouse ? mouse[1] : 0);\n\n emulateEvent[/^(mouse|click)/.test(type) ? \"mouse\" : \"touch\"](eventRect, type, {\n screenX: x,\n screenY: y,\n clientX: x,\n clientY: y\n });\n }\n});\n// CONCATENATED MODULE: ./src/internals/size.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Update container size\n * @private\n */\n setContainerSize: function setContainerSize() {\n var $$ = this;\n $$.currentWidth = $$.getCurrentWidth(), $$.currentHeight = $$.getCurrentHeight();\n },\n getCurrentWidth: function getCurrentWidth() {\n var $$ = this;\n return $$.config.size_width || $$.getParentWidth();\n },\n getCurrentHeight: function getCurrentHeight() {\n var $$ = this,\n config = $$.config,\n h = config.size_height || $$.getParentHeight();\n return h > 0 ? h : 320 / ($$.hasType(\"gauge\") && !config.gauge_fullCircle ? 2 : 1);\n },\n\n /**\n * Get Axis size according its position\n * @param {String} id Axis id value - x, y or y2\n * @return {number} size Axis size value\n * @private\n */\n getAxisSize: function getAxisSize(id) {\n var $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated;\n return isRotated && id === \"x\" || !isRotated && /y2?/.test(id) ? $$.getAxisWidthByAxisId(id, !0) : $$.getHorizontalAxisHeight(id);\n },\n getCurrentPaddingTop: function getCurrentPaddingTop() {\n var $$ = this,\n config = $$.config,\n axesLen = config.axis_y2_axes.length,\n padding = isValue(config.padding_top) ? config.padding_top : 0;\n return $$.title && $$.title.node() && (padding += $$.getTitlePadding()), axesLen && config.axis_rotated && (padding += $$.getHorizontalAxisHeight(\"y2\") * axesLen), padding;\n },\n getCurrentPaddingBottom: function getCurrentPaddingBottom() {\n var $$ = this,\n config = $$.config,\n axisId = config.axis_rotated ? \"y\" : \"x\",\n axesLen = config[\"axis_\".concat(axisId, \"_axes\")].length,\n padding = isValue(config.padding_bottom) ? config.padding_bottom : 0;\n return padding + (axesLen ? $$.getHorizontalAxisHeight(axisId) * axesLen : 0);\n },\n getCurrentPaddingLeft: function getCurrentPaddingLeft(withoutRecompute) {\n var padding,\n $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n axisId = isRotated ? \"x\" : \"y\",\n axesLen = config[\"axis_\".concat(axisId, \"_axes\")].length,\n axisWidth = $$.getAxisWidthByAxisId(axisId, withoutRecompute);\n return padding = isValue(config.padding_left) ? config.padding_left : isRotated ? config.axis_x_show ? Math.max(ceil10(axisWidth), 40) : 1 : !config.axis_y_show || config.axis_y_inner ? $$.axis.getAxisLabelPosition(\"y\").isOuter ? 30 : 1 : ceil10(axisWidth), padding + axisWidth * axesLen;\n },\n getCurrentPaddingRight: function getCurrentPaddingRight() {\n var padding,\n withoutTickTextOverflow = !!(arguments.length > 0 && arguments[0] !== undefined) && arguments[0],\n $$ = this,\n config = $$.config,\n defaultPadding = 10,\n legendWidthOnRight = $$.isLegendRight ? $$.getLegendWidth() + 20 : 0,\n axesLen = config.axis_y2_axes.length,\n axisWidth = $$.getAxisWidthByAxisId(\"y2\"),\n xAxisTickTextOverflow = withoutTickTextOverflow ? 0 : $$.axis.getXAxisTickTextY2Overflow(defaultPadding);\n return padding = isValue(config.padding_right) ? config.padding_right + 1 : config.axis_rotated ? defaultPadding + legendWidthOnRight : !config.axis_y2_show || config.axis_y2_inner ? Math.max(2 + legendWidthOnRight + ($$.axis.getAxisLabelPosition(\"y2\").isOuter ? 20 : 0), xAxisTickTextOverflow) : Math.max(ceil10(axisWidth) + legendWidthOnRight, xAxisTickTextOverflow), padding + axisWidth * axesLen;\n },\n\n /**\n * Get the parent rect element's size\n * @param {String} key property/attribute name\n * @private\n */\n getParentRectValue: function getParentRectValue(key) {\n for (var v, offsetName = \"offset\".concat(capitalize(key)), parent = this.selectChart.node(); !v && parent && parent.tagName !== \"BODY\";) {\n try {\n v = parent.getBoundingClientRect()[key];\n } catch (e) {\n offsetName in parent && (v = parent[offsetName]);\n }\n\n parent = parent.parentNode;\n }\n\n if (key === \"width\") {\n // Sometimes element's width value is incorrect(ex. flex container)\n // In this case, use body's offsetWidth instead.\n var bodyWidth = browser_doc.body.offsetWidth;\n v > bodyWidth && (v = bodyWidth);\n }\n\n return v;\n },\n getParentWidth: function getParentWidth() {\n return this.getParentRectValue(\"width\");\n },\n getParentHeight: function getParentHeight() {\n var h = this.selectChart.style(\"height\");\n return h.indexOf(\"px\") > 0 ? parseInt(h, 10) : 0;\n },\n getSvgLeft: function getSvgLeft(withoutRecompute) {\n var $$ = this,\n config = $$.config,\n hasLeftAxisRect = config.axis_rotated || !config.axis_rotated && !config.axis_y_inner,\n leftAxisClass = config.axis_rotated ? config_classes.axisX : config_classes.axisY,\n leftAxis = $$.main.select(\".\".concat(leftAxisClass)).node(),\n svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : {\n right: 0\n },\n chartRect = $$.selectChart.node().getBoundingClientRect(),\n hasArc = $$.hasArcType(),\n svgLeft = svgRect.right - chartRect.left - (hasArc ? 0 : $$.getCurrentPaddingLeft(withoutRecompute));\n return svgLeft > 0 ? svgLeft : 0;\n },\n getAxisWidthByAxisId: function getAxisWidthByAxisId(id, withoutRecompute) {\n var $$ = this,\n position = $$.axis.getLabelPositionById(id);\n return $$.axis.getMaxTickWidth(id, withoutRecompute) + (position.isInner ? 20 : 40);\n },\n getHorizontalAxisHeight: function getHorizontalAxisHeight(id) {\n var $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n h = 30;\n if (id === \"x\" && !config.axis_x_show) return 8;\n if (id === \"x\" && config.axis_x_height) return config.axis_x_height;\n if (id === \"y\" && !config.axis_y_show) return !config.legend_show || $$.isLegendRight || $$.isLegendInset ? 1 : 10;\n if (id === \"y2\" && !config.axis_y2_show) return $$.rotated_padding_top; // const rotate = config[`axis_${id}_tick_rotate`];\n\n var rotate = $$.getAxisTickRotate(id); // Calculate x/y axis height when tick rotated\n\n return (id === \"x\" && !isRotated || /y2?/.test(id) && isRotated) && rotate && (h = 30 + $$.axis.getMaxTickWidth(id) * Math.cos(Math.PI * (90 - rotate) / 180), !config.axis_x_tick_multiline && $$.currentHeight && h > $$.currentHeight / 2 && (h = $$.currentHeight / 2)), h + ($$.axis.getLabelPositionById(id).isInner ? 0 : 10) + (id !== \"y2\" || isRotated ? 0 : -10);\n },\n getEventRectWidth: function getEventRectWidth() {\n return Math.max(0, this.xAxis.tickInterval());\n },\n\n /**\n * Get axis tick test rotate value\n * @param {String} id\n * @return {Number} rotate value\n * @private\n */\n getAxisTickRotate: function getAxisTickRotate(id) {\n var $$ = this,\n config = $$.config,\n rotate = config[\"axis_\".concat(id, \"_tick_rotate\")];\n\n if (id === \"x\") {\n var isCategorized = $$.isCategorized(),\n isTimeSeries = $$.isTimeSeries(),\n allowedXAxisTypes = isCategorized || isTimeSeries,\n tickCount = 0;\n config.axis_x_tick_fit && allowedXAxisTypes && ($$.axis.x = {\n padding: {\n left: 0,\n right: 0\n },\n tickCount: 0\n }, tickCount = $$.currentMaxTickWidths.x.ticks.length + (isTimeSeries ? -1 : 1), tickCount !== $$.axis.x.tickCount && ($$.axis.x.padding = $$.axis.getXAxisPadding(tickCount)), $$.axis.x.tickCount = tickCount), $$.svg && config.axis_x_tick_fit && !config.axis_x_tick_multiline && !config.axis_x_tick_culling && config.axis_x_tick_autorotate && allowedXAxisTypes && (rotate = $$.needToRotateXAxisTickTexts() ? config.axis_x_tick_rotate : 0);\n }\n\n return rotate;\n },\n\n /**\n * Check weather axis tick text needs to be rotated\n * @private\n */\n needToRotateXAxisTickTexts: function needToRotateXAxisTickTexts() {\n var $$ = this,\n xAxisLength = $$.currentWidth - $$.getCurrentPaddingLeft(!1) - $$.getCurrentPaddingRight(!0),\n tickCountWithPadding = $$.axis.x.tickCount + $$.axis.x.padding.left + $$.axis.x.padding.right,\n maxTickWidth = $$.axis.getMaxTickWidth(\"x\");\n return maxTickWidth > (xAxisLength / tickCountWithPadding || 0);\n }\n});\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-shape\",\"commonjs2\":\"d3-shape\",\"amd\":\"d3-shape\",\"root\":\"d3\"}\nvar external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webpack_require__(10);\n\n// CONCATENATED MODULE: ./src/shape/shape.js\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n getShapeIndices: function getShapeIndices(typeFilter) {\n var $$ = this,\n config = $$.config,\n xs = config.data_xs,\n hasXs = notEmpty(xs),\n indices = {},\n i = hasXs ? {} : 0;\n return hasXs && getUnique(Object.keys(xs).map(function (v) {\n return xs[v];\n })).forEach(function (v) {\n i[v] = 0, indices[v] = {};\n }), $$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)).forEach(function (d) {\n for (var groups, xKey = (d.id in xs) ? xs[d.id] : \"\", ind = xKey ? indices[xKey] : indices, j = 0; groups = config.data_groups[j]; j++) if (!(groups.indexOf(d.id) < 0)) for (var _row4, _k4 = 0; _row4 = groups[_k4]; _k4++) if (_row4 in ind) {\n ind[d.id] = ind[_row4];\n break;\n }\n\n isUndefined(ind[d.id]) && (ind[d.id] = xKey ? i[xKey]++ : i++, ind.__max__ = (xKey ? i[xKey] : i) - 1);\n }), indices;\n },\n\n /**\n * Get indices value based on data ID value\n * @param {Object} indices Indices object\n * @param {String} id Data id value\n * @return {Object} Indices object\n * @private\n */\n getIndices: function getIndices(indices, id) {\n var xs = this.config.data_xs;\n return notEmpty(xs) ? indices[xs[id]] : indices;\n },\n\n /**\n * Get indices max number\n * @param {Object} indices Indices object\n * @return {Number} Max number\n * @private\n */\n getIndicesMax: function getIndicesMax(indices) {\n return notEmpty(this.config.data_xs) ? // if is multiple xs, return total sum of xs' __max__ value\n Object.keys(indices).map(function (v) {\n return indices[v].__max__ || 0;\n }).reduce(function (acc, curr) {\n return acc + curr;\n }) : indices.__max__;\n },\n getShapeX: function getShapeX(offset, indices, isSub) {\n var $$ = this,\n scale = isSub ? $$.subX : $$.zoomScale || $$.x,\n barPadding = $$.config.bar_padding,\n sum = function (p, c) {\n return p + c;\n },\n halfWidth = isObjectType(offset) && offset.total.length ? offset.total.reduce(sum) / 2 : 0;\n\n return function (d) {\n var ind = $$.getIndices(indices, d.id),\n index = d.id in ind ? ind[d.id] : 0,\n targetsNum = (ind.__max__ || 0) + 1,\n x = 0;\n\n if (notEmpty(d.x)) {\n var xPos = scale(d.x);\n x = halfWidth ? xPos - (offset[d.id] || offset.width) + offset.total.slice(0, index + 1).reduce(sum) - halfWidth : xPos - (isNumber(offset) ? offset : offset.width) * (targetsNum / 2 - index);\n } // adjust x position for bar.padding optionq\n\n\n return offset && x && targetsNum > 1 && barPadding && (index && (x += barPadding * index), targetsNum > 2 ? x -= (targetsNum - 1) * barPadding / 2 : targetsNum === 2 && (x -= barPadding / 2)), x;\n };\n },\n getShapeY: function getShapeY(isSub) {\n var $$ = this,\n isStackNormalized = $$.isStackNormalized();\n return function (d) {\n var value = isStackNormalized ? $$.getRatio(\"index\", d, !0) : $$.isBubbleZType(d) ? $$.getBubbleZData(d.value, \"y\") : d.value;\n return (isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id))(value);\n };\n },\n\n /**\n * Get shape based y Axis min value\n * @param {String} id Data id\n * @return {Number}\n * @private\n */\n getShapeYMin: function getShapeYMin(id) {\n var $$ = this,\n _$$$$$$axis$getId$dom = $$[$$.axis.getId(id)].domain(),\n _$$$$$$axis$getId$dom2 = _slicedToArray(_$$$$$$axis$getId$dom, 1),\n yMin = _$$$$$$axis$getId$dom2[0];\n\n return !$$.isGrouped(id) && yMin > 0 ? yMin : 0;\n },\n\n /**\n * Get Shape's offset data\n * @param {function(Object): boolean} typeFilter\n * @return {{shapeOffsetTargets: ShapeOffsetTarget[], indexMapByTargetId: object}}\n * @private\n */\n getShapeOffsetData: function getShapeOffsetData(typeFilter) {\n var $$ = this,\n targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$))),\n isStackNormalized = $$.isStackNormalized(),\n shapeOffsetTargets = targets.map(function (target) {\n var rowValues = target.values,\n values = {};\n $$.isStepType(target) && (rowValues = $$.convertValuesToStep(rowValues));\n var rowValueMapByXValue = rowValues.reduce(function (out, d) {\n var key = +d.x;\n return out[key] = d, values[key] = isStackNormalized ? $$.getRatio(\"index\", d, !0) : d.value, out;\n }, {});\n return {\n id: target.id,\n rowValues: rowValues,\n rowValueMapByXValue: rowValueMapByXValue,\n values: values\n };\n }),\n indexMapByTargetId = targets.reduce(function (out, _ref, index) {\n var id = _ref.id;\n return out[id] = index, out;\n }, {});\n return {\n indexMapByTargetId: indexMapByTargetId,\n shapeOffsetTargets: shapeOffsetTargets\n };\n },\n getShapeOffset: function getShapeOffset(typeFilter, indices, isSub) {\n var $$ = this,\n _$$$getShapeOffsetDat = $$.getShapeOffsetData(typeFilter),\n shapeOffsetTargets = _$$$getShapeOffsetDat.shapeOffsetTargets,\n indexMapByTargetId = _$$$getShapeOffsetDat.indexMapByTargetId;\n\n return function (d, idx) {\n var ind = $$.getIndices(indices, d.id),\n scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id),\n y0 = scale($$.getShapeYMin(d.id)),\n dataXAsNumber = +d.x,\n offset = y0;\n return shapeOffsetTargets.filter(function (t) {\n return t.id !== d.id;\n }).forEach(function (t) {\n if (ind[t.id] === ind[d.id] && indexMapByTargetId[t.id] < indexMapByTargetId[d.id]) {\n var row = t.rowValues[idx]; // check if the x values line up\n\n row && +row.x === dataXAsNumber || (row = t.rowValueMapByXValue[dataXAsNumber]), row && row.value * d.value >= 0 && (offset += scale(t.values[dataXAsNumber]) - y0);\n }\n }), offset;\n };\n },\n isWithinShape: function isWithinShape(that, d) {\n var isWithin,\n $$ = this,\n shape = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(that);\n return $$.isTargetToShow(d.id) ? $$.hasValidPointType(that.nodeName) ? isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScale(d.id)(d.value)) : $$.isWithinCircle(that, $$.isBubbleType(d) ? $$.pointSelectR(d) * 1.5 : 0) : that.nodeName === \"path\" && (isWithin = !shape.classed(config_classes.bar) || $$.isWithinBar(that)) : isWithin = !1, isWithin;\n },\n getInterpolate: function getInterpolate(d) {\n var $$ = this,\n interpolation = $$.getInterpolateType(d);\n return {\n \"basis\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveBasis\"],\n \"basis-closed\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveBasisClosed\"],\n \"basis-open\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveBasisOpen\"],\n \"bundle\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveBundle\"],\n \"cardinal\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveCardinal\"],\n \"cardinal-closed\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveCardinalClosed\"],\n \"cardinal-open\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveCardinalOpen\"],\n \"catmull-rom\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveCatmullRom\"],\n \"catmull-rom-closed\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveCatmullRomClosed\"],\n \"catmull-rom-open\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveCatmullRomOpen\"],\n \"monotone-x\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveMonotoneX\"],\n \"monotone-y\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveMonotoneY\"],\n \"natural\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveNatural\"],\n \"linear-closed\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveLinearClosed\"],\n \"linear\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveLinear\"],\n \"step\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveStep\"],\n \"step-after\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveStepAfter\"],\n \"step-before\": external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"curveStepBefore\"]\n }[interpolation];\n },\n getInterpolateType: function getInterpolateType(d) {\n var $$ = this,\n type = $$.config.spline_interpolation_type,\n interpolation = $$.isInterpolationType(type) ? type : \"cardinal\";\n return $$.isSplineType(d) ? interpolation : $$.isStepType(d) ? $$.config.line_step_type : \"linear\";\n }\n});\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-interpolate\",\"commonjs2\":\"d3-interpolate\",\"amd\":\"d3-interpolate\",\"root\":\"d3\"}\nvar external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_ = __webpack_require__(11);\n\n// CONCATENATED MODULE: ./src/shape/arc.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n initPie: function initPie() {\n var $$ = this,\n config = $$.config,\n dataType = config.data_type,\n padding = config.pie_padding,\n startingAngle = config[\"\".concat(dataType, \"_startingAngle\")] || 0,\n padAngle = ($$.hasType(\"pie\") && padding ? padding * .01 : config[\"\".concat(dataType, \"_padAngle\")]) || 0;\n $$.pie = Object(external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"pie\"])().startAngle(startingAngle).endAngle(startingAngle + 2 * Math.PI).padAngle(padAngle).sortValues($$.isOrderAsc() || $$.isOrderDesc() ? function (a, b) {\n return $$.isOrderAsc() ? a - b : b - a;\n } : null).value(function (d) {\n return d.values.reduce(function (a, b) {\n return a + b.value;\n }, 0);\n });\n },\n updateRadius: function updateRadius() {\n var $$ = this,\n config = $$.config,\n radius = config.pie_innerRadius,\n padding = config.pie_padding,\n w = config.gauge_width || config.donut_width,\n gaugeArcWidth = $$.filterTargetsToShow($$.data.targets).length * config.gauge_arcs_minWidth;\n $$.radiusExpanded = Math.min($$.arcWidth, $$.arcHeight) / 2 * ($$.hasMultiArcGauge() ? .85 : 1), $$.radius = $$.radiusExpanded * .95, $$.innerRadiusRatio = w ? ($$.radius - w) / $$.radius : .6, $$.gaugeArcWidth = w || (gaugeArcWidth <= $$.radius - $$.innerRadius ? $$.radius - $$.innerRadius : gaugeArcWidth <= $$.radius ? gaugeArcWidth : $$.radius);\n var innerRadius = radius || (padding ? padding * ($$.innerRadiusRatio + .1) : 0); // NOTE: innerRadius can be an object by user setting, only for 'pie' type\n\n $$.innerRadius = $$.hasType(\"donut\") || $$.hasType(\"gauge\") ? $$.radius * $$.innerRadiusRatio : innerRadius;\n },\n getInnerRadius: function getInnerRadius(d) {\n var $$ = this,\n radius = $$.innerRadius;\n return !isNumber(radius) && d && (radius = radius[d.data.id] || 0), radius;\n },\n updateArc: function updateArc() {\n var $$ = this;\n $$.svgArc = $$.getSvgArc(), $$.svgArcExpanded = $$.getSvgArcExpanded();\n },\n updateAngle: function updateAngle(dValue) {\n var $$ = this,\n config = $$.config,\n pie = $$.pie,\n d = dValue,\n found = !1;\n if (!config) return null;\n var radius = Math.PI * (config.gauge_fullCircle ? 2 : 1),\n gStart = config.gauge_startingAngle;\n\n if (d.data && $$.isGaugeType(d.data) && !$$.hasMultiArcGauge()) {\n // to prevent excluding total data sum during the init(when data.hide option is used), use $$.rendered state value\n var totalSum = $$.getTotalDataSum($$.rendered); // if gauge_max less than totalSum, make totalSum to max value\n\n totalSum > config.gauge_max && (config.gauge_max = totalSum);\n var gEnd = radius * (totalSum / (config.gauge_max - config.gauge_min));\n pie = pie.startAngle(gStart).endAngle(gEnd + gStart);\n }\n\n if (pie($$.filterTargetsToShow()).forEach(function (t, i) {\n found || t.data.id !== d.data.id || (found = !0, d = t, d.index = i);\n }), isNaN(d.startAngle) && (d.startAngle = 0), isNaN(d.endAngle) && (d.endAngle = d.startAngle), d.data && $$.hasMultiArcGauge()) {\n var maxValue = $$.getMinMaxData().max[0].value; // if gauge_max less than maxValue, make maxValue to max value\n\n maxValue > config.gauge_max && (config.gauge_max = maxValue);\n var gMin = config.gauge_min,\n gMax = config.gauge_max,\n gValue = d.value < gMin ? 0 : d.value < gMax ? d.value - gMin : gMax - gMin;\n d.startAngle = gStart, d.endAngle = gStart + radius / (gMax - gMin) * gValue;\n }\n\n return found ? d : null;\n },\n getSvgArc: function getSvgArc() {\n var $$ = this,\n ir = $$.getInnerRadius(),\n singleArcWidth = $$.gaugeArcWidth / $$.filterTargetsToShow($$.data.targets).length,\n hasMultiArcGauge = $$.hasMultiArcGauge(),\n arc = Object(external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"arc\"])().outerRadius(function (d) {\n return hasMultiArcGauge ? $$.radius - singleArcWidth * d.index : $$.radius;\n }).innerRadius(function (d) {\n return hasMultiArcGauge ? $$.radius - singleArcWidth * (d.index + 1) : isNumber(ir) ? ir : 0;\n }),\n newArc = function (d, withoutUpdate) {\n var path = \"M 0 0\";\n\n if (d.value || d.data) {\n isNumber(ir) || (arc = arc.innerRadius($$.getInnerRadius(d)));\n var updated = !withoutUpdate && $$.updateAngle(d);\n withoutUpdate ? path = arc(d) : updated && (path = arc(updated));\n }\n\n return path;\n };\n\n return newArc.centroid = arc.centroid, newArc;\n },\n getSvgArcExpanded: function getSvgArcExpanded(rate) {\n var $$ = this,\n newRate = rate || 1,\n singleArcWidth = $$.gaugeArcWidth / $$.filterTargetsToShow($$.data.targets).length,\n hasMultiArcGauge = $$.hasMultiArcGauge(),\n expandWidth = Math.min($$.radiusExpanded * newRate - $$.radius, singleArcWidth * .8 - (1 - newRate) * 100),\n arc = Object(external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"arc\"])().outerRadius(function (d) {\n return hasMultiArcGauge ? $$.radius - singleArcWidth * d.index + expandWidth : $$.radiusExpanded * newRate;\n }).innerRadius(function (d) {\n return hasMultiArcGauge ? $$.radius - singleArcWidth * (d.index + 1) : $$.innerRadius;\n });\n return function (d) {\n var updated = $$.updateAngle(d);\n return updated ? (hasMultiArcGauge ? arc : arc.innerRadius($$.getInnerRadius(d)))(updated) : \"M 0 0\";\n };\n },\n getArc: function getArc(d, withoutUpdate, force) {\n return force || this.isArcType(d.data) ? this.svgArc(d, withoutUpdate) : \"M 0 0\";\n },\n transformForArcLabel: function transformForArcLabel(d) {\n var $$ = this,\n config = $$.config,\n updated = $$.updateAngle(d),\n translate = \"\";\n if (updated) if ($$.hasMultiArcGauge()) {\n var y1 = Math.sin(updated.endAngle - Math.PI / 2),\n x = Math.cos(updated.endAngle - Math.PI / 2) * ($$.radiusExpanded + 25),\n y = y1 * ($$.radiusExpanded + 15 - Math.abs(y1 * 10)) + 3;\n translate = \"translate(\".concat(x, \",\").concat(y, \")\");\n } else if (!$$.hasType(\"gauge\") || $$.data.targets.length > 1) {\n var c = this.svgArc.centroid(updated),\n x = isNaN(c[0]) ? 0 : c[0],\n y = isNaN(c[1]) ? 0 : c[1],\n h = Math.sqrt(x * x + y * y),\n ratio = $$.hasType(\"donut\") && config.donut_label_ratio || $$.hasType(\"pie\") && config.pie_label_ratio;\n ratio = ratio ? isFunction(ratio) ? ratio(d, $$.radius, h) : ratio : $$.radius && (h ? (36 / $$.radius > .375 ? 1.175 - 36 / $$.radius : .8) * $$.radius / h : 0), translate = \"translate(\".concat(x * ratio, \",\").concat(y * ratio, \")\");\n }\n return translate;\n },\n convertToArcData: function convertToArcData(d) {\n return this.addName({\n id: d.data.id,\n value: d.value,\n ratio: this.getRatio(\"arc\", d),\n index: d.index\n });\n },\n textForArcLabel: function textForArcLabel(selection) {\n var $$ = this,\n hasGauge = $$.hasType(\"gauge\");\n $$.shouldShowArcLabel() && selection.each(function (d) {\n var node = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this),\n updated = $$.updateAngle(d),\n ratio = $$.getRatio(\"arc\", updated),\n isUnderThreshold = hasGauge || $$.meetsArcLabelThreshold(ratio);\n\n if (isUnderThreshold) {\n var value = (updated || d).value,\n text = ($$.getArcLabelFormat() || $$.defaultArcValueFormat)(value, ratio, d.data.id).toString();\n setTextValue(node, text, [-1, 1], hasGauge);\n } else node.text(\"\");\n });\n },\n textForGaugeMinMax: function textForGaugeMinMax(value, isMax) {\n var format = this.getGaugeLabelExtents();\n return format ? format(value, isMax) : value;\n },\n expandArc: function expandArc(targetIds) {\n var $$ = this; // MEMO: avoid to cancel transition\n\n if ($$.transiting) {\n var interval = setInterval(function () {\n $$.transiting || (clearInterval(interval), $$.legend.selectAll(\".\".concat(config_classes.legendItemFocused)).size() > 0 && $$.expandArc(targetIds));\n }, 10);\n return;\n }\n\n var newTargetIds = $$.mapToTargetIds(targetIds);\n $$.svg.selectAll($$.selectorTargets(newTargetIds, \".\".concat(config_classes.chartArc))).each(function (d) {\n if ($$.shouldExpand(d.data.id)) {\n var expandDuration = $$.getExpandConfig(d.data.id, \"duration\"),\n svgArcExpandedSub = $$.getSvgArcExpanded($$.getExpandConfig(d.data.id, \"rate\"));\n Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).selectAll(\"path\").transition().duration(expandDuration).attr(\"d\", $$.svgArcExpanded).transition().duration(expandDuration * 2).attr(\"d\", svgArcExpandedSub);\n }\n });\n },\n unexpandArc: function unexpandArc(targetIds) {\n var $$ = this;\n\n if (!$$.transiting) {\n var newTargetIds = $$.mapToTargetIds(targetIds);\n $$.svg.selectAll($$.selectorTargets(newTargetIds, \".\".concat(config_classes.chartArc))).selectAll(\"path\").transition().duration(function (d) {\n return $$.getExpandConfig(d.data.id, \"duration\");\n }).attr(\"d\", $$.svgArc), $$.svg.selectAll(\"\".concat(config_classes.arc)).style(\"opacity\", \"1\");\n }\n },\n\n /**\n * Get expand config value\n * @param {String} id data ID\n * @param {String} key config key: 'duration | rate'\n * @return {Number}\n * @private\n */\n getExpandConfig: function getExpandConfig(id, key) {\n var type,\n $$ = this,\n config = $$.config;\n return $$.isDonutType(id) ? type = \"donut\" : $$.isGaugeType(id) ? type = \"gauge\" : $$.isPieType(id) && (type = \"pie\"), type ? config[\"\".concat(type, \"_expand_\").concat(key)] : {\n duration: 50,\n rate: .98\n }[key];\n },\n shouldExpand: function shouldExpand(id) {\n var $$ = this,\n config = $$.config;\n return $$.isDonutType(id) && config.donut_expand || $$.isGaugeType(id) && config.gauge_expand || $$.isPieType(id) && config.pie_expand;\n },\n shouldShowArcLabel: function shouldShowArcLabel() {\n var $$ = this,\n config = $$.config;\n return [\"pie\", \"donut\", \"gauge\"].some(function (v) {\n return $$.hasType(v) && config[\"\".concat(v, \"_label_show\")];\n });\n },\n meetsArcLabelThreshold: function meetsArcLabelThreshold(ratio) {\n var $$ = this,\n config = $$.config,\n threshold = $$.hasType(\"donut\") ? config.donut_label_threshold : config.pie_label_threshold;\n return ratio >= threshold;\n },\n getArcLabelFormat: function getArcLabelFormat() {\n var $$ = this,\n config = $$.config,\n format = config.pie_label_format;\n return $$.hasType(\"gauge\") ? format = config.gauge_label_format : $$.hasType(\"donut\") && (format = config.donut_label_format), format;\n },\n getGaugeLabelExtents: function getGaugeLabelExtents() {\n var config = this.config;\n return config.gauge_label_extents;\n },\n getArcTitle: function getArcTitle() {\n var $$ = this,\n type = $$.hasType(\"donut\") && \"donut\" || $$.hasType(\"gauge\") && \"gauge\";\n return type ? $$.config[\"\".concat(type, \"_title\")] : \"\";\n },\n updateTargetsForArc: function updateTargetsForArc(targets) {\n var $$ = this,\n main = $$.main,\n hasGauge = $$.hasType(\"gauge\"),\n classChartArc = $$.classChartArc.bind($$),\n classArcs = $$.classArcs.bind($$),\n classFocus = $$.classFocus.bind($$),\n mainPieUpdate = main.select(\".\".concat(config_classes.chartArcs)).selectAll(\".\".concat(config_classes.chartArc)).data($$.pie(targets)).attr(\"class\", function (d) {\n return classChartArc(d) + classFocus(d.data);\n }),\n mainPieEnter = mainPieUpdate.enter().append(\"g\").attr(\"class\", classChartArc);\n mainPieEnter.append(\"g\").attr(\"class\", classArcs).merge(mainPieUpdate), mainPieEnter.append(\"text\").attr(\"dy\", hasGauge && !$$.hasMultiTargets() ? \"-.1em\" : \".35em\").style(\"opacity\", \"0\").style(\"text-anchor\", \"middle\").style(\"pointer-events\", \"none\");\n },\n initArc: function initArc() {\n var $$ = this;\n $$.arcs = $$.main.select(\".\".concat(config_classes.chart)).append(\"g\").attr(\"class\", config_classes.chartArcs).attr(\"transform\", $$.getTranslate(\"arc\")), $$.setArcTitle();\n },\n\n /**\n * Set arc title text\n * @private\n */\n setArcTitle: function setArcTitle() {\n var $$ = this,\n title = $$.getArcTitle(),\n hasGauge = $$.hasType(\"gauge\");\n\n if (title) {\n var text = $$.arcs.append(\"text\").attr(\"class\", config_classes[hasGauge ? \"chartArcsGaugeTitle\" : \"chartArcsTitle\"]).style(\"text-anchor\", \"middle\");\n hasGauge && text.attr(\"dy\", \"-0.3em\").style(\"font-size\", \"27px\"), setTextValue(text, title, hasGauge ? undefined : [-.6, 1.35], !0);\n }\n },\n redrawArc: function redrawArc(duration, durationForExit, withTransform) {\n var $$ = this,\n config = $$.config,\n main = $$.main,\n hasInteraction = config.interaction_enabled,\n mainArc = main.selectAll(\".\".concat(config_classes.arcs)).selectAll(\".\".concat(config_classes.arc)).data($$.arcData.bind($$));\n // bind arc events\n mainArc.exit().transition().duration(durationForExit).style(\"opacity\", \"0\").remove(), mainArc = mainArc.enter().append(\"path\").attr(\"class\", $$.classArc.bind($$)).style(\"fill\", function (d) {\n return $$.color(d.data);\n }).style(\"cursor\", function (d) {\n return hasInteraction && config.data_selection_isselectable(d) ? \"pointer\" : null;\n }).style(\"opacity\", \"0\").each(function (d) {\n $$.isGaugeType(d.data) && (d.startAngle = config.gauge_startingAngle, d.endAngle = config.gauge_startingAngle), this._current = d;\n }).merge(mainArc), $$.hasMultiArcGauge() && $$.redrawMultiArcGauge(), mainArc.attr(\"transform\", function (d) {\n return !$$.isGaugeType(d.data) && withTransform ? \"scale(0)\" : \"\";\n }).style(\"opacity\", function (d) {\n return d === this._current ? \"0\" : \"1\";\n }).each(function () {\n $$.transiting = !0;\n }).transition().duration(duration).attrTween(\"d\", function (d) {\n var updated = $$.updateAngle(d);\n if (!updated) return function () {\n return \"M 0 0\";\n };\n isNaN(this._current.startAngle) && (this._current.startAngle = 0), isNaN(this._current.endAngle) && (this._current.endAngle = this._current.startAngle);\n var interpolate = Object(external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_[\"interpolate\"])(this._current, updated);\n return this._current = interpolate(0), function (t) {\n var interpolated = interpolate(t);\n // data.id will be updated by interporator\n return interpolated.data = d.data, $$.getArc(interpolated, !0);\n };\n }).attr(\"transform\", withTransform ? \"scale(1)\" : \"\").style(\"fill\", function (d) {\n var color;\n return $$.levelColor ? (color = $$.levelColor(d.data.values[0].value), config.data_colors[d.data.id] = color) : color = $$.color(d.data.id), color;\n }) // Where gauge reading color would receive customization.\n .style(\"opacity\", \"1\").call($$.endall, function () {\n if ($$.levelColor) {\n var path = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this),\n d = path.datum();\n $$.updateLegendItemColor(d.data.id, path.style(\"fill\"));\n }\n\n $$.transiting = !1, callFn(config.onrendered, $$, $$.api);\n }), hasInteraction && $$.bindArcEvent(mainArc), $$.redrawArcText(duration);\n },\n redrawMultiArcGauge: function redrawMultiArcGauge() {\n var $$ = this,\n config = $$.config,\n arcLabelLines = $$.main.selectAll(\".\".concat(config_classes.arcs)).selectAll(\".\".concat(config_classes.arcLabelLine)).data($$.arcData.bind($$)),\n mainArcLabelLine = arcLabelLines.enter().append(\"rect\").attr(\"class\", function (d) {\n return \"\".concat(config_classes.arcLabelLine, \" \").concat(config_classes.target, \" \").concat(config_classes.target, \"-\").concat(d.data.id);\n }).merge(arcLabelLines);\n mainArcLabelLine.style(\"fill\", function (d) {\n return $$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data);\n }).style(\"display\", config.gauge_label_show ? \"\" : \"none\").each(function (d) {\n var lineLength = 0,\n lineThickness = 2,\n x = 0,\n y = 0,\n transform = \"\";\n\n if ($$.hiddenTargetIds.indexOf(d.data.id) < 0) {\n var updated = $$.updateAngle(d),\n innerLineLength = $$.gaugeArcWidth / $$.filterTargetsToShow($$.data.targets).length * (updated.index + 1),\n lineAngle = updated.endAngle - Math.PI / 2,\n arcInnerRadius = $$.radius - innerLineLength,\n linePositioningAngle = lineAngle - (arcInnerRadius === 0 ? 0 : 1 / arcInnerRadius);\n lineLength = $$.radiusExpanded - $$.radius + innerLineLength, x = Math.cos(linePositioningAngle) * arcInnerRadius, y = Math.sin(linePositioningAngle) * arcInnerRadius, transform = \"rotate(\".concat(lineAngle * 180 / Math.PI, \", \").concat(x, \", \").concat(y, \")\");\n }\n\n Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).attr(\"x\", x).attr(\"y\", y).attr(\"width\", lineLength).attr(\"height\", lineThickness).attr(\"transform\", transform).style(\"stroke-dasharray\", \"0, \".concat(lineLength + lineThickness, \", 0\"));\n });\n },\n bindArcEvent: function bindArcEvent(arc) {\n function selectArc(_this, arcData, id) {\n $$.expandArc(id), $$.api.focus(id), $$.toggleFocusLegend(id, !0), $$.showTooltip([arcData], _this);\n }\n\n function unselectArc(arcData) {\n var id = arcData && arcData.id || undefined;\n $$.unexpandArc(id), $$.api.revert(), $$.revertLegend(), $$.hideTooltip();\n }\n\n var $$ = this,\n isTouch = $$.inputType === \"touch\",\n isMouse = $$.inputType === \"mouse\";\n\n // touch events\n if (arc.on(\"click\", function (d, i) {\n var arcData,\n updated = $$.updateAngle(d);\n updated && (arcData = $$.convertToArcData(updated), $$.toggleShape && $$.toggleShape(this, arcData, i), $$.config.data_onclick.call($$.api, arcData, this));\n }), isMouse && arc.on(\"mouseover\", function (d) {\n if (!$$.transiting) // skip while transiting\n {\n var updated = $$.updateAngle(d),\n arcData = updated ? $$.convertToArcData(updated) : null,\n id = arcData && arcData.id || undefined;\n selectArc(this, arcData, id), $$.setOverOut(!0, arcData);\n }\n }).on(\"mouseout\", function (d) {\n if (!$$.transiting) // skip while transiting\n {\n var updated = $$.updateAngle(d),\n arcData = updated ? $$.convertToArcData(updated) : null;\n unselectArc(), $$.setOverOut(!1, arcData);\n }\n }).on(\"mousemove\", function (d) {\n var updated = $$.updateAngle(d),\n arcData = updated ? $$.convertToArcData(updated) : null;\n $$.showTooltip([arcData], this);\n }), isTouch && $$.hasArcType() && !$$.radars) {\n var getEventArc = function () {\n var touch = external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"].changedTouches[0],\n eventArc = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(browser_doc.elementFromPoint(touch.clientX, touch.clientY));\n return eventArc;\n },\n handler = function () {\n if (!$$.transiting) // skip while transiting\n {\n var eventArc = getEventArc(),\n datum = eventArc.datum(),\n updated = datum && datum.data && datum.data.id ? $$.updateAngle(datum) : null,\n arcData = updated ? $$.convertToArcData(updated) : null,\n id = arcData && arcData.id || undefined;\n $$.callOverOutForTouch(arcData), isUndefined(id) ? unselectArc() : selectArc(this, arcData, id);\n }\n };\n\n $$.svg.on(\"touchstart\", handler).on(\"touchmove\", handler);\n }\n },\n redrawArcText: function redrawArcText(duration) {\n var text,\n $$ = this,\n config = $$.config,\n main = $$.main,\n hasGauge = $$.hasType(\"gauge\"),\n hasMultiArcGauge = $$.hasMultiArcGauge();\n\n if (hasGauge && $$.data.targets.length === 1 && config.gauge_title || (text = main.selectAll(\".\".concat(config_classes.chartArc)).select(\"text\").style(\"opacity\", \"0\").attr(\"class\", function (d) {\n return $$.isGaugeType(d.data) ? config_classes.gaugeValue : null;\n }).call($$.textForArcLabel.bind($$)).attr(\"transform\", $$.transformForArcLabel.bind($$)).style(\"font-size\", function (d) {\n return $$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ? \"\".concat(Math.round($$.radius / 5), \"px\") : null;\n }).transition().duration(duration).style(\"opacity\", function (d) {\n return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? \"1\" : \"0\";\n }), hasMultiArcGauge && text.attr(\"dy\", \"-.1em\")), main.select(\".\".concat(config_classes.chartArcsTitle)).style(\"opacity\", $$.hasType(\"donut\") || hasGauge ? \"1\" : \"0\"), hasGauge) {\n var isFullCircle = config.gauge_fullCircle,\n startAngle = -1 * Math.PI / 2,\n endAngle = (isFullCircle ? -4 : -1) * startAngle;\n isFullCircle && text && text.attr(\"dy\", \"\".concat(Math.round($$.radius / 14)));\n var backgroundArc = $$.arcs.select(\"\".concat(hasMultiArcGauge ? \"g\" : \"\", \".\").concat(config_classes.chartArcsBackground));\n\n if (hasMultiArcGauge) {\n var index = 0;\n backgroundArc = backgroundArc.selectAll(\"path.\".concat(config_classes.chartArcsBackground)).data($$.data.targets), backgroundArc.enter().append(\"path\").attr(\"class\", function (d, i) {\n return \"\".concat(config_classes.chartArcsBackground, \" \").concat(config_classes.chartArcsBackground, \"-\").concat(i);\n }).merge(backgroundArc).attr(\"d\", function (d1) {\n if ($$.hiddenTargetIds.indexOf(d1.id) >= 0) return \"M 0 0\";\n var d = {\n data: [{\n value: config.gauge_max\n }],\n startAngle: startAngle,\n endAngle: endAngle,\n index: index++\n };\n return $$.getArc(d, !0, !0);\n }), backgroundArc.exit().remove();\n } else backgroundArc.attr(\"d\", function () {\n var d = {\n data: [{\n value: config.gauge_max\n }],\n startAngle: startAngle,\n endAngle: endAngle\n };\n return $$.getArc(d, !0, !0);\n });\n\n $$.arcs.select(\".\".concat(config_classes.chartArcsGaugeUnit)).attr(\"dy\", \".75em\").text(config.gauge_label_show ? config.gauge_units : \"\"), config.gauge_label_show && ($$.arcs.select(\".\".concat(config_classes.chartArcsGaugeMin)).attr(\"dx\", \"\".concat(-1 * ($$.innerRadius + ($$.radius - $$.innerRadius) / (isFullCircle ? 1 : 2)), \"px\")).attr(\"dy\", \"1.2em\").text($$.textForGaugeMinMax(config.gauge_min, !1)), !isFullCircle && $$.arcs.select(\".\".concat(config_classes.chartArcsGaugeMax)).attr(\"dx\", \"\".concat($$.innerRadius + ($$.radius - $$.innerRadius) / 2, \"px\")).attr(\"dy\", \"1.2em\").text($$.textForGaugeMinMax(config.gauge_max, !0)));\n }\n },\n initGauge: function initGauge() {\n var $$ = this,\n config = $$.config,\n arcs = $$.arcs,\n appendText = function (className) {\n arcs.append(\"text\").attr(\"class\", className).style(\"text-anchor\", \"middle\").style(\"pointer-events\", \"none\");\n };\n\n $$.hasType(\"gauge\") && (arcs.append($$.hasMultiArcGauge() ? \"g\" : \"path\").attr(\"class\", config_classes.chartArcsBackground), config.gauge_units && appendText(config_classes.chartArcsGaugeUnit), config.gauge_label_show && (appendText(config_classes.chartArcsGaugeMin), !config.gauge_fullCircle && appendText(config_classes.chartArcsGaugeMax)));\n },\n getGaugeLabelHeight: function getGaugeLabelHeight() {\n return this.config.gauge_label_show ? 20 : 0;\n }\n});\n// CONCATENATED MODULE: ./src/shape/bar.js\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n initBar: function initBar() {\n var $$ = this;\n $$.main.select(\".\".concat(config_classes.chart)).append(\"g\").attr(\"class\", config_classes.chartBars);\n },\n updateTargetsForBar: function updateTargetsForBar(targets) {\n var $$ = this,\n config = $$.config,\n classChartBar = $$.classChartBar.bind($$),\n classBars = $$.classBars.bind($$),\n classFocus = $$.classFocus.bind($$),\n mainBarUpdate = $$.main.select(\".\".concat(config_classes.chartBars)).selectAll(\".\".concat(config_classes.chartBar)).data(targets).attr(\"class\", function (d) {\n return classChartBar(d) + classFocus(d);\n }),\n mainBarEnter = mainBarUpdate.enter().append(\"g\").attr(\"class\", classChartBar).style(\"opacity\", \"0\").style(\"pointer-events\", \"none\");\n // Bars for each data\n mainBarEnter.append(\"g\").attr(\"class\", classBars).style(\"cursor\", function (d) {\n return config.data_selection_isselectable(d) ? \"pointer\" : null;\n });\n },\n updateBar: function updateBar(durationForExit) {\n var $$ = this,\n barData = $$.barData.bind($$),\n classBar = $$.classBar.bind($$),\n initialOpacity = $$.initialOpacity.bind($$);\n $$.mainBar = $$.main.selectAll(\".\".concat(config_classes.bars)).selectAll(\".\".concat(config_classes.bar)).data(barData), $$.mainBar.exit().transition().duration(durationForExit).style(\"opacity\", \"0\").remove(), $$.mainBar = $$.mainBar.enter().append(\"path\").attr(\"class\", classBar).style(\"fill\", $$.color).merge($$.mainBar).style(\"opacity\", initialOpacity);\n },\n redrawBar: function redrawBar(drawBar, withTransition) {\n return [(withTransition ? this.mainBar.transition(getRandom()) : this.mainBar).attr(\"d\", drawBar).style(\"fill\", this.color).style(\"opacity\", \"1\")];\n },\n getBarW: function getBarW(axis, barTargetsNum) {\n var result,\n $$ = this,\n config = $$.config,\n maxDataCount = $$.getMaxDataCount(),\n isGrouped = $$.isGrouped(),\n tickInterval = ($$.zoomScale || $$) && !$$.isCategorized() ? $$.xx($$.subX.domain()[1]) / maxDataCount : axis.tickInterval(maxDataCount),\n getWidth = function (id) {\n var width = id ? config.bar_width[id] : config.bar_width,\n ratio = id ? width.ratio : config.bar_width_ratio,\n max = id ? width.max : config.bar_width_max,\n w = isNumber(width) ? width : barTargetsNum ? tickInterval * ratio / barTargetsNum : 0;\n return max && w > max ? max : w;\n };\n\n return result = getWidth(), !isGrouped && isObjectType(config.bar_width) && (result = {\n width: result,\n total: []\n }, $$.filterTargetsToShow($$.data.targets).forEach(function (v) {\n config.bar_width[v.id] && (result[v.id] = getWidth(v.id), result.total.push(result[v.id] || result.width));\n })), result;\n },\n getBars: function getBars(i, id) {\n var $$ = this,\n suffix = isValue(i) ? \"-\".concat(i) : \"\";\n return (id ? $$.main.selectAll(\".\".concat(config_classes.bars).concat($$.getTargetSelectorSuffix(id))) : $$.main).selectAll(\".\".concat(config_classes.bar).concat(suffix));\n },\n expandBars: function expandBars(i, id, reset) {\n var $$ = this;\n reset && $$.unexpandBars(), $$.getBars(i, id).classed(config_classes.EXPANDED, !0);\n },\n unexpandBars: function unexpandBars(i) {\n this.getBars(i).classed(config_classes.EXPANDED, !1);\n },\n generateDrawBar: function generateDrawBar(barIndices, isSub) {\n var $$ = this,\n config = $$.config,\n getPoints = $$.generateGetBarPoints(barIndices, isSub),\n isRotated = config.axis_rotated,\n isGrouped = $$.isGrouped(),\n barRadius = config.bar_radius,\n barRadiusRatio = config.bar_radius_ratio,\n getRadius = isNumber(barRadius) && barRadius > 0 ? function () {\n return barRadius;\n } : isNumber(barRadiusRatio) ? function (w) {\n return w * barRadiusRatio;\n } : null;\n return function (d, i) {\n // 4 points that make a bar\n var points = getPoints(d, i),\n indexX = +isRotated,\n indexY = +!indexX,\n isNegative = d.value < 0,\n pathRadius = [\"\", \"\"],\n radius = 0; // switch points if axis is rotated, not applicable for sub chart\n\n if (getRadius && !isGrouped) {\n var index = isRotated ? indexY : indexX,\n barW = points[2][index] - points[0][index];\n radius = getRadius(barW);\n var arc = \"a\".concat(radius, \",\").concat(radius, \" \").concat(isNegative ? \"1 0 0\" : \"0 0 1\", \" \");\n pathRadius[+!isRotated] = \"\".concat(arc).concat(radius, \",\").concat(radius), pathRadius[+isRotated] = \"\".concat(arc).concat([-radius, radius][isRotated ? \"sort\" : \"reverse\"]()), isNegative && pathRadius.reverse();\n } // path string data shouldn't be containing new line chars\n // https://github.com/naver/billboard.js/issues/530\n\n\n var path = isRotated ? \"H\".concat(points[1][indexX] - radius, \" \").concat(pathRadius[0], \"V\").concat(points[2][indexY] - radius, \" \").concat(pathRadius[1], \"H\").concat(points[3][indexX]) : \"V\".concat(points[1][indexY] + (isNegative ? -radius : radius), \" \").concat(pathRadius[0], \"H\").concat(points[2][indexX] - radius, \" \").concat(pathRadius[1], \"V\").concat(points[3][indexY]);\n return \"M\".concat(points[0][indexX], \",\").concat(points[0][indexY]).concat(path, \"z\");\n };\n },\n generateGetBarPoints: function generateGetBarPoints(barIndices, isSub) {\n var $$ = this,\n axis = isSub ? $$.subXAxis : $$.xAxis,\n barTargetsNum = $$.getIndicesMax(barIndices) + 1,\n barW = $$.getBarW(axis, barTargetsNum),\n barX = $$.getShapeX(barW, barIndices, !!isSub),\n barY = $$.getShapeY(!!isSub),\n barOffset = $$.getShapeOffset($$.isBarType, barIndices, !!isSub),\n yScale = isSub ? $$.getSubYScale : $$.getYScale;\n return function (d, i) {\n var y0 = yScale.call($$, d.id)($$.getShapeYMin(d.id)),\n offset = barOffset(d, i) || y0,\n width = isNumber(barW) ? barW : barW[d.id] || barW.width,\n posX = barX(d),\n posY = barY(d);\n // 4 points that make a bar\n return $$.config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0), posY -= y0 - offset, [[posX, offset], [posX, posY], [posX + width, posY], [posX + width, offset]];\n };\n },\n isWithinBar: function isWithinBar(that) {\n var mouse = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(that),\n list = getRectSegList(that),\n _list2 = _slicedToArray(list, 2),\n seg0 = _list2[0],\n seg1 = _list2[1],\n x = Math.min(seg0.x, seg1.x),\n y = Math.min(seg0.y, seg1.y),\n offset = this.config.bar_sensitivity,\n _that$getBBox = that.getBBox(),\n width = _that$getBBox.width,\n height = _that$getBBox.height;\n\n return x - offset < mouse[0] && mouse[0] < x + width + offset && y - offset < mouse[1] && mouse[1] < y + height + offset;\n }\n});\n// CONCATENATED MODULE: ./src/shape/bubble.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Initializer\n * @private\n */\n initBubble: function initBubble() {\n var $$ = this,\n config = $$.config;\n $$.hasType(\"bubble\") && (config.point_show = !0, config.point_type = \"circle\", config.point_sensitivity = 25);\n },\n\n /**\n * Get user agent's computed value for the total length of the path in user units\n * https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/getTotalLength\n * @return {Number}\n * @private\n */\n getBaseLength: function getBaseLength() {\n var $$ = this,\n cacheKey = \"$baseLength\",\n baseLength = $$.getCache(cacheKey);\n return baseLength || $$.addCache(cacheKey, baseLength = getMinMax(\"min\", [$$.axes.x.select(\"path\").node().getTotalLength(), $$.axes.y.select(\"path\").node().getTotalLength()])), baseLength;\n },\n\n /**\n * Get the radius value for bubble circle\n * @param {Object} d\n * @return {Number}\n * @private\n \t */\n getBubbleR: function getBubbleR(d) {\n var $$ = this,\n maxR = $$.config.bubble_maxR;\n isFunction(maxR) ? maxR = maxR(d) : !isNumber(maxR) && (maxR = $$.getBaseLength() / ($$.getMaxDataCount() * 2) + 12);\n var max = getMinMax(\"max\", $$.getMinMaxData().max.map(function (d) {\n return $$.isBubbleZType(d) ? $$.getBubbleZData(d.value, \"y\") : isObject(d.value) ? d.value.mid : d.value;\n })),\n maxArea = maxR * maxR * Math.PI,\n area = ($$.isBubbleZType(d) ? $$.getBubbleZData(d.value, \"z\") : d.value) * (maxArea / max);\n return Math.sqrt(area / Math.PI);\n },\n\n /**\n * Get bubble dimension data\n * @param {Object|Array} d data value\n * @param {String} type - y or z\n * @return {Number}\n * @private\n */\n getBubbleZData: function getBubbleZData(d, type) {\n return isObject(d) ? d[type] : d[type === \"y\" ? 0 : 1];\n },\n\n /**\n * Determine if bubble has dimension data\n * @param {Object|array} d data value\n * @return {Boolean}\n * @private\n */\n isBubbleZType: function isBubbleZType(d) {\n var $$ = this;\n return $$.isBubbleType(d) && (isObject(d.value) && (\"z\" in d.value || \"y\" in d.value) || isArray(d.value) && d.value.length === 2);\n }\n});\n// CONCATENATED MODULE: ./src/shape/line.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n initLine: function initLine() {\n var $$ = this;\n $$.main.select(\".\".concat(config_classes.chart)).append(\"g\").attr(\"class\", config_classes.chartLines);\n },\n updateTargetsForLine: function updateTargetsForLine(targets) {\n var $$ = this,\n config = $$.config,\n classChartLine = $$.classChartLine.bind($$),\n classLines = $$.classLines.bind($$),\n classAreas = $$.classAreas.bind($$),\n classCircles = $$.classCircles.bind($$),\n classFocus = $$.classFocus.bind($$),\n mainLineUpdate = $$.main.select(\".\".concat(config_classes.chartLines)).selectAll(\".\".concat(config_classes.chartLine)).data(targets).attr(\"class\", function (d) {\n return classChartLine(d) + classFocus(d);\n }),\n mainLineEnter = mainLineUpdate.enter().append(\"g\").attr(\"class\", classChartLine).style(\"opacity\", \"0\").style(\"pointer-events\", \"none\");\n // Lines for each data\n // Areas\n // Update date for selected circles\n mainLineEnter.append(\"g\").attr(\"class\", classLines), mainLineEnter.append(\"g\").attr(\"class\", classAreas), config.point_show && (config.data_selection_enabled && mainLineEnter.append(\"g\").attr(\"class\", function (d) {\n return $$.generateClass(config_classes.selectedCircles, d.id);\n }), mainLineEnter.append(\"g\").attr(\"class\", classCircles).style(\"cursor\", function (d) {\n return config.data_selection_isselectable(d) ? \"pointer\" : null;\n })), targets.forEach(function (t) {\n $$.main.selectAll(\".\".concat(config_classes.selectedCircles).concat($$.getTargetSelectorSuffix(t.id))).selectAll(\"\".concat(config_classes.selectedCircle)).each(function (d) {\n d.value = t.values[d.index].value;\n });\n });\n },\n updateLine: function updateLine(durationForExit) {\n var $$ = this;\n $$.mainLine = $$.main.selectAll(\".\".concat(config_classes.lines)).selectAll(\".\".concat(config_classes.line)).data($$.lineData.bind($$)), $$.mainLine.exit().transition().duration(durationForExit).style(\"opacity\", \"0\").remove(), $$.mainLine = $$.mainLine.enter().append(\"path\").attr(\"class\", function (d) {\n return \"\".concat($$.classLine.bind($$)(d), \" \").concat($$.extraLineClasses(d) || \"\");\n }).style(\"stroke\", $$.color).merge($$.mainLine).style(\"opacity\", $$.initialOpacity.bind($$)).style(\"shape-rendering\", function (d) {\n return $$.isStepType(d) ? \"crispEdges\" : \"\";\n }).attr(\"transform\", null);\n },\n redrawLine: function redrawLine(drawLine, withTransition) {\n return [(withTransition ? this.mainLine.transition(getRandom()) : this.mainLine).attr(\"d\", drawLine).style(\"stroke\", this.color).style(\"opacity\", \"1\")];\n },\n\n /**\n * Get the curve interpolate\n * @param {Array} d Data object\n * @return {Function}\n * @private\n */\n getCurve: function getCurve(d) {\n var $$ = this,\n isRotatedStepType = $$.config.axis_rotated && $$.isStepType(d);\n // when is step & rotated, should be computed in different way\n // https://github.com/naver/billboard.js/issues/471\n return isRotatedStepType ? function (context) {\n var step = $$.getInterpolate(d)(context); // keep the original method\n\n return step.orgPoint = step.point, step.pointRotated = function (x, y) {\n this._point === 1 && (this._point = 2);\n var y1 = this._y * (1 - this._t) + y * this._t;\n this._context.lineTo(this._x, y1), this._context.lineTo(x, y1), this._x = x, this._y = y;\n }, step.point = function (x, y) {\n this._point === 0 ? this.orgPoint(x, y) : this.pointRotated(x, y);\n }, step;\n } : $$.getInterpolate(d);\n },\n generateDrawLine: function generateDrawLine(lineIndices, isSub) {\n var $$ = this,\n config = $$.config,\n lineConnectNull = config.line_connectNull,\n isRotated = config.axis_rotated,\n getPoints = $$.generateGetLinePoints(lineIndices, isSub),\n yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale,\n xValue = function (d) {\n return (isSub ? $$.subxx : $$.xx).call($$, d);\n },\n yValue = function (d, i) {\n return $$.isGrouped(d.id) ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.getBaseValue(d));\n },\n line = Object(external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"line\"])();\n\n line = isRotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue), lineConnectNull || (line = line.defined(function (d) {\n return $$.getBaseValue(d) !== null;\n }));\n var x = isSub ? $$.subX : $$.x;\n return function (d) {\n var path,\n y = yScaleGetter.call($$, d.id),\n values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values,\n x0 = 0,\n y0 = 0;\n\n if ($$.isLineType(d)) {\n var regions = config.data_regions[d.id];\n regions ? path = $$.lineWithRegions(values, x, y, regions) : ($$.isStepType(d) && (values = $$.convertValuesToStep(values)), path = line.curve($$.getCurve(d))(values));\n } else values[0] && (x0 = x(values[0].x), y0 = y(values[0].value)), path = isRotated ? \"M \".concat(y0, \" \").concat(x0) : \"M \".concat(x0, \" \").concat(y0);\n\n return path || \"M 0 0\";\n };\n },\n generateGetLinePoints: function generateGetLinePoints(lineIndices, isSubValue) {\n // partial duplication of generateGetBarPoints\n var $$ = this,\n config = $$.config,\n isSub = !!isSubValue,\n x = $$.getShapeX(0, lineIndices, isSub),\n y = $$.getShapeY(isSub),\n lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, isSub),\n yScale = isSub ? $$.getSubYScale : $$.getYScale;\n return function (d, i) {\n var y0 = yScale.call($$, d.id)($$.getShapeYMin(d.id)),\n offset = lineOffset(d, i) || y0,\n posX = x(d),\n posY = y(d);\n config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0);\n // 1 point that marks the line position\n var point = [posX, posY - (y0 - offset)];\n return [point, point, // from here and below, needed for compatibility\n point, point];\n };\n },\n lineWithRegions: function lineWithRegions(d, x, y, _regions) {\n var xp,\n yp,\n diff,\n diffx2,\n $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n isTimeSeries = $$.isTimeSeries(),\n xOffset = $$.isCategorized() ? .5 : 0,\n regions = [],\n dasharray = \"2 2\",\n isWithinRegions = function (withinX, withinRegions) {\n for (var reg, i = 0; reg = withinRegions[i]; i++) if (reg.start < withinX && withinX <= reg.end) return reg.style;\n\n return !1;\n };\n\n // Check start/end of regions\n if (isDefined(_regions)) {\n var getValue = function (v, def) {\n return isUndefined(v) ? def : isTimeSeries ? $$.parseDate(v) : v;\n };\n\n for (var reg, i = 0; reg = _regions[i]; i++) {\n var start = getValue(reg.start, d[0].x),\n end = getValue(reg.end, d[d.length - 1].x),\n style = reg.style || {\n dasharray: dasharray\n };\n regions[i] = {\n start: start,\n end: end,\n style: style\n };\n }\n } // Set scales\n\n\n var xValue = isRotated ? function (dt) {\n return y(dt.value);\n } : function (dt) {\n return x(dt.x);\n },\n yValue = isRotated ? function (dt) {\n return x(dt.x);\n } : function (dt) {\n return y(dt.value);\n },\n generateM = function (points) {\n return \"M\".concat(points[0][0], \",\").concat(points[0][1], \"L\").concat(points[1][0], \",\").concat(points[1][1]);\n },\n sWithRegion = isTimeSeries ? function (d0, d1, k, timeseriesDiff) {\n var x0 = d0.x.getTime(),\n xDiff = d1.x - d0.x,\n xv0 = new Date(x0 + xDiff * k),\n xv1 = new Date(x0 + xDiff * (k + timeseriesDiff)),\n points = isRotated ? [[y(yp(k)), x(xv0)], [y(yp(k + diff)), x(xv1)]] : [[x(xv0), y(yp(k))], [x(xv1), y(yp(k + diff))]];\n return generateM(points);\n } : function (d0, d1, k, otherDiff) {\n var points = isRotated ? [[y(yp(k), !0), x(xp(k))], [y(yp(k + otherDiff), !0), x(xp(k + otherDiff))]] : [[x(xp(k), !0), y(yp(k))], [x(xp(k + otherDiff), !0), y(yp(k + otherDiff))]];\n return generateM(points);\n },\n path = \"\";\n\n for (var data, _i = 0; data = d[_i]; _i++) {\n var prevData = d[_i - 1],\n hasPrevData = prevData && isValue(prevData.value),\n style = isWithinRegions(data.x, regions);\n // https://github.com/naver/billboard.js/issues/1172\n if (isValue(data.value)) // Draw as normal\n if (isUndefined(regions) || !style || !hasPrevData) path += \"\".concat(_i && hasPrevData ? \"L\" : \"M\").concat(xValue(data), \",\").concat(yValue(data));else if (hasPrevData) {\n try {\n style = style.dasharray.split(\" \");\n } catch (e) {\n style = dasharray.split(\" \");\n } // Draw with region // TODO: Fix for horizotal charts\n\n\n xp = $$.getScale(prevData.x + xOffset, data.x + xOffset, isTimeSeries), yp = $$.getScale(prevData.value, data.value);\n var dx = x(data.x) - x(prevData.x),\n dy = y(data.value) - y(prevData.value),\n dd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n diff = style[0] / dd, diffx2 = diff * style[1];\n\n for (var _j = diff; _j <= 1; _j += diffx2) path += sWithRegion(prevData, data, _j, diff), _j + diffx2 >= 1 && (path += sWithRegion(prevData, data, 1, 0));\n }\n }\n\n return path;\n },\n updateAreaGradient: function updateAreaGradient() {\n var $$ = this;\n $$.data.targets.forEach(function (d) {\n var id = \"\".concat($$.datetimeId, \"-areaGradient\").concat($$.getTargetSelectorSuffix(d.id));\n\n if ($$.isAreaType(d) && $$.defs.select(\"#\".concat(id)).empty()) {\n var color = $$.color(d),\n _$$$config$area_linea = $$.config.area_linearGradient,\n _$$$config$area_linea2 = _$$$config$area_linea.x,\n x = _$$$config$area_linea2 === void 0 ? [0, 0] : _$$$config$area_linea2,\n _$$$config$area_linea3 = _$$$config$area_linea.y,\n y = _$$$config$area_linea3 === void 0 ? [0, 1] : _$$$config$area_linea3,\n _$$$config$area_linea4 = _$$$config$area_linea.stops,\n stops = _$$$config$area_linea4 === void 0 ? [[0, color, 1], [1, color, 0]] : _$$$config$area_linea4,\n linearGradient = $$.defs.append(\"linearGradient\").attr(\"id\", \"\".concat(id)).attr(\"x1\", x[0]).attr(\"x2\", x[1]).attr(\"y1\", y[0]).attr(\"y2\", y[1]);\n stops.forEach(function (v) {\n var stopColor = isFunction(v[1]) ? v[1](d.id) : v[1];\n linearGradient.append(\"stop\").attr(\"offset\", v[0]).attr(\"stop-color\", stopColor || color).attr(\"stop-opacity\", v[2]);\n });\n }\n });\n },\n updateAreaColor: function updateAreaColor(d) {\n var $$ = this;\n return $$.config.area_linearGradient ? \"url(#\".concat($$.datetimeId, \"-areaGradient\").concat($$.getTargetSelectorSuffix(d.id), \")\") : $$.color(d);\n },\n updateArea: function updateArea(durationForExit) {\n var $$ = this;\n $$.config.area_linearGradient && $$.updateAreaGradient(), $$.mainArea = $$.main.selectAll(\".\".concat(config_classes.areas)).selectAll(\".\".concat(config_classes.area)).data($$.lineData.bind($$)), $$.mainArea.exit().transition().duration(durationForExit).style(\"opacity\", \"0\").remove(), $$.mainArea = $$.mainArea.enter().append(\"path\").attr(\"class\", $$.classArea.bind($$)).style(\"fill\", $$.updateAreaColor.bind($$)).style(\"opacity\", function () {\n return $$.orgAreaOpacity = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).style(\"opacity\"), \"0\";\n }).merge($$.mainArea), $$.mainArea.style(\"opacity\", $$.orgAreaOpacity);\n },\n redrawArea: function redrawArea(drawArea, withTransition) {\n var $$ = this;\n return [(withTransition ? $$.mainArea.transition(getRandom()) : $$.mainArea).attr(\"d\", drawArea).style(\"fill\", $$.updateAreaColor.bind($$)).style(\"opacity\", function (d) {\n return ($$.isAreaRangeType(d) ? $$.orgAreaOpacity / 1.75 : $$.orgAreaOpacity) + \"\";\n })];\n },\n\n /**\n * Generate area path data\n * @param areaIndices\n * @param isSub\n * @return {function(*=): (*|string)}\n * @private\n */\n generateDrawArea: function generateDrawArea(areaIndices, isSub) {\n var $$ = this,\n config = $$.config,\n lineConnectNull = config.line_connectNull,\n isRotated = config.axis_rotated,\n getPoints = $$.generateGetAreaPoints(areaIndices, isSub),\n yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale,\n xValue = function (d) {\n return (isSub ? $$.subxx : $$.xx).call($$, d);\n },\n value0 = function (d, i) {\n return $$.isGrouped(d.id) ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.isAreaRangeType(d) ? $$.getAreaRangeData(d, \"high\") : $$.getShapeYMin(d.id));\n },\n value1 = function (d, i) {\n return $$.isGrouped(d.id) ? getPoints(d, i)[1][1] : yScaleGetter.call($$, d.id)($$.isAreaRangeType(d) ? $$.getAreaRangeData(d, \"low\") : d.value);\n };\n\n return function (d) {\n var path,\n values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values,\n x0 = 0,\n y0 = 0;\n\n if ($$.isAreaType(d)) {\n var area = Object(external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_[\"area\"])();\n area = isRotated ? area.y(xValue).x0(value0).x1(value1) : area.x(xValue).y0(config.area_above ? 0 : value0).y1(value1), lineConnectNull || (area = area.defined(function (d) {\n return $$.getBaseValue(d) !== null;\n })), $$.isStepType(d) && (values = $$.convertValuesToStep(values)), path = area.curve($$.getCurve(d))(values);\n } else values[0] && (x0 = $$.x(values[0].x), y0 = $$.getYScale(d.id)(values[0].value)), path = isRotated ? \"M \".concat(y0, \" \").concat(x0) : \"M \".concat(x0, \" \").concat(y0);\n\n return path || \"M 0 0\";\n };\n },\n generateGetAreaPoints: function generateGetAreaPoints(areaIndices, isSub) {\n // partial duplication of generateGetBarPoints\n var $$ = this,\n config = $$.config,\n x = $$.getShapeX(0, areaIndices, !!isSub),\n y = $$.getShapeY(!!isSub),\n areaOffset = $$.getShapeOffset($$.isAreaType, areaIndices, !!isSub),\n yScale = isSub ? $$.getSubYScale : $$.getYScale;\n return function (d, i) {\n var y0 = yScale.call($$, d.id)($$.getShapeYMin(d.id)),\n offset = areaOffset(d, i) || y0,\n posX = x(d),\n posY = y(d);\n // 1 point that marks the area position\n return config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0), [[posX, offset], [posX, posY - (y0 - offset)], [posX, posY - (y0 - offset)], // needed for compatibility\n [posX, offset] // needed for compatibility\n ];\n };\n },\n updateCircle: function updateCircle() {\n var $$ = this;\n\n if ($$.config.point_show) {\n $$.mainCircle = $$.main.selectAll(\".\".concat(config_classes.circles)).selectAll(\".\".concat(config_classes.circle)).data(function (d) {\n return !$$.isBarType(d) && (!$$.isLineType(d) || $$.shouldDrawPointsForLine(d)) && $$.labelishData(d);\n }), $$.mainCircle.exit().remove();\n var fn = $$.point(\"create\", this, $$.pointR.bind($$), $$.color);\n $$.mainCircle = $$.mainCircle.enter().append(fn).merge($$.mainCircle).style(\"stroke\", $$.color).style(\"opacity\", $$.initialOpacityForCircle.bind($$));\n }\n },\n redrawCircle: function redrawCircle(cx, cy, withTransition, flow) {\n var $$ = this,\n selectedCircles = $$.main.selectAll(\".\".concat(config_classes.selectedCircle));\n if (!$$.config.point_show) return [];\n var mainCircles = [];\n $$.mainCircle.each(function (d) {\n var fn = $$.point(\"update\", $$, cx, cy, $$.opacityForCircle.bind($$), $$.color, withTransition, flow, selectedCircles).bind(this),\n result = fn(d);\n mainCircles.push(result);\n });\n var posAttr = $$.isCirclePoint() ? \"c\" : \"\";\n return [mainCircles, selectedCircles.attr(\"\".concat(posAttr, \"x\"), cx).attr(\"\".concat(posAttr, \"y\"), cy)];\n },\n circleX: function circleX(d) {\n var $$ = this,\n hasValue = isValue(d.x);\n return $$.config.zoom_enabled && $$.zoomScale ? hasValue ? $$.zoomScale(d.x) : null : hasValue ? $$.x(d.x) : null;\n },\n updateCircleY: function updateCircleY() {\n var $$ = this,\n getPoints = $$.generateGetLinePoints($$.getShapeIndices($$.isLineType), !1);\n\n $$.circleY = function (d, i) {\n var id = d.id;\n return $$.isGrouped(id) ? getPoints(d, i)[0][1] : $$.getYScale(id)($$.getBaseValue(d));\n };\n },\n getCircles: function getCircles(i, id) {\n var $$ = this,\n suffix = isValue(i) ? \"-\".concat(i) : \"\";\n return (id ? $$.main.selectAll(\".\".concat(config_classes.circles).concat($$.getTargetSelectorSuffix(id))) : $$.main).selectAll(\".\".concat(config_classes.circle).concat(suffix));\n },\n expandCircles: function expandCircles(i, id, reset) {\n var $$ = this,\n r = $$.pointExpandedR.bind($$);\n reset && $$.unexpandCircles();\n var circles = $$.getCircles(i, id).classed(config_classes.EXPANDED, !0),\n scale = r(circles) / $$.config.point_r,\n ratio = 1 - scale;\n $$.isCirclePoint() ? circles.attr(\"r\", r) : circles.each(function () {\n var point = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this);\n if (this.tagName === \"circle\") point.attr(\"r\", r);else {\n var _this$getBBox = this.getBBox(),\n width = _this$getBBox.width,\n height = _this$getBBox.height,\n x = ratio * (+point.attr(\"x\") + width / 2),\n y = ratio * (+point.attr(\"y\") + height / 2);\n\n point.attr(\"transform\", \"translate(\".concat(x, \" \").concat(y, \") scale(\").concat(scale, \")\"));\n }\n });\n },\n unexpandCircles: function unexpandCircles(i) {\n var $$ = this,\n r = $$.pointR.bind($$),\n circles = $$.getCircles(i).filter(function () {\n return Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).classed(config_classes.EXPANDED);\n }).classed(config_classes.EXPANDED, !1);\n circles.attr(\"r\", r), $$.isCirclePoint() || circles.attr(\"transform\", \"scale(\".concat(r(circles) / $$.config.point_r, \")\"));\n },\n pointR: function (d) {\n var $$ = this,\n config = $$.config,\n pointR = config.point_r,\n r = pointR;\n return $$.isStepType(d) ? r = 0 : $$.isBubbleType(d) ? r = $$.getBubbleR(d) : isFunction(pointR) && (r = pointR(d)), r;\n },\n pointExpandedR: function pointExpandedR(d) {\n var $$ = this,\n config = $$.config,\n scale = $$.isBubbleType(d) ? 1.15 : 1.75;\n return config.point_focus_expand_enabled ? config.point_focus_expand_r || $$.pointR(d) * scale : $$.pointR(d);\n },\n pointSelectR: function pointSelectR(d) {\n var $$ = this,\n selectR = $$.config.point_select_r;\n return isFunction(selectR) ? selectR(d) : selectR || $$.pointR(d) * 4;\n },\n isWithinCircle: function isWithinCircle(node, r) {\n var mouse = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(node),\n element = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(node),\n prefix = this.isCirclePoint() ? \"c\" : \"\",\n cx = +element.attr(\"\".concat(prefix, \"x\")),\n cy = +element.attr(\"\".concat(prefix, \"y\"));\n\n // if node don't have cx/y or x/y attribute value\n if (!(cx || cy) && node.nodeType === 1) {\n var _ref = node.getBBox ? node.getBBox() : node.getBoundingClientRect(),\n x = _ref.x,\n y = _ref.y;\n\n cx = x, cy = y;\n }\n\n return Math.sqrt(Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)) < (r || this.config.point_sensitivity);\n },\n isWithinStep: function isWithinStep(that, y) {\n return Math.abs(y - Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(that)[1]) < 30;\n },\n shouldDrawPointsForLine: function shouldDrawPointsForLine(d) {\n var linePoint = this.config.line_point;\n return linePoint === !0 || isArray(linePoint) && linePoint.indexOf(d.id) !== -1;\n }\n});\n// CONCATENATED MODULE: ./src/shape/point.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n hasValidPointType: function hasValidPointType(type) {\n return /^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type);\n },\n hasValidPointDrawMethods: function hasValidPointDrawMethods(type) {\n var pointType = type || this.config.point_type;\n return isObjectType(pointType) && isFunction(pointType.create) && isFunction(pointType.update);\n },\n insertPointInfoDefs: function insertPointInfoDefs(point, id) {\n var $$ = this,\n copyAttr = function (from, target) {\n for (var name, attribs = from.attributes, i = 0; name = attribs[i]; i++) name = name.name, target.setAttribute(name, from.getAttribute(name));\n },\n doc = new DOMParser().parseFromString(point, \"image/svg+xml\"),\n node = doc.documentElement,\n clone = browser_doc.createElementNS(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"namespaces\"].svg, node.nodeName.toLowerCase());\n\n if (clone.id = id, clone.style.fill = \"inherit\", clone.style.stroke = \"inherit\", copyAttr(node, clone), node.childNodes && node.childNodes.length) {\n var parent = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(clone);\n \"innerHTML\" in clone ? parent.html(node.innerHTML) : toArray(node.childNodes).forEach(function (v) {\n copyAttr(v, parent.append(v.tagName).node());\n });\n }\n\n $$.defs.node().appendChild(clone);\n },\n pointFromDefs: function pointFromDefs(id) {\n return this.defs.select(\"#\".concat(id));\n },\n updatePointClass: function updatePointClass(d) {\n var $$ = this,\n pointClass = !1;\n return (isObject(d) || $$.mainCircle) && (pointClass = d === !0 ? $$.mainCircle.each(function (d) {\n var className = $$.classCircle.bind($$)(d);\n this.getAttribute(\"class\").indexOf(config_classes.EXPANDED) > -1 && (className += \" \".concat(config_classes.EXPANDED)), this.setAttribute(\"class\", className);\n }) : $$.classCircle(d)), pointClass;\n },\n generatePoint: function generatePoint() {\n var $$ = this,\n config = $$.config,\n ids = [],\n pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];\n return function (method, context) {\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\n return function (d) {\n var id = d.id || d.data && d.data.id || d,\n element = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this);\n ids.indexOf(id) < 0 && ids.push(id);\n var point = pattern[ids.indexOf(id) % pattern.length];\n if ($$.hasValidPointType(point)) point = $$[point];else if (!$$.hasValidPointDrawMethods(point)) {\n var pointId = \"\".concat($$.datetimeId, \"-point-\").concat(id),\n pointFromDefs = $$.pointFromDefs(pointId);\n if (pointFromDefs.size() < 1 && $$.insertPointInfoDefs(point, pointId), method === \"create\") return $$.custom.create.bind(context).apply(void 0, [element, pointId].concat(args));\n if (method === \"update\") return $$.custom.update.bind(context).apply(void 0, [element].concat(args));\n }\n return point[method].bind(context).apply(void 0, [element].concat(args));\n };\n };\n },\n getTransitionName: function getTransitionName() {\n return getRandom();\n },\n custom: {\n create: function create(element, id, sizeFn, fillStyleFn) {\n return element.append(\"use\").attr(\"xlink:href\", \"#\".concat(id)).attr(\"class\", this.updatePointClass.bind(this)).style(\"fill\", fillStyleFn).node();\n },\n update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) {\n var $$ = this,\n _element$node$getBBox = element.node().getBBox(),\n width = _element$node$getBBox.width,\n height = _element$node$getBBox.height,\n xPosFn2 = function (d) {\n return xPosFn(d) - width / 2;\n },\n mainCircles = element;\n\n if (withTransition) {\n var transitionName = $$.getTransitionName();\n flow && mainCircles.attr(\"x\", xPosFn2), mainCircles = mainCircles.transition(transitionName), selectedCircles.transition($$.getTransitionName());\n }\n\n return mainCircles.attr(\"x\", xPosFn2).attr(\"y\", function yPosFn2(d) {\n return yPosFn(d) - height / 2;\n }).style(\"opacity\", opacityStyleFn).style(\"fill\", fillStyleFn);\n }\n },\n // 'circle' data point\n circle: {\n create: function create(element, sizeFn, fillStyleFn) {\n return element.append(\"circle\").attr(\"class\", this.updatePointClass.bind(this)).attr(\"r\", sizeFn).style(\"fill\", fillStyleFn).node();\n },\n update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) {\n var $$ = this,\n mainCircles = element;\n\n if ($$.hasType(\"bubble\") && mainCircles.attr(\"r\", $$.pointR.bind($$)), withTransition) {\n var transitionName = $$.getTransitionName();\n flow && mainCircles.attr(\"cx\", xPosFn), mainCircles.attr(\"cx\") && (mainCircles = mainCircles.transition(transitionName)), selectedCircles.transition($$.getTransitionName());\n }\n\n return mainCircles.attr(\"cx\", xPosFn).attr(\"cy\", yPosFn).style(\"opacity\", opacityStyleFn).style(\"fill\", fillStyleFn);\n }\n },\n // 'rectangle' data point\n rectangle: {\n create: function create(element, sizeFn, fillStyleFn) {\n var rectSizeFn = function (d) {\n return sizeFn(d) * 2;\n };\n\n return element.append(\"rect\").attr(\"class\", this.updatePointClass.bind(this)).attr(\"width\", rectSizeFn).attr(\"height\", rectSizeFn).style(\"fill\", fillStyleFn).node();\n },\n update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) {\n var $$ = this,\n r = $$.config.point_r,\n rectXPosFn = function (d) {\n return xPosFn(d) - r;\n },\n mainCircles = element;\n\n if (withTransition) {\n var transitionName = $$.getTransitionName();\n flow && mainCircles.attr(\"x\", rectXPosFn), mainCircles = mainCircles.transition(transitionName), selectedCircles.transition($$.getTransitionName());\n }\n\n return mainCircles.attr(\"x\", rectXPosFn).attr(\"y\", function rectYPosFn(d) {\n return yPosFn(d) - r;\n }).style(\"opacity\", opacityStyleFn).style(\"fill\", fillStyleFn);\n }\n }\n});\n// CONCATENATED MODULE: ./src/shape/radar.js\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n/**\n * Get the position value\n * @param {Boolean} isClockwise If the direction is clockwise\n * @param {String} type Coordinate type 'x' or 'y'\n * @param {Number} edge Number of edge\n * @param {Number} pos The indexed position\n * @param {Number} range\n * @param {Number} ratio\n * @return {number}\n * @private\n */\n\nfunction getPosition(isClockwise, type, edge, pos, range, ratio) {\n var index = isClockwise && pos > 0 ? edge - pos : pos,\n r = 2 * Math.PI,\n func = type === \"x\" ? Math.sin : Math.cos;\n return range * (1 - ratio * func(index * r / edge));\n} // cache key\n\n\nvar radar_cacheKey = \"$radarPoints\";\nextend(ChartInternal_ChartInternal.prototype, {\n initRadar: function initRadar() {\n var $$ = this,\n config = $$.config;\n $$.hasType(\"radar\") && ($$.radars = $$.main.select(\".\".concat(config_classes.chart)).append(\"g\").attr(\"class\", config_classes.chartRadars), $$.radars.levels = $$.radars.append(\"g\").attr(\"class\", config_classes.levels), $$.radars.axes = $$.radars.append(\"g\").attr(\"class\", config_classes.axis), $$.radars.shapes = $$.radars.append(\"g\").attr(\"class\", config_classes.shapes), $$.maxValue = config.radar_axis_max || $$.getMinMaxData().max[0].value);\n },\n getRadarSize: function getRadarSize() {\n var $$ = this,\n config = $$.config,\n padding = config.axis_x_categories.length < 4 ? -20 : 10,\n size = (Math.min($$.arcWidth, $$.arcHeight) - padding) / 2;\n return [size, size];\n },\n updateTargetsForRadar: function updateTargetsForRadar(targets) {\n var $$ = this,\n config = $$.config;\n isEmpty(config.axis_x_categories) && (config.axis_x_categories = getRange(0, getMinMax(\"max\", targets.map(function (v) {\n return v.values.length;\n })))), $$.generateRadarPoints();\n },\n getRadarPosition: function getRadarPosition(type, index, range, ratio) {\n var $$ = this,\n config = $$.config,\n _$$$getRadarSize = $$.getRadarSize(),\n _$$$getRadarSize2 = _slicedToArray(_$$$getRadarSize, 2),\n width = _$$$getRadarSize2[0],\n height = _$$$getRadarSize2[1],\n edge = config.axis_x_categories.length,\n isClockwise = config.radar_direction_clockwise,\n pos = toArray(type).map(function (v) {\n return getPosition(isClockwise, v, edge, index, isDefined(range) ? range : type === \"x\" ? width : height, isNumber(ratio) ? ratio : config.radar_size_ratio);\n });\n\n return pos.length === 1 ? pos[0] : pos;\n },\n\n /**\n * Generate data points\n * @private\n */\n generateRadarPoints: function generateRadarPoints() {\n var $$ = this,\n targets = $$.data.targets,\n _$$$getRadarSize3 = $$.getRadarSize(),\n _$$$getRadarSize4 = _slicedToArray(_$$$getRadarSize3, 2),\n width = _$$$getRadarSize4[0],\n height = _$$$getRadarSize4[1],\n points = $$.getCache(radar_cacheKey) || {},\n size = points._size;\n\n size && (size.width === width || size.height === height) || (targets.forEach(function (d) {\n points[d.id] = d.values.map(function (v, i) {\n return $$.getRadarPosition([\"x\", \"y\"], i, undefined, $$.getRatio(\"radar\", v));\n });\n }), points._size = {\n width: width,\n height: height\n }, $$.addCache(radar_cacheKey, points));\n },\n redrawRadar: function redrawRadar(durationForExit) {\n var $$ = this,\n translate = $$.getTranslate(\"radar\");\n translate && ($$.radars.attr(\"transform\", translate), $$.main.selectAll(\".\".concat(config_classes.circles)).attr(\"transform\", translate), $$.main.select(\".\".concat(config_classes.chartTexts)).attr(\"transform\", translate), $$.generateRadarPoints(), $$.updateRadarLevel(), $$.updateRadarAxes(), $$.updateRadarShape(durationForExit));\n },\n generateGetRadarPoints: function generateGetRadarPoints() {\n var $$ = this,\n points = $$.getCache(radar_cacheKey);\n return function (d, i) {\n var point = points[d.id][i];\n return [point, point, point, point];\n };\n },\n updateRadarLevel: function updateRadarLevel() {\n var $$ = this,\n config = $$.config,\n _$$$getRadarSize5 = $$.getRadarSize(),\n _$$$getRadarSize6 = _slicedToArray(_$$$getRadarSize5, 2),\n width = _$$$getRadarSize6[0],\n height = _$$$getRadarSize6[1],\n depth = config.radar_level_depth,\n edge = config.axis_x_categories.length,\n showText = config.radar_level_text_show,\n radarLevels = $$.radars.levels,\n levelData = getRange(0, depth),\n radius = config.radar_size_ratio * Math.min(width, height),\n levelRatio = levelData.map(function (l) {\n return radius * ((l + 1) / depth);\n }),\n levelTextFormat = config.radar_level_text_format,\n points = levelData.map(function (v) {\n var range = levelRatio[v],\n pos = getRange(0, edge).map(function (i) {\n return $$.getRadarPosition([\"x\", \"y\"], i, range, 1).join(\",\");\n });\n return pos.join(\" \");\n }),\n level = radarLevels.selectAll(\".\".concat(config_classes.level)).data(levelData);\n\n level.exit().remove();\n var levelEnter = level.enter().append(\"g\").attr(\"class\", function (d, i) {\n return \"\".concat(config_classes.level, \" \").concat(config_classes.level, \"-\").concat(i);\n });\n levelEnter.append(\"polygon\").style(\"visibility\", config.radar_level_show ? null : \"hidden\"), showText && (radarLevels.select(\"text\").empty() && radarLevels.append(\"text\").attr(\"dx\", \"-.5em\").attr(\"dy\", \"-.7em\").style(\"text-anchor\", \"end\").text(function () {\n return levelTextFormat(0);\n }), levelEnter.append(\"text\").attr(\"dx\", \"-.5em\").style(\"text-anchor\", \"end\").text(function (d) {\n return levelTextFormat($$.maxValue / levelData.length * (d + 1));\n })), levelEnter.merge(level).attr(\"transform\", function (d) {\n return \"translate(\".concat(width - levelRatio[d], \", \").concat(height - levelRatio[d], \")\");\n }).selectAll(\"polygon\").attr(\"points\", function (d) {\n return points[d];\n }), showText && radarLevels.selectAll(\"text\").attr(\"x\", function (d) {\n return isUndefined(d) ? width : points[d].split(\",\")[0];\n }).attr(\"y\", function (d) {\n return isUndefined(d) ? height : 0;\n });\n },\n updateRadarAxes: function updateRadarAxes() {\n var $$ = this,\n config = $$.config,\n _$$$getRadarSize7 = $$.getRadarSize(),\n _$$$getRadarSize8 = _slicedToArray(_$$$getRadarSize7, 2),\n width = _$$$getRadarSize8[0],\n height = _$$$getRadarSize8[1],\n categories = config.axis_x_categories,\n axis = $$.radars.axes.selectAll(\"g\").data(categories);\n\n axis.exit().remove();\n var axisEnter = axis.enter().append(\"g\").attr(\"class\", function (d, i) {\n return \"\".concat(config_classes.axis, \"-\").concat(i);\n });\n\n // axis text\n if (config.radar_axis_line_show && axisEnter.append(\"line\"), config.radar_axis_text_show && axisEnter.append(\"text\"), axis = axisEnter.merge(axis), config.radar_axis_line_show && axis.select(\"line\").attr(\"x1\", width).attr(\"y1\", height).attr(\"x2\", function (d, i) {\n return $$.getRadarPosition(\"x\", i);\n }).attr(\"y2\", function (d, i) {\n return $$.getRadarPosition(\"y\", i);\n }), config.radar_axis_text_show) {\n var _config$radar_axis_te = config.radar_axis_text_position,\n _config$radar_axis_te2 = _config$radar_axis_te.x,\n x = _config$radar_axis_te2 === void 0 ? 0 : _config$radar_axis_te2,\n _config$radar_axis_te3 = _config$radar_axis_te.y,\n y = _config$radar_axis_te3 === void 0 ? 0 : _config$radar_axis_te3;\n axis.select(\"text\").style(\"text-anchor\", \"middle\").attr(\"dy\", \".5em\").call(function (selection) {\n selection.each(function (d) {\n setTextValue(Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this), d + \"\", [-.6, 1.2]);\n });\n }).datum(function (d, i) {\n return {\n index: i\n };\n }).attr(\"transform\", function (d) {\n isUndefined(this.width) && (this.width = this.getBoundingClientRect().width / 2);\n var posX = $$.getRadarPosition(\"x\", d.index, undefined, 1),\n posY = Math.round($$.getRadarPosition(\"y\", d.index, undefined, 1));\n return posX > width ? posX += this.width + x : Math.round(posX) < width && (posX -= this.width + x), posY > height ? (posY / 2 === height && this.firstChild.tagName === \"tspan\" && this.firstChild.setAttribute(\"dy\", \"0em\"), posY += y) : posY < height && (posY -= y), \"translate(\".concat(posX, \" \").concat(posY, \")\");\n });\n }\n\n $$.bindEvent();\n },\n bindEvent: function bindEvent() {\n var _this = this,\n $$ = this,\n config = $$.config;\n\n if (config.interaction_enabled) {\n var isMouse = $$.inputType === \"mouse\",\n getIndex = function () {\n var target = external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"].target; // in case of multilined axis text\n\n /tspan/i.test(target.tagName) && (target = target.parentNode);\n var d = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(target).datum();\n return d && Object.keys(d).length === 1 ? d.index : undefined;\n },\n hide = function () {\n var index = getIndex(),\n noIndex = isUndefined(index);\n (isMouse || noIndex) && (_this.hideTooltip(), _this.unexpandCircles(), isMouse ? $$.setOverOut(!1, index) : noIndex && $$.callOverOutForTouch());\n };\n\n $$.radars.select(\".\".concat(config_classes.axis)).on(isMouse ? \"mouseover \" : \"touchstart\", function () {\n if (!$$.transiting) // skip while transiting\n {\n var index = getIndex();\n $$.selectRectForSingle($$.svg.node(), null, index), isMouse ? $$.setOverOut(!0, index) : $$.callOverOutForTouch(index);\n }\n }).on(\"mouseout\", isMouse ? hide : null), isMouse || $$.svg.on(\"touchstart\", hide);\n }\n },\n updateRadarShape: function updateRadarShape(durationForExit) {\n var $$ = this,\n targets = $$.data.targets,\n points = $$.getCache(radar_cacheKey),\n areas = $$.radars.shapes.selectAll(\"polygon\").data(targets),\n areasEnter = areas.enter().append(\"g\").attr(\"class\", $$.classChartRadar.bind($$));\n areas.exit().transition().duration(durationForExit).remove(), areasEnter.append(\"polygon\").merge(areas).style(\"fill\", $$.color).style(\"stroke\", $$.color).attr(\"points\", function (d) {\n return points[d.id].join(\" \");\n });\n },\n\n /**\n * Get data point x coordinate\n * @param {Object} d Data object\n * @return {Number}\n * @private\n */\n radarCircleX: function radarCircleX(d) {\n return this.getCache(radar_cacheKey)[d.id][d.index][0];\n },\n\n /**\n * Get data point y coordinate\n * @param {Object} d Data object\n * @return {Number}\n * @private\n */\n radarCircleY: function radarCircleY(d) {\n return this.getCache(radar_cacheKey)[d.id][d.index][1];\n }\n});\n// CONCATENATED MODULE: ./src/internals/text.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Initializes the text\n * @private\n */\n initText: function initText() {\n var $$ = this;\n $$.main.select(\".\".concat(config_classes.chart)).append(\"g\").attr(\"class\", config_classes.chartTexts), $$.mainText = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]);\n },\n\n /**\n * Update chartText\n * @private\n * @param {Object} $$.data.targets\n */\n updateTargetsForText: function updateTargetsForText(targets) {\n var $$ = this,\n classChartText = $$.classChartText.bind($$),\n classTexts = $$.classTexts.bind($$),\n classFocus = $$.classFocus.bind($$),\n mainTextUpdate = $$.main.select(\".\".concat(config_classes.chartTexts)).selectAll(\".\".concat(config_classes.chartText)).data(targets).attr(\"class\", function (d) {\n return classChartText(d) + classFocus(d);\n }),\n mainTextEnter = mainTextUpdate.enter().append(\"g\").attr(\"class\", classChartText).style(\"opacity\", \"0\").style(\"pointer-events\", \"none\");\n mainTextEnter.append(\"g\").attr(\"class\", classTexts);\n },\n\n /**\n * Update text\n * @private\n * @param {Number} Fade-out transition duration\n */\n updateText: function updateText(durationForExit) {\n var _this = this,\n $$ = this,\n config = $$.config,\n dataFn = $$.labelishData.bind($$),\n classText = $$.classText.bind($$);\n\n $$.mainText = $$.main.selectAll(\".\".concat(config_classes.texts)).selectAll(\".\".concat(config_classes.text)).data(function (d) {\n return _this.isRadarType(d) ? d.values : dataFn(d);\n }), $$.mainText.exit().transition().duration(durationForExit).style(\"fill-opacity\", \"0\").remove(), $$.mainText = $$.mainText.enter().append(\"text\").merge($$.mainText).attr(\"class\", classText).attr(\"text-anchor\", function (d) {\n return config.axis_rotated ? d.value < 0 ? \"end\" : \"start\" : \"middle\";\n }).style(\"fill\", $$.updateTextColor.bind($$)).style(\"fill-opacity\", \"0\").text(function (d, i, j) {\n var value = $$.isBubbleZType(d) ? $$.getBubbleZData(d.value, \"z\") : d.value;\n return $$.dataLabelFormat(d.id)(value, d.id, i, j);\n });\n },\n updateTextColor: function updateTextColor(d) {\n var color,\n $$ = this,\n labelColors = $$.config.data_labels_colors;\n return isString(labelColors) ? color = labelColors : isObject(labelColors) && (color = labelColors[d.id]), color || $$.color(d);\n },\n\n /**\n * Redraw chartText\n * @param {Function} x Positioning function for x\n * @param {Function} y Positioning function for y\n * @param {Boolean} forFlow\n * @param {Boolean} withTransition transition is enabled\n * @private\n */\n redrawText: function redrawText(x, y, forFlow, withTransition) {\n var $$ = this,\n t = getRandom(),\n opacityForText = forFlow ? 0 : $$.opacityForText.bind($$);\n // need to return 'true' as of being pushed to the redraw list\n // ref: getRedrawList()\n return $$.mainText.each(function (d, i) {\n var text = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this); // do not apply transition for newly added text elements\n\n (withTransition && text.attr(\"x\") ? text.transition(t) : text).attr(\"x\", x.bind(this)(d, i)).attr(\"y\", y.bind(this)(d, i)).style(\"fill\", $$.updateTextColor.bind($$)).style(\"fill-opacity\", opacityForText);\n }), !0;\n },\n\n /**\n * Gets the getBoundingClientRect value of the element\n * @private\n * @param {HTMLElement|d3.selection} element\n * @param {String} className\n * @returns {Object} value of element.getBoundingClientRect()\n */\n getTextRect: function getTextRect(element, className) {\n var $$ = this,\n base = element.node ? element.node() : element;\n /text/i.test(base.tagName) || (base = base.querySelector(\"text\"));\n var text = base.textContent,\n cacheKey = \"$\".concat(text.replace(/\\W/g, \"_\")),\n rect = $$.getCache(cacheKey);\n return rect || ($$.svg.append(\"text\").style(\"visibility\", \"hidden\").style(\"font\", Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(base).style(\"font\")).classed(className, !0).text(text).call(function (v) {\n rect = getBoundingRect(v.node());\n }).remove(), $$.addCache(cacheKey, rect)), rect;\n },\n\n /**\n * Gets the x or y coordinate of the text\n * @param {Object} indices Indices values\n * @param {Boolean} forX whether or not to x\n * @returns {Number} coordinates\n * @private\n */\n generateXYForText: function generateXYForText(indices, forX) {\n var $$ = this,\n types = Object.keys(indices),\n points = {},\n getter = forX ? $$.getXForText : $$.getYForText;\n return $$.hasType(\"radar\") && types.push(\"radar\"), types.forEach(function (v) {\n points[v] = $$[\"generateGet\".concat(capitalize(v), \"Points\")](indices[v], !1);\n }), function (d, i) {\n var type = $$.isAreaType(d) && \"area\" || $$.isBarType(d) && \"bar\" || $$.isRadarType(d) && \"radar\" || \"line\";\n return getter.call($$, points[type](d, i), d, this);\n };\n },\n\n /**\n * Get centerized text position for bar type data.label.text\n * @private\n * @param {Object} d Data object\n * @param {Array} points Data points position\n * @param {HTMLElement} textElement Data label text element\n * @returns {Number} Position value\n */\n getCenteredTextPos: function getCenteredTextPos(d, points, textElement) {\n var $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated;\n\n if (config.data_labels.centered && $$.isBarType(d)) {\n var rect = getBoundingRect(textElement),\n isPositive = d.value >= 0;\n\n if (isRotated) {\n var w = (isPositive ? points[1][1] - points[0][1] : points[0][1] - points[1][1]) / 2 + rect.width / 2;\n return isPositive ? -w - 3 : w + 2;\n }\n\n var h = (isPositive ? points[0][1] - points[1][1] : points[1][1] - points[0][1]) / 2 + rect.height / 2;\n return isPositive ? h : -h - 2;\n }\n\n return 0;\n },\n\n /**\n * Get data.labels.position value\n * @param {String} id Data id value\n * @param {String} type x | y\n * @return {Number} Position value\n * @private\n */\n getTextPos: function getTextPos(id, type) {\n var pos = this.config.data_labels_position;\n return (id in pos ? pos[id] : pos)[type] || 0;\n },\n\n /**\n * Gets the x coordinate of the text\n * @private\n * @param {Object} points\n * @param {Object} data\n * @param {HTMLElement} element\n * @returns {Number} x coordinate\n */\n getXForText: function getXForText(points, d, textElement) {\n var xPos,\n padding,\n $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated;\n // show labels regardless of the domain if value is null\n if (isRotated ? (padding = $$.isBarType(d) ? 4 : 6, xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1)) : xPos = $$.hasType(\"bar\") ? (points[2][0] + points[0][0]) / 2 : points[0][0], d.value === null) if (xPos > $$.width) {\n var _getBoundingRect = getBoundingRect(textElement),\n width = _getBoundingRect.width;\n\n xPos = $$.width - width;\n } else xPos < 0 && (xPos = 4);\n return isRotated && (xPos += $$.getCenteredTextPos(d, points, textElement)), xPos + $$.getTextPos(d.id, \"x\");\n },\n\n /**\n * Gets the y coordinate of the text\n * @private\n * @param {Object} points\n * @param {Object} data\n * @param {HTMLElement} element\n * @returns {Number} y coordinate\n */\n getYForText: function getYForText(points, d, textElement) {\n var yPos,\n $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n r = config.point_r,\n rect = getBoundingRect(textElement),\n baseY = 3;\n if (isRotated) yPos = (points[0][0] + points[2][0] + rect.height * .6) / 2;else if (yPos = points[2][1], isNumber(r) && r > 5 && ($$.isLineType(d) || $$.isScatterType(d)) && (baseY += config.point_r / 2.3), d.value < 0 || d.value === 0 && !$$.hasPositiveValue && $$.hasNegativeValue) yPos += rect.height + ($$.isBarType(d) ? -baseY : baseY);else {\n var diff = -baseY * 2;\n $$.isBarType(d) ? diff = -baseY : $$.isBubbleType(d) && (diff = baseY), yPos += diff;\n } // show labels regardless of the domain if value is null\n\n if (d.value === null && !isRotated) {\n var boxHeight = rect.height;\n yPos < boxHeight ? yPos = boxHeight : yPos > this.height && (yPos = this.height - 4);\n }\n\n return isRotated || (yPos += $$.getCenteredTextPos(d, points, textElement)), yPos + $$.getTextPos(d.id, \"y\");\n },\n\n /**\n * Calculate if two or more text nodes are overlapping\n * Mark overlapping text nodes with \"text-overlapping\" class\n * @private\n * @param {number} id\n * @param {ChartInternal} $$\n * @param {string} selector\n */\n markOverlapped: function markOverlapped(id, $$, selector) {\n var textNodes = $$.arcs.selectAll(selector),\n filteredTextNodes = textNodes.filter(function (node) {\n return node.data.id !== id;\n }),\n textNode = textNodes.filter(function (node) {\n return node.data.id === id;\n }),\n translate = getTranslation(textNode.node()),\n calcHypo = function (x, y) {\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n };\n\n textNode.node() && filteredTextNodes.each(function () {\n var coordinate = getTranslation(this),\n filteredTextNode = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this),\n nodeForWidth = calcHypo(translate.e, translate.f) > calcHypo(coordinate.e, coordinate.f) ? textNode : filteredTextNode,\n overlapsX = Math.ceil(Math.abs(translate.e - coordinate.e)) < Math.ceil(nodeForWidth.node().getComputedTextLength()),\n overlapsY = Math.ceil(Math.abs(translate.f - coordinate.f)) < parseInt(textNode.style(\"font-size\"), 10);\n filteredTextNode.classed(config_classes.TextOverlapping, overlapsX && overlapsY);\n });\n },\n\n /**\n * Calculate if two or more text nodes are overlapping\n * Remove \"text-overlapping\" class on selected text nodes\n * @private\n * @param {ChartInternal} $$\n * @param {string} selector\n */\n undoMarkOverlapped: function undoMarkOverlapped($$, selector) {\n $$.arcs.selectAll(selector).each(function () {\n Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([this, this.previousSibling]).classed(config_classes.TextOverlapping, !1);\n });\n }\n});\n// CONCATENATED MODULE: ./src/internals/type.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n // defined chart types as category\n\nvar TYPES = {\n Area: [\"area\", \"area-spline\", \"area-spline-range\", \"area-line-range\", \"area-step\"],\n AreaRange: [\"area-spline-range\", \"area-line-range\"],\n Arc: [\"pie\", \"donut\", \"gauge\", \"radar\"],\n Line: [\"line\", \"spline\", \"area\", \"area-spline\", \"area-spline-range\", \"area-line-range\", \"step\", \"area-step\"],\n Step: [\"step\", \"area-step\"],\n Spline: [\"spline\", \"area-spline\", \"area-spline-range\"]\n};\nextend(ChartInternal_ChartInternal.prototype, {\n setTargetType: function setTargetType(targetIds, type) {\n var $$ = this,\n config = $$.config;\n $$.mapToTargetIds(targetIds).forEach(function (id) {\n $$.withoutFadeIn[id] = type === config.data_types[id], config.data_types[id] = type;\n }), targetIds || (config.data_type = type);\n },\n hasType: function hasType(type, targetsValue) {\n var $$ = this,\n types = $$.config.data_types,\n targets = targetsValue || $$.data.targets,\n has = !1;\n return targets && targets.length ? targets.forEach(function (target) {\n var t = types[target.id];\n (t && t.indexOf(type) >= 0 || !t && type === \"line\") && (has = !0);\n }) : Object.keys(types).length ? Object.keys(types).forEach(function (id) {\n types[id] === type && (has = !0);\n }) : has = $$.config.data_type === type, has;\n },\n\n /**\n * Check if contains given chart types\n * @param {String} type Type key\n * @param {Object} targets\n * @param {Array} exclude Excluded types\n * @return {boolean}\n * @private\n */\n hasTypeOf: function hasTypeOf(type, targets) {\n var _this = this,\n exclude = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\n return !TYPES[type].filter(function (v) {\n return exclude.indexOf(v) === -1;\n }).every(function (v) {\n return !_this.hasType(v, targets);\n });\n },\n\n /**\n * Check if given data is certain chart type\n * @param {Object} d Data object\n * @param {String} type chart type\n * @return {Boolean}\n * @private\n */\n isTypeOf: function isTypeOf(d, type) {\n var id = isString(d) ? d : d.id,\n dataType = this.config.data_types[id];\n return isArray(type) ? type.indexOf(dataType) >= 0 : dataType === type;\n },\n\n /**\n * Check if contains arc types chart\n * @param {Object} targets\n * @param {Array} exclude Excluded types\n * @return {boolean}\n * @private\n */\n hasArcType: function hasArcType(targets, exclude) {\n return this.hasTypeOf(\"Arc\", targets, exclude);\n },\n hasMultiArcGauge: function hasMultiArcGauge() {\n return this.hasType(\"gauge\") && this.config.gauge_type === \"multi\";\n },\n isLineType: function isLineType(d) {\n var id = isString(d) ? d : d.id;\n return !this.config.data_types[id] || this.isTypeOf(id, TYPES.Line);\n },\n isStepType: function isStepType(d) {\n return this.isTypeOf(d, TYPES.Step);\n },\n isSplineType: function isSplineType(d) {\n return this.isTypeOf(d, TYPES.Spline);\n },\n isAreaType: function isAreaType(d) {\n return this.isTypeOf(d, TYPES.Area);\n },\n isAreaRangeType: function isAreaRangeType(d) {\n return this.isTypeOf(d, TYPES.AreaRange);\n },\n isBarType: function isBarType(d) {\n return this.isTypeOf(d, \"bar\");\n },\n isBubbleType: function isBubbleType(d) {\n return this.isTypeOf(d, \"bubble\");\n },\n isScatterType: function isScatterType(d) {\n return this.isTypeOf(d, \"scatter\");\n },\n isPieType: function isPieType(d) {\n return this.isTypeOf(d, \"pie\");\n },\n isGaugeType: function isGaugeType(d) {\n return this.isTypeOf(d, \"gauge\");\n },\n isDonutType: function isDonutType(d) {\n return this.isTypeOf(d, \"donut\");\n },\n isRadarType: function isRadarType(d) {\n return this.isTypeOf(d, \"radar\");\n },\n isArcType: function isArcType(d) {\n return this.isPieType(d) || this.isDonutType(d) || this.isGaugeType(d) || this.isRadarType(d);\n },\n // determine if is 'circle' data point\n isCirclePoint: function isCirclePoint() {\n var config = this.config,\n pattern = config.point_pattern;\n return config.point_type === \"circle\" && (!pattern || isArray(pattern) && pattern.length === 0);\n },\n lineData: function lineData(d) {\n return this.isLineType(d) ? [d] : [];\n },\n arcData: function arcData(d) {\n return this.isArcType(d.data) ? [d] : [];\n },\n barData: function barData(d) {\n return this.isBarType(d) ? d.values : [];\n },\n\n /**\n * Get data adapt for data label showing\n * @param {Object} d Data object\n * @return {Array}\n * @private\n */\n labelishData: function labelishData(d) {\n return this.isBarType(d) || this.isLineType(d) || this.isScatterType(d) || this.isBubbleType(d) || this.isRadarType(d) ? d.values : [];\n },\n barLineBubbleData: function barLineBubbleData(d) {\n return this.isBarType(d) || this.isLineType(d) || this.isBubbleType(d) ? d.values : [];\n },\n // https://github.com/d3/d3-shape#curves\n isInterpolationType: function isInterpolationType(type) {\n return [\"basis\", \"basis-closed\", \"basis-open\", \"bundle\", \"cardinal\", \"cardinal-closed\", \"cardinal-open\", \"catmull-rom\", \"catmull-rom-closed\", \"catmull-rom-open\", \"linear\", \"linear-closed\", \"monotone-x\", \"monotone-y\", \"natural\"].indexOf(type) >= 0;\n }\n});\n// CONCATENATED MODULE: ./src/internals/grid.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n // Grid position and text anchor helpers\n\nvar getGridTextAnchor = function (d) {\n return isValue(d.position) || \"end\";\n},\n getGridTextDx = function (d) {\n return d.position === \"start\" ? 4 : d.position === \"middle\" ? 0 : -4;\n},\n getGridTextX = function (isX, width, height) {\n return function (d) {\n var x = isX ? 0 : width;\n return d.position === \"start\" ? x = isX ? -height : 0 : d.position === \"middle\" && (x = (isX ? -height : width) / 2), x;\n };\n};\n\nextend(ChartInternal_ChartInternal.prototype, {\n initGrid: function initGrid() {\n var $$ = this;\n $$.xgrid = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]), $$.initGridLines(), $$.initFocusGrid();\n },\n initGridLines: function initGridLines() {\n var $$ = this,\n config = $$.config;\n (config.grid_x_lines.length || config.grid_y_lines.length) && ($$.gridLines = $$.main.insert(\"g\", \".\".concat(config_classes.chart).concat(config.grid_lines_front ? \" + *\" : \"\")).attr(\"clip-path\", $$.clipPathForGrid).attr(\"class\", \"\".concat(config_classes.grid, \" \").concat(config_classes.gridLines)), $$.gridLines.append(\"g\").attr(\"class\", config_classes.xgridLines), $$.gridLines.append(\"g\").attr(\"class\", config_classes.ygridLines), $$.xgridLines = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]));\n },\n updateXGrid: function updateXGrid(withoutUpdate) {\n var $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n xgridData = $$.generateGridData(config.grid_x_type, $$.x),\n tickOffset = $$.isCategorized() ? $$.xAxis.tickOffset() : 0,\n pos = function (d) {\n return ($$.zoomScale || $$.x)(d) + tickOffset * (isRotated ? -1 : 1);\n };\n\n $$.xgridAttr = isRotated ? {\n \"x1\": 0,\n \"x2\": $$.width,\n \"y1\": pos,\n \"y2\": pos\n } : {\n \"x1\": pos,\n \"x2\": pos,\n \"y1\": 0,\n \"y2\": $$.height\n }, $$.xgrid = $$.main.select(\".\".concat(config_classes.xgrids)).selectAll(\".\".concat(config_classes.xgrid)).data(xgridData), $$.xgrid.exit().remove(), $$.xgrid = $$.xgrid.enter().append(\"line\").attr(\"class\", config_classes.xgrid).merge($$.xgrid), withoutUpdate || $$.xgrid.each(function () {\n var grid = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this);\n Object.keys($$.xgridAttr).forEach(function (id) {\n grid.attr(id, $$.xgridAttr[id]).style(\"opacity\", function () {\n return grid.attr(isRotated ? \"y1\" : \"x1\") === (isRotated ? $$.height : 0) ? \"0\" : \"1\";\n });\n });\n });\n },\n updateYGrid: function updateYGrid() {\n var $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n gridValues = $$.yAxis.tickValues() || $$.y.ticks(config.grid_y_ticks),\n pos = function (d) {\n return Math.ceil($$.y(d));\n };\n\n $$.ygrid = $$.main.select(\".\".concat(config_classes.ygrids)).selectAll(\".\".concat(config_classes.ygrid)).data(gridValues), $$.ygrid.exit().remove(), $$.ygrid = $$.ygrid.enter().append(\"line\").attr(\"class\", config_classes.ygrid).merge($$.ygrid), $$.ygrid.attr(\"x1\", isRotated ? pos : 0).attr(\"x2\", isRotated ? pos : $$.width).attr(\"y1\", isRotated ? 0 : pos).attr(\"y2\", isRotated ? $$.height : pos), $$.smoothLines($$.ygrid, \"grid\");\n },\n updateGrid: function updateGrid(duration) {\n var $$ = this;\n // hide if arc type\n $$.gridLines || $$.initGridLines(), $$.grid.style(\"visibility\", $$.hasArcType() ? \"hidden\" : \"visible\"), $$.hideGridFocus(), $$.updateXGridLines(duration), $$.updateYGridLines(duration);\n },\n\n /**\n * Update X Grid lines\n * @param {Number} duration\n * @private\n */\n updateXGridLines: function updateXGridLines(duration) {\n var $$ = this,\n main = $$.main,\n config = $$.config,\n isRotated = config.axis_rotated;\n config.grid_x_show && $$.updateXGrid(), $$.xgridLines = main.select(\".\".concat(config_classes.xgridLines)).selectAll(\".\".concat(config_classes.xgridLine)).data(config.grid_x_lines), $$.xgridLines.exit().transition().duration(duration).style(\"opacity\", \"0\").remove();\n // enter\n var xgridLine = $$.xgridLines.enter().append(\"g\");\n xgridLine.append(\"line\").style(\"opacity\", \"0\"), xgridLine.append(\"text\").attr(\"transform\", isRotated ? \"\" : \"rotate(-90)\").attr(\"dy\", -5).style(\"opacity\", \"0\"), $$.xgridLines = xgridLine.merge($$.xgridLines), $$.xgridLines.attr(\"class\", function (d) {\n return \"\".concat(config_classes.xgridLine, \" \").concat(d[\"class\"] || \"\").trim();\n }).select(\"text\").attr(\"text-anchor\", getGridTextAnchor).attr(\"dx\", getGridTextDx).transition().duration(duration).text(function (d) {\n return d.text;\n }).transition().style(\"opacity\", \"1\");\n },\n\n /**\n * Update Y Grid lines\n * @param {Number} duration\n * @private\n */\n updateYGridLines: function updateYGridLines(duration) {\n var $$ = this,\n main = $$.main,\n config = $$.config,\n isRotated = config.axis_rotated;\n config.grid_y_show && $$.updateYGrid(), $$.ygridLines = main.select(\".\".concat(config_classes.ygridLines)).selectAll(\".\".concat(config_classes.ygridLine)).data(config.grid_y_lines), $$.ygridLines.exit().transition().duration(duration).style(\"opacity\", \"0\").remove();\n // enter\n var ygridLine = $$.ygridLines.enter().append(\"g\");\n ygridLine.append(\"line\").style(\"opacity\", \"0\"), ygridLine.append(\"text\").attr(\"transform\", isRotated ? \"rotate(-90)\" : \"\").style(\"opacity\", \"0\"), $$.ygridLines = ygridLine.merge($$.ygridLines);\n // update\n var yv = $$.yv.bind($$);\n $$.ygridLines.attr(\"class\", function (d) {\n return \"\".concat(config_classes.ygridLine, \" \").concat(d[\"class\"] || \"\").trim();\n }).select(\"line\").transition().duration(duration).attr(\"x1\", isRotated ? yv : 0).attr(\"x2\", isRotated ? yv : $$.width).attr(\"y1\", isRotated ? 0 : yv).attr(\"y2\", isRotated ? $$.height : yv).transition().style(\"opacity\", \"1\"), $$.ygridLines.select(\"text\").attr(\"text-anchor\", getGridTextAnchor).attr(\"dx\", getGridTextDx).transition().duration(duration).attr(\"dy\", -5).attr(\"x\", getGridTextX(isRotated, $$.width, $$.height)).attr(\"y\", yv).text(function (d) {\n return d.text;\n }).transition().style(\"opacity\", \"1\");\n },\n redrawGrid: function redrawGrid(withTransition) {\n var $$ = this,\n isRotated = $$.config.axis_rotated,\n xv = $$.xv.bind($$),\n lines = $$.xgridLines.select(\"line\"),\n texts = $$.xgridLines.select(\"text\");\n return lines = (withTransition ? lines.transition() : lines).attr(\"x1\", isRotated ? 0 : xv).attr(\"x2\", isRotated ? $$.width : xv).attr(\"y1\", isRotated ? xv : 0).attr(\"y2\", isRotated ? xv : $$.height), texts = (withTransition ? texts.transition() : texts).attr(\"x\", getGridTextX(!isRotated, $$.width, $$.height)).attr(\"y\", xv).text(function (d) {\n return d.text;\n }), [(withTransition ? lines.transition() : lines).style(\"opacity\", \"1\"), (withTransition ? texts.transition() : texts).style(\"opacity\", \"1\")];\n },\n initFocusGrid: function initFocusGrid() {\n var $$ = this,\n config = $$.config,\n isFront = config.grid_front,\n className = \".\".concat(config_classes[isFront && $$.gridLines ? \"gridLines\" : \"chart\"]).concat(isFront ? \" + *\" : \"\");\n $$.grid = $$.main.insert(\"g\", className).attr(\"clip-path\", $$.clipPathForGrid).attr(\"class\", config_classes.grid), config.grid_x_show && $$.grid.append(\"g\").attr(\"class\", config_classes.xgrids), config.grid_y_show && $$.grid.append(\"g\").attr(\"class\", config_classes.ygrids), config.grid_focus_show && ($$.grid.append(\"g\").attr(\"class\", config_classes.xgridFocus).append(\"line\").attr(\"class\", config_classes.xgridFocus), config.grid_focus_y && !config.tooltip_grouped && $$.grid.append(\"g\").attr(\"class\", config_classes.ygridFocus).append(\"line\").attr(\"class\", config_classes.ygridFocus));\n },\n\n /**\n * Show grid focus line\n * @param {Array} selectedData\n * @private\n */\n showGridFocus: function showGridFocus(selectedData) {\n var $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n dataToShow = selectedData.filter(function (d) {\n return d && isValue($$.getBaseValue(d));\n });\n\n // Hide when bubble/scatter/stanford plot exists\n if (!(!config.tooltip_show || dataToShow.length === 0 || $$.hasType(\"bubble\") || $$.hasArcType())) {\n var focusEl = $$.main.selectAll(\"line.\".concat(config_classes.xgridFocus, \", line.\").concat(config_classes.ygridFocus)),\n isEdge = config.grid_focus_edge && !config.tooltip_grouped,\n xx = $$.xx.bind($$);\n focusEl.style(\"visibility\", \"visible\").data(dataToShow.concat(dataToShow)).each(function (d) {\n var xy,\n el = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this),\n pos = {\n x: xx(d),\n y: $$.getYScale(d.id)(d.value)\n };\n if (el.classed(config_classes.xgridFocus)) xy = isRotated ? [null, // x1\n pos.x, // y1\n isEdge ? pos.y : $$.width, // x2\n pos.x // y2\n ] : [pos.x, isEdge ? pos.y : null, pos.x, $$.height];else {\n var isY2 = $$.axis.getId(d.id) === \"y2\";\n xy = isRotated ? [pos.y, // x1\n isEdge && !isY2 ? pos.x : null, // y1\n pos.y, // x2\n isEdge && isY2 ? pos.x : $$.height // y2\n ] : [isEdge && isY2 ? pos.x : null, pos.y, isEdge && !isY2 ? pos.x : $$.width, pos.y];\n }\n [\"x1\", \"y1\", \"x2\", \"y2\"].forEach(function (v, i) {\n return el.attr(v, xy[i]);\n });\n }), $$.smoothLines(focusEl, \"grid\");\n }\n },\n hideGridFocus: function hideGridFocus() {\n var $$ = this;\n $$.inputType === \"mouse\" && $$.main.selectAll(\"line.\".concat(config_classes.xgridFocus, \", line.\").concat(config_classes.ygridFocus)).style(\"visibility\", \"hidden\");\n },\n updateGridFocus: function updateGridFocus() {\n var $$ = this,\n xgridFocus = $$.grid.select(\"line.\".concat(config_classes.xgridFocus));\n\n if (!($$.inputType === \"touch\")) {\n var _isRotated = $$.config.axis_rotated;\n xgridFocus.attr(\"x1\", _isRotated ? 0 : -10).attr(\"x2\", _isRotated ? $$.width : -10).attr(\"y1\", _isRotated ? -10 : 0).attr(\"y2\", _isRotated ? -10 : $$.height);\n } else if (!xgridFocus.empty()) {\n var d = xgridFocus.datum();\n d && $$.showGridFocus([d]);\n } // need to return 'true' as of being pushed to the redraw list\n // ref: getRedrawList()\n\n\n return !0;\n },\n generateGridData: function generateGridData(type, scale) {\n var $$ = this,\n tickNum = $$.main.select(\".\".concat(config_classes.axisX)).selectAll(\".tick\").size(),\n gridData = [];\n\n if (type === \"year\") {\n var xDomain = $$.getXDomain(),\n firstYear = xDomain[0].getFullYear(),\n lastYear = xDomain[1].getFullYear();\n\n for (var i = firstYear; i <= lastYear; i++) gridData.push(new Date(\"\".concat(i, \"-01-01 00:00:00\")));\n } else gridData = scale.ticks(10), gridData.length > tickNum && (gridData = gridData.filter(function (d) {\n return (d + \"\").indexOf(\".\") < 0;\n }));\n\n return gridData;\n },\n getGridFilterToRemove: function getGridFilterToRemove(params) {\n return params ? function (line) {\n var found = !1;\n return (isArray(params) ? params.concat() : [params]).forEach(function (param) {\n (\"value\" in param && line.value === param.value || \"class\" in param && line[\"class\"] === param[\"class\"]) && (found = !0);\n }), found;\n } : function () {\n return !0;\n };\n },\n removeGridLines: function removeGridLines(params, forX) {\n var $$ = this,\n config = $$.config,\n toRemove = $$.getGridFilterToRemove(params),\n classLines = forX ? config_classes.xgridLines : config_classes.ygridLines,\n classLine = forX ? config_classes.xgridLine : config_classes.ygridLine;\n $$.main.select(\".\".concat(classLines)).selectAll(\".\".concat(classLine)).filter(toRemove).transition().duration(config.transition_duration).style(\"opacity\", \"0\").remove();\n var gridLines = \"grid_\".concat(forX ? \"x\" : \"y\", \"_lines\");\n config[gridLines] = config[gridLines].filter(function toShow(line) {\n return !toRemove(line);\n });\n }\n});\n// CONCATENATED MODULE: ./src/internals/tooltip.js\n\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Initializes the tooltip\n * @private\n */\n initTooltip: function initTooltip() {\n var $$ = this,\n config = $$.config,\n bindto = config.tooltip_contents.bindto;\n\n // Show tooltip if needed\n if ($$.tooltip = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(bindto), $$.tooltip.empty() && ($$.tooltip = $$.selectChart.style(\"position\", \"relative\").append(\"div\").attr(\"class\", config_classes.tooltipContainer).style(\"position\", \"absolute\").style(\"pointer-events\", \"none\").style(\"display\", \"none\")), config.tooltip_init_show) {\n if ($$.isTimeSeries() && isString(config.tooltip_init_x)) {\n var i,\n val,\n targets = $$.data.targets[0];\n\n for (config.tooltip_init_x = $$.parseDate(config.tooltip_init_x), i = 0; (val = targets.values[i]) && val.x - config.tooltip_init_x !== 0; i++);\n\n config.tooltip_init_x = i;\n }\n\n $$.tooltip.html($$.getTooltipHTML($$.data.targets.map(function (d) {\n return $$.addName(d.values[config.tooltip_init_x]);\n }), $$.axis.getXAxisTickFormat(), $$.getYFormat($$.hasArcType(null, [\"radar\"])), $$.color)), bindto || $$.tooltip.style(\"top\", config.tooltip_init_position.top).style(\"left\", config.tooltip_init_position.left).style(\"display\", \"block\");\n }\n\n $$.bindTooltipResizePos();\n },\n\n /**\n * Get the tooltip HTML string\n * @param {...any} args\n * @private\n * @return {String} Formatted HTML string\n */\n getTooltipHTML: function getTooltipHTML() {\n for (var _config$tooltip_conte, _$$, $$ = this, config = $$.config, _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];\n\n return isFunction(config.tooltip_contents) ? (_config$tooltip_conte = config.tooltip_contents).call.apply(_config$tooltip_conte, [$$].concat(args)) : (_$$ = $$).getTooltipContent.apply(_$$, args);\n },\n\n /**\n * Returns the tooltip content(HTML string)\n * @param {Object} d data\n * @param {Function} defaultTitleFormat Default title format\n * @param {Function} defaultValueFormat Default format for each data value in the tooltip.\n * @param {Function} color Color function\n * @returns {String} html\n * @private\n */\n getTooltipContent: function getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) {\n var $$ = this,\n config = $$.config,\n titleFormat = config.tooltip_format_title || defaultTitleFormat,\n nameFormat = config.tooltip_format_name || function (name) {\n return name;\n },\n valueFormat = config.tooltip_format_value || ($$.isStackNormalized() ? function (v, ratio) {\n return \"\".concat((ratio * 100).toFixed(2), \"%\");\n } : defaultValueFormat),\n order = config.tooltip_order,\n getRowValue = function (row) {\n return $$.isBubbleZType(row) ? $$.getBubbleZData(row.value, \"z\") : $$.getBaseValue(row);\n },\n getBgColor = $$.levelColor ? function (row) {\n return $$.levelColor(row.value);\n } : function (row) {\n return color(row);\n },\n contents = config.tooltip_contents,\n tplStr = contents.template,\n targetIds = $$.mapToTargetIds();\n\n if (order === null && $$.isGrouped()) {\n // for stacked data, order should aligned with the visually displayed data\n var ids = $$.orderTargets($$.data.targets).map(function (i2) {\n return i2.id;\n }).reverse();\n d.sort(function (a, b) {\n var v1 = a ? a.value : null,\n v2 = b ? b.value : null;\n return v1 > 0 && v2 > 0 && (v1 = a.id ? ids.indexOf(a.id) : null, v2 = b.id ? ids.indexOf(b.id) : null), v1 - v2;\n });\n } else if (/^(asc|desc)$/.test(order)) {\n d.sort(function (a, b) {\n var v1 = a ? getRowValue(a) : null,\n v2 = b ? getRowValue(b) : null;\n return order === \"asc\" ? v1 - v2 : v2 - v1;\n });\n } else isFunction(order) && d.sort(order);\n\n var text,\n row,\n param,\n value,\n i,\n tpl = $$.getTooltipContentTemplate(tplStr),\n len = d.length;\n\n for (i = 0; i < len; i++) if (row = d[i], row && (getRowValue(row) || getRowValue(row) === 0)) {\n if (isUndefined(text)) {\n var title = sanitise(titleFormat ? titleFormat(row.x) : row.x);\n text = tplProcess(tpl[0], {\n CLASS_TOOLTIP: config_classes.tooltip,\n TITLE: isValue(title) ? tplStr ? title : \"<tr><th colspan=\\\"2\\\">\".concat(title, \"</th></tr>\") : \"\"\n });\n }\n\n if (param = [row.ratio, row.id, row.index, d], value = sanitise(valueFormat.apply(void 0, [getRowValue(row)].concat(_toConsumableArray(param)))), $$.isAreaRangeType(row)) {\n var _map = [\"high\", \"low\"].map(function (v) {\n return sanitise(valueFormat.apply(void 0, [$$.getAreaRangeData(row, v)].concat(_toConsumableArray(param))));\n }),\n _map2 = _slicedToArray(_map, 2),\n high = _map2[0],\n low = _map2[1];\n\n value = \"<b>Mid:</b> \".concat(value, \" <b>High:</b> \").concat(high, \" <b>Low:</b> \").concat(low);\n }\n\n if (value !== undefined) {\n var _ret = function () {\n // Skip elements when their name is set to null\n if (row.name === null) return \"continue\";\n var name = sanitise(nameFormat.apply(void 0, [row.name].concat(_toConsumableArray(param)))),\n color = getBgColor(row),\n contentValue = {\n CLASS_TOOLTIP_NAME: config_classes.tooltipName + $$.getTargetSelectorSuffix(row.id),\n COLOR: tplStr || !$$.patterns ? color : \"<svg><rect style=\\\"fill:\".concat(color, \"\\\" width=\\\"10\\\" height=\\\"10\\\"></rect></svg>\"),\n NAME: name,\n VALUE: value\n };\n\n if (tplStr && isObject(contents.text)) {\n var index = targetIds.indexOf(row.id);\n Object.keys(contents.text).forEach(function (key) {\n contentValue[key] = contents.text[key][index];\n });\n }\n\n text += tplProcess(tpl[1], contentValue);\n }();\n\n if (_ret === \"continue\") continue;\n }\n }\n\n return \"\".concat(text, \"</table>\");\n },\n\n /**\n * Get the content template string\n * @param {String} tplStr\n * @return {String} Template string\n * @private\n */\n getTooltipContentTemplate: function getTooltipContentTemplate(tplStr) {\n return (tplStr || \"<table class=\\\"{=CLASS_TOOLTIP}\\\"><tbody>\\n\\t\\t\\t\\t{=TITLE}\\n\\t\\t\\t\\t{{<tr class=\\\"{=CLASS_TOOLTIP_NAME}\\\">\\n\\t\\t\\t\\t\\t<td class=\\\"name\\\">\".concat(this.patterns ? \"{=COLOR}\" : \"<span style=\\\"background-color:{=COLOR}\\\"></span>\", \"{=NAME}</td>\\n\\t\\t\\t\\t\\t<td class=\\\"value\\\">{=VALUE}</td>\\n\\t\\t\\t\\t</tr>}}\\n\\t\\t\\t</tbody></table>\")).replace(/(\\r?\\n|\\t)/g, \"\").split(/{{(.*)}}/);\n },\n\n /**\n * Returns the position of the tooltip\n * @param {Object} dataToShow data\n * @param {String} tWidth Width value of tooltip element\n * @param {String} tHeight Height value of tooltip element\n * @param {HTMLElement} element\n * @returns {Object} top, left value\n * @private\n */\n tooltipPosition: function tooltipPosition(dataToShow, tWidth, tHeight, element) {\n var $$ = this,\n config = $$.config,\n hasGauge = $$.hasType(\"gauge\") && !config.gauge_fullCircle,\n svgLeft = $$.getSvgLeft(!0),\n _d3Mouse = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(element),\n _d3Mouse2 = _slicedToArray(_d3Mouse, 2),\n left = _d3Mouse2[0],\n top = _d3Mouse2[1],\n chartRight = svgLeft + $$.currentWidth - $$.getCurrentPaddingRight(!0),\n chartLeft = $$.getCurrentPaddingLeft(!0),\n size = 20;\n\n // Determine tooltip position\n if (top += size, $$.hasArcType()) {\n var raw = $$.inputType === \"touch\" || $$.hasType(\"radar\");\n raw || (top += hasGauge ? $$.height : $$.height / 2, left += ($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2);\n } else {\n var dataScale = $$.x(dataToShow[0].x);\n config.axis_rotated ? (top = dataScale + size, left += svgLeft + 100, chartRight -= svgLeft) : (top -= 5, left = svgLeft + chartLeft + size + ($$.zoomScale ? left : dataScale));\n } // when tooltip left + tWidth > chart's width\n\n\n left + tWidth + 15 > chartRight && (left -= tWidth + chartLeft), top + tHeight > $$.currentHeight && (top -= hasGauge ? tHeight * 3 : tHeight + 30);\n var pos = {\n top: top,\n left: left\n }; // make sure to not be positioned out of viewport\n\n return Object.keys(pos).forEach(function (v) {\n pos[v] < 0 && (pos[v] = 0);\n }), pos;\n },\n\n /**\n * Show the tooltip\n * @private\n * @param {Object} selectedData\n * @param {HTMLElement} element\n */\n showTooltip: function showTooltip(selectedData, element) {\n var $$ = this,\n config = $$.config,\n bindto = config.tooltip_contents.bindto,\n forArc = $$.hasArcType(null, [\"radar\"]),\n dataToShow = selectedData.filter(function (d) {\n return d && isValue($$.getBaseValue(d));\n });\n\n if (dataToShow.length !== 0 && config.tooltip_show) {\n var datum = $$.tooltip.datum(),\n _ref = datum || {},\n _ref$width = _ref.width,\n width = _ref$width === void 0 ? 0 : _ref$width,\n _ref$height = _ref.height,\n height = _ref$height === void 0 ? 0 : _ref$height,\n dataStr = JSON.stringify(selectedData);\n\n if (!datum || datum.current !== dataStr) {\n var index = selectedData.concat().sort()[0].index;\n callFn(config.tooltip_onshow, $$, $$.api, selectedData), $$.tooltip.html($$.getTooltipHTML(selectedData, $$.axis.getXAxisTickFormat(), $$.getYFormat(forArc), $$.color)).style(\"display\", null).style(\"visibility\", null) // for IE9\n .datum(datum = {\n index: index,\n current: dataStr,\n width: width = $$.tooltip.property(\"offsetWidth\"),\n height: height = $$.tooltip.property(\"offsetHeight\")\n }), callFn(config.tooltip_onshown, $$, $$.api, selectedData), $$._handleLinkedCharts(!0, index);\n }\n\n if (!bindto) {\n var fnPos = config.tooltip_position || $$.tooltipPosition,\n pos = fnPos.call(this, dataToShow, width, height, element); // Get tooltip dimensions\n\n [\"top\", \"left\"].forEach(function (v) {\n var value = pos[v];\n $$.tooltip.style(v, \"\".concat(value, \"px\")), v !== \"left\" || datum.xPosInPercent || (datum.xPosInPercent = value / $$.currentWidth * 100);\n });\n }\n }\n },\n\n /**\n * Adjust tooltip position on resize event\n * @private\n */\n bindTooltipResizePos: function bindTooltipResizePos() {\n var $$ = this,\n resizeFunction = $$.resizeFunction,\n tooltip = $$.tooltip;\n resizeFunction.add(function () {\n if (tooltip.style(\"display\") === \"block\") {\n var currentWidth = $$.currentWidth,\n _tooltip$datum = tooltip.datum(),\n width = _tooltip$datum.width,\n xPosInPercent = _tooltip$datum.xPosInPercent,\n _value = currentWidth / 100 * xPosInPercent,\n diff = currentWidth - (_value + width);\n\n diff < 0 && (_value += diff), tooltip.style(\"left\", \"\".concat(_value, \"px\"));\n }\n });\n },\n\n /**\n * Hide the tooltip\n * @param {Boolean} force Force to hide\n * @private\n */\n hideTooltip: function hideTooltip(force) {\n var $$ = this,\n api = $$.api,\n config = $$.config,\n tooltip = $$.tooltip;\n\n if (tooltip.style(\"display\") !== \"none\" && (!config.tooltip_doNotHide || force)) {\n var selectedData = JSON.parse(this.tooltip.datum().current);\n // hide tooltip\n callFn(config.tooltip_onhide, $$, api, selectedData), tooltip.style(\"display\", \"none\").style(\"visibility\", \"hidden\") // for IE9\n .datum(null), callFn(config.tooltip_onhidden, $$, api, selectedData);\n }\n },\n\n /**\n * Toggle display for linked chart instances\n * @param {Boolean} show true: show, false: hide\n * @param {Number} index x Axis index\n * @private\n */\n _handleLinkedCharts: function _handleLinkedCharts(show, index) {\n var $$ = this;\n\n if ($$.config.tooltip_linked) {\n var linkedName = $$.config.tooltip_linked_name;\n ($$.api.internal.charts || []).forEach(function (c) {\n if (c !== $$.api) {\n var _config = c.internal.config,\n isLinked = _config.tooltip_linked,\n name = _config.tooltip_linked_name,\n isInDom = browser_doc.body.contains(c.element);\n\n if (isLinked && linkedName === name && isInDom) {\n var data = c.internal.tooltip.data()[0],\n isNotSameIndex = index !== (data && data.index);\n\n // prevent throwing error for non-paired linked indexes\n try {\n show && isNotSameIndex ? c.tooltip.show({\n index: index\n }) : !show && c.tooltip.hide();\n } catch (e) {}\n }\n }\n });\n }\n }\n});\n// CONCATENATED MODULE: ./src/internals/legend.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Initialize the legend.\n * @private\n */\n initLegend: function initLegend() {\n var $$ = this,\n config = $$.config;\n $$.legendItemTextBox = {}, $$.legendHasRendered = !1, $$.legend = $$.svg.append(\"g\"), config.legend_show ? ($$.legend.attr(\"transform\", $$.getTranslate(\"legend\")), $$.updateLegend()) : ($$.legend.style(\"visibility\", \"hidden\"), $$.hiddenLegendIds = $$.mapToIds($$.data.targets));\n },\n\n /**\n * Update legend element\n * @param {Array} targetIds ID's of target\n * @param {Object} options withTransform : Whether to use the transform property / withTransitionForTransform: Whether transition is used when using the transform property / withTransition : whether or not to transition.\n * @param {Object} transitions Return value of the generateTransitions\n * @private\n */\n updateLegend: function updateLegend(targetIds, options, transitions) {\n var $$ = this,\n config = $$.config,\n optionz = options || {\n withTransform: !1,\n withTransitionForTransform: !1,\n withTransition: !1\n };\n // toggle legend state\n // Update size and scale\n // Update g positions\n optionz.withTransition = getOption(optionz, \"withTransition\", !0), optionz.withTransitionForTransform = getOption(optionz, \"withTransitionForTransform\", !0), config.legend_contents_bindto && config.legend_contents_template ? $$.updateLegendTemplate() : $$.updateLegendElement(targetIds || $$.mapToIds($$.data.targets), optionz, transitions), $$.legend.selectAll(\".\".concat(config_classes.legendItem)).classed(config_classes.legendItemHidden, function (id) {\n return !$$.isTargetToShow(id);\n }), $$.updateScales(!1, !$$.zoomScale), $$.updateSvgSize(), $$.transformAll(optionz.withTransitionForTransform, transitions), $$.legendHasRendered = !0;\n },\n\n /**\n * Update legend using template option\n * @private\n */\n updateLegendTemplate: function updateLegendTemplate() {\n var $$ = this,\n config = $$.config,\n wrapper = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(config.legend_contents_bindto),\n template = config.legend_contents_template;\n\n if (!wrapper.empty()) {\n var targets = $$.mapToIds($$.data.targets),\n ids = [],\n html = \"\";\n targets.forEach(function (v) {\n var content = isFunction(template) ? template.call($$, v, $$.color(v), $$.api.data(v)[0].values) : tplProcess(template, {\n COLOR: $$.color(v),\n TITLE: v\n });\n content && (ids.push(v), html += content);\n });\n var legendItem = wrapper.html(html).selectAll(function () {\n return this.childNodes;\n }).data(ids);\n $$.setLegendItem(legendItem), $$.legend = wrapper;\n }\n },\n\n /**\n * Update the size of the legend.\n * @private\n * @param {Obejct} size S\n */\n updateSizeForLegend: function updateSizeForLegend(size) {\n var $$ = this,\n config = $$.config,\n width = size.width,\n height = size.height,\n insetLegendPosition = {\n top: $$.isLegendTop ? $$.getCurrentPaddingTop() + config.legend_inset_y + 5.5 : $$.currentHeight - height - $$.getCurrentPaddingBottom() - config.legend_inset_y,\n left: $$.isLegendLeft ? $$.getCurrentPaddingLeft() + config.legend_inset_x + .5 : $$.currentWidth - width - $$.getCurrentPaddingRight() - config.legend_inset_x + .5\n };\n $$.margin3 = {\n top: $$.isLegendRight ? 0 : $$.isLegendInset ? insetLegendPosition.top : $$.currentHeight - height,\n right: NaN,\n bottom: 0,\n left: $$.isLegendRight ? $$.currentWidth - width : $$.isLegendInset ? insetLegendPosition.left : 0\n };\n },\n\n /**\n * Transform Legend\n * @private\n * @param {Boolean} whether or not to transition.\n */\n transformLegend: function transformLegend(withTransition) {\n var $$ = this;\n (withTransition ? $$.legend.transition() : $$.legend).attr(\"transform\", $$.getTranslate(\"legend\"));\n },\n\n /**\n * Update the legend step\n * @private\n * @param {Number} step\n */\n updateLegendStep: function updateLegendStep(step) {\n this.legendStep = step;\n },\n\n /**\n * Update legend item width\n * @private\n * @param {Number} width\n */\n updateLegendItemWidth: function updateLegendItemWidth(w) {\n this.legendItemWidth = w;\n },\n\n /**\n * Update legend item height\n * @private\n * @param {Number} height\n */\n updateLegendItemHeight: function updateLegendItemHeight(h) {\n this.legendItemHeight = h;\n },\n\n /**\n * Update legend item color\n * @private\n * @param {String} id Corresponding data ID value\n * @param {String} color Color value\n */\n updateLegendItemColor: function updateLegendItemColor(id, color) {\n this.legend.select(\".\".concat(config_classes.legendItem, \"-\").concat(id, \" line\")).style(\"stroke\", color);\n },\n\n /**\n * Get the width of the legend\n * @private\n * @return {Number} width\n */\n getLegendWidth: function getLegendWidth() {\n var $$ = this;\n return $$.config.legend_show ? $$.isLegendRight || $$.isLegendInset ? $$.legendItemWidth * ($$.legendStep + 1) : $$.currentWidth : 0;\n },\n\n /**\n * Get the height of the legend\n * @return {Number} height\n * @private\n */\n getLegendHeight: function getLegendHeight() {\n var $$ = this;\n return $$.config.legend_show ? $$.isLegendRight ? $$.currentHeight : Math.max(20, $$.legendItemHeight) * ($$.legendStep + 1) : 0;\n },\n\n /**\n * Get the opacity of the legend\n * @private\n * @param {Object} d3.Select\n * @returns {Number} opacity\n */\n opacityForLegend: function opacityForLegend(legendItem) {\n return legendItem.classed(config_classes.legendItemHidden) ? null : \"1\";\n },\n\n /**\n * Get the opacity of the legend that is unfocused\n * @private\n * @param {Object} legendItem, d3.Select\n * @returns {Number} opacity\n */\n opacityForUnfocusedLegend: function opacityForUnfocusedLegend(legendItem) {\n return legendItem.classed(config_classes.legendItemHidden) ? null : \"0.3\";\n },\n\n /**\n * Toggles the focus of the legend\n * @private\n * @param {Array} ID's of target\n * @param {Boolean} whether or not to focus.\n */\n toggleFocusLegend: function toggleFocusLegend(targetIds, focus) {\n var $$ = this,\n targetIdz = $$.mapToTargetIds(targetIds);\n $$.legend.selectAll(\".\".concat(config_classes.legendItem)).filter(function (id) {\n return targetIdz.indexOf(id) >= 0;\n }).classed(config_classes.legendItemFocused, focus).transition().duration(100).style(\"opacity\", function () {\n return (focus ? $$.opacityForLegend : $$.opacityForUnfocusedLegend).call($$, Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this));\n });\n },\n\n /**\n * Revert the legend to its default state\n * @private\n */\n revertLegend: function revertLegend() {\n var $$ = this;\n $$.legend.selectAll(\".\".concat(config_classes.legendItem)).classed(config_classes.legendItemFocused, !1).transition().duration(100).style(\"opacity\", function () {\n return $$.opacityForLegend(Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this));\n });\n },\n\n /**\n * Shows the legend\n * @private\n * @param {Array} ID's of target\n */\n showLegend: function showLegend(targetIds) {\n var $$ = this,\n config = $$.config;\n config.legend_show || (config.legend_show = !0, $$.legend.style(\"visibility\", \"visible\"), !$$.legendHasRendered && $$.updateLegend()), $$.removeHiddenLegendIds(targetIds), $$.legend.selectAll($$.selectorLegends(targetIds)).style(\"visibility\", \"visible\").transition().style(\"opacity\", function () {\n return $$.opacityForLegend(Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this));\n });\n },\n\n /**\n * Hide the legend\n * @private\n * @param {Array} ID's of target\n */\n hideLegend: function hideLegend(targetIds) {\n var $$ = this,\n config = $$.config;\n config.legend_show && isEmpty(targetIds) && (config.legend_show = !1, $$.legend.style(\"visibility\", \"hidden\")), $$.addHiddenLegendIds(targetIds), $$.legend.selectAll($$.selectorLegends(targetIds)).style(\"opacity\", \"0\").style(\"visibility\", \"hidden\");\n },\n\n /**\n * Clear the LegendItemTextBox cache.\n * @private\n */\n clearLegendItemTextBoxCache: function clearLegendItemTextBoxCache() {\n this.legendItemTextBox = {};\n },\n\n /**\n * Set legend item style & bind events\n * @private\n * @param {d3.selection} item\n */\n setLegendItem: function setLegendItem(item) {\n var $$ = this,\n config = $$.config,\n isTouch = $$.inputType === \"touch\",\n hasGauge = $$.hasType(\"gauge\");\n item.attr(\"class\", function (id) {\n var node = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this),\n itemClass = !node.empty() && node.attr(\"class\") || \"\";\n return itemClass + $$.generateClass(config_classes.legendItem, id);\n }).style(\"visibility\", function (id) {\n return $$.isLegendToShow(id) ? \"visible\" : \"hidden\";\n }).style(\"cursor\", \"pointer\").on(\"click\", function (id) {\n callFn(config.legend_item_onclick, $$, id) || (external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"].altKey ? ($$.api.hide(), $$.api.show(id)) : ($$.api.toggle(id), !isTouch && $$.isTargetToShow(id) ? $$.api.focus(id) : $$.api.revert())), isTouch && $$.hideTooltip();\n }), isTouch || item.on(\"mouseout\", function (id) {\n callFn(config.legend_item_onout, $$, id) || (Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).classed(config_classes.legendItemFocused, !1), hasGauge && $$.undoMarkOverlapped($$, \".\".concat(config_classes.gaugeValue)), $$.api.revert());\n }).on(\"mouseover\", function (id) {\n callFn(config.legend_item_onover, $$, id) || (Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).classed(config_classes.legendItemFocused, !0), hasGauge && $$.markOverlapped(id, $$, \".\".concat(config_classes.gaugeValue)), !$$.transiting && $$.isTargetToShow(id) && $$.api.focus(id));\n });\n },\n\n /**\n * Update the legend\n * @param {Array} targetIds ID's of target\n * @param {Object} options withTransform : Whether to use the transform property / withTransitionForTransform: Whether transition is used when using the transform property / withTransition : whether or not to transition.\n \t * @private\n */\n updateLegendElement: function updateLegendElement(targetIds, options) {\n var xForLegend,\n yForLegend,\n background,\n $$ = this,\n config = $$.config,\n posMin = 10,\n tileWidth = config.legend_item_tile_width + 5,\n maxWidth = 0,\n maxHeight = 0,\n totalLength = 0,\n offsets = {},\n widths = {},\n heights = {},\n margins = [0],\n steps = {},\n step = 0,\n isLegendRightOrInset = $$.isLegendRight || $$.isLegendInset,\n targetIdz = targetIds.filter(function (id) {\n return !isDefined(config.data_names[id]) || config.data_names[id] !== null;\n }),\n withTransition = options.withTransition,\n getTextBox = function (textElement, id) {\n return $$.legendItemTextBox[id] || ($$.legendItemTextBox[id] = $$.getTextRect(textElement, config_classes.legendItem)), $$.legendItemTextBox[id];\n },\n updatePositions = function (textElement, id, index) {\n var margin,\n isLast = index === targetIdz.length - 1,\n box = getTextBox(textElement, id),\n itemWidth = box.width + tileWidth + (isLast && !isLegendRightOrInset ? 0 : 10) + config.legend_padding,\n itemHeight = box.height + 4,\n itemLength = isLegendRightOrInset ? itemHeight : itemWidth,\n areaLength = isLegendRightOrInset ? $$.getLegendHeight() : $$.getLegendWidth(),\n updateValues = function (id2, withoutStep) {\n withoutStep || (margin = (areaLength - totalLength - itemLength) / 2, margin < posMin && (margin = (areaLength - itemLength) / 2, totalLength = 0, step++)), steps[id2] = step, margins[step] = $$.isLegendInset ? 10 : margin, offsets[id2] = totalLength, totalLength += itemLength;\n };\n\n if (index === 0 && (totalLength = 0, step = 0, maxWidth = 0, maxHeight = 0), config.legend_show && !$$.isLegendToShow(id)) return widths[id] = 0, heights[id] = 0, steps[id] = 0, void (offsets[id] = 0);\n widths[id] = itemWidth, heights[id] = itemHeight, (!maxWidth || itemWidth >= maxWidth) && (maxWidth = itemWidth), (!maxHeight || itemHeight >= maxHeight) && (maxHeight = itemHeight);\n var maxLength = isLegendRightOrInset ? maxHeight : maxWidth;\n config.legend_equally ? (Object.keys(widths).forEach(function (id2) {\n return widths[id2] = maxWidth;\n }), Object.keys(heights).forEach(function (id2) {\n return heights[id2] = maxHeight;\n }), margin = (areaLength - maxLength * targetIdz.length) / 2, margin < posMin ? (totalLength = 0, step = 0, targetIdz.forEach(function (id2) {\n return updateValues(id2);\n })) : updateValues(id, !0)) : updateValues(id);\n };\n\n $$.isLegendInset && (step = config.legend_inset_step ? config.legend_inset_step : targetIdz.length, $$.updateLegendStep(step)), $$.isLegendRight ? (xForLegend = function (id) {\n return maxWidth * steps[id];\n }, yForLegend = function (id) {\n return margins[steps[id]] + offsets[id];\n }) : $$.isLegendInset ? (xForLegend = function (id) {\n return maxWidth * steps[id] + 10;\n }, yForLegend = function (id) {\n return margins[steps[id]] + offsets[id];\n }) : (xForLegend = function (id) {\n return margins[steps[id]] + offsets[id];\n }, yForLegend = function (id) {\n return maxHeight * steps[id];\n });\n\n var xForLegendText = function (id, i) {\n return xForLegend(id, i) + 4 + config.legend_item_tile_width;\n },\n xForLegendRect = function (id, i) {\n return xForLegend(id, i);\n },\n x1ForLegendTile = function (id, i) {\n return xForLegend(id, i) - 2;\n },\n x2ForLegendTile = function (id, i) {\n return xForLegend(id, i) - 2 + config.legend_item_tile_width;\n },\n yForLegendText = function (id, i) {\n return yForLegend(id, i) + 9;\n },\n yForLegendRect = function (id, i) {\n return yForLegend(id, i) - 5;\n },\n yForLegendTile = function (id, i) {\n return yForLegend(id, i) + 4;\n },\n pos = -200,\n l = $$.legend.selectAll(\".\".concat(config_classes.legendItem)).data(targetIdz).enter().append(\"g\");\n\n $$.setLegendItem(l), l.append(\"text\").text(function (id) {\n return isDefined(config.data_names[id]) ? config.data_names[id] : id;\n }).each(function (id, i) {\n updatePositions(this, id, i);\n }).style(\"pointer-events\", \"none\").attr(\"x\", isLegendRightOrInset ? xForLegendText : pos).attr(\"y\", isLegendRightOrInset ? pos : yForLegendText), l.append(\"rect\").attr(\"class\", config_classes.legendItemEvent).style(\"fill-opacity\", \"0\").attr(\"x\", isLegendRightOrInset ? xForLegendRect : pos).attr(\"y\", isLegendRightOrInset ? pos : yForLegendRect);\n var usePoint = $$.config.legend_usePoint;\n\n if (usePoint) {\n var ids = [];\n l.append(function (d) {\n var pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];\n ids.indexOf(d) === -1 && ids.push(d);\n var point = pattern[ids.indexOf(d) % pattern.length];\n return point === \"rectangle\" && (point = \"rect\"), browser_doc.createElementNS(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"namespaces\"].svg, $$.hasValidPointType(point) ? point : \"use\");\n }).attr(\"class\", config_classes.legendItemPoint).style(\"fill\", function (d) {\n return $$.color(d);\n }).style(\"pointer-events\", \"none\").attr(\"href\", function (data, idx, selection) {\n var node = selection[idx],\n nodeName = node.nodeName.toLowerCase();\n return nodeName === \"use\" ? \"#\".concat($$.datetimeId, \"-point-\").concat(data) : undefined;\n });\n } else l.append(\"line\").attr(\"class\", config_classes.legendItemTile).style(\"stroke\", $$.color).style(\"pointer-events\", \"none\").attr(\"x1\", isLegendRightOrInset ? x1ForLegendTile : pos).attr(\"y1\", isLegendRightOrInset ? pos : yForLegendTile).attr(\"x2\", isLegendRightOrInset ? x2ForLegendTile : pos).attr(\"y2\", isLegendRightOrInset ? pos : yForLegendTile).attr(\"stroke-width\", config.legend_item_tile_height); // Set background for inset legend\n\n\n background = $$.legend.select(\".\".concat(config_classes.legendBackground, \" rect\")), $$.isLegendInset && maxWidth > 0 && background.size() === 0 && (background = $$.legend.insert(\"g\", \".\".concat(config_classes.legendItem)).attr(\"class\", config_classes.legendBackground).append(\"rect\"));\n var texts = $$.legend.selectAll(\"text\").data(targetIdz).text(function (id) {\n return isDefined(config.data_names[id]) ? config.data_names[id] : id;\n }) // MEMO: needed for update\n .each(function (id, i) {\n updatePositions(this, id, i);\n });\n (withTransition ? texts.transition() : texts).attr(\"x\", xForLegendText).attr(\"y\", yForLegendText);\n var rects = $$.legend.selectAll(\"rect.\".concat(config_classes.legendItemEvent)).data(targetIdz);\n\n if ((withTransition ? rects.transition() : rects).attr(\"width\", function (id) {\n return widths[id];\n }).attr(\"height\", function (id) {\n return heights[id];\n }).attr(\"x\", xForLegendRect).attr(\"y\", yForLegendRect), usePoint) {\n var tiles = $$.legend.selectAll(\".\".concat(config_classes.legendItemPoint)).data(targetIdz);\n (withTransition ? tiles.transition() : tiles).each(function () {\n var radius,\n width,\n height,\n nodeName = this.nodeName.toLowerCase(),\n pointR = $$.config.point_r,\n x = \"x\",\n y = \"y\",\n xOffset = 2,\n yOffset = 2.5;\n\n if (nodeName === \"circle\") {\n var size = pointR * .2;\n x = \"cx\", y = \"cy\", radius = pointR + size, xOffset = pointR * 2, yOffset = -size;\n } else if (nodeName === \"rect\") {\n var _size = pointR * 2.5;\n\n width = _size, height = _size, yOffset = 3;\n }\n\n Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).attr(x, function (d) {\n return x1ForLegendTile(d) + xOffset;\n }).attr(y, function (d) {\n return yForLegendTile(d) - yOffset;\n }).attr(\"r\", radius).attr(\"width\", width).attr(\"height\", height);\n });\n } else {\n var _tiles = $$.legend.selectAll(\"line.\".concat(config_classes.legendItemTile)).data(targetIdz);\n\n (withTransition ? _tiles.transition() : _tiles).style(\"stroke\", $$.levelColor ? function (id) {\n return $$.levelColor($$.cache[id].values[0].value);\n } : $$.color).attr(\"x1\", x1ForLegendTile).attr(\"y1\", yForLegendTile).attr(\"x2\", x2ForLegendTile).attr(\"y2\", yForLegendTile);\n }\n\n background && (withTransition ? background.transition() : background).attr(\"height\", $$.getLegendHeight() - 12).attr(\"width\", maxWidth * (step + 1) + 10), $$.updateLegendItemWidth(maxWidth), $$.updateLegendItemHeight(maxHeight), $$.updateLegendStep(step);\n }\n});\n// CONCATENATED MODULE: ./src/internals/title.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n/**\n * Get the text position\n * @param {String} pos right, left or center\n * @param {Number} width chart width\n * @return {String|Number} text-anchor value or position in pixel\n * @private\n */\n\nvar getTextPos = function () {\n var position,\n pos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"left\",\n width = arguments.length > 1 ? arguments[1] : undefined,\n isNum = isNumber(width);\n return position = pos.indexOf(\"center\") > -1 ? isNum ? width / 2 : \"middle\" : pos.indexOf(\"right\") > -1 ? isNum ? width : \"end\" : isNum ? 0 : \"start\", position;\n};\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Initializes the title\n * @private\n */\n initTitle: function initTitle() {\n var $$ = this;\n\n if ($$.config.title_text) {\n $$.title = $$.svg.append(\"g\");\n var text = $$.title.append(\"text\").style(\"text-anchor\", getTextPos($$.config.title_position)).attr(\"class\", config_classes.title);\n setTextValue(text, $$.config.title_text, [.3, 1.5]);\n }\n },\n\n /**\n * Redraw title\n * @private\n */\n redrawTitle: function redrawTitle() {\n var $$ = this;\n\n if ($$.title) {\n var y = $$.yForTitle.call($$);\n /g/i.test($$.title.node().tagName) ? $$.title.attr(\"transform\", \"translate(\".concat(getTextPos($$.config.title_position, $$.currentWidth), \", \").concat(y, \")\")) : $$.title.attr(\"x\", $$.xForTitle.call($$)).attr(\"y\", y);\n }\n },\n\n /**\n * Returns the x attribute value of the title\n * @private\n * @returns {Number} x attribute value\n */\n xForTitle: function xForTitle() {\n var x,\n $$ = this,\n config = $$.config,\n position = config.title_position || \"left\",\n textRectWidth = $$.getTextRect($$.title, config_classes.title).width;\n return /(right|center)/.test(position) ? (x = $$.currentWidth - textRectWidth, position.indexOf(\"right\") >= 0 ? x = $$.currentWidth - textRectWidth - config.title_padding.right : position.indexOf(\"center\") >= 0 && (x = ($$.currentWidth - textRectWidth) / 2)) : x = config.title_padding.left || 0, x;\n },\n\n /**\n * Returns the y attribute value of the title\n * @private\n * @returns {Number} y attribute value\n */\n yForTitle: function yForTitle() {\n var $$ = this;\n return ($$.config.title_padding.top || 0) + $$.getTextRect($$.title, config_classes.title).height;\n },\n\n /**\n * Get title padding\n * @private\n * @returns {Number} padding value\n */\n getTitlePadding: function getTitlePadding() {\n var $$ = this;\n return $$.yForTitle() + ($$.config.title_padding.bottom || 0);\n }\n});\n// CONCATENATED MODULE: ./src/internals/clip.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n initClip: function initClip() {\n var $$ = this; // MEMO: clipId needs to be unique because it conflicts when multiple charts exist\n\n // Define 'clip-path' attribute values\n $$.clipId = \"\".concat($$.datetimeId, \"-clip\"), $$.clipIdForXAxis = \"\".concat($$.clipId, \"-xaxis\"), $$.clipIdForYAxis = \"\".concat($$.clipId, \"-yaxis\"), $$.clipIdForGrid = \"\".concat($$.clipId, \"-grid\"), $$.clipPath = $$.getClipPath($$.clipId), $$.clipPathForXAxis = $$.getClipPath($$.clipIdForXAxis), $$.clipPathForYAxis = $$.getClipPath($$.clipIdForYAxis), $$.clipPathForGrid = $$.getClipPath($$.clipIdForGrid);\n },\n getClipPath: function getClipPath(id) {\n var $$ = this,\n config = $$.config;\n if (!config.clipPath && /-clip$/.test(id) || !config.axis_x_clipPath && /-clip-xaxis$/.test(id) || !config.axis_y_clipPath && /-clip-yaxis$/.test(id)) return null;\n var isIE9 = !!win.navigator && win.navigator.appVersion.toLowerCase().indexOf(\"msie 9.\") >= 0;\n return \"url(\".concat(isIE9 ? \"\" : browser_doc.URL.split(\"#\")[0], \"#\").concat(id, \")\");\n },\n appendClip: function appendClip(parent, id) {\n return parent.append(\"clipPath\").attr(\"id\", id).append(\"rect\");\n },\n getAxisClipX: function getAxisClipX(forHorizontal) {\n // axis line width + padding for left\n var left = Math.max(30, this.margin.left);\n return forHorizontal ? -(1 + left) : -(left - 1);\n },\n getAxisClipY: function getAxisClipY(forHorizontal) {\n return forHorizontal ? -20 : -this.margin.top;\n },\n getXAxisClipX: function getXAxisClipX() {\n var $$ = this;\n return $$.getAxisClipX(!$$.config.axis_rotated);\n },\n getXAxisClipY: function getXAxisClipY() {\n var $$ = this;\n return $$.getAxisClipY(!$$.config.axis_rotated);\n },\n getYAxisClipX: function getYAxisClipX() {\n var $$ = this;\n return $$.config.axis_y_inner ? -1 : $$.getAxisClipX($$.config.axis_rotated);\n },\n getYAxisClipY: function getYAxisClipY() {\n var $$ = this;\n return $$.getAxisClipY($$.config.axis_rotated);\n },\n getAxisClipWidth: function getAxisClipWidth(forHorizontal) {\n var $$ = this,\n left = Math.max(30, $$.margin.left),\n right = Math.max(30, $$.margin.right);\n // width + axis line width + padding for left/right\n return forHorizontal ? $$.width + 2 + left + right : $$.margin.left + 20;\n },\n getAxisClipHeight: function getAxisClipHeight(forHorizontal) {\n // less than 20 is not enough to show the axis label 'outer' without legend\n return (forHorizontal ? this.margin.bottom : this.margin.top + this.height) + 20;\n },\n getXAxisClipWidth: function getXAxisClipWidth() {\n var $$ = this;\n return $$.getAxisClipWidth(!$$.config.axis_rotated);\n },\n getXAxisClipHeight: function getXAxisClipHeight() {\n var $$ = this;\n return $$.getAxisClipHeight(!$$.config.axis_rotated);\n },\n getYAxisClipWidth: function getYAxisClipWidth() {\n var $$ = this;\n return $$.getAxisClipWidth($$.config.axis_rotated) + ($$.config.axis_y_inner ? 20 : 0);\n },\n getYAxisClipHeight: function getYAxisClipHeight() {\n var $$ = this;\n return $$.getAxisClipHeight($$.config.axis_rotated);\n },\n updateXAxisTickClip: function updateXAxisTickClip() {\n var $$ = this,\n newXAxisHeight = $$.getHorizontalAxisHeight(\"x\");\n\n if ($$.defs && !$$.clipXAxisTickTexts) {\n var clipId = \"\".concat($$.clipId, \"-xaxisticktexts\");\n $$.clipXAxisTickTexts = $$.appendClip($$.defs, clipId), $$.clipPathForXAxisTickTexts = $$.getClipPath(clipId), $$.clipIdForXAxisTickTexts = clipId;\n }\n\n !$$.config.axis_x_tick_multiline && $$.getAxisTickRotate(\"x\") && newXAxisHeight !== $$.xAxisHeight && ($$.setXAxisTickClipWidth(), $$.setXAxisTickTextClipPathWidth()), $$.xAxisHeight = newXAxisHeight;\n },\n setXAxisTickClipWidth: function setXAxisTickClipWidth() {\n var $$ = this,\n config = $$.config,\n xAxisTickRotate = $$.getAxisTickRotate(\"x\");\n\n if (!config.axis_x_tick_multiline && xAxisTickRotate) {\n var sinRotation = Math.sin(Math.PI / 180 * Math.abs(xAxisTickRotate));\n $$.xAxisTickClipPathMaxWidth = ($$.getHorizontalAxisHeight(\"x\") - 20) / sinRotation;\n } else $$.xAxisTickClipPathMaxWidth = null;\n },\n setXAxisTickTextClipPathWidth: function setXAxisTickTextClipPathWidth() {\n var $$ = this;\n $$.svg && $$.svg.select(\"#\".concat($$.clipIdForXAxisTickTexts, \" rect\")).attr(\"width\", $$.xAxisTickClipPathMaxWidth).attr(\"height\", 30);\n }\n});\n// CONCATENATED MODULE: ./src/internals/region.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n // selection\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n initRegion: function initRegion() {\n var $$ = this;\n $$.region = $$.main.append(\"g\").attr(\"clip-path\", $$.clipPath).attr(\"class\", config_classes.regions);\n },\n updateRegion: function updateRegion(duration) {\n var $$ = this,\n config = $$.config;\n // hide if arc type\n // select <g> element\n $$.region.style(\"visibility\", $$.hasArcType() ? \"hidden\" : \"visible\"), $$.mainRegion = $$.main.select(\".\".concat(config_classes.regions)).selectAll(\".\".concat(config_classes.region)).data(config.regions), $$.mainRegion.exit().transition().duration(duration).style(\"opacity\", \"0\").remove(), $$.mainRegion = $$.mainRegion.enter().append(\"g\").merge($$.mainRegion).attr(\"class\", $$.classRegion.bind($$)), $$.mainRegion.append(\"rect\").style(\"fill-opacity\", \"0\");\n },\n redrawRegion: function redrawRegion(withTransition) {\n var $$ = this,\n regions = $$.mainRegion.select(\"rect\");\n return regions = (withTransition ? regions.transition() : regions).attr(\"x\", $$.regionX.bind($$)).attr(\"y\", $$.regionY.bind($$)).attr(\"width\", $$.regionWidth.bind($$)).attr(\"height\", $$.regionHeight.bind($$)), [(withTransition ? regions.transition() : regions).style(\"fill-opacity\", function (d) {\n return isValue(d.opacity) ? d.opacity : \"0.1\";\n }).on(\"end\", function () {\n Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this.parentNode).selectAll(\"rect:not([x])\").remove();\n })];\n },\n getRegionXY: function getRegionXY(type, d) {\n var scale,\n $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n isX = type === \"x\",\n key = \"start\",\n pos = 0;\n return d.axis === \"y\" || d.axis === \"y2\" ? (!isX && (key = \"end\"), (isX ? isRotated : !isRotated) && key in d && (scale = $$[d.axis], pos = scale(d[key]))) : (isX ? !isRotated : isRotated) && key in d && (scale = $$.zoomScale || $$.x, pos = scale($$.isTimeSeries() ? $$.parseDate(d[key]) : d[key])), pos;\n },\n regionX: function regionX(d) {\n return this.getRegionXY(\"x\", d);\n },\n regionY: function regionY(d) {\n return this.getRegionXY(\"y\", d);\n },\n getRegionSize: function getRegionSize(type, d) {\n var scale,\n $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n isWidth = type === \"width\",\n start = $$[isWidth ? \"regionX\" : \"regionY\"](d),\n key = \"end\",\n end = $$[type];\n return d.axis === \"y\" || d.axis === \"y2\" ? (!isWidth && (key = \"start\"), (isWidth ? isRotated : !isRotated) && key in d && (scale = $$[d.axis], end = scale(d[key]))) : (isWidth ? !isRotated : isRotated) && key in d && (scale = $$.zoomScale || $$.x, end = scale($$.isTimeSeries() ? $$.parseDate(d[key]) : d[key])), end < start ? 0 : end - start;\n },\n regionWidth: function regionWidth(d) {\n return this.getRegionSize(\"width\", d);\n },\n regionHeight: function regionHeight(d) {\n return this.getRegionSize(\"height\", d);\n },\n isRegionOnX: function isRegionOnX(d) {\n return !d.axis || d.axis === \"x\";\n }\n});\n// CONCATENATED MODULE: ./src/interactions/drag.js\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Called when dragging.\n * Data points can be selected.\n * @private\n * @param {Object} mouse Object\n */\n drag: function drag(mouse) {\n var $$ = this,\n config = $$.config,\n main = $$.main;\n\n if (!$$.hasArcType() && config.data_selection_enabled && ( // do nothing if not selectable\n !config.zoom_enabled || $$.zoom.altDomain) && config.data_selection_multiple // skip when single selection because drag is used for multiple selection\n ) {\n var _$$$dragStart = _slicedToArray($$.dragStart, 2),\n sx = _$$$dragStart[0],\n sy = _$$$dragStart[1],\n _mouse = _slicedToArray(mouse, 2),\n mx = _mouse[0],\n my = _mouse[1],\n minX = Math.min(sx, mx),\n maxX = Math.max(sx, mx),\n minY = config.data_selection_grouped ? $$.margin.top : Math.min(sy, my),\n maxY = config.data_selection_grouped ? $$.height : Math.max(sy, my);\n\n main.select(\".\".concat(config_classes.dragarea)).attr(\"x\", minX).attr(\"y\", minY).attr(\"width\", maxX - minX).attr(\"height\", maxY - minY), main.selectAll(\".\".concat(config_classes.shapes)).selectAll(\".\".concat(config_classes.shape)).filter(function (d) {\n return config.data_selection_isselectable(d);\n }).each(function (d, i) {\n var toggle,\n shape = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this),\n isSelected = shape.classed(config_classes.SELECTED),\n isIncluded = shape.classed(config_classes.INCLUDED),\n isWithin = !1;\n\n if (shape.classed(config_classes.circle)) {\n var x = shape.attr(\"cx\") * 1,\n y = shape.attr(\"cy\") * 1;\n toggle = $$.togglePoint, isWithin = minX < x && x < maxX && minY < y && y < maxY;\n } else if (shape.classed(config_classes.bar)) {\n var _getPathBox = getPathBox(this),\n _x = _getPathBox.x,\n y = _getPathBox.y,\n width = _getPathBox.width,\n height = _getPathBox.height;\n\n toggle = $$.togglePath, isWithin = !(maxX < _x || _x + width < minX) && !(maxY < y || y + height < minY);\n } else // line/area selection not supported yet\n return;\n\n isWithin ^ isIncluded && (shape.classed(config_classes.INCLUDED, !isIncluded), shape.classed(config_classes.SELECTED, !isSelected), toggle.call($$, !isSelected, shape, d, i));\n });\n }\n },\n\n /**\n * Called when the drag starts.\n * Adds and Shows the drag area.\n * @private\n * @param {Object} mouse Object\n */\n dragstart: function dragstart(mouse) {\n var $$ = this,\n config = $$.config;\n $$.hasArcType() || !config.data_selection_enabled || ($$.dragStart = mouse, $$.main.select(\".\".concat(config_classes.chart)).append(\"rect\").attr(\"class\", config_classes.dragarea).style(\"opacity\", \"0.1\"), $$.setDragStatus(!0));\n },\n\n /**\n * Called when the drag finishes.\n * Removes the drag area.\n * @private\n */\n dragend: function dragend() {\n var $$ = this,\n config = $$.config;\n $$.hasArcType() || !config.data_selection_enabled || ($$.main.select(\".\".concat(config_classes.dragarea)).transition().duration(100).style(\"opacity\", \"0\").remove(), $$.main.selectAll(\".\".concat(config_classes.shape)).classed(config_classes.INCLUDED, !1), $$.setDragStatus(!1));\n },\n setDragStatus: function setDragStatus(isDragging) {\n this.dragging = isDragging;\n }\n});\n// CONCATENATED MODULE: ./src/internals/selection.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Select a point\n * @private\n * @param {Object} target point\n * @param {Object} data\n * @param {Number} index\n */\n selectPoint: function selectPoint(target, d, i) {\n var $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n cx = (isRotated ? $$.circleY : $$.circleX).bind($$),\n cy = (isRotated ? $$.circleX : $$.circleY).bind($$),\n r = $$.pointSelectR.bind($$);\n // add selected-circle on low layer g\n callFn(config.data_onselected, $$.api, d, target.node()), $$.main.select(\".\".concat(config_classes.selectedCircles).concat($$.getTargetSelectorSuffix(d.id))).selectAll(\".\".concat(config_classes.selectedCircle, \"-\").concat(i)).data([d]).enter().append(\"circle\").attr(\"class\", function () {\n return $$.generateClass(config_classes.selectedCircle, i);\n }).attr(\"cx\", cx).attr(\"cy\", cy).attr(\"stroke\", $$.color).attr(\"r\", function (d2) {\n return $$.pointSelectR(d2) * 1.4;\n }).transition().duration(100).attr(\"r\", r);\n },\n\n /**\n * Unelect a point\n * @private\n * @param {Object} target point\n * @param {Object} data\n * @param {Number} index\n */\n unselectPoint: function unselectPoint(target, d, i) {\n var $$ = this;\n // remove selected-circle from low layer g\n callFn($$.config.data_onunselected, $$.api, d, target.node()), $$.main.select(\".\".concat(config_classes.selectedCircles).concat($$.getTargetSelectorSuffix(d.id))).selectAll(\".\".concat(config_classes.selectedCircle, \"-\").concat(i)).transition().duration(100).attr(\"r\", 0).remove();\n },\n\n /**\n * Toggles the selection of points\n * @private\n * @param {Boolean} whether or not to select.\n * @param {Object} target point\n * @param {Object} data\n * @param {Number} index\n */\n togglePoint: function togglePoint(selected, target, d, i) {\n var method = \"\".concat(selected ? \"\" : \"un\", \"selectPoint\");\n this[method](target, d, i);\n },\n\n /**\n * Select a path\n * @private\n * @param {Object} target path\n * @param {Object} data\n */\n selectPath: function selectPath(target, d) {\n var $$ = this,\n config = $$.config;\n callFn(config.data_onselected, $$, d, target.node()), config.interaction_brighten && target.style(\"filter\", \"brightness(1.25)\");\n },\n\n /**\n * Unelect a path\n * @private\n * @param {Object} target path\n * @param {Object} data\n */\n unselectPath: function unselectPath(target, d) {\n var $$ = this,\n config = $$.config;\n callFn(config.data_onunselected, $$, d, target.node()), config.interaction_brighten && target.transition().duration(100).style(\"fill\", function () {\n return $$.color(d);\n });\n },\n\n /**\n * Toggles the selection of lines\n * @private\n * @param {Boolean} whether or not to select.\n * @param {Object} target shape\n * @param {Object} data\n * @param {Number} index\n */\n togglePath: function togglePath(selected, target, d, i) {\n this[\"\".concat(selected ? \"\" : \"un\", \"selectPath\")](target, d, i);\n },\n\n /**\n * Returns the toggle method of the target\n * @private\n * @param {Object} target shape\n * @param {Object} data\n * @returns {Function} toggle method\n */\n getToggle: function getToggle(that, d) {\n var $$ = this;\n return that.nodeName === \"path\" ? $$.togglePath : $$.isStepType(d) ? function () {} : // circle is hidden in step chart, so treat as within the click area\n $$.togglePoint;\n },\n\n /**\n * Toggles the selection of shapes\n * @private\n * @param {Object} target shape\n * @param {Object} data\n * @param {Number} index\n */\n toggleShape: function toggleShape(that, d, i) {\n var toggledShape,\n $$ = this,\n config = $$.config,\n shape = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(that),\n isSelected = shape.classed(config_classes.SELECTED),\n toggle = $$.getToggle(that, d).bind($$);\n\n if (config.data_selection_enabled && config.data_selection_isselectable(d)) {\n if (!config.data_selection_multiple) {\n var selector = \".\".concat(config_classes.shapes);\n config.data_selection_grouped && (selector += $$.getTargetSelectorSuffix(d.id)), $$.main.selectAll(selector).selectAll(\".\".concat(config_classes.shape)).each(function (d, i) {\n var shape = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this);\n shape.classed(config_classes.SELECTED) && (toggledShape = shape, toggle(!1, shape.classed(config_classes.SELECTED, !1), d, i));\n });\n }\n\n toggledShape && toggledShape.node() === shape.node() || (shape.classed(config_classes.SELECTED, !isSelected), toggle(!isSelected, shape, d, i));\n }\n }\n});\n// CONCATENATED MODULE: ./src/interactions/subchart.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Initialize the brush.\n * @private\n */\n initBrush: function initBrush() {\n var $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated;\n $$.brush = isRotated ? Object(external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_[\"brushY\"])() : Object(external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_[\"brushX\"])();\n\n // set \"brush\" event\n var lastDomain,\n timeout,\n brushHandler = function () {\n $$.redrawForBrush();\n },\n getBrushSize = function () {\n var brush = $$.svg.select(\".\".concat(config_classes.brush, \" .overlay\")),\n brushSize = {\n width: 0,\n height: 0\n };\n return brush.size() && (brushSize.width = +brush.attr(\"width\"), brushSize.height = +brush.attr(\"height\")), brushSize[isRotated ? \"width\" : \"height\"];\n };\n\n // set the brush extent\n $$.brush.on(\"start\", function () {\n $$.inputType === \"touch\" && $$.hideTooltip(), brushHandler();\n }).on(\"brush\", brushHandler).on(\"end\", function () {\n lastDomain = $$.x.orgDomain();\n }), $$.brush.updateResize = function () {\n var _this = this;\n\n timeout && clearTimeout(timeout), timeout = setTimeout(function () {\n var selection = _this.getSelection();\n\n lastDomain && Object(external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_[\"brushSelection\"])(selection.node()) && _this.move(selection, lastDomain.map($$.subX.orgScale()));\n }, 0);\n }, $$.brush.update = function () {\n var extent = this.extent()();\n return extent[1].filter(function (v) {\n return isNaN(v);\n }).length === 0 && $$.context && $$.context.select(\".\".concat(config_classes.brush)).call(this), this;\n }, $$.brush.scale = function (scale) {\n var h = config.subchart_size_height || getBrushSize(),\n extent = $$.getExtent();\n // [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner\n // when extent updates, brush selection also be re-applied\n // https://github.com/d3/d3/issues/2918\n !extent && scale.range ? extent = [[0, 0], [scale.range()[1], h]] : isArray(extent) && (extent = extent.map(function (v, i) {\n return [v, i > 0 ? h : i];\n })), isRotated && extent[1].reverse(), this.extent(extent), this.update();\n }, $$.brush.getSelection = function () {\n return $$.context ? $$.context.select(\".\".concat(config_classes.brush)) : Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])([]);\n };\n },\n\n /**\n * Initialize the subchart.\n * @private\n */\n initSubchart: function initSubchart() {\n var $$ = this,\n config = $$.config,\n visibility = config.subchart_show ? \"visible\" : \"hidden\",\n clipId = \"\".concat($$.clipId, \"-subchart\"),\n clipPath = $$.getClipPath(clipId);\n $$.clipIdForSubchart = clipId, $$.appendClip($$.defs, clipId), $$.initBrush(), $$.context = $$.svg.append(\"g\").attr(\"transform\", $$.getTranslate(\"context\"));\n var context = $$.context;\n // Define g for chart area\n // Define g for bar chart area\n // Define g for line chart area\n // Add extent rect for Brush\n // ATTENTION: This must be called AFTER chart added\n // Add Axis\n context.style(\"visibility\", visibility), context.append(\"g\").attr(\"clip-path\", clipPath).attr(\"class\", config_classes.chart), $$.hasType(\"bar\") && context.select(\".\".concat(config_classes.chart)).append(\"g\").attr(\"class\", config_classes.chartBars), context.select(\".\".concat(config_classes.chart)).append(\"g\").attr(\"class\", config_classes.chartLines), context.append(\"g\").attr(\"clip-path\", clipPath).attr(\"class\", config_classes.brush).call($$.brush), $$.axes.subx = context.append(\"g\").attr(\"class\", config_classes.axisX).attr(\"transform\", $$.getTranslate(\"subx\")).attr(\"clip-path\", config.axis_rotated ? \"\" : $$.clipPathForXAxis).style(\"visibility\", config.subchart_axis_x_show ? visibility : \"hidden\");\n },\n\n /**\n * Update sub chart\n * @private\n * @param {Object} $$.data.targets\n */\n updateTargetsForSubchart: function updateTargetsForSubchart(targets) {\n var $$ = this,\n context = $$.context,\n config = $$.config,\n classChartBar = $$.classChartBar.bind($$),\n classBars = $$.classBars.bind($$),\n classChartLine = $$.classChartLine.bind($$),\n classLines = $$.classLines.bind($$),\n classAreas = $$.classAreas.bind($$);\n\n if (config.subchart_show) {\n // -- Bar --//\n var contextBarUpdate = context.select(\".\".concat(config_classes.chartBars)).selectAll(\".\".concat(config_classes.chartBar)).data(targets).attr(\"class\", classChartBar),\n contextBarEnter = contextBarUpdate.enter().append(\"g\").style(\"opacity\", \"0\").attr(\"class\", classChartBar).merge(contextBarUpdate);\n contextBarEnter.append(\"g\").attr(\"class\", classBars);\n // -- Line --//\n var contextLineUpdate = context.select(\".\".concat(config_classes.chartLines)).selectAll(\".\".concat(config_classes.chartLine)).data(targets).attr(\"class\", classChartLine),\n contextLineEnter = contextLineUpdate.enter().append(\"g\").style(\"opacity\", \"0\").attr(\"class\", classChartLine).merge(contextLineUpdate);\n // Lines for each data\n // Area\n // -- Brush --//\n contextLineEnter.append(\"g\").attr(\"class\", classLines), $$.hasType(\"area\") && contextLineEnter.append(\"g\").attr(\"class\", classAreas), context.selectAll(\".\".concat(config_classes.brush, \" rect\")).attr(config.axis_rotated ? \"width\" : \"height\", config.axis_rotated ? $$.width2 : $$.height2);\n }\n },\n\n /**\n * Update the bar of the sub chart\n * @private\n * @param {Object} durationForExit\n */\n updateBarForSubchart: function updateBarForSubchart(durationForExit) {\n var $$ = this;\n $$.contextBar = $$.context.selectAll(\".\".concat(config_classes.bars)).selectAll(\".\".concat(config_classes.bar)).data($$.barData.bind($$)), $$.contextBar.exit().transition().duration(durationForExit).style(\"opacity\", \"0\").remove(), $$.contextBar = $$.contextBar.enter().append(\"path\").attr(\"class\", $$.classBar.bind($$)).style(\"stroke\", \"none\").style(\"fill\", $$.color).merge($$.contextBar).style(\"opacity\", $$.initialOpacity.bind($$));\n },\n\n /**\n * Redraw the bar of the subchart\n * @private\n * @param {String} path in subchart bar\n * @param {Boolean} whether or not to transition.\n * @param {Number} transition duration\n */\n redrawBarForSubchart: function redrawBarForSubchart(drawBarOnSub, withTransition, duration) {\n var contextBar = withTransition ? this.contextBar.transition(getRandom()).duration(duration) : this.contextBar;\n contextBar.attr(\"d\", drawBarOnSub).style(\"opacity\", \"1\");\n },\n\n /**\n * Update the line of the sub chart\n * @private\n * @param {Number} Fade-out transition duration\n */\n updateLineForSubchart: function updateLineForSubchart(durationForExit) {\n var $$ = this;\n $$.contextLine = $$.context.selectAll(\".\".concat(config_classes.lines)).selectAll(\".\".concat(config_classes.line)).data($$.lineData.bind($$)), $$.contextLine.exit().transition().duration(durationForExit).style(\"opacity\", \"0\").remove(), $$.contextLine = $$.contextLine.enter().append(\"path\").attr(\"class\", $$.classLine.bind($$)).style(\"stroke\", $$.color).merge($$.contextLine).style(\"opacity\", $$.initialOpacity.bind($$));\n },\n\n /**\n * Redraw the line of the subchart\n * @private\n * @param {String} path in subchart line\n * @param {Boolean} whether or not to transition\n * @param {Number} transition duration\n */\n redrawLineForSubchart: function redrawLineForSubchart(drawLineOnSub, withTransition, duration) {\n var contextLine = withTransition ? this.contextLine.transition(getRandom()).duration(duration) : this.contextLine;\n contextLine.attr(\"d\", drawLineOnSub).style(\"opacity\", \"1\");\n },\n\n /**\n * Update the area of the sub chart\n * @private\n * @param {Number} Fade-out transition duration\n */\n updateAreaForSubchart: function updateAreaForSubchart(durationForExit) {\n var $$ = this;\n $$.contextArea = $$.context.selectAll(\".\".concat(config_classes.areas)).selectAll(\".\".concat(config_classes.area)).data($$.lineData.bind($$)), $$.contextArea.exit().transition().duration(durationForExit).style(\"opacity\", \"0\").remove(), $$.contextArea = $$.contextArea.enter().append(\"path\").attr(\"class\", $$.classArea.bind($$)).style(\"fill\", $$.color).style(\"opacity\", function () {\n return $$.orgAreaOpacity = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).style(\"opacity\"), \"0\";\n }).merge($$.contextArea).style(\"opacity\", \"0\");\n },\n\n /**\n * Redraw the area of the subchart\n * @private\n * @param {String} path in subchart line\n * @param {Boolean} whether or not to transition\n * @param {Number} transition duration\n */\n redrawAreaForSubchart: function redrawAreaForSubchart(drawAreaOnSub, withTransition, duration) {\n var contextArea = withTransition ? this.contextArea.transition(getRandom()).duration(duration) : this.contextArea;\n contextArea.attr(\"d\", drawAreaOnSub).style(\"fill\", this.color).style(\"opacity\", this.orgAreaOpacity);\n },\n\n /**\n * Redraw subchart.\n * @private\n * @param {Boolean} withSubchart whether or not to show subchart\n * @param {Number} duration duration\n * @param {Object} shape Shape's info\n */\n redrawSubchart: function redrawSubchart(withSubchart, duration, shape) {\n var $$ = this,\n config = $$.config;\n $$.context.style(\"visibility\", config.subchart_show ? \"visible\" : \"hidden\"), config.subchart_show && (external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"] && external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"].type === \"zoom\" && $$.brush.update(), withSubchart && (!brushEmpty($$) && $$.brush.update(), Object.keys(shape.type).forEach(function (v) {\n var name = capitalize(v),\n draw = $$[\"generateDraw\".concat(name)](shape.indices[v], !0);\n $$[\"update\".concat(name, \"ForSubchart\")](duration), $$[\"redraw\".concat(name, \"ForSubchart\")](draw, duration, duration);\n })));\n },\n\n /**\n * Redraw the brush.\n * @private\n */\n redrawForBrush: function redrawForBrush() {\n var $$ = this;\n $$.redraw({\n withTransition: !1,\n withY: $$.config.zoom_rescale,\n withSubchart: !1,\n withUpdateXDomain: !0,\n withDimension: !1\n }), $$.config.subchart_onbrush.call($$.api, $$.x.orgDomain());\n },\n\n /**\n * Transform context\n * @private\n * @param {Boolean} indicates transition is enabled\n * @param {Object} The return value of the generateTransitions method of Axis.\n */\n transformContext: function transformContext(withTransition, transitions) {\n var subXAxis,\n $$ = this;\n transitions && transitions.axisSubX ? subXAxis = transitions.axisSubX : (subXAxis = $$.context.select(\".\".concat(config_classes.axisX)), withTransition && (subXAxis = subXAxis.transition())), $$.context.attr(\"transform\", $$.getTranslate(\"context\")), subXAxis.attr(\"transform\", $$.getTranslate(\"subx\"));\n },\n\n /**\n * Get extent value\n * @private\n * @returns {Array} default extent\n */\n getExtent: function getExtent() {\n var $$ = this,\n extent = $$.config.axis_x_extent;\n return extent && (isFunction(extent) ? extent = extent($$.getXDomain($$.data.targets), $$.subX) : $$.isTimeSeries() && extent.every(isNaN) && (extent = extent.map(function (v) {\n return $$.subX($$.parseDate(v));\n }))), extent;\n }\n});\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-zoom\",\"commonjs2\":\"d3-zoom\",\"amd\":\"d3-zoom\",\"root\":\"d3\"}\nvar external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_ = __webpack_require__(12);\n\n// CONCATENATED MODULE: ./src/interactions/zoom.js\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Initialize zoom.\n * @private\n */\n initZoom: function initZoom() {\n var $$ = this;\n $$.zoomScale = null, $$.generateZoom(), $$.initZoomBehaviour();\n },\n\n /**\n * Bind zoom event\n * @param {Boolean} bind Weather bind or unbound\n * @private\n */\n bindZoomEvent: function bindZoomEvent() {\n var bind = !(arguments.length > 0 && arguments[0] !== undefined) || arguments[0],\n $$ = this,\n zoomEnabled = $$.config.zoom_enabled;\n $$.redrawEventRect();\n var eventRects = $$.main.select(\".\".concat(config_classes.eventRects));\n zoomEnabled && bind ? !$$.config.subchart_show && $$.bindZoomOnEventRect(eventRects, zoomEnabled.type) : bind === !1 && ($$.api.unzoom(), eventRects.on(\".zoom\", null).on(\".drag\", null));\n },\n\n /**\n * Generate zoom\n * @private\n */\n generateZoom: function generateZoom() {\n var $$ = this,\n config = $$.config,\n zoom = Object(external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_[\"zoom\"])().duration(0).on(\"start\", $$.onZoomStart.bind($$)).on(\"zoom\", $$.onZoom.bind($$)).on(\"end\", $$.onZoomEnd.bind($$));\n // get zoom extent\n\n /**\n * Update scale according zoom transform value\n * @param {Object} transform\n * @private\n */\n zoom.orgScaleExtent = function () {\n var extent = config.zoom_extent || [1, 10];\n return [extent[0], Math.max($$.getMaxDataCount() / extent[1], extent[1])];\n }, zoom.updateScaleExtent = function () {\n var ratio = diffDomain($$.x.orgDomain()) / diffDomain($$.getZoomDomain()),\n extent = this.orgScaleExtent();\n return this.scaleExtent([extent[0] * ratio, extent[1] * ratio]), this;\n }, zoom.updateTransformScale = function (transform) {\n $$.orgXScale && $$.orgXScale.range($$.x.range());\n // rescale from the original scale\n var newScale = transform[config.axis_rotated ? \"rescaleY\" : \"rescaleX\"]($$.orgXScale || $$.x),\n domain = $$.trimXDomain(newScale.domain()),\n rescale = config.zoom_rescale;\n newScale.domain(domain, $$.orgXDomain), $$.zoomScale = $$.getCustomizedScale(newScale), $$.xAxis.scale($$.zoomScale), rescale && (!$$.orgXScale && ($$.orgXScale = $$.x.copy()), $$.x.domain(domain));\n }, $$.zoom = zoom;\n },\n\n /**\n * 'start' event listener\n * @private\n */\n onZoomStart: function onZoomStart() {\n var $$ = this,\n event = external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"].sourceEvent;\n event && ($$.zoom.startEvent = event, callFn($$.config.zoom_onzoomstart, $$.api, event));\n },\n\n /**\n * 'zoom' event listener\n * @private\n */\n onZoom: function onZoom() {\n var $$ = this,\n config = $$.config,\n event = external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"],\n sourceEvent = event.sourceEvent;\n\n if (config.zoom_enabled && event.sourceEvent && $$.filterTargetsToShow($$.data.targets).length !== 0 && ($$.zoomScale || !(sourceEvent.type.indexOf(\"touch\") > -1) || sourceEvent.touches.length !== 1)) {\n var isMousemove = sourceEvent.type === \"mousemove\",\n isZoomOut = sourceEvent.wheelDelta < 0,\n transform = event.transform;\n !isMousemove && isZoomOut && $$.x.domain().every(function (v, i) {\n return v !== $$.orgXDomain[i];\n }) && $$.x.domain($$.orgXDomain), $$.zoom.updateTransformScale(transform), $$.isCategorized() && $$.x.orgDomain()[0] === $$.orgXDomain[0] && $$.x.domain([$$.orgXDomain[0] - 1e-10, $$.x.orgDomain()[1]]), $$.redraw({\n withTransition: !1,\n withY: config.zoom_rescale,\n withSubchart: !1,\n withEventRect: !1,\n withDimension: !1\n }), $$.cancelClick = isMousemove, callFn(config.zoom_onzoom, $$.api, $$.zoomScale.domain());\n }\n },\n\n /**\n * 'end' event listener\n * @private\n */\n onZoomEnd: function onZoomEnd() {\n var $$ = this,\n startEvent = $$.zoom.startEvent,\n event = external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"] && external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"].sourceEvent;\n startEvent && startEvent.type.indexOf(\"touch\") > -1 && (startEvent = startEvent.changedTouches[0], event = event.changedTouches[0]);\n // if click, do nothing. otherwise, click interaction will be canceled.\n !startEvent || event && startEvent.clientX === event.clientX && startEvent.clientY === event.clientY || ($$.redrawEventRect(), $$.updateZoom(), callFn($$.config.zoom_onzoomend, $$.api, $$[$$.zoomScale ? \"zoomScale\" : \"subX\"].domain()));\n },\n\n /**\n * Get zoom domain\n * @returns {Array} zoom domain\n \t * @private\n */\n getZoomDomain: function getZoomDomain() {\n var $$ = this,\n config = $$.config,\n _$$$orgXDomain = _slicedToArray($$.orgXDomain, 2),\n min = _$$$orgXDomain[0],\n max = _$$$orgXDomain[1];\n\n return isDefined(config.zoom_x_min) && (min = getMinMax(\"min\", [min, config.zoom_x_min])), isDefined(config.zoom_x_max) && (max = getMinMax(\"max\", [max, config.zoom_x_max])), [min, max];\n },\n\n /**\n * Update zoom\n * @param {Boolean} force Force unzoom\n * @private\n */\n updateZoom: function updateZoom(force) {\n var $$ = this;\n\n if ($$.zoomScale) {\n var zoomDomain = $$.zoomScale.domain(),\n xDomain = $$.subX.domain(),\n delta = .015,\n isfullyShown = (zoomDomain[0] <= xDomain[0] || zoomDomain[0] - delta <= xDomain[0]) && (xDomain[1] <= zoomDomain[1] || xDomain[1] <= zoomDomain[1] - delta);\n (force || isfullyShown) && ($$.xAxis.scale($$.subX), $$.x.domain($$.subX.orgDomain()), $$.zoomScale = null);\n }\n },\n\n /**\n * Attach zoom event on <rect>\n * @private\n */\n bindZoomOnEventRect: function bindZoomOnEventRect(eventRects, type) {\n var $$ = this,\n behaviour = type === \"drag\" ? $$.zoomBehaviour : $$.zoom;\n eventRects.call(behaviour).on(\"dblclick.zoom\", null);\n },\n\n /**\n * Initialize the drag behaviour used for zooming.\n * @private\n */\n initZoomBehaviour: function initZoomBehaviour() {\n var $$ = this,\n config = $$.config,\n isRotated = config.axis_rotated,\n start = 0,\n end = 0,\n zoomRect = null,\n prop = {\n axis: isRotated ? \"y\" : \"x\",\n attr: isRotated ? \"height\" : \"width\",\n index: isRotated ? 1 : 0\n };\n $$.zoomBehaviour = Object(external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_[\"drag\"])().clickDistance(4).on(\"start\", function () {\n $$.setDragStatus(!0), zoomRect || (zoomRect = $$.main.append(\"rect\").attr(\"clip-path\", $$.clipPath).attr(\"class\", config_classes.zoomBrush).attr(\"width\", isRotated ? $$.width : 0).attr(\"height\", isRotated ? 0 : $$.height)), start = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(this)[prop.index], end = start, zoomRect.attr(prop.axis, start).attr(prop.attr, 0), $$.onZoomStart();\n }).on(\"drag\", function () {\n end = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"mouse\"])(this)[prop.index], zoomRect.attr(prop.axis, Math.min(start, end)).attr(prop.attr, Math.abs(end - start));\n }).on(\"end\", function () {\n var _ref,\n scale = $$.zoomScale || $$.x;\n\n if ($$.setDragStatus(!1), zoomRect.attr(prop.axis, 0).attr(prop.attr, 0), start > end && (_ref = [end, start], start = _ref[0], end = _ref[1], _ref), start < 0 && (end += Math.abs(start), start = 0), start !== end) $$.api.zoom([start, end].map(function (v) {\n return scale.invert(v);\n })), $$.onZoomEnd();else if ($$.isMultipleX()) $$.clickHandlerForMultipleXS.bind(this)($$);else {\n var _event = external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"].sourceEvent || external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"event\"],\n _ref2 = \"clientX\" in _event ? [_event.clientX, _event.clientY] : [_event.x, _event.y],\n _ref3 = _slicedToArray(_ref2, 2),\n x = _ref3[0],\n y = _ref3[1],\n target = browser_doc.elementFromPoint(x, y);\n\n $$.clickHandlerForSingleX.bind(target)(Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(target).datum(), $$);\n }\n });\n },\n setZoomResetButton: function setZoomResetButton() {\n var $$ = this,\n config = $$.config,\n resetButton = config.zoom_resetButton;\n resetButton && config.zoom_enabled.type === \"drag\" && ($$.zoom.resetBtn ? $$.zoom.resetBtn.style(\"display\", null) : $$.zoom.resetBtn = $$.selectChart.append(\"div\").classed(config_classes.button, !0).append(\"span\").on(\"click\", function () {\n isFunction(resetButton.onclick) && resetButton.onclick(this), $$.api.unzoom.call($$);\n }).classed(config_classes.buttonZoomReset, !0).text(resetButton.text || \"Reset Zoom\"));\n }\n});\n// CONCATENATED MODULE: ./src/internals/color.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\n\n/**\n * Set pattern's background color\n * (it adds a <rect> element to simulate bg-color)\n * @param {SVGPatternElement} pattern SVG pattern element\n * @param {String} color Color string\n * @param {String} id ID to be set\n * @return {{id: string, node: SVGPatternElement}}\n * @private\n */\n\nvar colorizePattern = function (pattern, color, id) {\n var node = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(pattern.cloneNode(!0));\n return node.attr(\"id\", id).insert(\"rect\", \":first-child\").attr(\"width\", node.attr(\"width\")).attr(\"height\", node.attr(\"height\")).style(\"fill\", color), {\n id: id,\n node: node.node()\n };\n},\n schemeCategory10 = [\"#1f77b4\", \"#ff7f0e\", \"#2ca02c\", \"#d62728\", \"#9467bd\", \"#8c564b\", \"#e377c2\", \"#7f7f7f\", \"#bcbd22\", \"#17becf\"]; // Replacement of d3.schemeCategory10.\n// Contained differently depend on d3 version: v4(d3-scale), v5(d3-scale-chromatic)\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Get color pattern from CSS file\n * CSS should be defined as: background-image: url(\"#00c73c;#fa7171; ...\");\n * @return {Array}\n * @private\n */\n getColorFromCss: function getColorFromCss() {\n var body = browser_doc.body,\n pattern = body[\"__colorPattern__\"];\n\n if (!pattern) {\n var span = browser_doc.createElement(\"span\");\n span.className = config_classes.colorPattern, span.style.display = \"none\", body.appendChild(span);\n var content = win.getComputedStyle(span).backgroundImage;\n span.parentNode.removeChild(span), content.indexOf(\";\") > -1 && (pattern = content.replace(/url[^#]*|[\"'()]|(\\s|%20)/g, \"\").split(\";\").map(function (v) {\n return v.trim().replace(/[\\\"'\\s]/g, \"\");\n }).filter(Boolean), body[\"__colorPattern__\"] = pattern);\n }\n\n return pattern;\n },\n generateColor: function generateColor() {\n var $$ = this,\n config = $$.config,\n colors = config.data_colors,\n callback = config.data_color,\n ids = [],\n pattern = notEmpty(config.color_pattern) ? config.color_pattern : Object(external_commonjs_d3_scale_commonjs2_d3_scale_amd_d3_scale_root_d3_[\"scaleOrdinal\"])($$.getColorFromCss() || schemeCategory10).range(),\n originalColorPattern = pattern;\n\n if (isFunction(config.color_tiles)) {\n var tiles = config.color_tiles(),\n colorizedPatterns = pattern.map(function (p, index) {\n var color = p.replace(/[#\\(\\)\\s,]/g, \"\"),\n id = \"\".concat($$.datetimeId, \"-pattern-\").concat(color, \"-\").concat(index);\n return colorizePattern(tiles[index % tiles.length], p, id);\n }); // Add background color to patterns\n\n pattern = colorizedPatterns.map(function (p) {\n return \"url(#\".concat(p.id, \")\");\n }), $$.patterns = colorizedPatterns;\n }\n\n return function (d) {\n var color,\n id = d.id || d.data && d.data.id || d,\n isLine = $$.isTypeOf(id, [\"line\", \"spline\", \"step\"]) || !$$.config.data_types[id];\n return isFunction(colors[id]) ? color = colors[id](d) : colors[id] ? color = colors[id] : (ids.indexOf(id) < 0 && ids.push(id), color = isLine ? originalColorPattern[ids.indexOf(id) % originalColorPattern.length] : pattern[ids.indexOf(id) % pattern.length], colors[id] = color), isFunction(callback) ? callback(color, d) : color;\n };\n },\n generateLevelColor: function generateLevelColor() {\n var $$ = this,\n config = $$.config,\n colors = config.color_pattern,\n threshold = config.color_threshold,\n asValue = threshold.unit === \"value\",\n max = threshold.max || 100,\n values = threshold.values && threshold.values.length ? threshold.values : [];\n return notEmpty(threshold) ? function (value) {\n var v = asValue ? value : value * 100 / max,\n color = colors[colors.length - 1];\n\n for (var i = 0, l = values.length; i < l; i++) if (v <= values[i]) {\n color = colors[i];\n break;\n }\n\n return color;\n } : null;\n },\n\n /**\n * Set the data over color.\n * When is out, will restore in its previous color value\n * @param {Boolean} isOver true: set overed color, false: restore\n * @param {Number|Object} d target index or data object for Arc type\n * @private\n */\n setOverColor: function setOverColor(isOver, d) {\n var $$ = this,\n config = $$.config,\n onover = config.color_onover,\n color = isOver ? onover : $$.color;\n isObject(color) ? color = function (_ref) {\n var id = _ref.id;\n return id in onover ? onover[id] : $$.color(id);\n } : isString(color) && (color = function () {\n return onover;\n }), isObject(d) ? $$.main.selectAll(\".\".concat(config_classes.arc).concat($$.getTargetSelectorSuffix(d.id))).style(\"fill\", color(d)) : $$.main.selectAll(\".\".concat(config_classes.shape, \"-\").concat(d)).style(\"fill\", color);\n }\n});\n// CONCATENATED MODULE: ./src/internals/format.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\nvar getFormat = function ($$, typeValue, v) {\n var config = $$.config,\n type = \"axis_\".concat(typeValue, \"_tick_format\"),\n format = config[type] ? config[type] : $$.defaultValueFormat;\n return format(v);\n};\n\nextend(ChartInternal_ChartInternal.prototype, {\n getYFormat: function getYFormat(forArc) {\n var $$ = this,\n formatForY = $$.yFormat,\n formatForY2 = $$.y2Format;\n return forArc && !$$.hasType(\"gauge\") && (formatForY = $$.defaultArcValueFormat, formatForY2 = $$.defaultArcValueFormat), function (v, ratio, id) {\n var format = $$.axis.getId(id) === \"y2\" ? formatForY2 : formatForY;\n return format.call($$, v, ratio);\n };\n },\n yFormat: function yFormat(v) {\n return getFormat(this, \"y\", v);\n },\n y2Format: function y2Format(v) {\n return getFormat(this, \"y2\", v);\n },\n defaultValueFormat: function defaultValueFormat(v) {\n return isValue(v) ? +v : \"\";\n },\n defaultArcValueFormat: function defaultArcValueFormat(v, ratio) {\n return \"\".concat((ratio * 100).toFixed(1), \"%\");\n },\n dataLabelFormat: function dataLabelFormat(targetId) {\n var $$ = this,\n dataLabels = $$.config.data_labels,\n defaultFormat = function (v) {\n return isValue(v) ? +v : \"\";\n },\n format = defaultFormat;\n\n return isFunction(dataLabels.format) ? format = dataLabels.format : isObjectType(dataLabels.format) && (dataLabels.format[targetId] ? format = dataLabels.format[targetId] === !0 ? defaultFormat : dataLabels.format[targetId] : format = function () {\n return \"\";\n }), format;\n }\n});\n// CONCATENATED MODULE: ./src/internals/cache.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n /**\n * Add cache\n * @param {String} key\n * @param {*} value\n * @param {Boolean} isDataType\n * @private\n */\n addCache: function addCache(key, value) {\n var isDataType = !!(arguments.length > 2 && arguments[2] !== undefined) && arguments[2];\n this.cache[key] = isDataType ? this.cloneTarget(value) : value;\n },\n\n /**\n * Remove cache\n * @param {String|Array} key\n * @private\n */\n removeCache: function removeCache(key) {\n var _this = this;\n\n toArray(key).forEach(function (v) {\n return delete _this.cache[v];\n });\n },\n\n /**\n * Get cahce\n * @param {String|Array} key\n * @param {Boolean} isDataType\n * @return {*}\n * @private\n */\n getCache: function getCache(key) {\n var isDataType = !!(arguments.length > 1 && arguments[1] !== undefined) && arguments[1];\n\n if (isDataType) {\n var targets = [];\n\n for (var id, i = 0; id = key[i]; i++) id in this.cache && targets.push(this.cloneTarget(this.cache[id]));\n\n return targets;\n }\n\n return this.cache[key] || null;\n },\n\n /**\n * reset cached data\n * @param {Boolean} all true: reset all data, false: reset only '$' prefixed key data\n * @private\n \t */\n resetCache: function resetCache(all) {\n var $$ = this;\n\n for (var x in $$.cache) (all || /^\\$/.test(x)) && ($$.cache[x] = null);\n }\n});\n// CONCATENATED MODULE: ./src/internals/class.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\nextend(ChartInternal_ChartInternal.prototype, {\n generateClass: function generateClass(prefix, targetId) {\n return \" \".concat(prefix, \" \").concat(prefix + this.getTargetSelectorSuffix(targetId));\n },\n classText: function classText(d) {\n return this.generateClass(config_classes.text, d.index);\n },\n classTexts: function classTexts(d) {\n return this.generateClass(config_classes.texts, d.id);\n },\n classShape: function classShape(d) {\n return this.generateClass(config_classes.shape, d.index);\n },\n classShapes: function classShapes(d) {\n return this.generateClass(config_classes.shapes, d.id);\n },\n generateExtraLineClass: function generateExtraLineClass() {\n var $$ = this,\n classes = $$.config.line_classes || [],\n ids = [];\n return function (d) {\n var id = d.id || d.data && d.data.id || d;\n return ids.indexOf(id) < 0 && ids.push(id), classes[ids.indexOf(id) % classes.length];\n };\n },\n classLine: function classLine(d) {\n return this.classShape(d) + this.generateClass(config_classes.line, d.id);\n },\n classLines: function classLines(d) {\n return this.classShapes(d) + this.generateClass(config_classes.lines, d.id);\n },\n classCircle: function classCircle(d) {\n return this.classShape(d) + this.generateClass(config_classes.circle, d.index);\n },\n classCircles: function classCircles(d) {\n return this.classShapes(d) + this.generateClass(config_classes.circles, d.id);\n },\n classBar: function classBar(d) {\n return this.classShape(d) + this.generateClass(config_classes.bar, d.index);\n },\n classBars: function classBars(d) {\n return this.classShapes(d) + this.generateClass(config_classes.bars, d.id);\n },\n classArc: function classArc(d) {\n return this.classShape(d.data) + this.generateClass(config_classes.arc, d.data.id);\n },\n classArcs: function classArcs(d) {\n return this.classShapes(d.data) + this.generateClass(config_classes.arcs, d.data.id);\n },\n classArea: function classArea(d) {\n return this.classShape(d) + this.generateClass(config_classes.area, d.id);\n },\n classAreas: function classAreas(d) {\n return this.classShapes(d) + this.generateClass(config_classes.areas, d.id);\n },\n classRegion: function classRegion(d, i) {\n return \"\".concat(this.generateClass(config_classes.region, i), \" \").concat(\"class\" in d ? d[\"class\"] : \"\");\n },\n classEvent: function classEvent(d) {\n return this.generateClass(config_classes.eventRect, d.index);\n },\n classTarget: function classTarget(id) {\n var additionalClassSuffix = this.config.data_classes[id],\n additionalClass = \"\";\n return additionalClassSuffix && (additionalClass = \" \".concat(config_classes.target, \"-\").concat(additionalClassSuffix)), this.generateClass(config_classes.target, id) + additionalClass;\n },\n classFocus: function classFocus(d) {\n return this.classFocused(d) + this.classDefocused(d);\n },\n classFocused: function classFocused(d) {\n return \" \".concat(this.focusedTargetIds.indexOf(d.id) >= 0 ? config_classes.focused : \"\");\n },\n classDefocused: function classDefocused(d) {\n return \" \".concat(this.defocusedTargetIds.indexOf(d.id) >= 0 ? config_classes.defocused : \"\");\n },\n classChartText: function classChartText(d) {\n return config_classes.chartText + this.classTarget(d.id);\n },\n classChartLine: function classChartLine(d) {\n return config_classes.chartLine + this.classTarget(d.id);\n },\n classChartBar: function classChartBar(d) {\n return config_classes.chartBar + this.classTarget(d.id);\n },\n classChartArc: function classChartArc(d) {\n return config_classes.chartArc + this.classTarget(d.data.id);\n },\n classChartRadar: function classChartRadar(d) {\n return config_classes.chartRadar + this.classTarget(d.id);\n },\n getTargetSelectorSuffix: function getTargetSelectorSuffix(targetId) {\n return targetId || targetId === 0 ? \"-\".concat(targetId).replace(/[\\s?!@#$%^&*()_=+,.<>'\":;\\[\\]\\/|~`{}\\\\]/g, \"-\") : \"\";\n },\n selectorTarget: function selectorTarget(id, prefix) {\n return \"\".concat(prefix || \"\", \".\").concat(config_classes.target + this.getTargetSelectorSuffix(id));\n },\n selectorTargets: function selectorTargets(idsValue, prefix) {\n var $$ = this,\n ids = idsValue || [];\n return ids.length ? ids.map(function (id) {\n return $$.selectorTarget(id, prefix);\n }) : null;\n },\n selectorLegend: function selectorLegend(id) {\n return \".\".concat(config_classes.legendItem + this.getTargetSelectorSuffix(id));\n },\n selectorLegends: function selectorLegends(ids) {\n var $$ = this;\n return ids && ids.length ? ids.map(function (id) {\n return $$.selectorLegend(id);\n }) : null;\n }\n});\n// CONCATENATED MODULE: ./src/api/api.focus.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\nextend(Chart_Chart.prototype, {\n /**\n * This API highlights specified targets and fade out the others.<br><br>\n * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be highlighted.\n * @method focus\n * @instance\n * @memberof Chart\n * @param {String|Array} targetIdsValue Target ids to be highlighted.\n * @example\n * // data1 will be highlighted and the others will be faded out\n * chart.focus(\"data1\");\n *\n * // data1 and data2 will be highlighted and the others will be faded out\n * chart.focus([\"data1\", \"data2\"]);\n *\n * // all targets will be highlighted\n * chart.focus();\n */\n focus: function focus(targetIdsValue) {\n var $$ = this.internal,\n targetIds = $$.mapToTargetIds(targetIdsValue),\n candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));\n this.revert(), this.defocus(), candidates.classed(config_classes.focused, !0).classed(config_classes.defocused, !1), $$.hasArcType() && ($$.expandArc(targetIds), $$.hasType(\"gauge\") && $$.markOverlapped(targetIdsValue, $$, \".\".concat(config_classes.gaugeValue))), $$.toggleFocusLegend(targetIds, !0), $$.focusedTargetIds = targetIds, $$.defocusedTargetIds = $$.defocusedTargetIds.filter(function (id) {\n return targetIds.indexOf(id) < 0;\n });\n },\n\n /**\n * This API fades out specified targets and reverts the others.<br><br>\n * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be faded out.\n * @method defocus\n * @instance\n * @memberof Chart\n * @param {String|Array} Target ids to be faded out.\n * @example\n * // data1 will be faded out and the others will be reverted.\n * chart.defocus(\"data1\");\n *\n * // data1 and data2 will be faded out and the others will be reverted.\n * chart.defocus([\"data1\", \"data2\"]);\n *\n * // all targets will be faded out.\n * chart.defocus();\n */\n defocus: function defocus(targetIdsValue) {\n var $$ = this.internal,\n targetIds = $$.mapToTargetIds(targetIdsValue),\n candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));\n candidates.classed(config_classes.focused, !1).classed(config_classes.defocused, !0), $$.hasArcType() && ($$.unexpandArc(targetIds), $$.hasType(\"gauge\") && $$.undoMarkOverlapped($$, \".\".concat(config_classes.gaugeValue))), $$.toggleFocusLegend(targetIds, !1), $$.focusedTargetIds = $$.focusedTargetIds.filter(function (id) {\n return targetIds.indexOf(id) < 0;\n }), $$.defocusedTargetIds = targetIds;\n },\n\n /**\n * This API reverts specified targets.<br><br>\n * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be reverted.\n * @method revert\n * @instance\n * @memberof Chart\n * @param {String|Array} Target ids to be reverted\n * @example\n * // data1 will be reverted.\n * chart.revert(\"data1\");\n *\n * // data1 and data2 will be reverted.\n * chart.revert([\"data1\", \"data2\"]);\n *\n * // all targets will be reverted.\n * chart.revert();\n */\n revert: function revert(targetIdsValue) {\n var $$ = this.internal,\n targetIds = $$.mapToTargetIds(targetIdsValue),\n candidates = $$.svg.selectAll($$.selectorTargets(targetIds));\n // should be for all targets\n candidates.classed(config_classes.focused, !1).classed(config_classes.defocused, !1), $$.hasArcType() && $$.unexpandArc(targetIds), $$.config.legend_show && ($$.showLegend(targetIds.filter($$.isLegendToShow.bind($$))), $$.legend.selectAll($$.selectorLegends(targetIds)).filter(function () {\n return Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).classed(config_classes.legendItemFocused);\n }).classed(config_classes.legendItemFocused, !1)), $$.focusedTargetIds = [], $$.defocusedTargetIds = [];\n }\n});\n// CONCATENATED MODULE: ./src/api/api.show.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\nextend(Chart_Chart.prototype, {\n /**\n * Show/Hide data series\n * @private\n */\n _showHide: function _showHide(show, targetIdsValue, options) {\n var $$ = this.internal,\n targetIds = $$.mapToTargetIds(targetIdsValue);\n $$[\"\".concat(show ? \"remove\" : \"add\", \"HiddenTargetIds\")](targetIds);\n var targets = $$.svg.selectAll($$.selectorTargets(targetIds)),\n opacity = show ? \"1\" : \"0\";\n targets.transition().style(\"opacity\", opacity, \"important\").call($$.endall, function () {\n targets.style(\"opacity\", null).style(\"opacity\", opacity);\n }), options.withLegend && $$[\"\".concat(show ? \"show\" : \"hide\", \"Legend\")](targetIds), $$.redraw({\n withUpdateOrgXDomain: !0,\n withUpdateXDomain: !0,\n withLegend: !0\n });\n },\n\n /**\n * Show data series on chart\n * @method show\n * @instance\n * @memberof Chart\n * @param {String|Array} [targetIdsValue=all] The target id value.\n * @param {Object} [options] The object can consist with following members:<br>\n *\n * | Key | Type | default | Description |\n * | --- | --- | --- | --- |\n * | withLegend | Boolean | false | whether or not display legend |\n *\n * @example\n * // show 'data1'\n * chart.show(\"data1\");\n *\n * // show 'data1' and 'data3'\n * chart.show([\"data1\", \"data3\"]);\n */\n show: function show(targetIdsValue) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n this._showHide(!0, targetIdsValue, options);\n },\n\n /**\n * Hide data series from chart\n * @method hide\n * @instance\n * @memberof Chart\n * @param {String|Array} [targetIdsValue=all] The target id value.\n * @param {Object} [options] The object can consist with following members:<br>\n *\n * | Key | Type | default | Description |\n * | --- | --- | --- | --- |\n * | withLegend | Boolean | false | whether or not display legend |\n *\n * @example\n * // hide 'data1'\n * chart.hide(\"data1\");\n *\n * // hide 'data1' and 'data3'\n * chart.hide([\"data1\", \"data3\"]);\n */\n hide: function hide(targetIdsValue) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n this._showHide(!1, targetIdsValue, options);\n },\n\n /**\n * Toggle data series on chart. When target data is hidden, it will show. If is shown, it will hide in vice versa.\n * @method toggle\n * @instance\n * @memberof Chart\n * @param {String|Array} [targetIdsValue=all] The target id value.\n * @param {Object} [options] The object can consist with following members:<br>\n *\n * | Key | Type | default | Description |\n * | --- | --- | --- | --- |\n * | withLegend | Boolean | false | whether or not display legend |\n *\n * @example\n * // toggle 'data1'\n * chart.toggle(\"data1\");\n *\n * // toggle 'data1' and 'data3'\n * chart.toggle([\"data1\", \"data3\"]);\n */\n toggle: function toggle(targetIds) {\n var _this = this,\n options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n $$ = this.internal,\n targets = {\n show: [],\n hide: []\n };\n\n // sort show & hide target ids\n // perform show & hide task separately\n // https://github.com/naver/billboard.js/issues/454\n $$.mapToTargetIds(targetIds).forEach(function (id) {\n return targets[$$.isTargetToShow(id) ? \"hide\" : \"show\"].push(id);\n }), targets.show.length && this.show(targets.show, options), targets.hide.length && setTimeout(function () {\n return _this.hide(targets.hide, options);\n }, 0);\n }\n});\n// CONCATENATED MODULE: ./src/api/api.zoom.js\n\n\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n/**\n * Check if the given domain is within zoom range\n * @param {Array} domain\n * @return {Boolean}\n * @private\n */\n\nvar withinRange = function (domain, range) {\n var _range = _slicedToArray(range, 2),\n min = _range[0],\n max = _range[1];\n\n return domain.every(function (v, i) {\n return i === 0 ? v >= min : v <= max;\n });\n},\n api_zoom_zoom = function (domainValue) {\n var resultDomain,\n $$ = this.internal,\n domain = domainValue;\n\n if ($$.config.zoom_enabled && domain && withinRange(domain, $$.getZoomDomain())) {\n var isTimeSeries = $$.isTimeSeries();\n\n if (isTimeSeries && (domain = domain.map(function (x) {\n return $$.parseDate(x);\n })), $$.config.subchart_show) {\n var xScale = $$.zoomScale || $$.x;\n $$.brush.getSelection().call($$.brush.move, [xScale(domain[0]), xScale(domain[1])]), resultDomain = domain;\n } else $$.x.domain(domain), $$.zoomScale = $$.x, $$.xAxis.scale($$.zoomScale), resultDomain = $$.zoomScale.orgDomain();\n\n $$.redraw({\n withTransition: !0,\n withY: $$.config.zoom_rescale,\n withDimension: !1\n }), $$.setZoomResetButton(), callFn($$.config.zoom_onzoom, $$.api, resultDomain);\n } else resultDomain = $$.zoomScale ? $$.zoomScale.domain() : $$.x.orgDomain();\n\n return resultDomain;\n};\n/**\n * Zoom by giving x domain.\n * - **NOTE:**\n * - For `wheel` type zoom, the minimum zoom range will be set as the given domain. To get the initial state, [.unzoom()](#unzoom) should be called.\n * - To be used [zoom.enabled](Options.html#.zoom) option should be set as `truthy`.\n * @method zoom\n * @instance\n * @memberof Chart\n * @param {Array} domainValue If domain is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned.\n * @return {Array} domain value in array\n * @example\n * // Zoom to specified domain\n * chart.zoom([10, 20]);\n *\n * // Get the current zoomed domain\n * chart.zoom();\n */\n\n\nextend(api_zoom_zoom, {\n /**\n * Enable and disable zooming.\n * @method zoom․enable\n * @instance\n * @memberof Chart\n * @param {String|Boolean} enabled Possible string values are \"wheel\" or \"drag\". If enabled is true, \"wheel\" will be used. If false is given, zooming will be disabled.<br>When set to false, the current zooming status will be reset.\n * @example\n * // Enable zooming using the mouse wheel\n * chart.zoom.enable(true);\n * // Or\n * chart.zoom.enable(\"wheel\");\n *\n * // Enable zooming by dragging\n * chart.zoom.enable(\"drag\");\n *\n * // Disable zooming\n * chart.zoom.enable(false);\n */\n enable: function enable() {\n var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"wheel\",\n $$ = this.internal,\n config = $$.config,\n enableType = enabled;\n enabled && (enableType = isString(enabled) && /^(drag|wheel)$/.test(enabled) ? {\n type: enabled\n } : enabled), config.zoom_enabled = enableType, $$.zoom ? enabled === !1 && $$.bindZoomEvent(!1) : ($$.initZoom(), $$.bindZoomEvent()), $$.updateAndRedraw();\n },\n\n /**\n * Set or get x Axis maximum zoom range value\n * @method zoom․max\n * @instance\n * @memberof Chart\n * @param {Number} [max] maximum value to set for zoom\n * @return {Number} zoom max value\n * @example\n * // Set maximum range value\n * chart.zoom.max(20);\n */\n max: function max(_max) {\n var $$ = this.internal,\n config = $$.config;\n return (_max === 0 || _max) && (config.zoom_x_max = getMinMax(\"max\", [$$.orgXDomain[1], _max])), config.zoom_x_max;\n },\n\n /**\n * Set or get x Axis minimum zoom range value\n * @method zoom․min\n * @instance\n * @memberof Chart\n * @param {Number} [min] minimum value to set for zoom\n * @return {Number} zoom min value\n * @example\n * // Set minimum range value\n * chart.zoom.min(-1);\n */\n min: function min(_min) {\n var $$ = this.internal,\n config = $$.config;\n return (_min === 0 || _min) && (config.zoom_x_min = getMinMax(\"min\", [$$.orgXDomain[0], _min])), config.zoom_x_min;\n },\n\n /**\n * Set zoom range\n * @method zoom․range\n * @instance\n * @memberof Chart\n * @param {Object} [range]\n * @return {Object} zoom range value\n * {\n * min: 0,\n * max: 100\n * }\n * @example\n * chart.zoom.range({\n * min: 10,\n * max: 100\n * });\n */\n range: function range(_range2) {\n var zoom = this.zoom;\n\n if (isObject(_range2)) {\n var min = _range2.min,\n max = _range2.max;\n isDefined(min) && zoom.min(min), isDefined(max) && zoom.max(max);\n }\n\n return {\n min: zoom.min(),\n max: zoom.max()\n };\n }\n}), extend(Chart_Chart.prototype, {\n zoom: api_zoom_zoom,\n\n /**\n * Unzoom zoomed area\n * @method unzoom\n * @instance\n * @memberof Chart\n * @example\n * chart.unzoom();\n */\n unzoom: function unzoom() {\n var $$ = this.internal,\n config = $$.config;\n\n if ($$.zoomScale) {\n config.subchart_show ? $$.brush.getSelection().call($$.brush.move, null) : $$.zoom.updateTransformScale(external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_[\"zoomIdentity\"]), $$.updateZoom(!0), $$.zoom.resetBtn && $$.zoom.resetBtn.style(\"display\", \"none\");\n // reset transform\n var eventRects = $$.main.select(\".\".concat(config_classes.eventRects));\n Object(external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_[\"zoomTransform\"])(eventRects.node()) !== external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_[\"zoomIdentity\"] && $$.zoom.transform(eventRects, external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_[\"zoomIdentity\"]), $$.redraw({\n withTransition: !0,\n withUpdateXDomain: !0,\n withUpdateOrgXDomain: !0,\n withY: config.zoom_rescale\n });\n }\n }\n});\n// CONCATENATED MODULE: ./src/api/api.load.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\nextend(Chart_Chart.prototype, {\n /**\n * Load data to the chart.<br><br>\n * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.\n * - <b>Note:</b>\n * - unload should be used if some data needs to be unloaded simultaneously.\n * If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation.<br>\n * - done will be called after data loaded, but it's not after rendering.\n * It's because rendering will finish after some transition and there is some time lag between loading and rendering\n * @method load\n * @instance\n * @memberof Chart\n * @param {Object} args The object can consist with following members:<br>\n *\n * | Key | Description |\n * | --- | --- |\n * | - url<br>- json<br>- rows<br>- columns | The data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added |\n * | data | Data objects to be loaded. Checkout the example. |\n * | names | Same as data.names() |\n * | xs | Same as data.xs option |\n * | classes | The classes specified by data.classes will be updated. classes must be Object that has target id as keys. |\n * | categories | The categories specified by axis.x.categories or data.x will be updated. categories must be Array. |\n * | axes | The axes specified by data.axes will be updated. axes must be Object that has target id as keys. |\n * | colors | The colors specified by data.colors will be updated. colors must be Object that has target id as keys. |\n * | headers | Set request header if loading via `data.url`.<br>@see [data․headers](Options.html#.data%25E2%2580%25A4headers) |\n * | keys | Choose which JSON objects keys correspond to desired data.<br>**NOTE:** Only for JSON object given as array.<br>@see [data․keys](Options.html#.data%25E2%2580%25A4keys) |\n * | mimeType | Set 'json' if loading JSON via url.<br>@see [data․mimeType](Options.html#.data%25E2%2580%25A4mimeType) |\n * | - type<br>- types | The type of targets will be updated. type must be String and types must be Object. |\n * | unload | Specify the data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. If absent or false given, unload will not occur. |\n * | done | The specified function will be called after data loaded.|\n * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataFromURL)\n * @example\n * // Load data1 and unload data2 and data3\n * chart.load({\n * columns: [\n * [\"data1\", 100, 200, 150, ...],\n * ...\n * ],\n * unload: [\"data2\", \"data3\"],\n * url: \"...\",\n * done: function() { ... }\n * });\n * @example\n * // myAPI.json\n * // {\n * // \"data1\": [220, 240, 270, 250, 280],\n * // \"data2\": [180, 150, 300, 70, 120]\n * // }\n *\n * chart.load({\n * url: './data/myAPI.json',\n * mimeType: \"json\",\n *\n * // set request header if is needed\n * headers: {\n * \"Content-Type\": \"text/json\"\n * }\n * });\n * @example\n * chart.load({\n * data: [\n * // equivalent as: columns: [[\"data1\", 30, 200, 100]]\n * {\"data1\": 30}, {\"data1\": 200}, {\"data1\": 100}\n *\n * // or\n * // equivalent as: columns: [[\"data1\", 10, 20], [\"data2\", 13, 30]]\n * // {\"data1\": 10, \"data2\": 13}, {\"data1\": 20, \"data2\": 30}}\n * ]\n * });\n * @example\n * chart.load({\n * json: [\n * {name: \"www.site1.com\", upload: 800, download: 500, total: 400},\n * ],\n * keys: {\n * x: \"name\",\n * value: [\"upload\", \"download\"]\n * }\n * });\n */\n load: function load(args) {\n var $$ = this.internal,\n config = $$.config;\n // update xs if specified\n // update names if exists\n // update classes if exists\n // update axes if exists\n // update colors if exists\n args.xs && $$.addXs(args.xs), \"names\" in args && this.data.names(args.names), \"classes\" in args && Object.keys(args.classes).forEach(function (id) {\n config.data_classes[id] = args.classes[id];\n }), \"categories\" in args && $$.isCategorized() && (config.axis_x_categories = args.categories), \"axes\" in args && Object.keys(args.axes).forEach(function (id) {\n config.data_axes[id] = args.axes[id];\n }), \"colors\" in args && Object.keys(args.colors).forEach(function (id) {\n config.data_colors[id] = args.colors[id];\n }), \"unload\" in args && args.unload !== !1 ? $$.unload($$.mapToTargetIds(args.unload === !0 ? null : args.unload), function () {\n return $$.loadFromArgs(args);\n }) : $$.loadFromArgs(args);\n },\n\n /**\n * Unload data to the chart.<br><br>\n * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.\n * - <b>Note:</b>\n * If you call load API soon after/before unload, unload param of load should be used. Otherwise chart will not be rendered properly because of cancel of animation.<br>\n * `done` will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.\n * @method unload\n * @instance\n * @memberof Chart\n * @param {Object} args\n * | key | Type | Description |\n * | --- | --- | --- |\n * | ids | String | Array | Target id data to be unloaded. If not given, all data will be unloaded. |\n * | done | Fuction | Callback after data is unloaded. |\n * @example\n * // Unload data2 and data3\n * chart.unload({\n * ids: [\"data2\", \"data3\"],\n * done: function() {\n * // called after the unloaded\n * }\n * });\n */\n unload: function unload(argsValue) {\n var $$ = this.internal,\n args = argsValue || {};\n isArray(args) ? args = {\n ids: args\n } : isString(args) && (args = {\n ids: [args]\n });\n var ids = $$.mapToTargetIds(args.ids);\n $$.unload(ids, function () {\n $$.redraw({\n withUpdateOrgXDomain: !0,\n withUpdateXDomain: !0,\n withLegend: !0\n }), $$.removeCache(ids), args.done && args.done();\n });\n }\n});\n// EXTERNAL MODULE: external {\"commonjs\":\"d3-ease\",\"commonjs2\":\"d3-ease\",\"amd\":\"d3-ease\",\"root\":\"d3\"}\nvar external_commonjs_d3_ease_commonjs2_d3_ease_amd_d3_ease_root_d3_ = __webpack_require__(13);\n\n// CONCATENATED MODULE: ./src/api/api.flow.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n\n\n\nextend(Chart_Chart.prototype, {\n /**\n * Flow data to the chart.<br><br>\n * By this API, you can append new data points to the chart.\n * @method flow\n * @instance\n * @memberof Chart\n * @param {Object} args The object can consist with following members:<br>\n *\n * | Key | Type | Description |\n * | --- | --- | --- |\n * | json | Object | Data as JSON format (@see [data․json](Options.html#.data%25E2%2580%25A4json)) |\n * | rows | Array | Data in array as row format (@see [data․rows](Options.html#.data%25E2%2580%25A4json)) |\n * | columns | Array | Data in array as column format (@see [data․columns](Options.html#.data%25E2%2580%25A4columns)) |\n * | to | String | The lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points |\n * | length | Number | The lower x edge will move by the number of this argument |\n * | duration | Number | The duration of the transition will be specified value. If not given, transition.duration will be used as default |\n * | done | Function | The specified function will be called when flow ends |\n *\n * - **NOTE:**\n * - If json, rows and columns given, the data will be loaded.\n * - If data that has the same target id is given, the chart will be appended.\n * - Otherwise, new target will be added. One of these is required when calling.\n * - If json specified, keys is required as well as data.json.\n * \t - If tab isn't visible(by evaluating `document.hidden`), will not be executed to prevent unnecessary work.\n * @example\n * // 2 data points will be apprended to the tail and popped from the head.\n * // After that, 4 data points will be appended and no data points will be poppoed.\n * chart.flow({\n * columns: [\n * [\"x\", \"2018-01-11\", \"2018-01-21\"],\n * [\"data1\", 500, 200],\n * [\"data2\", 100, 300],\n * [\"data3\", 200, 120]\n * ],\n * to: \"2013-01-11\",\n * done: function () {\n * chart.flow({\n * columns: [\n * [\"x\", \"2018-02-11\", \"2018-02-12\", \"2018-02-13\", \"2018-02-14\"],\n * [\"data1\", 200, 300, 100, 250],\n * [\"data2\", 100, 90, 40, 120],\n * [\"data3\", 100, 100, 300, 500]\n * ],\n * length: 2,\n * duration: 1500\n * });\n * }\n * });\n */\n flow: function flow(args) {\n var data,\n domain,\n diff,\n to,\n $$ = this.internal,\n length = 0,\n tail = 0;\n\n if ((args.json || args.rows || args.columns) && (data = $$.convertData(args)), data && $$.isTabVisible()) {\n var notfoundIds = [],\n orgDataCount = $$.getMaxDataCount(),\n targets = $$.convertDataToTargets(data, !0);\n $$.data.targets.forEach(function (t) {\n for (var found = !1, i = 0; i < targets.length; i++) if (t.id === targets[i].id) {\n found = !0, t.values[t.values.length - 1] && (tail = t.values[t.values.length - 1].index + 1), length = targets[i].values.length;\n\n for (var _j3 = 0; _j3 < length; _j3++) targets[i].values[_j3].index = tail + _j3, $$.isTimeSeries() || (targets[i].values[_j3].x = tail + _j3);\n\n t.values = t.values.concat(targets[i].values), targets.splice(i, 1);\n break;\n }\n\n found || notfoundIds.push(t.id);\n }), $$.data.targets.forEach(function (t) {\n for (var _i = 0; _i < notfoundIds.length; _i++) if (t.id === notfoundIds[_i]) {\n tail = t.values[t.values.length - 1].index + 1;\n\n for (var _j4 = 0; _j4 < length; _j4++) t.values.push({\n id: t.id,\n index: tail + _j4,\n x: $$.isTimeSeries() ? $$.getOtherTargetX(tail + _j4) : tail + _j4,\n value: null\n });\n }\n }), $$.data.targets.length && targets.forEach(function (t) {\n for (var missing = [], i = $$.data.targets[0].values[0].index; i < tail; i++) missing.push({\n id: t.id,\n index: i,\n x: $$.isTimeSeries() ? $$.getOtherTargetX(i) : i,\n value: null\n });\n\n t.values.forEach(function (v) {\n v.index += tail, $$.isTimeSeries() || (v.x += tail);\n }), t.values = missing.concat(t.values);\n }), $$.data.targets = $$.data.targets.concat(targets);\n // add remained\n // check data count because behavior needs to change when it\"s only one\n // const dataCount = $$.getMaxDataCount();\n var baseTarget = $$.data.targets[0],\n baseValue = baseTarget.values[0];\n isDefined(args.to) ? (length = 0, to = $$.isTimeSeries() ? $$.parseDate(args.to) : args.to, baseTarget.values.forEach(function (v) {\n v.x < to && length++;\n })) : isDefined(args.length) && (length = args.length), orgDataCount ? orgDataCount === 1 && $$.isTimeSeries() && (diff = (baseTarget.values[baseTarget.values.length - 1].x - baseValue.x) / 2, domain = [new Date(+baseValue.x - diff), new Date(+baseValue.x + diff)]) : (diff = $$.isTimeSeries() ? baseTarget.values.length > 1 ? baseTarget.values[baseTarget.values.length - 1].x - baseValue.x : baseValue.x - $$.getXDomain($$.data.targets)[0] : 1, domain = [baseValue.x - diff, baseValue.x]), domain && $$.updateXDomain(null, !0, !0, !1, domain), $$.updateTargets($$.data.targets), $$.redraw({\n flow: {\n index: baseValue.index,\n length: length,\n duration: isValue(args.duration) ? args.duration : $$.config.transition_duration,\n done: args.done,\n orgDataCount: orgDataCount\n },\n withLegend: !0,\n withTransition: orgDataCount > 1,\n withTrimXDomain: !1,\n withUpdateXAxis: !0\n });\n }\n }\n}), extend(ChartInternal_ChartInternal.prototype, {\n /**\n * Generate flow\n * @memberof ChartInternal\n * @private\n * @param {Object} args\n * @return {Function}\n */\n generateFlow: function generateFlow(args) {\n var $$ = this,\n config = $$.config;\n return function () {\n var translateX,\n targets = args.targets,\n flow = args.flow,\n _args$shape$type = args.shape.type,\n drawBar = _args$shape$type.bar,\n drawLine = _args$shape$type.line,\n drawArea = _args$shape$type.area,\n _args$shape$pos = args.shape.pos,\n cx = _args$shape$pos.cx,\n cy = _args$shape$pos.cy,\n xForText = _args$shape$pos.xForText,\n yForText = _args$shape$pos.yForText,\n xv = args.xv,\n duration = args.duration,\n scaleX = 1,\n flowIndex = flow.index,\n flowLength = flow.length,\n flowStart = $$.getValueOnIndex($$.data.targets[0].values, flowIndex),\n flowEnd = $$.getValueOnIndex($$.data.targets[0].values, flowIndex + flowLength),\n orgDomain = $$.x.domain(),\n durationForFlow = flow.duration || duration,\n done = flow.done || function () {},\n wait = $$.generateWait(),\n xgrid = $$.xgrid || Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]),\n xgridLines = $$.xgridLines || Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]),\n mainRegion = $$.mainRegion || Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]),\n mainText = $$.mainText || Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]),\n mainBar = $$.mainBar || Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]),\n mainLine = $$.mainLine || Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]),\n mainArea = $$.mainArea || Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]),\n mainCircle = $$.mainCircle || Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"selectAll\"])([]);\n\n $$.flowing = !0, $$.data.targets.forEach(function (d) {\n d.values.splice(0, flowLength);\n });\n // update x domain to generate axis elements for flow\n var domain = $$.updateXDomain(targets, !0, !0); // update elements related to x scale\n\n $$.updateXGrid && $$.updateXGrid(!0), flow.orgDataCount ? flow.orgDataCount === 1 || (flowStart && flowStart.x) === (flowEnd && flowEnd.x) ? translateX = $$.x(orgDomain[0]) - $$.x(domain[0]) : $$.isTimeSeries() ? translateX = $$.x(orgDomain[0]) - $$.x(domain[0]) : translateX = $$.x(flowStart.x) - $$.x(flowEnd.x) : $$.data.targets[0].values.length === 1 ? $$.isTimeSeries() ? (flowStart = $$.getValueOnIndex($$.data.targets[0].values, 0), flowEnd = $$.getValueOnIndex($$.data.targets[0].values, $$.data.targets[0].values.length - 1), translateX = $$.x(flowStart.x) - $$.x(flowEnd.x)) : translateX = diffDomain(domain) / 2 : translateX = $$.x(orgDomain[0]) - $$.x(domain[0]), scaleX = diffDomain(orgDomain) / diffDomain(domain);\n var transform = \"translate(\".concat(translateX, \",0) scale(\").concat(scaleX, \",1)\");\n $$.hideGridFocus();\n var gt = Object(external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_root_d3_[\"transition\"])().ease(external_commonjs_d3_ease_commonjs2_d3_ease_amd_d3_ease_root_d3_[\"easeLinear\"]).duration(durationForFlow);\n wait.add([$$.axes.x.transition(gt).call(function (g) {\n return $$.xAxis.setTransition(gt).create(g);\n }), mainBar.transition(gt).attr(\"transform\", transform), mainLine.transition(gt).attr(\"transform\", transform), mainArea.transition(gt).attr(\"transform\", transform), mainCircle.transition(gt).attr(\"transform\", transform), mainText.transition(gt).attr(\"transform\", transform), mainRegion.filter($$.isRegionOnX).transition(gt).attr(\"transform\", transform), xgrid.transition(gt).attr(\"transform\", transform), xgridLines.transition(gt).attr(\"transform\", transform)]), gt.call(wait, function () {\n var isRotated = config.axis_rotated; // remove flowed elements\n\n if (flowLength) {\n for (var target = {\n shapes: [],\n texts: [],\n eventRects: []\n }, i = 0; i < flowLength; i++) target.shapes.push(\".\".concat(config_classes.shape, \"-\").concat(i)), target.texts.push(\".\".concat(config_classes.text, \"-\").concat(i)), target.eventRects.push(\".\".concat(config_classes.eventRect, \"-\").concat(i));\n\n [\"shapes\", \"texts\", \"eventRects\"].forEach(function (v) {\n $$.svg.selectAll(\".\".concat(config_classes[v])).selectAll(target[v]).remove();\n }), $$.svg.select(\".\".concat(config_classes.xgrid)).remove();\n } // draw again for removing flowed elements and reverting attr\n\n\n if (xgrid.size() && xgrid.attr(\"transform\", null).attr($$.xgridAttr), xgridLines.attr(\"transform\", null), xgridLines.select(\"line\").attr(\"x1\", isRotated ? 0 : xv).attr(\"x2\", isRotated ? $$.width : xv), xgridLines.select(\"text\").attr(\"x\", isRotated ? $$.width : 0).attr(\"y\", xv), mainBar.attr(\"transform\", null).attr(\"d\", drawBar), mainLine.attr(\"transform\", null).attr(\"d\", drawLine), mainArea.attr(\"transform\", null).attr(\"d\", drawArea), mainCircle.attr(\"transform\", null), $$.isCirclePoint()) mainCircle.attr(\"cx\", cx).attr(\"cy\", cy);else {\n var xFunc = function (d) {\n return cx(d) - config.point_r;\n },\n yFunc = function (d) {\n return cy(d) - config.point_r;\n };\n\n mainCircle.attr(\"x\", xFunc).attr(\"y\", yFunc).attr(\"cx\", cx) // when pattern is used, it possibly contain 'circle' also.\n .attr(\"cy\", cy);\n }\n mainText.attr(\"transform\", null).attr(\"x\", xForText).attr(\"y\", yForText).style(\"fill-opacity\", $$.opacityForText.bind($$)), mainRegion.attr(\"transform\", null), mainRegion.select(\"rect\").filter($$.isRegionOnX).attr(\"x\", $$.regionX.bind($$)).attr(\"width\", $$.regionWidth.bind($$)), config.interaction_enabled && $$.redrawEventRect(), done(), $$.flowing = !1;\n });\n };\n }\n});\n// CONCATENATED MODULE: ./src/api/api.selection.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\nextend(Chart_Chart.prototype, {\n /**\n * Get selected data points.<br><br>\n * By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true.\n * @method selected\n * @instance\n * @memberof Chart\n * @param {String} [targetId] You can filter the result by giving target id that you want to get. If not given, all of data points will be returned.\n * @return {Array} dataPoint Array of the data points.<br>ex.) `[{x: 1, value: 200, id: \"data1\", index: 1, name: \"data1\"}, ...]`\n * @example\n * // all selected data points will be returned.\n * chart.selected();\n * // --> ex.) [{x: 1, value: 200, id: \"data1\", index: 1, name: \"data1\"}, ... ]\n *\n * // all selected data points of data1 will be returned.\n * chart.selected(\"data1\");\n */\n selected: function selected(targetId) {\n var $$ = this.internal,\n dataPoint = [];\n return $$.main.selectAll(\".\".concat(config_classes.shapes + $$.getTargetSelectorSuffix(targetId))).selectAll(\".\".concat(config_classes.shape)).filter(function () {\n return Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this).classed(config_classes.SELECTED);\n }).each(function (d) {\n return dataPoint.push(d);\n }), dataPoint;\n },\n\n /**\n * Set data points to be selected. (`[data.selection.enabled](Options.html#.data%25E2%2580%25A4selection%25E2%2580%25A4enabled) option should be set true to use this method)`\n * @method select\n * @instance\n * @memberof Chart\n * @param {String|Array} [ids] id value to get selected.\n * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points.\n * @param {Boolean} [resetOther] Unselect already selected.\n * @example\n * // select all data points\n * chart.select();\n *\n * // select all from 'data2'\n * chart.select(\"data2\");\n *\n * // select all from 'data1' and 'data2'\n * chart.select([\"data1\", \"data2\"]);\n *\n * // select from 'data1', indices 2 and unselect others selected\n * chart.select(\"data1\", [2], true);\n *\n * // select from 'data1', indices 0, 3 and 5\n * chart.select(\"data1\", [0, 3, 5]);\n */\n select: function select(ids, indices, resetOther) {\n var $$ = this.internal,\n config = $$.config;\n config.data_selection_enabled && $$.main.selectAll(\".\".concat(config_classes.shapes)).selectAll(\".\".concat(config_classes.shape)).each(function (d, i) {\n var shape = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this),\n id = d.data ? d.data.id : d.id,\n toggle = $$.getToggle(this, d).bind($$),\n isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,\n isTargetIndex = !indices || indices.indexOf(i) >= 0,\n isSelected = shape.classed(config_classes.SELECTED);\n // line/area selection not supported yet\n shape.classed(config_classes.line) || shape.classed(config_classes.area) || (isTargetId && isTargetIndex ? config.data_selection_isselectable(d) && !isSelected && toggle(!0, shape.classed(config_classes.SELECTED, !0), d, i) : isDefined(resetOther) && resetOther && isSelected && toggle(!1, shape.classed(config_classes.SELECTED, !1), d, i));\n });\n },\n\n /**\n * Set data points to be un-selected.\n * @method unselect\n * @instance\n * @memberof Chart\n * @param {String|Array} [ids] id value to be unselected.\n * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points.\n * @example\n * // unselect all data points\n * chart.unselect();\n *\n * // unselect all from 'data1'\n * chart.unselect(\"data1\");\n *\n * // unselect from 'data1', indices 2\n * chart.unselect(\"data1\", [2]);\n */\n unselect: function unselect(ids, indices) {\n var $$ = this.internal,\n config = $$.config;\n config.data_selection_enabled && $$.main.selectAll(\".\".concat(config_classes.shapes)).selectAll(\".\".concat(config_classes.shape)).each(function (d, i) {\n var shape = Object(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"select\"])(this),\n id = d.data ? d.data.id : d.id,\n toggle = $$.getToggle(this, d).bind($$),\n isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,\n isTargetIndex = !indices || indices.indexOf(i) >= 0,\n isSelected = shape.classed(config_classes.SELECTED);\n // line/area selection not supported yet\n shape.classed(config_classes.line) || shape.classed(config_classes.area) || isTargetId && isTargetIndex && config.data_selection_isselectable(d) && isSelected && toggle(!1, shape.classed(config_classes.SELECTED, !1), d, i);\n });\n }\n});\n// CONCATENATED MODULE: ./src/api/api.transform.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n/**\n * Change the type of the chart.\n * @private\n * @param {String|Array} targetIds\n * @param {String} type\n * @param {Object} optionsForRedraw\n */\n\nfunction transformTo(targetIds, type, optionsForRedraw) {\n var $$ = this,\n options = optionsForRedraw || {\n withTransitionForAxis: !$$.hasArcType()\n };\n // this is needed when transforming to arc\n options.withTransitionForTransform = !1, $$.transiting = !1, $$.setTargetType(targetIds, type), $$.updateTargets($$.data.targets), $$.updateAndRedraw(options);\n}\n\nextend(Chart_Chart.prototype, {\n /**\n * Change the type of the chart.\n * @method transform\n * @instance\n * @memberof Chart\n * @param {String} type Specify the type to be transformed. The types listed in data.type can be used.\n * @param {String|Array} targetIds Specify targets to be transformed. If not given, all targets will be the candidate.\n * @example\n * // all targets will be bar chart.\n * chart.transform(\"bar\");\n *\n * // only data1 will be bar chart.\n * chart.transform(\"bar\", \"data1\");\n *\n * // only data1 and data2 will be bar chart.\n * chart.transform(\"bar\", [\"data1\", \"data2\"]);\n */\n transform: function transform(type, targetIds) {\n var $$ = this.internal,\n options = [\"pie\", \"donut\"].indexOf(type) >= 0 ? {\n withTransform: !0\n } : null;\n transformTo.bind($$)(targetIds, type, options);\n }\n});\n// CONCATENATED MODULE: ./src/api/api.group.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\nextend(Chart_Chart.prototype, {\n /**\n * Update groups for the targets.\n * @method groups\n * @instance\n * @memberof Chart\n * @param {Array} groups This argument needs to be an Array that includes one or more Array that includes target ids to be grouped.\n * @return {Array} Grouped data names array\n * @example\n * // data1 and data2 will be a new group.\n * chart.groups([\n * [\"data1\", \"data2\"]\n * ]);\n */\n groups: function groups(_groups) {\n var $$ = this.internal,\n config = $$.config;\n return isUndefined(_groups) ? config.data_groups : (config.data_groups = _groups, $$.redraw(), config.data_groups);\n }\n});\n// CONCATENATED MODULE: ./src/api/api.grid.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n/**\n * Update x grid lines.\n * @method xgrids\n * @instance\n * @memberof Chart\n * @param {Array} grids X grid lines will be replaced with this argument. The format of this argument is the same as grid.x.lines.\n * @example\n * // Show 2 x grid lines\n * chart.xgrids([\n * {value: 1, text: \"Label 1\"},\n * {value: 4, text: \"Label 4\"}\n * ]);\n */\n\nvar xgrids = function (grids) {\n var $$ = this.internal,\n config = $$.config;\n return grids ? (config.grid_x_lines = grids, $$.redrawWithoutRescale(), config.grid_x_lines) : config.grid_x_lines;\n};\n\nextend(xgrids, {\n /**\n * Add x grid lines.<br>\n * This API adds new x grid lines instead of replacing like xgrids.\n * @method xgrids․add\n * @instance\n * @memberof Chart\n * @param {Array|Object} grids New x grid lines will be added. The format of this argument is the same as grid.x.lines and it's possible to give an Object if only one line will be added.\n * @example\n * // Add a new x grid line\n * chart.xgrids.add(\n * {value: 4, text: \"Label 4\"}\n * );\n *\n * // Add new x grid lines\n * chart.xgrids.add([\n * {value: 2, text: \"Label 2\"},\n * {value: 4, text: \"Label 4\"}\n * ]);\n */\n add: function add(grids) {\n return this.xgrids(this.internal.config.grid_x_lines.concat(grids || []));\n },\n\n /**\n * Remove x grid lines.<br>\n * This API removes x grid lines.\n * @method xgrids․remove\n * @instance\n * @memberof Chart\n * @param {Object} params This argument should include value or class. If value is given, the x grid lines that have specified x value will be removed. If class is given, the x grid lines that have specified class will be removed. If args is not given, all of x grid lines will be removed.\n * @example\n * // x grid line on x = 2 will be removed\n * chart.xgrids.remove({value: 2});\n *\n * // x grid lines that have 'grid-A' will be removed\n * chart.xgrids.remove({\n * class: \"grid-A\"\n * });\n *\n * // all of x grid lines will be removed\n * chart.xgrids.remove();\n */\n remove: function remove(params) {\n // TODO: multiple\n this.internal.removeGridLines(params, !0);\n }\n});\n\n/**\n * Update y grid lines.\n * @method ygrids\n * @instance\n * @memberof Chart\n * @param {Array} grids Y grid lines will be replaced with this argument. The format of this argument is the same as grid.y.lines.\n * @example\n * // Show 2 y grid lines\n * chart.ygrids([\n * {value: 100, text: \"Label 1\"},\n * {value: 400, text: \"Label 4\"}\n * ]);\n */\nvar ygrids = function (grids) {\n var $$ = this.internal,\n config = $$.config;\n return grids ? (config.grid_y_lines = grids, $$.redrawWithoutRescale(), config.grid_y_lines) : config.grid_y_lines;\n};\n\nextend(ygrids, {\n /**\n * Add y grid lines.<br>\n * This API adds new y grid lines instead of replacing like ygrids.\n * @method ygrids․add\n * @instance\n * @memberof Chart\n * @param {Array|Object} grids New y grid lines will be added. The format of this argument is the same as grid.y.lines and it's possible to give an Object if only one line will be added.\n * @example\n * // Add a new x grid line\n * chart.ygrids.add(\n * {value: 400, text: \"Label 4\"}\n * );\n *\n * // Add new x grid lines\n * chart.ygrids.add([\n * {value: 200, text: \"Label 2\"},\n * {value: 400, text: \"Label 4\"}\n * ]);\n */\n add: function add(grids) {\n return this.ygrids(this.internal.config.grid_y_lines.concat(grids || []));\n },\n\n /**\n * Remove y grid lines.<br>\n * This API removes x grid lines.\n * @method ygrids․remove\n * @instance\n * @memberof Chart\n * @param {Object} params This argument should include value or class. If value is given, the y grid lines that have specified y value will be removed. If class is given, the y grid lines that have specified class will be removed. If args is not given, all of y grid lines will be removed.\n * @example\n * // y grid line on y = 200 will be removed\n * chart.ygrids.remove({value: 200});\n *\n * // y grid lines that have 'grid-A' will be removed\n * chart.ygrids.remove({\n * class: \"grid-A\"\n * });\n *\n * // all of y grid lines will be removed\n * chart.ygrids.remove();\n */\n remove: function remove(params) {\n // TODO: multiple\n this.internal.removeGridLines(params, !1);\n }\n}), extend(Chart_Chart.prototype, {\n xgrids: xgrids,\n ygrids: ygrids\n});\n// CONCATENATED MODULE: ./src/api/api.region.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n/**\n * Update regions.\n * @method regions\n * @instance\n * @memberof Chart\n * @param {Array} regions Regions will be replaced with this argument. The format of this argument is the same as regions.\n * @return {Array} regions\n * @example\n * // Show 2 regions\n * chart.regions([\n * {axis: \"x\", start: 5, class: \"regionX\"},\n * {axis: \"y\", end: 50, class: \"regionY\"}\n * ]);\n */\n\nvar api_region_regions = function (_regions) {\n var $$ = this.internal,\n config = $$.config;\n return _regions ? (config.regions = _regions, $$.redrawWithoutRescale(), _regions) : config.regions;\n};\n\nextend(api_region_regions, {\n /**\n * Add new region.<br><br>\n * This API adds new region instead of replacing like regions.\n * @method regions․add\n * @instance\n * @memberof Chart\n * @param {Array|Object} regions New region will be added. The format of this argument is the same as regions and it's possible to give an Object if only one region will be added.\n * @return {Array} regions\n * @example\n * // Add a new region\n * chart.regions.add(\n * {axis: \"x\", start: 5, class: \"regionX\"}\n * );\n *\n * // Add new regions\n * chart.regions.add([\n * {axis: \"x\", start: 5, class: \"regionX\"},\n * {axis: \"y\", end: 50, class: \"regionY\"}\n *]);\n */\n add: function add(regions) {\n var $$ = this.internal,\n config = $$.config;\n return regions ? (config.regions = config.regions.concat(regions), $$.redrawWithoutRescale(), config.regions) : config.regions;\n },\n\n /**\n * Remove regions.<br><br>\n * This API removes regions.\n * @method regions․remove\n * @instance\n * @memberof Chart\n * @param {Object} regions This argument should include classes. If classes is given, the regions that have one of the specified classes will be removed. If args is not given, all of regions will be removed.\n * @return {Array} regions Removed regions\n * @example\n * // regions that have 'region-A' or 'region-B' will be removed.\n * chart.regions.remove({\n * classes: [\n * \"region-A\", \"region-B\"\n * ]\n * });\n *\n * // all of regions will be removed.\n * chart.regions.remove();\n */\n remove: function remove(optionsValue) {\n var $$ = this.internal,\n config = $$.config,\n options = optionsValue || {},\n duration = getOption(options, \"duration\", config.transition_duration),\n classes = getOption(options, \"classes\", [config_classes.region]),\n regions = $$.main.select(\".\".concat(config_classes.regions)).selectAll(classes.map(function (c) {\n return \".\".concat(c);\n }));\n return (duration ? regions.transition().duration(duration) : regions).style(\"opacity\", \"0\").remove(), regions = config.regions, Object.keys(options).length ? (regions = regions.filter(function (region) {\n var found = !1;\n return !region[\"class\"] || (region[\"class\"].split(\" \").forEach(function (c) {\n classes.indexOf(c) >= 0 && (found = !0);\n }), !found);\n }), config.regions = regions) : config.regions = [], regions;\n }\n}), extend(Chart_Chart.prototype, {\n regions: api_region_regions\n});\n// CONCATENATED MODULE: ./src/api/api.data.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n/**\n * Get data loaded in the chart.\n * @method data\n * @instance\n * @memberof Chart\n * @param {String|Array} targetIds If this argument is given, this API returns the specified target data. If this argument is not given, all of data will be returned.\n * @return {Array} Data objects\n * @example\n * // Get only data1 data\n * chart.data(\"data1\");\n * // --> [{id: \"data1\", id_org: \"data1\", values: Array(6)}, ...]\n *\n * // Get data1 and data2 data\n * chart.data([\"data1\", \"data2\"]);\n *\n * // Get all data\n * chart.data();\n */\n\nvar api_data_data = function (targetIds) {\n var targets = this.internal.data.targets;\n\n if (!isUndefined(targetIds)) {\n var ids = isArray(targetIds) ? targetIds : [targetIds];\n return targets.filter(function (t) {\n return ids.some(function (v) {\n return v === t.id;\n });\n });\n }\n\n return targets;\n};\n\nextend(api_data_data, {\n /**\n * Get data shown in the chart.\n * @method data․shown\n * @instance\n * @memberof Chart\n * @param {String|Array} targetIds If this argument is given, this API filters the data with specified target ids. If this argument is not given, all shown data will be returned.\n * @return {Array} Data objects\n * @example\n * // Get shown data by filtering to include only data1 data\n * chart.data.shown(\"data1\");\n * // --> [{id: \"data1\", id_org: \"data1\", values: Array(6)}, ...]\n *\n * // Get shown data by filtering to include data1 and data2 data\n * chart.data.shown([\"data1\", \"data2\"]);\n *\n * // Get all shown data\n * chart.data.shown();\n */\n shown: function shown(targetIds) {\n return this.internal.filterTargetsToShow(this.data(targetIds));\n },\n\n /**\n * Get values of the data loaded in the chart.\n * @method data․values\n * @instance\n * @memberof Chart\n * @param {String|Array} targetIds This API returns the values of specified target. If this argument is not given, null will be retruned\n * @return {Array} Data values\n * @example\n * // Get data1 values\n * chart.data.values(\"data1\");\n * // --> [10, 20, 30, 40]\n */\n values: function (targetId) {\n var flat = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1],\n values = null;\n\n if (targetId) {\n var targets = this.data(targetId);\n targets && isArray(targets) && (values = [], targets.forEach(function (v) {\n var dataValue = v.values.map(function (d) {\n return d.value;\n });\n flat ? values = values.concat(dataValue) : values.push(dataValue);\n }));\n }\n\n return values;\n },\n\n /**\n * Get and set names of the data loaded in the chart.\n * @method data․names\n * @instance\n * @memberof Chart\n * @param {Object} names If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as\n * @return {Object} Corresponding names according its key value, if specified names values.\n * @example\n * // Get current names\n * chart.data.names();\n * // --> {data1: \"test1\", data2: \"test2\"}\n *\n * // Update names\n * chart.data.names({\n * data1: \"New Name 1\",\n * data2: \"New Name 2\"\n *});\n */\n names: function names(_names) {\n return this.internal.clearLegendItemTextBoxCache(), this.internal.updateDataAttributes(\"names\", _names);\n },\n\n /**\n * Get and set colors of the data loaded in the chart.\n * @method data․colors\n * @instance\n * @memberof Chart\n * @param {Object} colors If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as [data.colors](./Options.html#.data%25E2%2580%25A4colors).\n * @return {Object} Corresponding data color value according its key value.\n * @example\n * // Get current colors\n * chart.data.colors();\n * // --> {data1: \"#00c73c\", data2: \"#fa7171\"}\n *\n * // Update colors\n * chart.data.colors({\n * data1: \"#FFFFFF\",\n * data2: \"#000000\"\n * });\n */\n colors: function colors(_colors) {\n return this.internal.updateDataAttributes(\"colors\", _colors);\n },\n\n /**\n * Get and set axes of the data loaded in the chart.\n * - **NOTE:** If all data is related to one of the axes, the domain of axis without related data will be replaced by the domain from the axis with related data\n * @method data․axes\n * @instance\n * @memberof Chart\n * @param {Object} axes If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as\n * @return {Object} Corresponding axes value for data, if specified axes value.\n * @example\n * // Get current axes\n * chart.data.axes();\n * // --> {data1: \"y\"}\n *\n * // Update axes\n * chart.data.axes({\n * data1: \"y\",\n * data2: \"y2\"\n * });\n */\n axes: function axes(_axes) {\n return this.internal.updateDataAttributes(\"axes\", _axes);\n },\n\n /**\n * Get the minimum data value bound to the chart\n * @method data․min\n * @instance\n * @memberof Chart\n * @return {Array} Data objects\n * @example\n * // Get current axes\n * chart.data.min();\n * // --> [{x: 0, value: 30, id: \"data1\", index: 0}, ...]\n */\n min: function min() {\n return this.internal.getMinMaxData().min;\n },\n\n /**\n * Get the maximum data value bound to the chart\n * @method data․max\n * @instance\n * @memberof Chart\n * @return {Array} Data objects\n * @example\n * // Get current axes\n * chart.data.max();\n * // --> [{x: 3, value: 400, id: \"data1\", index: 3}, ...]\n */\n max: function max() {\n return this.internal.getMinMaxData().max;\n }\n}), extend(Chart_Chart.prototype, {\n data: api_data_data\n});\n// CONCATENATED MODULE: ./src/api/api.category.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\nextend(Chart_Chart.prototype, {\n /**\n * Set specified category name on category axis.\n * @method category\n * @instance\n * @memberof Chart\n * @param {Number} i index of category to be changed\n * @param {String} category category value to be changed\n * @example\n * chart.category(2, \"Category 3\");\n */\n category: function category(i, _category) {\n var $$ = this.internal,\n config = $$.config;\n return arguments.length > 1 && (config.axis_x_categories[i] = _category, $$.redraw()), config.axis_x_categories[i];\n },\n\n /**\n * Set category names on category axis.\n * @method categories\n * @instance\n * @memberof Chart\n * @param {Array} categories This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.\n * @example\n * chart.categories([\n * \"Category 1\", \"Category 2\", ...\n * ]);\n */\n categories: function categories(_categories) {\n var $$ = this.internal,\n config = $$.config;\n return arguments.length ? (config.axis_x_categories = _categories, $$.redraw(), config.axis_x_categories) : config.axis_x_categories;\n }\n});\n// CONCATENATED MODULE: ./src/api/api.color.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\nextend(Chart_Chart.prototype, {\n /**\n * Get the color\n * @method color\n * @instance\n * @memberof Chart\n * @param {String} id id to get the color\n * @example\n * chart.color(\"data1\");\n */\n color: function color(id) {\n return this.internal.color(id); // more patterns\n }\n});\n// CONCATENATED MODULE: ./src/api/api.x.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\nextend(Chart_Chart.prototype, {\n /**\n * Get and set x values for the chart.\n * @method x\n * @instance\n * @memberof Chart\n * @param {Array} x If x is given, x values of every target will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.\n * @return {Object} xs\n * @example\n * // Get current x values\n * chart.x();\n *\n * // Update x values for all targets\n * chart.x([100, 200, 300, 400, ...]);\n */\n x: function x(_x) {\n var $$ = this.internal,\n isCategorized = $$.isCustomX() && $$.isCategorized();\n return isArray(_x) && (isCategorized ? $$.api.categories(_x) : ($$.updateTargetX($$.data.targets, _x), $$.redraw({\n withUpdateOrgXDomain: !0,\n withUpdateXDomain: !0\n }))), isCategorized ? $$.api.categories() : $$.data.xs;\n },\n\n /**\n * Get and set x values for the chart.\n * @method xs\n * @instance\n * @memberof Chart\n * @param {Array} xs If xs is given, specified target's x values will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.\n * @return {Object} xs\n * @example\n * // Get current x values\n * chart.xs();\n *\n * // Update x values for all targets\n * chart.xs({\n * data1: [10, 20, 30, 40, ...],\n * data2: [100, 200, 300, 400, ...]\n * });\n */\n xs: function xs(_xs) {\n var $$ = this.internal;\n return isObject(_xs) && ($$.updateTargetXs($$.data.targets, _xs), $$.redraw({\n withUpdateOrgXDomain: !0,\n withUpdateXDomain: !0\n })), $$.data.xs;\n }\n});\n// CONCATENATED MODULE: ./src/api/api.axis.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n/**\n * Set the min/max value\n * @param {Chart} $$\n * @param {String} type\n * @param {Object} value\n * @return {undefined}\n * @private\n */\n\nvar setMinMax = function ($$, type, value) {\n var config = $$.config,\n axisX = \"axis_x_\".concat(type),\n axisY = \"axis_y_\".concat(type),\n axisY2 = \"axis_y2_\".concat(type);\n return isDefined(value) && (isObjectType(value) ? (isValue(value.x) && (config[axisX] = value.x), isValue(value.y) && (config[axisY] = value.y), isValue(value.y2) && (config[axisY2] = value.y2)) : (config[axisY] = value, config[axisY2] = value), $$.redraw({\n withUpdateOrgXDomain: !0,\n withUpdateXDomain: !0\n })), undefined;\n},\n api_axis_getMinMax = function ($$, type) {\n var config = $$.config;\n return {\n x: config[\"axis_x_\".concat(type)],\n y: config[\"axis_y_\".concat(type)],\n y2: config[\"axis_y2_\".concat(type)]\n };\n},\n api_axis_axis = extend(function () {}, {\n /**\n * Get and set axis labels.\n * @method axis․labels\n * @instance\n * @memberof Chart\n * @param {Object} labels specified axis' label to be updated.\n * @example\n * // Update axis' label\n * chart.axis.labels({\n * x: \"New X Axis Label\",\n * y: \"New Y Axis Label\"\n * });\n */\n labels: function labels(_labels) {\n var $$ = this.internal;\n arguments.length && (Object.keys(_labels).forEach(function (axisId) {\n $$.axis.setLabelText(axisId, _labels[axisId]);\n }), $$.axis.updateLabels());\n },\n\n /**\n * Get and set axis min value.\n * @method axis․min\n * @instance\n * @memberof Chart\n * @param {Object} min If min is given, specified axis' min value will be updated.<br>\n * If no argument is given, the min values set on generating option for each axis will be returned.\n * If not set any min values on generation, it will return `undefined`.\n * @example\n * // Update axis' min\n * chart.axis.min({\n * x: -10,\n * y: 1000,\n * y2: 100\n * });\n */\n min: function min(_min) {\n var $$ = this.internal;\n return arguments.length ? setMinMax($$, \"min\", _min) : api_axis_getMinMax($$, \"min\");\n },\n\n /**\n * Get and set axis max value.\n * @method axis․max\n * @instance\n * @memberof Chart\n * @param {Object} max If max is given, specified axis' max value will be updated.<br>\n * If no argument is given, the max values set on generating option for each axis will be returned.\n * If not set any max values on generation, it will return `undefined`.\n * @example\n * // Update axis' label\n * chart.axis.max({\n * x: 100,\n * y: 1000,\n * y2: 10000\n * });\n */\n max: function max(_max) {\n var $$ = this.internal;\n return arguments.length ? setMinMax($$, \"max\", _max) : api_axis_getMinMax($$, \"max\");\n },\n\n /**\n * Get and set axis min and max value.\n * @method axis․range\n * @instance\n * @memberof Chart\n * @param {Object} range If range is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned.\n * @example\n * // Update axis' label\n * chart.axis.range({\n * min: {\n * x: -10,\n * y: -1000,\n * y2: -10000\n * },\n * max: {\n * x: 100,\n * y: 1000,\n * y2: 10000\n * },\n * });\n */\n range: function range(_range) {\n var axis = this.axis;\n if (arguments.length) isDefined(_range.max) && axis.max(_range.max), isDefined(_range.min) && axis.min(_range.min);else return {\n max: axis.max(),\n min: axis.min()\n };\n return undefined;\n }\n});\n/**\n * Get the min/max value\n * @param {Chart} $$\n * @param {String} type\n * @return {{x, y, y2}}\n * @private\n */\n\n\nextend(Chart_Chart.prototype, {\n axis: api_axis_axis\n});\n// CONCATENATED MODULE: ./src/api/api.legend.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n/**\n * Define legend\n * @ignore\n */\n\nvar legend = extend(function () {}, {\n /**\n * Show legend for each target.\n * @method legend․show\n * @instance\n * @memberof Chart\n * @param {String|Array} targetIds\n * - If targetIds is given, specified target's legend will be shown.\n * - If only one target is the candidate, String can be passed.\n * - If no argument is given, all of target's legend will be shown.\n * @example\n * // Show legend for data1.\n * chart.legend.show(\"data1\");\n *\n * // Show legend for data1 and data2.\n * chart.legend.show([\"data1\", \"data2\"]);\n *\n * // Show all legend.\n * chart.legend.show();\n */\n show: function show(targetIds) {\n var $$ = this.internal;\n $$.showLegend($$.mapToTargetIds(targetIds)), $$.updateAndRedraw({\n withLegend: !0\n });\n },\n\n /**\n * Hide legend for each target.\n * @method legend․hide\n * @instance\n * @memberof Chart\n * @param {String|Array} targetIds\n * - If targetIds is given, specified target's legend will be hidden.\n * - If only one target is the candidate, String can be passed.\n * - If no argument is given, all of target's legend will be hidden.\n * @example\n * // Hide legend for data1.\n * chart.legend.hide(\"data1\");\n *\n * // Hide legend for data1 and data2.\n * chart.legend.hide([\"data1\", \"data2\"]);\n *\n * // Hide all legend.\n * chart.legend.hide();\n */\n hide: function hide(targetIds) {\n var $$ = this.internal;\n $$.hideLegend($$.mapToTargetIds(targetIds)), $$.updateAndRedraw({\n withLegend: !0\n });\n }\n});\nextend(Chart_Chart.prototype, {\n legend: legend\n});\n// CONCATENATED MODULE: ./src/api/api.chart.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\nextend(Chart_Chart.prototype, {\n /**\n * Resize the chart.\n * @method resize\n * @instance\n * @memberof Chart\n * @param {Object} size This argument should include width and height in pixels.\n * @example\n * // Resize to 640x480\n * chart.resize({\n * width: 640,\n * height: 480\n * });\n */\n resize: function resize(size) {\n var $$ = this.internal,\n config = $$.config;\n $$.rendered && (config.size_width = size ? size.width : null, config.size_height = size ? size.height : null, this.flush(!1, !0), $$.resizeFunction());\n },\n\n /**\n * Force to redraw.\n * @method flush\n * @instance\n * @memberof Chart\n * @param {Boolean} [soft] For soft redraw.\n * @example\n * chart.flush();\n *\n * // for soft redraw\n * chart.flush(true);\n */\n flush: function flush(soft, _isFromResize) {\n var $$ = this.internal;\n $$.rendered ? (_isFromResize ? $$.brush && $$.brush.updateResize() : $$.axis && $$.axis.setOrient(), $$.zoomScale = null, soft ? $$.redraw({\n withTransform: !0,\n withUpdateXDomain: !0,\n withUpdateOrgXDomain: !0,\n withLegend: !0\n }) : $$.updateAndRedraw({\n withLegend: !0,\n withTransition: !1,\n withTransitionForTransform: !1\n })) : $$.initToRender(!0);\n },\n\n /**\n * Reset the chart object and remove element and events completely.\n * @method destroy\n * @instance\n * @memberof Chart\n * @example\n * chart.destroy();\n */\n destroy: function destroy() {\n var _this = this,\n $$ = this.internal;\n\n return notEmpty($$) && ($$.callPluginHook(\"$willDestroy\"), $$.charts.splice($$.charts.indexOf(this), 1), $$.svg.select(\"*\").interrupt(), $$.generateResize.timeout && win.clearTimeout($$.generateResize.timeout), win.removeEventListener(\"resize\", $$.resizeFunction), $$.selectChart.classed(\"bb\", !1).html(\"\"), Object.keys(this).forEach(function (key) {\n key === \"internal\" && Object.keys($$).forEach(function (k) {\n $$[k] = null;\n }), _this[key] = null, delete _this[key];\n })), null;\n },\n\n /**\n * Get or set single config option value.\n * @method config\n * @instance\n * @memberof Chart\n * @param {String} name The option key name.\n * @param {*} [value] The value accepted for indicated option.\n * @param {Boolean} [redraw] Set to redraw with the new option changes.\n * - **NOTE:** Doesn't guarantee work in all circumstances. It can be applied for limited options only.\n * @example\n * // Getter\n * chart.config(\"gauge.max\");\n *\n * // Setter\n * chart.config(\"gauge.max\", 100);\n *\n * // Setter & redraw with the new option\n * chart.config(\"gauge.max\", 100, true);\n */\n config: function config(name, value, redraw) {\n var res,\n $$ = this.internal,\n key = name && name.replace(/\\./g, \"_\");\n return key in $$.config && (isDefined(value) ? ($$.config[key] = value, res = value, redraw && this.flush()) : res = $$.config[key]), res;\n }\n});\n// CONCATENATED MODULE: ./src/api/api.tooltip.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n/**\n * Define tooltip\n * @ignore\n */\n\nvar api_tooltip_tooltip = extend(function () {}, {\n /**\n * Show tooltip\n * @method tooltip․show\n * @instance\n * @memberof Chart\n * @param {Object} args The object can consist with following members:<br>\n *\n * | Key | Type | Description |\n * | --- | --- | --- |\n * | index | Number | Determine focus by index |\n * | x | Number | Date | Determine focus by x Axis index |\n * | mouse | Array | Determine x and y coordinate value relative the targeted '.bb-event-rect' x Axis.<br>It should be used along with `data`, `index` or `x` value. The default value is set as `[0,0]` |\n * | data | Object | When [data.xs](Options.html#.data%25E2%2580%25A4xs) option is used or [tooltip.grouped](Options.html#.tooltip) set to 'false', `should be used giving this param`.<br><br>**Key:**<br>- x {Number | Date}: x Axis value<br>- index {Number}: x Axis index (useless for data.xs)<br>- id {String}: data id<br>- value {Number}: The corresponding value for tooltip. |\n *\n * @example\n * // show the 2nd x Axis coordinate tooltip\n * chart.tooltip.show({\n * index: 1\n * });\n *\n * // show tooltip for the 3rd x Axis in x:50 and y:100 coordinate of '.bb-event-rect' of the x Axis.\n * chart.tooltip.show({\n * x: 2,\n * mouse: [50, 100]\n * });\n *\n * // show tooltip for timeseries x axis\n * chart.tooltip.show({\n * x: new Date(\"2018-01-02 00:00\")\n * });\n *\n * // when data.xs is used\n * chart.tooltip.show({\n * data: {\n * x: 3, // x Axis value\n * id: \"data1\", // data id\n * value: 500 // data value\n * }\n * });\n *\n * // when data.xs isn't used, but tooltip.grouped=false is set\n * chart.tooltip.show({\n * data: {\n * index: 3, // or 'x' key value\n * id: \"data1\", // data id\n * value: 500 // data value\n * }\n * });\n */\n show: function show() {\n var index,\n mouse,\n args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n $$ = this.internal;\n\n // determine focus data\n if (args.mouse && (mouse = args.mouse), args.data) {\n var y = $$.getYScale(args.data.id)(args.data.value);\n $$.isMultipleX() ? mouse = [$$.x(args.data.x), y] : (!$$.config.tooltip_grouped && (mouse = [0, y]), index = isValue(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x));\n } else isDefined(args.x) ? index = $$.getIndexByX(args.x) : isDefined(args.index) && (index = args.index); // emulate events to show\n\n\n ($$.inputType === \"mouse\" ? [\"mouseover\", \"mousemove\"] : [\"touchstart\"]).forEach(function (eventName) {\n $$.dispatchEvent(eventName, index, mouse);\n });\n },\n\n /**\n * Hide tooltip\n * @method tooltip․hide\n * @instance\n * @memberof Chart\n */\n hide: function hide() {\n var $$ = this.internal; // reset last touch point index\n\n $$.inputType === \"touch\" && $$.callOverOutForTouch(), $$.hideTooltip(!0), $$.hideGridFocus(), $$.unexpandCircles(), $$.unexpandBars();\n }\n});\nextend(Chart_Chart.prototype, {\n tooltip: api_tooltip_tooltip\n});\n// CONCATENATED MODULE: ./src/api/api.export.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n\n\n\n\n/**\n * Encode to base64\n * @param {String} str\n * @return {String}\n * @private\n * @see https://developer.mozilla.org/ko/docs/Web/API/WindowBase64/Base64_encoding_and_decoding\n */\n\nvar b64EncodeUnicode = function (str) {\n return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p) {\n return String.fromCharCode(\"0x\".concat(p));\n }));\n},\n nodeToSvgDataUrl = function (node, size) {\n var serializer = new XMLSerializer(),\n clone = node.cloneNode(!0),\n cssText = getCssRules(toArray(browser_doc.styleSheets)).filter(function (r) {\n return r.cssText;\n }).map(function (r) {\n return r.cssText;\n });\n clone.setAttribute(\"xmlns\", external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"namespaces\"].xhtml);\n var nodeXml = serializer.serializeToString(clone),\n style = browser_doc.createElement(\"style\"); // escape css for XML\n\n style.appendChild(browser_doc.createTextNode(cssText.join(\"\\n\")));\n var styleXml = serializer.serializeToString(style),\n dataStr = \"<svg xmlns=\\\"\".concat(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_[\"namespaces\"].svg, \"\\\" width=\\\"\").concat(size.width, \"\\\" height=\\\"\").concat(size.height, \"\\\">\\n\\t\\t\\t<foreignObject width=\\\"100%\\\" height=\\\"100%\\\">\\n\\t\\t\\t\\t\").concat(styleXml, \"\\n\\t\\t\\t\\t\").concat(nodeXml.replace(/(url\\()[^#]+/g, \"$1\"), \"\\n\\t\\t\\t</foreignObject></svg>\").replace(\"/\\n/g\", \"%0A\"); // foreignObject not supported in IE11 and below\n // https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx\n\n return \"data:image/svg+xml;base64,\".concat(b64EncodeUnicode(dataStr));\n};\n/**\n * Convert svg node to data url\n * @param {HTMLElement} node\n * @return {String}\n * @private\n */\n\n\nextend(Chart_Chart.prototype, {\n /**\n * Export chart as an image.\n * - **NOTE:**\n * - IE11 and below not work properly due to the lack of the feature(<a href=\"https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx\">foreignObject</a>) support\n * - The basic CSS file(ex. billboard.css) should be at same domain as API call context to get correct styled export image.\n * @method export\n * @instance\n * @memberof Chart\n * @param {String} [mimeType=image/png] The desired output image format. (ex. 'image/png' for png, 'image/jpeg' for jpeg format)\n * @param {Function} [callback] The callback to be invoked when export is ready.\n * @return {String} dataURI\n * @example\n * chart.export();\n * // --> \"data:image/svg+xml;base64,PHN...\"\n *\n * // Initialize the download automatically\n * chart.export(\"image/png\", dataUrl => {\n * const link = document.createElement(\"a\");\n *\n * link.download = `${Date.now()}.png`;\n * link.href = dataUrl;\n * link.innerHTML = \"Download chart as image\";\n *\n * document.body.appendChild(link);\n * });\n */\n \"export\": function _export(mimeType, callback) {\n var $$ = this.internal,\n size = {\n width: $$.currentWidth,\n height: $$.currentHeight\n },\n svgDataUrl = nodeToSvgDataUrl(this.element, size);\n\n if (isFunction(callback)) {\n var img = new Image();\n img.crosssOrigin = \"Anonymous\", img.onload = function () {\n var canvas = browser_doc.createElement(\"canvas\"),\n ctx = canvas.getContext(\"2d\");\n canvas.width = size.width, canvas.height = size.height, ctx.drawImage(img, 0, 0), callback(canvas.toDataURL(mimeType));\n }, img.src = svgDataUrl;\n }\n\n return svgDataUrl;\n }\n});\n// CONCATENATED MODULE: ./src/core.js\n/**\n * Copyright (c) 2017 ~ present NAVER Corp.\n * billboard project is licensed under the MIT license\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar _defaults = {},\n bb = {\n /**\n * Version information\n * @property {String} version version\n * @example\n * bb.version; // \"1.0.0\"\n * @memberof bb\n */\n version: \"1.12.12\",\n\n /**\n * Generate chart\n * @param {Options} options chart options\n * @memberof bb\n * @return {Chart}\n * @see {@link Options} for different generation options\n * @see {@link Chart} for different methods API\n * @example\n * <!-- chart holder -->\n * <div id=\"LineChart\"></div>\n * @example\n * // generate chart with options\n * var chart = bb.generate({\n * \"bindto\": \"#LineChart\"\n * \"data\": {\n * \"columns\": [\n * [\"data1\", 30, 200, 100, 400, 150, 250],\n * [\"data2\", 50, 20, 10, 40, 15, 25]\n * ]\n * }\n * });\n *\n * // call some API\n * // ex) get the data of 'data1'\n * chart.data(\"data1\");\n */\n generate: function generate(config) {\n var options = mergeObj({}, _defaults, config),\n inst = new Chart_Chart(options);\n return inst.internal.charts = this.instance, this.instance.push(inst), inst;\n },\n\n /**\n * Set or get global default options.\n * - **NOTE:**\n * - The options values settings are valid within page context only.\n * - If is called multiple times, will override the last value.\n * @param {Options} options chart options\n * @memberof bb\n * @return {Options}\n * @see {@link Options}\n * @example\n * // Set same option value as for `.generate()`\n * bb.defaults({\n * data: {\n * type: \"bar\"\n * }\n * });\n *\n * bb.defaults(); // {data:{type: \"bar\"}}\n *\n * // data.type defaults to 'bar'\n * var chart = bb.generate({ ... });\n */\n defaults: function defaults(options) {\n return isObject(options) && (_defaults = options), _defaults;\n },\n\n /**\n * An array containing instance created\n * @property {Array} instance instance array\n * @example\n * // generate charts\n * var chart1 = bb.generate(...);\n * var chart2 = bb.generate(...);\n *\n * bb.instance; // [ chart1, chart2, ... ]\n * @memberof bb\n */\n instance: [],\n\n /**\n * Namespace for plugins\n * @property {Object} plugin plugin namespace\n * @example\n * // Stanford diagram plugin\n * bb.plugin.stanford;\n * @memberof bb\n */\n plugin: {},\n\n /**\n * Internal chart object\n * @private\n */\n chart: {\n fn: Chart_Chart.prototype,\n internal: {\n fn: ChartInternal_ChartInternal.prototype,\n axis: {\n fn: Axis_Axis.prototype\n }\n }\n }\n};\n/**\n * @namespace bb\n * @version 1.12.12\n */\n\n\n/* harmony default export */ var core = __webpack_exports__[\"default\"] = (bb);\n\n/***/ })\n/******/ ]);\n});\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import ascending from \"./ascending\";\n\nexport default function(compare) {\n if (compare.length === 1) compare = ascendingComparator(compare);\n return {\n left: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n },\n right: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n };\n}\n\nfunction ascendingComparator(f) {\n return function(d, x) {\n return ascending(f(d), x);\n };\n}\n","import ascending from \"./ascending\";\nimport bisector from \"./bisector\";\n\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport default bisectRight;\n","var array = Array.prototype;\n\nexport var slice = array.slice;\nexport var map = array.map;\n","var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n start = Math.ceil(start / step);\n stop = Math.floor(stop / step);\n ticks = new Array(n = Math.ceil(stop - start + 1));\n while (++i < n) ticks[i] = (start + i) * step;\n } else {\n start = Math.floor(start * step);\n stop = Math.ceil(stop * step);\n ticks = new Array(n = Math.ceil(start - stop + 1));\n while (++i < n) ticks[i] = (start - i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n}\n","export default function(x) {\n return x === null ? NaN : +x;\n}\n","import number from \"./number\";\n\nexport default function(values, p, valueof) {\n if (valueof == null) valueof = number;\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}\n","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.interpolator(domain); break;\n default: this.interpolator(interpolator).domain(domain); break;\n }\n return this;\n}\n","export var prefix = \"$\";\n\nfunction Map() {}\n\nMap.prototype = map.prototype = {\n constructor: Map,\n has: function(key) {\n return (prefix + key) in this;\n },\n get: function(key) {\n return this[prefix + key];\n },\n set: function(key, value) {\n this[prefix + key] = value;\n return this;\n },\n remove: function(key) {\n var property = prefix + key;\n return property in this && delete this[property];\n },\n clear: function() {\n for (var property in this) if (property[0] === prefix) delete this[property];\n },\n keys: function() {\n var keys = [];\n for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));\n return keys;\n },\n values: function() {\n var values = [];\n for (var property in this) if (property[0] === prefix) values.push(this[property]);\n return values;\n },\n entries: function() {\n var entries = [];\n for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});\n return entries;\n },\n size: function() {\n var size = 0;\n for (var property in this) if (property[0] === prefix) ++size;\n return size;\n },\n empty: function() {\n for (var property in this) if (property[0] === prefix) return false;\n return true;\n },\n each: function(f) {\n for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);\n }\n};\n\nfunction map(object, f) {\n var map = new Map;\n\n // Copy constructor.\n if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });\n\n // Index array by numeric index or specified key function.\n else if (Array.isArray(object)) {\n var i = -1,\n n = object.length,\n o;\n\n if (f == null) while (++i < n) map.set(i, object[i]);\n else while (++i < n) map.set(f(o = object[i], i, object), o);\n }\n\n // Convert object to map.\n else if (object) for (var key in object) map.set(key, object[key]);\n\n return map;\n}\n\nexport default map;\n","import {default as map, prefix} from \"./map\";\n\nfunction Set() {}\n\nvar proto = map.prototype;\n\nSet.prototype = set.prototype = {\n constructor: Set,\n has: proto.has,\n add: function(value) {\n value += \"\";\n this[prefix + value] = value;\n return this;\n },\n remove: proto.remove,\n clear: proto.clear,\n values: proto.keys,\n size: proto.size,\n empty: proto.empty,\n each: proto.each\n};\n\nfunction set(object, f) {\n var set = new Set;\n\n // Copy constructor.\n if (object instanceof Set) object.each(function(value) { set.add(value); });\n\n // Otherwise, assume it’s an array.\n else if (object) {\n var i = -1, n = object.length;\n if (f == null) while (++i < n) set.add(object[i]);\n else while (++i < n) set.add(f(object[i], i, object));\n }\n\n return set;\n}\n\nexport default set;\n","var array = Array.prototype;\n\nexport var map = array.map;\nexport var slice = array.slice;\n","import {map} from \"d3-collection\";\nimport {slice} from \"./array\";\nimport {initRange} from \"./init\";\n\nexport var implicit = {name: \"implicit\"};\n\nexport default function ordinal() {\n var index = map(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n var key = d + \"\", i = index.get(key);\n if (!i) {\n if (unknown !== implicit) return unknown;\n index.set(key, i = domain.push(d));\n }\n return range[(i - 1) % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = map();\n var i = -1, n = _.length, d, key;\n while (++i < n) if (!index.has(key = (d = _[i]) + \"\")) index.set(key, domain.push(d));\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice.call(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init\";\nimport ordinal from \"./ordinal\";\n\nexport default function band() {\n var scale = ordinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range,\n range = [0, 1],\n step,\n bandwidth,\n round = false,\n paddingInner = 0,\n paddingOuter = 0,\n align = 0.5;\n\n delete scale.unknown;\n\n function rescale() {\n var n = domain().length,\n reverse = range[1] < range[0],\n start = range[reverse - 0],\n stop = range[1 - reverse];\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (round) step = Math.floor(step);\n start += (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n var values = sequence(n).map(function(i) { return start + step * i; });\n return ordinalRange(reverse ? values.reverse() : values);\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = [+_[0], +_[1]], round = true, rescale();\n };\n\n scale.bandwidth = function() {\n return bandwidth;\n };\n\n scale.step = function() {\n return step;\n };\n\n scale.round = function(_) {\n return arguments.length ? (round = !!_, rescale()) : round;\n };\n\n scale.padding = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n };\n\n scale.paddingInner = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n };\n\n scale.paddingOuter = function(_) {\n return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n };\n\n scale.align = function(_) {\n return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n };\n\n scale.copy = function() {\n return band(domain(), range)\n .round(round)\n .paddingInner(paddingInner)\n .paddingOuter(paddingOuter)\n .align(align);\n };\n\n return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n var copy = scale.copy;\n\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n\n scale.copy = function() {\n return pointish(copy());\n };\n\n return scale;\n}\n\nexport function point() {\n return pointish(band.apply(null, arguments).paddingInner(1));\n}\n","export default function(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","export default function(x) {\n return +x;\n}\n","import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport {map, slice} from \"./array\";\nimport constant from \"./constant\";\nimport number from \"./number\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(domain) {\n var a = domain[0], b = domain[domain.length - 1], t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = map.call(_, number), clamp === identity || (clamp = clamper(domain)), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice.call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = slice.call(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? clamper(domain) : identity, scale) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous(transform, untransform) {\n return transformer()(transform, untransform);\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": function(x, p) { return (x * 100).toFixed(p); },\n \"b\": function(x) { return Math.round(x).toString(2); },\n \"c\": function(x) { return x + \"\"; },\n \"d\": formatDecimal,\n \"e\": function(x, p) { return x.toExponential(p); },\n \"f\": function(x, p) { return x.toFixed(p); },\n \"g\": function(x, p) { return x.toPrecision(p); },\n \"o\": function(x) { return Math.round(x).toString(8); },\n \"p\": function(x, p) { return formatRounded(x * 100, p); },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n \"x\": function(x) { return Math.round(x).toString(16); }\n};\n","export default function(x) {\n return x;\n}\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"],\n minus: \"-\"\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n","import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy, identity} from \"./continuous\";\nimport {initRange} from \"./init\";\nimport tickFormat from \"./tickFormat\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain(),\n i0 = 0,\n i1 = d.length - 1,\n start = d[i0],\n stop = d[i1],\n step;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n\n step = tickIncrement(start, stop, count);\n\n if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n step = tickIncrement(start, stop, count);\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n step = tickIncrement(start, stop, count);\n }\n\n if (step > 0) {\n d[i0] = Math.floor(start / step) * step;\n d[i1] = Math.ceil(stop / step) * step;\n domain(d);\n } else if (step < 0) {\n d[i0] = Math.ceil(start * step) / step;\n d[i1] = Math.floor(stop * step) / step;\n domain(d);\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous(identity, identity);\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {map} from \"./array\";\nimport {linearish} from \"./linear\";\nimport number from \"./number\";\n\nexport default function identity(domain) {\n var unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : x;\n }\n\n scale.invert = scale;\n\n scale.domain = scale.range = function(_) {\n return arguments.length ? (domain = map.call(_, number), scale) : domain.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return identity(domain).unknown(unknown);\n };\n\n domain = arguments.length ? map.call(domain, number) : [0, 1];\n\n return linearish(scale);\n}\n","export default function(domain, interval) {\n domain = domain.slice();\n\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}\n","import {ticks} from \"d3-array\";\nimport {format} from \"d3-format\";\nimport nice from \"./nice\";\nimport {copy, transformer} from \"./continuous\";\nimport {initRange} from \"./init\";\n\nfunction transformLog(x) {\n return Math.log(x);\n}\n\nfunction transformExp(x) {\n return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n return base === 10 ? pow10\n : base === Math.E ? Math.exp\n : function(x) { return Math.pow(base, x); };\n}\n\nfunction logp(base) {\n return base === Math.E ? Math.log\n : base === 10 && Math.log10\n || base === 2 && Math.log2\n || (base = Math.log(base), function(x) { return Math.log(x) / base; });\n}\n\nfunction reflect(f) {\n return function(x) {\n return -f(-x);\n };\n}\n\nexport function loggish(transform) {\n var scale = transform(transformLog, transformExp),\n domain = scale.domain,\n base = 10,\n logs,\n pows;\n\n function rescale() {\n logs = logp(base), pows = powp(base);\n if (domain()[0] < 0) {\n logs = reflect(logs), pows = reflect(pows);\n transform(transformLogn, transformExpn);\n } else {\n transform(transformLog, transformExp);\n }\n return scale;\n }\n\n scale.base = function(_) {\n return arguments.length ? (base = +_, rescale()) : base;\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.ticks = function(count) {\n var d = domain(),\n u = d[0],\n v = d[d.length - 1],\n r;\n\n if (r = v < u) i = u, u = v, v = i;\n\n var i = logs(u),\n j = logs(v),\n p,\n k,\n t,\n n = count == null ? 10 : +count,\n z = [];\n\n if (!(base % 1) && j - i < n) {\n i = Math.round(i) - 1, j = Math.round(j) + 1;\n if (u > 0) for (; i < j; ++i) {\n for (k = 1, p = pows(i); k < base; ++k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n } else for (; i < j; ++i) {\n for (k = base - 1, p = pows(i); k >= 1; --k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n }\n } else {\n z = ticks(i, j, Math.min(j - i, n)).map(pows);\n }\n\n return r ? z.reverse() : z;\n };\n\n scale.tickFormat = function(count, specifier) {\n if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n if (typeof specifier !== \"function\") specifier = format(specifier);\n if (count === Infinity) return specifier;\n if (count == null) count = 10;\n var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n return function(d) {\n var i = d / pows(Math.round(logs(d)));\n if (i * base < base - 0.5) i *= base;\n return i <= k ? specifier(d) : \"\";\n };\n };\n\n scale.nice = function() {\n return domain(nice(domain(), {\n floor: function(x) { return pows(Math.floor(logs(x))); },\n ceil: function(x) { return pows(Math.ceil(logs(x))); }\n }));\n };\n\n return scale;\n}\n\nexport default function log() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, log()).base(scale.base());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","import {linearish} from \"./linear\";\nimport {copy, transformer} from \"./continuous\";\nimport {initRange} from \"./init\";\n\nfunction transformSymlog(c) {\n return function(x) {\n return Math.sign(x) * Math.log1p(Math.abs(x / c));\n };\n}\n\nfunction transformSymexp(c) {\n return function(x) {\n return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n };\n}\n\nexport function symlogish(transform) {\n var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n scale.constant = function(_) {\n return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n };\n\n return linearish(scale);\n}\n\nexport default function symlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, symlog()).constant(scale.constant());\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {linearish} from \"./linear\";\nimport {copy, identity, transformer} from \"./continuous\";\nimport {initRange} from \"./init\";\n\nfunction transformPow(exponent) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n };\n}\n\nfunction transformSqrt(x) {\n return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n var scale = transform(identity, identity),\n exponent = 1;\n\n function rescale() {\n return exponent === 1 ? transform(identity, identity)\n : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n : transform(transformPow(exponent), transformPow(1 / exponent));\n }\n\n scale.exponent = function(_) {\n return arguments.length ? (exponent = +_, rescale()) : exponent;\n };\n\n return linearish(scale);\n}\n\nexport default function pow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, pow()).exponent(scale.exponent());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n\nexport function sqrt() {\n return pow.apply(null, arguments).exponent(0.5);\n}\n","import {ascending, bisect, quantile as threshold} from \"d3-array\";\nimport {slice} from \"./array\";\nimport {initRange} from \"./init\";\n\nexport default function quantile() {\n var domain = [],\n range = [],\n thresholds = [],\n unknown;\n\n function rescale() {\n var i = 0, n = Math.max(1, range.length);\n thresholds = new Array(n - 1);\n while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n return scale;\n }\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n }\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN] : [\n i > 0 ? thresholds[i - 1] : domain[0],\n i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n ];\n };\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return rescale();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice.call(_), rescale()) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.quantiles = function() {\n return thresholds.slice();\n };\n\n scale.copy = function() {\n return quantile()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {slice} from \"./array\";\nimport {linearish} from \"./linear\";\nimport {initRange} from \"./init\";\n\nexport default function quantize() {\n var x0 = 0,\n x1 = 1,\n n = 1,\n domain = [0.5],\n range = [0, 1],\n unknown;\n\n function scale(x) {\n return x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n function rescale() {\n var i = -1;\n domain = new Array(n);\n while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n return scale;\n }\n\n scale.domain = function(_) {\n return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];\n };\n\n scale.range = function(_) {\n return arguments.length ? (n = (range = slice.call(_)).length - 1, rescale()) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN]\n : i < 1 ? [x0, domain[0]]\n : i >= n ? [domain[n - 1], x1]\n : [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : scale;\n };\n\n scale.thresholds = function() {\n return domain.slice();\n };\n\n scale.copy = function() {\n return quantize()\n .domain([x0, x1])\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(linearish(scale), arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {slice} from \"./array\";\nimport {initRange} from \"./init\";\n\nexport default function threshold() {\n var domain = [0.5],\n range = [0, 1],\n unknown,\n n = 1;\n\n function scale(x) {\n return x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return threshold()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n","export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","import interval from \"./interval.js\";\n\nvar month = interval(function(date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n return date.getMonth();\n});\n\nexport default month;\nexport var months = month.range;\n","import interval from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nvar hour = interval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, function(date, step) {\n date.setTime(+date + step * durationHour);\n}, function(start, end) {\n return (end - start) / durationHour;\n}, function(date) {\n return date.getHours();\n});\n\nexport default hour;\nexport var hours = hour.range;\n","import interval from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nvar minute = interval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, function(date, step) {\n date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n return (end - start) / durationMinute;\n}, function(date) {\n return date.getMinutes();\n});\n\nexport default minute;\nexport var minutes = minute.range;\n","import interval from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nvar second = interval(function(date) {\n date.setTime(date - date.getMilliseconds());\n}, function(date, step) {\n date.setTime(+date + step * durationSecond);\n}, function(start, end) {\n return (end - start) / durationSecond;\n}, function(date) {\n return date.getUTCSeconds();\n});\n\nexport default second;\nexport var seconds = second.range;\n","import interval from \"./interval.js\";\n\nvar millisecond = interval(function() {\n // noop\n}, function(date, step) {\n date.setTime(+date + step);\n}, function(start, end) {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return interval(function(date) {\n date.setTime(Math.floor(date / k) * k);\n }, function(date, step) {\n date.setTime(+date + step * k);\n }, function(start, end) {\n return (end - start) / k;\n });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;\n","import {bisector, tickStep} from \"d3-array\";\nimport {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport {map} from \"./array\";\nimport continuous, {copy, identity} from \"./continuous\";\nimport {initRange} from \"./init\";\nimport nice from \"./nice\";\n\nvar durationSecond = 1000,\n durationMinute = durationSecond * 60,\n durationHour = durationMinute * 60,\n durationDay = durationHour * 24,\n durationWeek = durationDay * 7,\n durationMonth = durationDay * 30,\n durationYear = durationDay * 365;\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(year, month, week, day, hour, minute, second, millisecond, format) {\n var scale = continuous(identity, identity),\n invert = scale.invert,\n domain = scale.domain;\n\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n\n var tickIntervals = [\n [second, 1, durationSecond],\n [second, 5, 5 * durationSecond],\n [second, 15, 15 * durationSecond],\n [second, 30, 30 * durationSecond],\n [minute, 1, durationMinute],\n [minute, 5, 5 * durationMinute],\n [minute, 15, 15 * durationMinute],\n [minute, 30, 30 * durationMinute],\n [ hour, 1, durationHour ],\n [ hour, 3, 3 * durationHour ],\n [ hour, 6, 6 * durationHour ],\n [ hour, 12, 12 * durationHour ],\n [ day, 1, durationDay ],\n [ day, 2, 2 * durationDay ],\n [ week, 1, durationWeek ],\n [ month, 1, durationMonth ],\n [ month, 3, 3 * durationMonth ],\n [ year, 1, durationYear ]\n ];\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond\n : minute(date) < date ? formatSecond\n : hour(date) < date ? formatMinute\n : day(date) < date ? formatHour\n : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n : year(date) < date ? formatMonth\n : formatYear)(date);\n }\n\n function tickInterval(interval, start, stop, step) {\n if (interval == null) interval = 10;\n\n // If a desired tick count is specified, pick a reasonable tick interval\n // based on the extent of the domain and a rough estimate of tick size.\n // Otherwise, assume interval is already a time interval and use it.\n if (typeof interval === \"number\") {\n var target = Math.abs(stop - start) / interval,\n i = bisector(function(i) { return i[2]; }).right(tickIntervals, target);\n if (i === tickIntervals.length) {\n step = tickStep(start / durationYear, stop / durationYear, interval);\n interval = year;\n } else if (i) {\n i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n step = i[1];\n interval = i[0];\n } else {\n step = Math.max(tickStep(start, stop, interval), 1);\n interval = millisecond;\n }\n }\n\n return step == null ? interval : interval.every(step);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(map.call(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval, step) {\n var d = domain(),\n t0 = d[0],\n t1 = d[d.length - 1],\n r = t1 < t0,\n t;\n if (r) t = t0, t0 = t1, t1 = t;\n t = tickInterval(interval, t0, t1, step);\n t = t ? t.range(t0, t1 + 1) : []; // inclusive stop\n return r ? t.reverse() : t;\n };\n\n scale.tickFormat = function(count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function(interval, step) {\n var d = domain();\n return (interval = tickInterval(interval, d[0], d[d.length - 1], step))\n ? domain(nice(d, interval))\n : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));\n };\n\n return scale;\n}\n\nexport default function() {\n return initRange.apply(calendar(timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n","import interval from \"./interval.js\";\n\nvar utcMonth = interval(function(date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n return date.getUTCMonth();\n});\n\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;\n","import interval from \"./interval.js\";\nimport {durationHour} from \"./duration.js\";\n\nvar utcHour = interval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n date.setTime(+date + step * durationHour);\n}, function(start, end) {\n return (end - start) / durationHour;\n}, function(date) {\n return date.getUTCHours();\n});\n\nexport default utcHour;\nexport var utcHours = utcHour.range;\n","import interval from \"./interval.js\";\nimport {durationMinute} from \"./duration.js\";\n\nvar utcMinute = interval(function(date) {\n date.setUTCSeconds(0, 0);\n}, function(date, step) {\n date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n return (end - start) / durationMinute;\n}, function(date) {\n return date.getUTCMinutes();\n});\n\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;\n","import {calendar} from \"./time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcMillisecond} from \"d3-time\";\nimport {initRange} from \"./init\";\n\nexport default function() {\n return initRange.apply(calendar(utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcMillisecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n","import {identity} from \"./continuous\";\nimport {initInterpolator} from \"./init\";\nimport {linearish} from \"./linear\";\nimport {loggish} from \"./log\";\nimport {symlogish} from \"./symlog\";\nimport {powish} from \"./pow\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 1,\n t0,\n t1,\n k10,\n transform,\n interpolator = identity,\n clamp = false,\n unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n return scale;\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .interpolator(source.interpolator())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport default function sequential() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, sequential());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, sequentialLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n","import {ascending, bisect} from \"d3-array\";\nimport {identity} from \"./continuous\";\nimport {initInterpolator} from \"./init\";\n\nexport default function sequentialQuantile() {\n var domain = [],\n interpolator = identity;\n\n function scale(x) {\n if (!isNaN(x = +x)) return interpolator((bisect(domain, x) - 1) / (domain.length - 1));\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return scale;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.copy = function() {\n return sequentialQuantile(interpolator).domain(domain);\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n","import {identity} from \"./continuous\";\nimport {initInterpolator} from \"./init\";\nimport {linearish} from \"./linear\";\nimport {loggish} from \"./log\";\nimport {copy} from \"./sequential\";\nimport {symlogish} from \"./symlog\";\nimport {powish} from \"./pow\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 0.5,\n x2 = 1,\n t0,\n t1,\n t2,\n k10,\n k21,\n interpolator = identity,\n transform,\n clamp = false,\n unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (x < t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), t2 = transform(x2 = +_[2]), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), scale) : [x0, x1, x2];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1);\n return scale;\n };\n}\n\nexport default function diverging() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, diverging());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n scale.copy = function() {\n return copy(scale, divergingLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n return divergingPow.apply(null, arguments).exponent(0.5);\n}\n","export var slice = Array.prototype.slice;\n","export default function(x) {\n return x;\n}\n","import {slice} from \"./array\";\nimport identity from \"./identity\";\n\nvar top = 1,\n right = 2,\n bottom = 3,\n left = 4,\n epsilon = 1e-6;\n\nfunction translateX(x) {\n return \"translate(\" + (x + 0.5) + \",0)\";\n}\n\nfunction translateY(y) {\n return \"translate(0,\" + (y + 0.5) + \")\";\n}\n\nfunction number(scale) {\n return function(d) {\n return +scale(d);\n };\n}\n\nfunction center(scale) {\n var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset.\n if (scale.round()) offset = Math.round(offset);\n return function(d) {\n return +scale(d) + offset;\n };\n}\n\nfunction entering() {\n return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n var tickArguments = [],\n tickValues = null,\n tickFormat = null,\n tickSizeInner = 6,\n tickSizeOuter = 6,\n tickPadding = 3,\n k = orient === top || orient === left ? -1 : 1,\n x = orient === left || orient === right ? \"x\" : \"y\",\n transform = orient === top || orient === bottom ? translateX : translateY;\n\n function axis(context) {\n var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n spacing = Math.max(tickSizeInner, 0) + tickPadding,\n range = scale.range(),\n range0 = +range[0] + 0.5,\n range1 = +range[range.length - 1] + 0.5,\n position = (scale.bandwidth ? center : number)(scale.copy()),\n selection = context.selection ? context.selection() : context,\n path = selection.selectAll(\".domain\").data([null]),\n tick = selection.selectAll(\".tick\").data(values, scale).order(),\n tickExit = tick.exit(),\n tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n line = tick.select(\"line\"),\n text = tick.select(\"text\");\n\n path = path.merge(path.enter().insert(\"path\", \".tick\")\n .attr(\"class\", \"domain\")\n .attr(\"stroke\", \"currentColor\"));\n\n tick = tick.merge(tickEnter);\n\n line = line.merge(tickEnter.append(\"line\")\n .attr(\"stroke\", \"currentColor\")\n .attr(x + \"2\", k * tickSizeInner));\n\n text = text.merge(tickEnter.append(\"text\")\n .attr(\"fill\", \"currentColor\")\n .attr(x, k * spacing)\n .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n if (context !== selection) {\n path = path.transition(context);\n tick = tick.transition(context);\n line = line.transition(context);\n text = text.transition(context);\n\n tickExit = tickExit.transition(context)\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute(\"transform\"); });\n\n tickEnter\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); });\n }\n\n tickExit.remove();\n\n path\n .attr(\"d\", orient === left || orient == right\n ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H0.5V\" + range1 + \"H\" + k * tickSizeOuter : \"M0.5,\" + range0 + \"V\" + range1)\n : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V0.5H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",0.5H\" + range1));\n\n tick\n .attr(\"opacity\", 1)\n .attr(\"transform\", function(d) { return transform(position(d)); });\n\n line\n .attr(x + \"2\", k * tickSizeInner);\n\n text\n .attr(x, k * spacing)\n .text(format);\n\n selection.filter(entering)\n .attr(\"fill\", \"none\")\n .attr(\"font-size\", 10)\n .attr(\"font-family\", \"sans-serif\")\n .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n selection\n .each(function() { this.__axis = position; });\n }\n\n axis.scale = function(_) {\n return arguments.length ? (scale = _, axis) : scale;\n };\n\n axis.ticks = function() {\n return tickArguments = slice.call(arguments), axis;\n };\n\n axis.tickArguments = function(_) {\n return arguments.length ? (tickArguments = _ == null ? [] : slice.call(_), axis) : tickArguments.slice();\n };\n\n axis.tickValues = function(_) {\n return arguments.length ? (tickValues = _ == null ? null : slice.call(_), axis) : tickValues && tickValues.slice();\n };\n\n axis.tickFormat = function(_) {\n return arguments.length ? (tickFormat = _, axis) : tickFormat;\n };\n\n axis.tickSize = function(_) {\n return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeInner = function(_) {\n return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeOuter = function(_) {\n return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n };\n\n axis.tickPadding = function(_) {\n return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n };\n\n return axis;\n}\n\nexport function axisTop(scale) {\n return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n return axis(left, scale);\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(target, type, selection) {\n this.target = target;\n this.type = type;\n this.selection = selection;\n}\n","import {event} from \"d3-selection\";\n\nexport function nopropagation() {\n event.stopImmediatePropagation();\n}\n\nexport default function() {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {customEvent, event, touch, mouse, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n MODE_SPACE = {name: \"space\"},\n MODE_HANDLE = {name: \"handle\"},\n MODE_CENTER = {name: \"center\"};\n\nfunction number1(e) {\n return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n return [number1(e[0]), number1(e[1])];\n}\n\nfunction toucher(identifier) {\n return function(target) {\n return touch(target, event.touches, identifier);\n };\n}\n\nvar X = {\n name: \"x\",\n handles: [\"w\", \"e\"].map(type),\n input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n name: \"y\",\n handles: [\"n\", \"s\"].map(type),\n input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n name: \"xy\",\n handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n input: function(xy) { return xy == null ? null : number2(xy); },\n output: function(xy) { return xy; }\n};\n\nvar cursors = {\n overlay: \"crosshair\",\n selection: \"move\",\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\n\nvar flipX = {\n e: \"w\",\n w: \"e\",\n nw: \"ne\",\n ne: \"nw\",\n se: \"sw\",\n sw: \"se\"\n};\n\nvar flipY = {\n n: \"s\",\n s: \"n\",\n nw: \"sw\",\n ne: \"se\",\n se: \"ne\",\n sw: \"nw\"\n};\n\nvar signsX = {\n overlay: +1,\n selection: +1,\n n: null,\n e: +1,\n s: null,\n w: -1,\n nw: -1,\n ne: +1,\n se: +1,\n sw: -1\n};\n\nvar signsY = {\n overlay: +1,\n selection: +1,\n n: -1,\n e: null,\n s: +1,\n w: null,\n nw: -1,\n ne: -1,\n se: +1,\n sw: +1\n};\n\nfunction type(t) {\n return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n var svg = this.ownerSVGElement || this;\n if (svg.hasAttribute(\"viewBox\")) {\n svg = svg.viewBox.baseVal;\n return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n }\n return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name “__brush” rather than auto-generated.\nfunction local(node) {\n while (!node.__brush) if (!(node = node.parentNode)) return;\n return node.__brush;\n}\n\nfunction empty(extent) {\n return extent[0][0] === extent[1][0]\n || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n var state = node.__brush;\n return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n return brush(X);\n}\n\nexport function brushY() {\n return brush(Y);\n}\n\nexport default function() {\n return brush(XY);\n}\n\nfunction brush(dim) {\n var extent = defaultExtent,\n filter = defaultFilter,\n touchable = defaultTouchable,\n keys = true,\n listeners = dispatch(\"start\", \"brush\", \"end\"),\n handleSize = 6,\n touchending;\n\n function brush(group) {\n var overlay = group\n .property(\"__brush\", initialize)\n .selectAll(\".overlay\")\n .data([type(\"overlay\")]);\n\n overlay.enter().append(\"rect\")\n .attr(\"class\", \"overlay\")\n .attr(\"pointer-events\", \"all\")\n .attr(\"cursor\", cursors.overlay)\n .merge(overlay)\n .each(function() {\n var extent = local(this).extent;\n select(this)\n .attr(\"x\", extent[0][0])\n .attr(\"y\", extent[0][1])\n .attr(\"width\", extent[1][0] - extent[0][0])\n .attr(\"height\", extent[1][1] - extent[0][1]);\n });\n\n group.selectAll(\".selection\")\n .data([type(\"selection\")])\n .enter().append(\"rect\")\n .attr(\"class\", \"selection\")\n .attr(\"cursor\", cursors.selection)\n .attr(\"fill\", \"#777\")\n .attr(\"fill-opacity\", 0.3)\n .attr(\"stroke\", \"#fff\")\n .attr(\"shape-rendering\", \"crispEdges\");\n\n var handle = group.selectAll(\".handle\")\n .data(dim.handles, function(d) { return d.type; });\n\n handle.exit().remove();\n\n handle.enter().append(\"rect\")\n .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n group\n .each(redraw)\n .attr(\"fill\", \"none\")\n .attr(\"pointer-events\", \"all\")\n .on(\"mousedown.brush\", started)\n .filter(touchable)\n .on(\"touchstart.brush\", started)\n .on(\"touchmove.brush\", touchmoved)\n .on(\"touchend.brush touchcancel.brush\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n brush.move = function(group, selection) {\n if (group.selection) {\n group\n .on(\"start.brush\", function() { emitter(this, arguments).beforestart().start(); })\n .on(\"interrupt.brush end.brush\", function() { emitter(this, arguments).end(); })\n .tween(\"brush\", function() {\n var that = this,\n state = that.__brush,\n emit = emitter(that, arguments),\n selection0 = state.selection,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n i = interpolate(selection0, selection1);\n\n function tween(t) {\n state.selection = t === 1 && selection1 === null ? null : i(t);\n redraw.call(that);\n emit.brush();\n }\n\n return selection0 !== null && selection1 !== null ? tween : tween(1);\n });\n } else {\n group\n .each(function() {\n var that = this,\n args = arguments,\n state = that.__brush,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n emit = emitter(that, args).beforestart();\n\n interrupt(that);\n state.selection = selection1 === null ? null : selection1;\n redraw.call(that);\n emit.start().brush().end();\n });\n }\n };\n\n brush.clear = function(group) {\n brush.move(group, null);\n };\n\n function redraw() {\n var group = select(this),\n selection = local(this).selection;\n\n if (selection) {\n group.selectAll(\".selection\")\n .style(\"display\", null)\n .attr(\"x\", selection[0][0])\n .attr(\"y\", selection[0][1])\n .attr(\"width\", selection[1][0] - selection[0][0])\n .attr(\"height\", selection[1][1] - selection[0][1]);\n\n group.selectAll(\".handle\")\n .style(\"display\", null)\n .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n }\n\n else {\n group.selectAll(\".selection,.handle\")\n .style(\"display\", \"none\")\n .attr(\"x\", null)\n .attr(\"y\", null)\n .attr(\"width\", null)\n .attr(\"height\", null);\n }\n }\n\n function emitter(that, args, clean) {\n var emit = that.__brush.emitter;\n return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n }\n\n function Emitter(that, args, clean) {\n this.that = that;\n this.args = args;\n this.state = that.__brush;\n this.active = 0;\n this.clean = clean;\n }\n\n Emitter.prototype = {\n beforestart: function() {\n if (++this.active === 1) this.state.emitter = this, this.starting = true;\n return this;\n },\n start: function() {\n if (this.starting) this.starting = false, this.emit(\"start\");\n else this.emit(\"brush\");\n return this;\n },\n brush: function() {\n this.emit(\"brush\");\n return this;\n },\n end: function() {\n if (--this.active === 0) delete this.state.emitter, this.emit(\"end\");\n return this;\n },\n emit: function(type) {\n customEvent(new BrushEvent(brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]);\n }\n };\n\n function started() {\n if (touchending && !event.touches) return;\n if (!filter.apply(this, arguments)) return;\n\n var that = this,\n type = event.target.__data__.type,\n mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n signX = dim === Y ? null : signsX[type],\n signY = dim === X ? null : signsY[type],\n state = local(that),\n extent = state.extent,\n selection = state.selection,\n W = extent[0][0], w0, w1,\n N = extent[0][1], n0, n1,\n E = extent[1][0], e0, e1,\n S = extent[1][1], s0, s1,\n dx = 0,\n dy = 0,\n moving,\n shifting = signX && signY && keys && event.shiftKey,\n lockX,\n lockY,\n pointer = event.touches ? toucher(event.changedTouches[0].identifier) : mouse,\n point0 = pointer(that),\n point = point0,\n emit = emitter(that, arguments, true).beforestart();\n\n if (type === \"overlay\") {\n if (selection) moving = true;\n state.selection = selection = [\n [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]],\n [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0]\n ];\n } else {\n w0 = selection[0][0];\n n0 = selection[0][1];\n e0 = selection[1][0];\n s0 = selection[1][1];\n }\n\n w1 = w0;\n n1 = n0;\n e1 = e0;\n s1 = s0;\n\n var group = select(that)\n .attr(\"pointer-events\", \"none\");\n\n var overlay = group.selectAll(\".overlay\")\n .attr(\"cursor\", cursors[type]);\n\n if (event.touches) {\n emit.moved = moved;\n emit.ended = ended;\n } else {\n var view = select(event.view)\n .on(\"mousemove.brush\", moved, true)\n .on(\"mouseup.brush\", ended, true);\n if (keys) view\n .on(\"keydown.brush\", keydowned, true)\n .on(\"keyup.brush\", keyupped, true)\n\n dragDisable(event.view);\n }\n\n nopropagation();\n interrupt(that);\n redraw.call(that);\n emit.start();\n\n function moved() {\n var point1 = pointer(that);\n if (shifting && !lockX && !lockY) {\n if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true;\n else lockX = true;\n }\n point = point1;\n moving = true;\n noevent();\n move();\n }\n\n function move() {\n var t;\n\n dx = point[0] - point0[0];\n dy = point[1] - point0[1];\n\n switch (mode) {\n case MODE_SPACE:\n case MODE_DRAG: {\n if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n break;\n }\n case MODE_HANDLE: {\n if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n break;\n }\n case MODE_CENTER: {\n if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX));\n if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY));\n break;\n }\n }\n\n if (e1 < w1) {\n signX *= -1;\n t = w0, w0 = e0, e0 = t;\n t = w1, w1 = e1, e1 = t;\n if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n }\n\n if (s1 < n1) {\n signY *= -1;\n t = n0, n0 = s0, s0 = t;\n t = n1, n1 = s1, s1 = t;\n if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n }\n\n if (state.selection) selection = state.selection; // May be set by brush.move!\n if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n if (selection[0][0] !== w1\n || selection[0][1] !== n1\n || selection[1][0] !== e1\n || selection[1][1] !== s1) {\n state.selection = [[w1, n1], [e1, s1]];\n redraw.call(that);\n emit.brush();\n }\n }\n\n function ended() {\n nopropagation();\n if (event.touches) {\n if (event.touches.length) return;\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n } else {\n dragEnable(event.view, moving);\n view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n }\n group.attr(\"pointer-events\", \"all\");\n overlay.attr(\"cursor\", cursors.overlay);\n if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n if (empty(selection)) state.selection = null, redraw.call(that);\n emit.end();\n }\n\n function keydowned() {\n switch (event.keyCode) {\n case 16: { // SHIFT\n shifting = signX && signY;\n break;\n }\n case 18: { // ALT\n if (mode === MODE_HANDLE) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n move();\n }\n break;\n }\n case 32: { // SPACE; takes priority over ALT\n if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n mode = MODE_SPACE;\n overlay.attr(\"cursor\", cursors.selection);\n move();\n }\n break;\n }\n default: return;\n }\n noevent();\n }\n\n function keyupped() {\n switch (event.keyCode) {\n case 16: { // SHIFT\n if (shifting) {\n lockX = lockY = shifting = false;\n move();\n }\n break;\n }\n case 18: { // ALT\n if (mode === MODE_CENTER) {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n move();\n }\n break;\n }\n case 32: { // SPACE\n if (mode === MODE_SPACE) {\n if (event.altKey) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n } else {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n }\n overlay.attr(\"cursor\", cursors[type]);\n move();\n }\n break;\n }\n default: return;\n }\n noevent();\n }\n }\n\n function touchmoved() {\n emitter(this, arguments).moved();\n }\n\n function touchended() {\n emitter(this, arguments).ended();\n }\n\n function initialize() {\n var state = this.__brush || {selection: null};\n state.extent = number2(extent.apply(this, arguments));\n state.dim = dim;\n return state;\n }\n\n brush.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n };\n\n brush.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n };\n\n brush.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n };\n\n brush.handleSize = function(_) {\n return arguments.length ? (handleSize = +_, brush) : handleSize;\n };\n\n brush.keyModifiers = function(_) {\n return arguments.length ? (keys = !!_, brush) : keys;\n };\n\n brush.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? brush : value;\n };\n\n return brush;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","var noop = {value: function() {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {\n this.target = target;\n this.type = type;\n this.subject = subject;\n this.identifier = id;\n this.active = active;\n this.x = x;\n this.y = y;\n this.dx = dx;\n this.dy = dy;\n this._ = dispatch;\n}\n\nDragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n};\n","import {dispatch} from \"d3-dispatch\";\nimport {event, customEvent, select, mouse, touch} from \"d3-selection\";\nimport nodrag, {yesdrag} from \"./nodrag.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\nimport constant from \"./constant.js\";\nimport DragEvent from \"./event.js\";\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n return this.parentNode;\n}\n\nfunction defaultSubject(d) {\n return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nexport default function() {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection\n .on(\"mousedown.drag\", mousedowned)\n .filter(touchable)\n .on(\"touchstart.drag\", touchstarted)\n .on(\"touchmove.drag\", touchmoved)\n .on(\"touchend.drag touchcancel.drag\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned() {\n if (touchending || !filter.apply(this, arguments)) return;\n var gesture = beforestart(\"mouse\", container.apply(this, arguments), mouse, this, arguments);\n if (!gesture) return;\n select(event.view).on(\"mousemove.drag\", mousemoved, true).on(\"mouseup.drag\", mouseupped, true);\n nodrag(event.view);\n nopropagation();\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\");\n }\n\n function mousemoved() {\n noevent();\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\");\n }\n\n function mouseupped() {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent();\n gestures.mouse(\"end\");\n }\n\n function touchstarted() {\n if (!filter.apply(this, arguments)) return;\n var touches = event.changedTouches,\n c = container.apply(this, arguments),\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) {\n nopropagation();\n gesture(\"start\");\n }\n }\n }\n\n function touchmoved() {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent();\n gesture(\"drag\");\n }\n }\n }\n\n function touchended() {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation();\n gesture(\"end\");\n }\n }\n }\n\n function beforestart(id, container, point, that, args) {\n var p = point(container, id), s, dx, dy,\n sublisteners = listeners.copy();\n\n if (!customEvent(new DragEvent(drag, \"beforestart\", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {\n if ((event.subject = s = subject.apply(that, args)) == null) return false;\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n return true;\n })) return;\n\n return function gesture(type) {\n var p0 = p, n;\n switch (type) {\n case \"start\": gestures[id] = gesture, n = active++; break;\n case \"end\": delete gestures[id], --active; // nobreak\n case \"drag\": p = point(container, id), n = active; break;\n }\n customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);\n };\n }\n\n drag.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), drag) : filter;\n };\n\n drag.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant(_), drag) : container;\n };\n\n drag.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant(_), drag) : subject;\n };\n\n drag.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), drag) : touchable;\n };\n\n drag.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n}\n","import {select} from \"d3-selection\";\nimport noevent from \"./noevent.js\";\n\nexport default function(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, true);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, true);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\n\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, true);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}\n","import {event} from \"d3-selection\";\n\nexport function nopropagation() {\n event.stopImmediatePropagation();\n}\n\nexport default function() {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function(row, i) {\n return f(object(row), i, columns);\n };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n\n rows.forEach(function(row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n\n return columns;\n}\n\nfunction pad(value, width) {\n var s = value + \"\", length = s.length;\n return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n return year < 0 ? \"-\" + pad(-year, 6)\n : year > 9999 ? \"+\" + pad(year, 6)\n : pad(year, 4);\n}\n\nfunction formatDate(date) {\n var hours = date.getUTCHours(),\n minutes = date.getUTCMinutes(),\n seconds = date.getUTCSeconds(),\n milliseconds = date.getUTCMilliseconds();\n return isNaN(date) ? \"Invalid Date\"\n : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n : \"\");\n}\n\nexport default function(delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert, columns, rows = parseRows(text, function(row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns || [];\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // current line number\n t, // current token\n eof = N <= 0, // current token followed by EOF?\n eol = false; // current token followed by EOL?\n\n // Strip the trailing newline.\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL;\n\n // Unescape quotes.\n var i, j = I, c;\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n if ((i = I) >= N) eof = true;\n else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n }\n\n // Find next delimiter or newline.\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n }\n\n // Return last token before EOF.\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n while (t !== EOL && t !== EOF) row.push(t), t = token();\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function preformatBody(rows, columns) {\n return rows.map(function(row) {\n return columns.map(function(column) {\n return formatValue(row[column]);\n }).join(delimiter);\n });\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n }\n\n function formatBody(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return preformatBody(rows, columns).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(value) {\n return value == null ? \"\"\n : value instanceof Date ? formatDate(value)\n : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n : value;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatBody: formatBody,\n formatRows: formatRows,\n formatRow: formatRow,\n formatValue: formatValue\n };\n}\n","import dsv from \"./dsv.js\";\n\nvar csv = dsv(\",\");\n\nexport var csvParse = csv.parse;\nexport var csvParseRows = csv.parseRows;\nexport var csvFormat = csv.format;\nexport var csvFormatBody = csv.formatBody;\nexport var csvFormatRows = csv.formatRows;\nexport var csvFormatRow = csv.formatRow;\nexport var csvFormatValue = csv.formatValue;\n","import dsv from \"./dsv.js\";\n\nvar tsv = dsv(\"\\t\");\n\nexport var tsvParse = tsv.parse;\nexport var tsvParseRows = tsv.parseRows;\nexport var tsvFormat = tsv.format;\nexport var tsvFormatBody = tsv.formatBody;\nexport var tsvFormatRows = tsv.formatRows;\nexport var tsvFormatRow = tsv.formatRow;\nexport var tsvFormatValue = tsv.formatValue;\n","export default function autoType(object) {\n for (var key in object) {\n var value = object[key].trim(), number, m;\n if (!value) value = null;\n else if (value === \"true\") value = true;\n else if (value === \"false\") value = false;\n else if (value === \"NaN\") value = NaN;\n else if (!isNaN(number = +value)) value = number;\n else if (m = value.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)) {\n if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, \"/\").replace(/T/, \" \");\n value = new Date(value);\n }\n else continue;\n object[key] = value;\n }\n return object;\n}\n\n// https://github.com/d3/d3-dsv/issues/45\nvar fixtz = new Date(\"2019-01-01T00:00\").getHours() || new Date(\"2019-07-01T00:00\").getHours();","export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","export function linear(t) {\n return +t;\n}\n","export function quadIn(t) {\n return t * t;\n}\n\nexport function quadOut(t) {\n return t * (2 - t);\n}\n\nexport function quadInOut(t) {\n return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n","var exponent = 3;\n\nexport var polyIn = (function custom(e) {\n e = +e;\n\n function polyIn(t) {\n return Math.pow(t, e);\n }\n\n polyIn.exponent = custom;\n\n return polyIn;\n})(exponent);\n\nexport var polyOut = (function custom(e) {\n e = +e;\n\n function polyOut(t) {\n return 1 - Math.pow(1 - t, e);\n }\n\n polyOut.exponent = custom;\n\n return polyOut;\n})(exponent);\n\nexport var polyInOut = (function custom(e) {\n e = +e;\n\n function polyInOut(t) {\n return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n }\n\n polyInOut.exponent = custom;\n\n return polyInOut;\n})(exponent);\n","var pi = Math.PI,\n halfPi = pi / 2;\n\nexport function sinIn(t) {\n return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);\n}\n\nexport function sinOut(t) {\n return Math.sin(t * halfPi);\n}\n\nexport function sinInOut(t) {\n return (1 - Math.cos(pi * t)) / 2;\n}\n","// tpmt is two power minus ten times t scaled to [0,1]\nexport function tpmt(x) {\n return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n","import {tpmt} from \"./math.js\";\n\nexport function expIn(t) {\n return tpmt(1 - +t);\n}\n\nexport function expOut(t) {\n return 1 - tpmt(t);\n}\n\nexport function expInOut(t) {\n return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2;\n}\n","export function circleIn(t) {\n return 1 - Math.sqrt(1 - t * t);\n}\n\nexport function circleOut(t) {\n return Math.sqrt(1 - --t * t);\n}\n\nexport function circleInOut(t) {\n return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n","var b1 = 4 / 11,\n b2 = 6 / 11,\n b3 = 8 / 11,\n b4 = 3 / 4,\n b5 = 9 / 11,\n b6 = 10 / 11,\n b7 = 15 / 16,\n b8 = 21 / 22,\n b9 = 63 / 64,\n b0 = 1 / b1 / b1;\n\nexport function bounceIn(t) {\n return 1 - bounceOut(1 - t);\n}\n\nexport function bounceOut(t) {\n return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nexport function bounceInOut(t) {\n return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n","var overshoot = 1.70158;\n\nexport var backIn = (function custom(s) {\n s = +s;\n\n function backIn(t) {\n return (t = +t) * t * (s * (t - 1) + t);\n }\n\n backIn.overshoot = custom;\n\n return backIn;\n})(overshoot);\n\nexport var backOut = (function custom(s) {\n s = +s;\n\n function backOut(t) {\n return --t * t * ((t + 1) * s + t) + 1;\n }\n\n backOut.overshoot = custom;\n\n return backOut;\n})(overshoot);\n\nexport var backInOut = (function custom(s) {\n s = +s;\n\n function backInOut(t) {\n return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n }\n\n backInOut.overshoot = custom;\n\n return backInOut;\n})(overshoot);\n","import {tpmt} from \"./math.js\";\n\nvar tau = 2 * Math.PI,\n amplitude = 1,\n period = 0.3;\n\nexport var elasticIn = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticIn(t) {\n return a * tpmt(-(--t)) * Math.sin((s - t) / p);\n }\n\n elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n elasticIn.period = function(p) { return custom(a, p); };\n\n return elasticIn;\n})(amplitude, period);\n\nexport var elasticOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticOut(t) {\n return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p);\n }\n\n elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticOut.period = function(p) { return custom(a, p); };\n\n return elasticOut;\n})(amplitude, period);\n\nexport var elasticInOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticInOut(t) {\n return ((t = t * 2 - 1) < 0\n ? a * tpmt(-t) * Math.sin((s - t) / p)\n : 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2;\n }\n\n elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticInOut.period = function(p) { return custom(a, p); };\n\n return elasticInOut;\n})(amplitude, period);\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n","import {hue} from \"./color.js\";\n\nexport default function(a, b) {\n var i = hue(+a, +b);\n return function(t) {\n var x = i(t);\n return x - 360 * Math.floor(x / 360);\n };\n}\n","import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n return function(start, end) {\n var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n","export var deg2rad = Math.PI / 180;\nexport var rad2deg = 180 / Math.PI;\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {deg2rad, rad2deg} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nvar K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n brighter: function(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker: function(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb: function() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * rad2deg;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * deg2rad;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n brighter: function(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker: function(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb: function() {\n return hcl2lab(this).rgb();\n }\n}));\n","import {lab as colorLab} from \"d3-color\";\nimport color from \"./color.js\";\n\nexport default function lab(start, end) {\n var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n a = color(start.a, end.a),\n b = color(start.b, end.b),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.l = l(t);\n start.a = a(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n}\n","import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {deg2rad, rad2deg} from \"./math.js\";\n\nvar A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n bl = b - l,\n k = (E * (g - l) - C * bl) / D,\n s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n l = +this.l,\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh)),\n this.opacity\n );\n }\n}));\n","import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n return (function cubehelixGamma(y) {\n y = +y;\n\n function cubehelix(start, end) {\n var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(Math.pow(t, y));\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n cubehelix.gamma = cubehelixGamma;\n\n return cubehelix;\n })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\n","export default function piecewise(interpolate, values) {\n var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n while (i < n) I[i] = interpolate(v, v = values[++i]);\n return function(t) {\n var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n return I[i](t - i);\n };\n}\n","export default function(interpolator, n) {\n var samples = new Array(n);\n for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n return samples;\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","import decompose, {identity} from \"./decompose.js\";\n\nvar cssNode,\n cssRoot,\n cssView,\n svgNode;\n\nexport function parseCss(value) {\n if (value === \"none\") return identity;\n if (!cssNode) cssNode = document.createElement(\"DIV\"), cssRoot = document.documentElement, cssView = document.defaultView;\n cssNode.style.transform = value;\n value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue(\"transform\");\n cssRoot.removeChild(cssNode);\n value = value.slice(7, -1).split(\",\");\n return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n","var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n","import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","var rho = Math.SQRT2,\n rho2 = 2,\n rho4 = 4,\n epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n// p0 = [ux0, uy0, w0]\n// p1 = [ux1, uy1, w1]\nexport default function(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000;\n\n return i;\n}\n","import namespace from \"./namespace\";\nimport {xhtml} from \"./namespaces\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n","import creator from \"./creator\";\nimport select from \"./select\";\n\nexport default function(name) {\n return select(creator(name).call(document.documentElement));\n}\n","var nextId = 0;\n\nexport default function local() {\n return new Local;\n}\n\nfunction Local() {\n this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n constructor: Local,\n get: function(node) {\n var id = this._;\n while (!(id in node)) if (!(node = node.parentNode)) return;\n return node[id];\n },\n set: function(node, value) {\n return node[this._] = value;\n },\n remove: function(node) {\n return this._ in node && delete node[this._];\n },\n toString: function() {\n return this._;\n }\n};\n","import {Selection, root} from \"./selection/index\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([document.querySelectorAll(selector)], [document.documentElement])\n : new Selection([selector == null ? [] : selector], root);\n}\n","import sourceEvent from \"./sourceEvent\";\nimport point from \"./point\";\n\nexport default function(node, touches) {\n if (touches == null) touches = sourceEvent().touches;\n\n for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) {\n points[i] = point(node, touches[i]);\n }\n\n return points;\n}\n","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n","import sourceEvent from \"./sourceEvent\";\nimport point from \"./point\";\n\nexport default function(node) {\n var event = sourceEvent();\n if (event.changedTouches) event = event.changedTouches[0];\n return point(node, event);\n}\n","import namespaces from \"./namespaces\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name;\n}\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: 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};\n","export default function(node, event) {\n var svg = node.ownerSVGElement || node;\n\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n}\n","import {Selection, root} from \"./selection/index\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n","import {Selection} from \"./index\";\nimport {EnterNode} from \"./enter\";\nimport constant from \"../constant\";\n\nvar keyPrefix = \"$\"; // Protect against keys like “__proto__”.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = {},\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n if (keyValue in nodeByKeyValue) {\n exit[i] = node;\n } else {\n nodeByKeyValue[keyValue] = node;\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = keyPrefix + key.call(parent, data[i], i, data);\n if (node = nodeByKeyValue[keyValue]) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue[keyValue] = null;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n exit[i] = node;\n }\n }\n}\n\nexport default function(value, key) {\n if (!value) {\n data = new Array(this.size()), j = -1;\n this.each(function(d) { data[++j] = d; });\n return data;\n }\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = value.call(parent, parent && parent.__data__, j, parents),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n","import {Selection} from \"./index\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import namespace from \"../namespace\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n","function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n","function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n","function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n","import creator from \"../creator\";\nimport selector from \"../selector\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n","function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n","import defaultView from \"../window\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n","import selection_select from \"./select\";\nimport selection_selectAll from \"./selectAll\";\nimport selection_filter from \"./filter\";\nimport selection_data from \"./data\";\nimport selection_enter from \"./enter\";\nimport selection_exit from \"./exit\";\nimport selection_join from \"./join\";\nimport selection_merge from \"./merge\";\nimport selection_order from \"./order\";\nimport selection_sort from \"./sort\";\nimport selection_call from \"./call\";\nimport selection_nodes from \"./nodes\";\nimport selection_node from \"./node\";\nimport selection_size from \"./size\";\nimport selection_empty from \"./empty\";\nimport selection_each from \"./each\";\nimport selection_attr from \"./attr\";\nimport selection_style from \"./style\";\nimport selection_property from \"./property\";\nimport selection_classed from \"./classed\";\nimport selection_text from \"./text\";\nimport selection_html from \"./html\";\nimport selection_raise from \"./raise\";\nimport selection_lower from \"./lower\";\nimport selection_append from \"./append\";\nimport selection_insert from \"./insert\";\nimport selection_remove from \"./remove\";\nimport selection_clone from \"./clone\";\nimport selection_datum from \"./datum\";\nimport selection_on from \"./on\";\nimport selection_dispatch from \"./dispatch\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch\n};\n\nexport default selection;\n","import {Selection} from \"./index\";\nimport selector from \"../selector\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","import {Selection} from \"./index\";\nimport selectorAll from \"../selectorAll\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n","import {Selection} from \"./index\";\nimport matcher from \"../matcher\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n","export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n if (onupdate != null) update = onupdate(update);\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n","import {Selection} from \"./index\";\n\nexport default function(selection) {\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n","export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n","export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n","export default function() {\n var nodes = new Array(this.size()), i = -1;\n this.each(function() { nodes[++i] = this; });\n return nodes;\n}\n","export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n","export default function() {\n var size = 0;\n this.each(function() { ++size; });\n return size;\n}\n","export default function() {\n return !this.node();\n}\n","export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n","import creator from \"../creator\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n","export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n","var filterEvents = {};\n\nexport var event = null;\n\nif (typeof document !== \"undefined\") {\n var element = document.documentElement;\n if (!(\"onmouseenter\" in element)) {\n filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n }\n}\n\nfunction filterContextListener(listener, index, group) {\n listener = contextListener(listener, index, group);\n return function(event) {\n var related = event.relatedTarget;\n if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n listener.call(this, event);\n }\n };\n}\n\nfunction contextListener(listener, index, group) {\n return function(event1) {\n var event0 = event; // Events can be reentrant (e.g., focus).\n event = event1;\n try {\n listener.call(this, this.__data__, index, group);\n } finally {\n event = event0;\n }\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.capture);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, capture) {\n var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n return function(d, i, group) {\n var on = this.__on, o, listener = wrap(value, i, group);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.capture);\n this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, capture);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, capture) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n if (capture == null) capture = false;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n return this;\n}\n\nexport function customEvent(event1, listener, that, args) {\n var event0 = event;\n event1.sourceEvent = event;\n event = event1;\n try {\n return listener.apply(that, args);\n } finally {\n event = event0;\n }\n}\n","import defaultView from \"../window\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n","import {event} from \"./selection/on\";\n\nexport default function() {\n var current = event, source;\n while (source = current.sourceEvent) current = source;\n return current;\n}\n","import sourceEvent from \"./sourceEvent\";\nimport point from \"./point\";\n\nexport default function(node, touches, identifier) {\n if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches;\n\n for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {\n if ((touch = touches[i]).identifier === identifier) {\n return point(node, touch);\n }\n }\n\n return null;\n}\n","export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n","var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export var abs = Math.abs;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var sin = Math.sin;\nexport var sqrt = Math.sqrt;\n\nexport var epsilon = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null;\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle.\n if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function() {\n var x = pointX,\n y = pointY,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n function line(data) {\n var i,\n n = data.length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function() {\n var x0 = pointX,\n x1 = null,\n y0 = constant(0),\n y1 = pointY,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n function area(data) {\n var i,\n j,\n k,\n n = data.length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n output.lineEnd();\n output.areaEnd();\n }\n }\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n\n area.x = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n\n area.x0 = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n\n area.x1 = function(_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n\n area.y = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n\n area.y0 = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n\n area.y1 = function(_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n\n area.lineX0 =\n area.lineY0 = function() {\n return arealine().x(x0).y(y0);\n };\n\n area.lineY1 = function() {\n return arealine().x(x0).y(y1);\n };\n\n area.lineX1 = function() {\n return arealine().x(x1).y(y0);\n };\n\n area.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n\n area.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n\n area.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n\n return area;\n}\n","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","import constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = data.length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","import curveLinear from \"./linear.js\";\n\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n this._curve = curve;\n}\n\nRadial.prototype = {\n areaStart: function() {\n this._curve.areaStart();\n },\n areaEnd: function() {\n this._curve.areaEnd();\n },\n lineStart: function() {\n this._curve.lineStart();\n },\n lineEnd: function() {\n this._curve.lineEnd();\n },\n point: function(a, r) {\n this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n }\n};\n\nexport default function curveRadial(curve) {\n\n function radial(context) {\n return new Radial(curve(context));\n }\n\n radial._curve = curve;\n\n return radial;\n}\n","import curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport line from \"./line.js\";\n\nexport function lineRadial(l) {\n var c = l.curve;\n\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n\n l.curve = function(_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return l;\n}\n\nexport default function() {\n return lineRadial(line().curve(curveRadialLinear));\n}\n","import curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport area from \"./area.js\";\nimport {lineRadial} from \"./lineRadial.js\";\n\nexport default function() {\n var a = area().curve(curveRadialLinear),\n c = a.curve,\n x0 = a.lineX0,\n x1 = a.lineX1,\n y0 = a.lineY0,\n y1 = a.lineY1;\n\n a.angle = a.x, delete a.x;\n a.startAngle = a.x0, delete a.x0;\n a.endAngle = a.x1, delete a.x1;\n a.radius = a.y, delete a.y;\n a.innerRadius = a.y0, delete a.y0;\n a.outerRadius = a.y1, delete a.y1;\n a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0;\n a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1;\n a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0;\n a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1;\n\n a.curve = function(_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return a;\n}\n","export default function(x, y) {\n return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n}\n","export var slice = Array.prototype.slice;\n","import {path} from \"d3-path\";\nimport {slice} from \"../array.js\";\nimport constant from \"../constant.js\";\nimport {x as pointX, y as pointY} from \"../point.js\";\nimport pointRadial from \"../pointRadial.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nfunction link(curve) {\n var source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null;\n\n function link() {\n var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n if (!context) context = buffer = path();\n curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), link) : context;\n };\n\n return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n var p0 = pointRadial(x0, y0),\n p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n p2 = pointRadial(x1, y0),\n p3 = pointRadial(x1, y1);\n context.moveTo(p0[0], p0[1]);\n context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nexport function linkHorizontal() {\n return link(curveHorizontal);\n}\n\nexport function linkVertical() {\n return link(curveVertical);\n}\n\nexport function linkRadial() {\n var l = link(curveRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}\n","import {pi, tau} from \"../math.js\";\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }\n};\n","export default {\n draw: function(context, size) {\n var r = Math.sqrt(size / 5) / 2;\n context.moveTo(-3 * r, -r);\n context.lineTo(-r, -r);\n context.lineTo(-r, -3 * r);\n context.lineTo(r, -3 * r);\n context.lineTo(r, -r);\n context.lineTo(3 * r, -r);\n context.lineTo(3 * r, r);\n context.lineTo(r, r);\n context.lineTo(r, 3 * r);\n context.lineTo(-r, 3 * r);\n context.lineTo(-r, r);\n context.lineTo(-3 * r, r);\n context.closePath();\n }\n};\n","var tan30 = Math.sqrt(1 / 3),\n tan30_2 = tan30 * 2;\n\nexport default {\n draw: function(context, size) {\n var y = Math.sqrt(size / tan30_2),\n x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }\n};\n","import {pi, tau} from \"../math.js\";\n\nvar ka = 0.89081309152928522810,\n kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10),\n kx = Math.sin(tau / 10) * kr,\n ky = -Math.cos(tau / 10) * kr;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size * ka),\n x = kx * r,\n y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (var i = 1; i < 5; ++i) {\n var a = tau * i / 5,\n c = Math.cos(a),\n s = Math.sin(a);\n context.lineTo(s * r, -c * r);\n context.lineTo(c * x - s * y, s * x + c * y);\n }\n context.closePath();\n }\n};\n","export default {\n draw: function(context, size) {\n var w = Math.sqrt(size),\n x = -w / 2;\n context.rect(x, x, w, w);\n }\n};\n","var sqrt3 = Math.sqrt(3);\n\nexport default {\n draw: function(context, size) {\n var y = -Math.sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }\n};\n","var c = -0.5,\n s = Math.sqrt(3) / 2,\n k = 1 / Math.sqrt(12),\n a = (k / 2 + 1) * 3;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / a),\n x0 = r / 2,\n y0 = r * k,\n x1 = x0,\n y1 = r * k + r,\n x2 = -x1,\n y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }\n};\n","import {path} from \"d3-path\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport star from \"./symbol/star.js\";\nimport square from \"./symbol/square.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport wye from \"./symbol/wye.js\";\nimport constant from \"./constant.js\";\n\nexport var symbols = [\n circle,\n cross,\n diamond,\n square,\n star,\n triangle,\n wye\n];\n\nexport default function() {\n var type = constant(circle),\n size = constant(64),\n context = null;\n\n function symbol() {\n var buffer;\n if (!context) context = buffer = path();\n type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n symbol.type = function(_) {\n return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n };\n\n symbol.size = function(_) {\n return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n };\n\n symbol.context = function(_) {\n return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n };\n\n return symbol;\n}\n","export default function() {}\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // proceed\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n","import noop from \"../noop.js\";\nimport {point} from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n","import {point} from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n","import {Basis} from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {point} from \"./cardinal.js\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {epsilon} from \"../math.js\";\nimport {Cardinal} from \"./cardinal.js\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalClosed} from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalOpen} from \"./cardinalOpen.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n","export default function(series, order) {\n if (!((n = series.length) > 1)) return;\n for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n s0 = s1, s1 = series[order[i]];\n for (j = 0; j < m; ++j) {\n s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n }\n }\n}\n","export default function(series) {\n var n = series.length, o = new Array(n);\n while (--n >= 0) o[n] = n;\n return o;\n}\n","import {slice} from \"./array.js\";\nimport constant from \"./constant.js\";\nimport offsetNone from \"./offset/none.js\";\nimport orderNone from \"./order/none.js\";\n\nfunction stackValue(d, key) {\n return d[key];\n}\n\nexport default function() {\n var keys = constant([]),\n order = orderNone,\n offset = offsetNone,\n value = stackValue;\n\n function stack(data) {\n var kz = keys.apply(this, arguments),\n i,\n m = data.length,\n n = kz.length,\n sz = new Array(n),\n oz;\n\n for (i = 0; i < n; ++i) {\n for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {\n si[j] = sij = [0, +value(data[j], ki, j, data)];\n sij.data = data[j];\n }\n si.key = ki;\n }\n\n for (i = 0, oz = order(sz); i < n; ++i) {\n sz[oz[i]].index = i;\n }\n\n offset(sz, oz);\n return sz;\n }\n\n stack.keys = function(_) {\n return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : keys;\n };\n\n stack.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n };\n\n stack.order = function(_) {\n return arguments.length ? (order = _ == null ? orderNone : typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : order;\n };\n\n stack.offset = function(_) {\n return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset;\n };\n\n return stack;\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n }\n none(series, order);\n}\n","export default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n for (yp = yn = 0, i = 0; i < n; ++i) {\n if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {\n d[0] = yp, d[1] = yp += dy;\n } else if (dy < 0) {\n d[1] = yn, d[0] = yn += dy;\n } else {\n d[0] = 0, d[1] = dy;\n }\n }\n }\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n s0[j][1] += s0[j][0] = -y / 2;\n }\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n var si = series[order[i]],\n sij0 = si[j][1] || 0,\n sij1 = si[j - 1][1] || 0,\n s3 = (sij0 - sij1) / 2;\n for (var k = 0; k < i; ++k) {\n var sk = series[order[k]],\n skj0 = sk[j][1] || 0,\n skj1 = sk[j - 1][1] || 0;\n s3 += skj0 - skj1;\n }\n s1 += sij0, s2 += s3 * sij0;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n if (s1) y -= s2 / s1;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var peaks = series.map(peak);\n return none(series).sort(function(a, b) { return peaks[a] - peaks[b]; });\n}\n\nfunction peak(series) {\n var i = -1, j = 0, n = series.length, vi, vj = -Infinity;\n while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n return j;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var sums = series.map(sum);\n return none(series).sort(function(a, b) { return sums[a] - sums[b]; });\n}\n\nexport function sum(series) {\n var s = 0, i = -1, n = series.length, v;\n while (++i < n) if (v = +series[i][1]) s += v;\n return s;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function(series) {\n return ascending(series).reverse();\n}\n","import appearance from \"./appearance.js\";\nimport {sum} from \"./ascending.js\";\n\nexport default function(series) {\n var n = series.length,\n i,\n j,\n sums = series.map(sum),\n order = appearance(series),\n top = 0,\n bottom = 0,\n tops = [],\n bottoms = [];\n\n for (i = 0; i < n; ++i) {\n j = order[i];\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n\n return bottoms.reverse().concat(tops);\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n return none(series).reverse();\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n","import {utcFormat} from \"./defaultLocale.js\";\n\nexport var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n ? formatIsoNative\n : utcFormat(isoSpecifier);\n\nexport default formatIso;\n","import {isoSpecifier} from \"./isoFormat.js\";\nimport {utcParse} from \"./defaultLocale.js\";\n\nfunction parseIsoNative(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n ? parseIsoNative\n : utcParse(isoSpecifier);\n\nexport default parseIso;\n","import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n var map = {}, i = -1, n = names.length;\n while (++i < n) map[names[i].toLowerCase()] = i;\n return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n","import interval from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nvar day = interval(function(date) {\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setDate(date.getDate() + step);\n}, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function(date) {\n return date.getDate() - 1;\n});\n\nexport default day;\nexport var days = day.range;\n","export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;\n","var t0 = new Date,\n t1 = new Date;\n\nexport default function newInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = function(date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function(date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [], previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function(step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? function(d) { return field(d) % step === 0; }\n : function(d) { return interval.count(0, d) % step === 0; });\n };\n }\n\n return interval;\n}\n","import interval from \"./interval.js\";\nimport {durationDay} from \"./duration.js\";\n\nvar utcDay = interval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n return (end - start) / durationDay;\n}, function(date) {\n return date.getUTCDate() - 1;\n});\n\nexport default utcDay;\nexport var utcDays = utcDay.range;\n","import interval from \"./interval.js\";\nimport {durationWeek} from \"./duration.js\";\n\nfunction utcWeekday(i) {\n return interval(function(date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\n\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;\n","import interval from \"./interval.js\";\n\nvar utcYear = interval(function(date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;\n","import interval from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction weekday(i) {\n return interval(function(date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\n\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;\n","import interval from \"./interval.js\";\n\nvar year = interval(function(date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function(date) {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(function(elapsed) {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n","import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n","import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n","import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n","import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n","import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n","import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n","import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n","import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n end: transition_end\n};\n","import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n","import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n","import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n","import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n","import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n","import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n","function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n","import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n","function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n","function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n","import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n });\n}\n","import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n return defaultTiming.time = now(), defaultTiming;\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n","import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n","import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n","import {Transition} from \"./transition/index.js\";\nimport {SCHEDULED} from \"./transition/schedule.js\";\n\nvar root = [null];\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n i;\n\n if (schedules) {\n name = name == null ? null : name + \"\";\n for (i in schedules) {\n if ((schedule = schedules[i]).state > SCHEDULED && schedule.name === name) {\n return new Transition([[node]], root, name, +i);\n }\n }\n }\n\n return null;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function ZoomEvent(target, type, transform) {\n this.target = target;\n this.type = type;\n this.transform = transform;\n}\n","export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\n\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n return node.__zoom;\n}\n","import {event} from \"d3-selection\";\n\nexport function nopropagation() {\n event.stopImmediatePropagation();\n}\n\nexport default function() {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {event, customEvent, select, mouse, touch} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport {Transform, identity} from \"./transform.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n var e = this;\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta() {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002);\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(\n dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n );\n}\n\nexport default function() {\n var filter = defaultFilter,\n extent = defaultExtent,\n constrain = defaultConstrain,\n wheelDelta = defaultWheelDelta,\n touchable = defaultTouchable,\n scaleExtent = [0, Infinity],\n translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n duration = 250,\n interpolate = interpolateZoom,\n listeners = dispatch(\"start\", \"zoom\", \"end\"),\n touchstarting,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0;\n\n function zoom(selection) {\n selection\n .property(\"__zoom\", defaultTransform)\n .on(\"wheel.zoom\", wheeled)\n .on(\"mousedown.zoom\", mousedowned)\n .on(\"dblclick.zoom\", dblclicked)\n .filter(touchable)\n .on(\"touchstart.zoom\", touchstarted)\n .on(\"touchmove.zoom\", touchmoved)\n .on(\"touchend.zoom touchcancel.zoom\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function(collection, transform, point) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n if (collection !== selection) {\n schedule(collection, transform, point);\n } else {\n selection.interrupt().each(function() {\n gesture(this, arguments)\n .start()\n .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n .end();\n });\n }\n };\n\n zoom.scaleBy = function(selection, k, p) {\n zoom.scaleTo(selection, function() {\n var k0 = this.__zoom.k,\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p);\n };\n\n zoom.scaleTo = function(selection, k, p) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t0 = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n p1 = t0.invert(p0),\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p);\n };\n\n zoom.translateBy = function(selection, x, y) {\n zoom.transform(selection, function() {\n return constrain(this.__zoom.translate(\n typeof x === \"function\" ? x.apply(this, arguments) : x,\n typeof y === \"function\" ? y.apply(this, arguments) : y\n ), extent.apply(this, arguments), translateExtent);\n });\n };\n\n zoom.translateTo = function(selection, x, y, p) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n typeof y === \"function\" ? -y.apply(this, arguments) : -y\n ), e, translateExtent);\n }, p);\n };\n\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n\n function centroid(extent) {\n return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n }\n\n function schedule(transition, transform, point) {\n transition\n .on(\"start.zoom\", function() { gesture(this, arguments).start(); })\n .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).end(); })\n .tween(\"zoom\", function() {\n var that = this,\n args = arguments,\n g = gesture(that, args),\n e = extent.apply(that, args),\n p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n a = that.__zoom,\n b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function(t) {\n if (t === 1) t = b; // Avoid rounding error on end.\n else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }\n g.zoom(null, t);\n };\n });\n }\n\n function gesture(that, args, clean) {\n return (!clean && that.__zooming) || new Gesture(that, args);\n }\n\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n start: function() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n return this;\n },\n zoom: function(key, transform) {\n if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n return this;\n },\n emit: function(type) {\n customEvent(new ZoomEvent(zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]);\n }\n };\n\n function wheeled() {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, arguments),\n t = this.__zoom,\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n p = mouse(this);\n\n // If the mouse is in the same location as before, reuse it.\n // If there were recent wheel events, reset the wheel idle timeout.\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n clearTimeout(g.wheel);\n }\n\n // If this wheel event won’t trigger a transform change, ignore it.\n else if (t.k === k) return;\n\n // Otherwise, capture the mouse point and location at the start.\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n\n noevent();\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n\n function mousedowned() {\n if (touchending || !filter.apply(this, arguments)) return;\n var g = gesture(this, arguments, true),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = mouse(this),\n x0 = event.clientX,\n y0 = event.clientY;\n\n dragDisable(event.view);\n nopropagation();\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved() {\n noevent();\n if (!g.moved) {\n var dx = event.clientX - x0, dy = event.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n g.zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = mouse(g.that), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped() {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent();\n g.end();\n }\n }\n\n function dblclicked() {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = mouse(this),\n p1 = t0.invert(p0),\n k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent);\n\n noevent();\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0);\n else select(this).call(zoom.transform, t1);\n }\n\n function touchstarted() {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, arguments, event.changedTouches.length === n),\n started, i, t, p;\n\n nopropagation();\n for (i = 0; i < n; ++i) {\n t = touches[i], p = touch(this, touches, t.identifier);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n }\n\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n if (started) {\n if (g.taps < 2) touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved() {\n if (!this.__zooming) return;\n var g = gesture(this, arguments),\n touches = event.changedTouches,\n n = touches.length, i, t, p, l;\n\n noevent();\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n g.taps = 0;\n for (i = 0; i < n; ++i) {\n t = touches[i], p = touch(this, touches, t.identifier);\n if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n }\n t = g.that.__zoom;\n if (g.touch1) {\n var p0 = g.touch0[0], l0 = g.touch0[1],\n p1 = g.touch1[0], l1 = g.touch1[1],\n dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n }\n else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n else return;\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended() {\n if (!this.__zooming) return;\n var g = gesture(this, arguments),\n touches = event.changedTouches,\n n = touches.length, i, t;\n\n nopropagation();\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, touchDelay);\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n }\n if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n else {\n g.end();\n // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n if (g.taps === 2) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\n }\n }\n\n zoom.wheelDelta = function(_) {\n return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n };\n\n zoom.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n };\n\n zoom.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n };\n\n zoom.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n };\n\n zoom.scaleExtent = function(_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n };\n\n zoom.translateExtent = function(_) {\n return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n };\n\n zoom.constrain = function(_) {\n return arguments.length ? (constrain = _, zoom) : constrain;\n };\n\n zoom.duration = function(_) {\n return arguments.length ? (duration = +_, zoom) : duration;\n };\n\n zoom.interpolate = function(_) {\n return arguments.length ? (interpolate = _, zoom) : interpolate;\n };\n\n zoom.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom : value;\n };\n\n zoom.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n };\n\n return zoom;\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\n/** @type {?} */\r\nconst WINDOW = new InjectionToken('WindowToken', typeof window !== 'undefined' && window.document ? { providedIn: 'root', factory: (/**\r\n * @return {?}\r\n */\r\n () => window) } : undefined);\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\n\nexport { WINDOW };\n\n","import { WINDOW } from 'ngx-window-token';\nimport { Subject } from 'rxjs';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport { Inject, Injectable, Optional, Directive, EventEmitter, HostListener, Input, Output, TemplateRef, ViewContainerRef, NgModule, defineInjectable, inject } from '@angular/core';\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\n/**\r\n * The following code is heavily copied from https://github.com/zenorocha/clipboard.js\r\n */\r\nimport * as ɵngcc0 from '@angular/core';\nclass ClipboardService {\r\n /**\r\n * @param {?} document\r\n * @param {?} window\r\n */\r\n constructor(document, window) {\r\n this.document = document;\r\n this.window = window;\r\n this.copySubject = new Subject();\r\n this.copyResponse$ = this.copySubject.asObservable();\r\n this.config = {};\r\n }\r\n /**\r\n * @param {?} config\r\n * @return {?}\r\n */\r\n configure(config) {\r\n this.config = config;\r\n }\r\n /**\r\n * @param {?} content\r\n * @return {?}\r\n */\r\n copy(content) {\r\n if (!this.isSupported || !content) {\r\n return this.pushCopyResponse({ isSuccess: false, content });\r\n }\r\n /** @type {?} */\r\n const copyResult = this.copyFromContent(content);\r\n if (copyResult) {\r\n return this.pushCopyResponse({ content, isSuccess: copyResult });\r\n }\r\n return this.pushCopyResponse({ isSuccess: false, content });\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n get isSupported() {\r\n return !!this.document.queryCommandSupported && !!this.document.queryCommandSupported('copy') && !!this.window;\r\n }\r\n /**\r\n * @param {?} element\r\n * @return {?}\r\n */\r\n isTargetValid(element) {\r\n if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) {\r\n if (element.hasAttribute('disabled')) {\r\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\r\n }\r\n return true;\r\n }\r\n throw new Error('Target should be input or textarea');\r\n }\r\n /**\r\n * Attempts to copy from an input `targetElm`\r\n * @param {?} targetElm\r\n * @param {?=} isFocus\r\n * @return {?}\r\n */\r\n copyFromInputElement(targetElm, isFocus = true) {\r\n try {\r\n this.selectTarget(targetElm);\r\n /** @type {?} */\r\n const re = this.copyText();\r\n this.clearSelection(isFocus ? targetElm : undefined, this.window);\r\n return re && this.isCopySuccessInIE11();\r\n }\r\n catch (error) {\r\n return false;\r\n }\r\n }\r\n /**\r\n * This is a hack for IE11 to return `true` even if copy fails.\r\n * @return {?}\r\n */\r\n isCopySuccessInIE11() {\r\n /** @type {?} */\r\n const clipboardData = this.window['clipboardData'];\r\n if (clipboardData && clipboardData.getData) {\r\n if (!clipboardData.getData('Text')) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * Creates a fake textarea element, sets its value from `text` property,\r\n * and makes a selection on it.\r\n * @param {?} content\r\n * @param {?=} container\r\n * @return {?}\r\n */\r\n copyFromContent(content, container = this.document.body) {\r\n // check if the temp textarea still belongs to the current container.\r\n // In case we have multiple places using ngx-clipboard, one is in a modal using container but the other one is not.\r\n if (this.tempTextArea && !container.contains(this.tempTextArea)) {\r\n this.destroy(this.tempTextArea.parentElement);\r\n }\r\n if (!this.tempTextArea) {\r\n this.tempTextArea = this.createTempTextArea(this.document, this.window);\r\n try {\r\n container.appendChild(this.tempTextArea);\r\n }\r\n catch (error) {\r\n throw new Error('Container should be a Dom element');\r\n }\r\n }\r\n this.tempTextArea.value = content;\r\n /** @type {?} */\r\n const toReturn = this.copyFromInputElement(this.tempTextArea, false);\r\n if (this.config.cleanUpAfterCopy) {\r\n this.destroy(this.tempTextArea.parentElement);\r\n }\r\n return toReturn;\r\n }\r\n /**\r\n * Remove temporary textarea if any exists.\r\n * @param {?=} container\r\n * @return {?}\r\n */\r\n destroy(container = this.document.body) {\r\n if (this.tempTextArea) {\r\n container.removeChild(this.tempTextArea);\r\n // removeChild doesn't remove the reference from memory\r\n this.tempTextArea = undefined;\r\n }\r\n }\r\n /**\r\n * Select the target html input element.\r\n * @private\r\n * @param {?} inputElement\r\n * @return {?}\r\n */\r\n selectTarget(inputElement) {\r\n inputElement.select();\r\n inputElement.setSelectionRange(0, inputElement.value.length);\r\n return inputElement.value.length;\r\n }\r\n /**\r\n * @private\r\n * @return {?}\r\n */\r\n copyText() {\r\n return this.document.execCommand('copy');\r\n }\r\n /**\r\n * Moves focus away from `target` and back to the trigger, removes current selection.\r\n * @private\r\n * @param {?} inputElement\r\n * @param {?} window\r\n * @return {?}\r\n */\r\n clearSelection(inputElement, window) {\r\n inputElement && inputElement.focus();\r\n window.getSelection().removeAllRanges();\r\n }\r\n /**\r\n * Creates a fake textarea for copy command.\r\n * @private\r\n * @param {?} doc\r\n * @param {?} window\r\n * @return {?}\r\n */\r\n createTempTextArea(doc, window) {\r\n /** @type {?} */\r\n const isRTL = doc.documentElement.getAttribute('dir') === 'rtl';\r\n /** @type {?} */\r\n let ta;\r\n ta = doc.createElement('textarea');\r\n // Prevent zooming on iOS\r\n ta.style.fontSize = '12pt';\r\n // Reset box model\r\n ta.style.border = '0';\r\n ta.style.padding = '0';\r\n ta.style.margin = '0';\r\n // Move element out of screen horizontally\r\n ta.style.position = 'absolute';\r\n ta.style[isRTL ? 'right' : 'left'] = '-9999px';\r\n // Move element to the same position vertically\r\n /** @type {?} */\r\n const yPosition = window.pageYOffset || doc.documentElement.scrollTop;\r\n ta.style.top = yPosition + 'px';\r\n ta.setAttribute('readonly', '');\r\n return ta;\r\n }\r\n /**\r\n * Pushes copy operation response to copySubject, to provide global access\r\n * to the response.\r\n * @param {?} response\r\n * @return {?}\r\n */\r\n pushCopyResponse(response) {\r\n this.copySubject.next(response);\r\n }\r\n /**\r\n * @deprecated use pushCopyResponse instead.\r\n * @param {?} response\r\n * @return {?}\r\n */\r\n pushCopyReponse(response) {\r\n this.pushCopyResponse(response);\r\n }\r\n}\nClipboardService.ɵfac = function ClipboardService_Factory(t) { return new (t || ClipboardService)(ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(WINDOW, 8)); };\nClipboardService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: ClipboardService, factory: ClipboardService.ɵfac, providedIn: 'root' });\r\n/** @nocollapse */\r\nClipboardService.ctorParameters = () => [\r\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\r\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [WINDOW,] }] }\r\n];\r\n/** @nocollapse */ ClipboardService.ngInjectableDef = defineInjectable({ factory: function ClipboardService_Factory() { return new ClipboardService(inject(DOCUMENT), inject(WINDOW, 8)); }, token: ClipboardService, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ClipboardService, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [WINDOW]\n }] }]; }, null); })();\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\nclass ClipboardDirective {\r\n /**\r\n * @param {?} clipboardSrv\r\n */\r\n constructor(clipboardSrv) {\r\n this.clipboardSrv = clipboardSrv;\r\n this.cbOnSuccess = new EventEmitter();\r\n this.cbOnError = new EventEmitter();\r\n }\r\n // tslint:disable-next-line:no-empty\r\n /**\r\n * @return {?}\r\n */\r\n ngOnInit() { }\r\n /**\r\n * @return {?}\r\n */\r\n ngOnDestroy() {\r\n this.clipboardSrv.destroy(this.container);\r\n }\r\n /**\r\n * @param {?} event\r\n * @return {?}\r\n */\r\n onClick(event) {\r\n if (!this.clipboardSrv.isSupported) {\r\n this.handleResult(false, undefined, event);\r\n }\r\n else if (this.targetElm && this.clipboardSrv.isTargetValid(this.targetElm)) {\r\n this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm), this.targetElm.value, event);\r\n }\r\n else if (this.cbContent) {\r\n this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent, this.container), this.cbContent, event);\r\n }\r\n }\r\n /**\r\n * Fires an event based on the copy operation result.\r\n * @private\r\n * @param {?} succeeded\r\n * @param {?} copiedContent\r\n * @param {?} event\r\n * @return {?}\r\n */\r\n handleResult(succeeded, copiedContent, event) {\r\n /** @type {?} */\r\n let response = {\r\n isSuccess: succeeded,\r\n event\r\n };\r\n if (succeeded) {\r\n response = Object.assign(response, {\r\n content: copiedContent,\r\n successMessage: this.cbSuccessMsg\r\n });\r\n this.cbOnSuccess.emit(response);\r\n }\r\n else {\r\n this.cbOnError.emit(response);\r\n }\r\n this.clipboardSrv.pushCopyResponse(response);\r\n }\r\n}\nClipboardDirective.ɵfac = function ClipboardDirective_Factory(t) { return new (t || ClipboardDirective)(ɵngcc0.ɵɵdirectiveInject(ClipboardService)); };\nClipboardDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: ClipboardDirective, selectors: [[\"\", \"ngxClipboard\", \"\"]], hostBindings: function ClipboardDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function ClipboardDirective_click_HostBindingHandler($event) { return ctx.onClick($event.target); });\n } }, inputs: { targetElm: [\"ngxClipboard\", \"targetElm\"], container: \"container\", cbContent: \"cbContent\", cbSuccessMsg: \"cbSuccessMsg\" }, outputs: { cbOnSuccess: \"cbOnSuccess\", cbOnError: \"cbOnError\" } });\r\n/** @nocollapse */\r\nClipboardDirective.ctorParameters = () => [\r\n { type: ClipboardService }\r\n];\r\nClipboardDirective.propDecorators = {\r\n targetElm: [{ type: Input, args: ['ngxClipboard',] }],\r\n container: [{ type: Input }],\r\n cbContent: [{ type: Input }],\r\n cbSuccessMsg: [{ type: Input }],\r\n cbOnSuccess: [{ type: Output }],\r\n cbOnError: [{ type: Output }],\r\n onClick: [{ type: HostListener, args: ['click', ['$event.target'],] }]\r\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ClipboardDirective, [{\n type: Directive,\n args: [{\n selector: '[ngxClipboard]'\n }]\n }], function () { return [{ type: ClipboardService }]; }, { cbOnSuccess: [{\n type: Output\n }], cbOnError: [{\n type: Output\n }], \n /**\n * @param {?} event\n * @return {?}\n */\n onClick: [{\n type: HostListener,\n args: ['click', ['$event.target']]\n }], targetElm: [{\n type: Input,\n args: ['ngxClipboard']\n }], container: [{\n type: Input\n }], cbContent: [{\n type: Input\n }], cbSuccessMsg: [{\n type: Input\n }] }); })();\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\nclass ClipboardIfSupportedDirective {\r\n /**\r\n * @param {?} _clipboardService\r\n * @param {?} _viewContainerRef\r\n * @param {?} _templateRef\r\n */\r\n constructor(_clipboardService, _viewContainerRef, _templateRef) {\r\n this._clipboardService = _clipboardService;\r\n this._viewContainerRef = _viewContainerRef;\r\n this._templateRef = _templateRef;\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n ngOnInit() {\r\n if (this._clipboardService.isSupported) {\r\n this._viewContainerRef.createEmbeddedView(this._templateRef);\r\n }\r\n }\r\n}\nClipboardIfSupportedDirective.ɵfac = function ClipboardIfSupportedDirective_Factory(t) { return new (t || ClipboardIfSupportedDirective)(ɵngcc0.ɵɵdirectiveInject(ClipboardService), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nClipboardIfSupportedDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: ClipboardIfSupportedDirective, selectors: [[\"\", \"ngxClipboardIfSupported\", \"\"]] });\r\n/** @nocollapse */\r\nClipboardIfSupportedDirective.ctorParameters = () => [\r\n { type: ClipboardService },\r\n { type: ViewContainerRef },\r\n { type: TemplateRef }\r\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ClipboardIfSupportedDirective, [{\n type: Directive,\n args: [{\n selector: '[ngxClipboardIfSupported]'\n }]\n }], function () { return [{ type: ClipboardService }, { type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.TemplateRef }]; }, null); })();\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\nclass ClipboardModule {\r\n}\nClipboardModule.ɵfac = function ClipboardModule_Factory(t) { return new (t || ClipboardModule)(); };\nClipboardModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: ClipboardModule });\nClipboardModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [CommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ClipboardModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n declarations: [ClipboardDirective, ClipboardIfSupportedDirective],\n exports: [ClipboardDirective, ClipboardIfSupportedDirective]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(ClipboardModule, { declarations: function () { return [ClipboardDirective, ClipboardIfSupportedDirective]; }, imports: function () { return [CommonModule]; }, exports: function () { return [ClipboardDirective, ClipboardIfSupportedDirective]; } }); })();\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\n\nexport { ClipboardService, ClipboardDirective, ClipboardModule, ClipboardIfSupportedDirective };\n\n","import { Subscriber } from '../Subscriber';\nexport function retry(count = -1) {\n return (source) => source.lift(new RetryOperator(count, source));\n}\nclass RetryOperator {\n constructor(count, source) {\n this.count = count;\n this.source = source;\n }\n call(subscriber, source) {\n return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));\n }\n}\nclass RetrySubscriber extends Subscriber {\n constructor(destination, count, source) {\n super(destination);\n this.count = count;\n this.source = source;\n }\n error(err) {\n if (!this.isStopped) {\n const { source, count } = this;\n if (count === 0) {\n return super.error(err);\n }\n else if (count > -1) {\n this.count = count - 1;\n }\n source.subscribe(this._unsubscribeAndRecycle());\n }\n }\n}\n","import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\nexport const queueScheduler = new QueueScheduler(QueueAction);\nexport const queue = queueScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\nexport class QueueScheduler extends AsyncScheduler {\n}\n","import { AsyncAction } from './AsyncAction';\nexport class QueueAction extends AsyncAction {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n }\n schedule(state, delay = 0) {\n if (delay > 0) {\n return super.schedule(state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n }\n execute(state, delay) {\n return (delay > 0 || this.closed) ?\n super.execute(state, delay) :\n this._execute(state, delay);\n }\n requestAsyncId(scheduler, id, delay = 0) {\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n return scheduler.flush(this);\n }\n}\n","import { empty } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nexport var NotificationKind;\n(function (NotificationKind) {\n NotificationKind[\"NEXT\"] = \"N\";\n NotificationKind[\"ERROR\"] = \"E\";\n NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nexport class Notification {\n constructor(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n observe(observer) {\n switch (this.kind) {\n case 'N':\n return observer.next && observer.next(this.value);\n case 'E':\n return observer.error && observer.error(this.error);\n case 'C':\n return observer.complete && observer.complete();\n }\n }\n do(next, error, complete) {\n const kind = this.kind;\n switch (kind) {\n case 'N':\n return next && next(this.value);\n case 'E':\n return error && error(this.error);\n case 'C':\n return complete && complete();\n }\n }\n accept(nextOrObserver, error, complete) {\n if (nextOrObserver && typeof nextOrObserver.next === 'function') {\n return this.observe(nextOrObserver);\n }\n else {\n return this.do(nextOrObserver, error, complete);\n }\n }\n toObservable() {\n const kind = this.kind;\n switch (kind) {\n case 'N':\n return of(this.value);\n case 'E':\n return throwError(this.error);\n case 'C':\n return empty();\n }\n throw new Error('unexpected notification kind value');\n }\n static createNext(value) {\n if (typeof value !== 'undefined') {\n return new Notification('N', value);\n }\n return Notification.undefinedValueNotification;\n }\n static createError(err) {\n return new Notification('E', undefined, err);\n }\n static createComplete() {\n return Notification.completeNotification;\n }\n}\nNotification.completeNotification = new Notification('C');\nNotification.undefinedValueNotification = new Notification('N', undefined);\n","import { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function observeOn(scheduler, delay = 0) {\n return function observeOnOperatorFunction(source) {\n return source.lift(new ObserveOnOperator(scheduler, delay));\n };\n}\nexport class ObserveOnOperator {\n constructor(scheduler, delay = 0) {\n this.scheduler = scheduler;\n this.delay = delay;\n }\n call(subscriber, source) {\n return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));\n }\n}\nexport class ObserveOnSubscriber extends Subscriber {\n constructor(destination, scheduler, delay = 0) {\n super(destination);\n this.scheduler = scheduler;\n this.delay = delay;\n }\n static dispatch(arg) {\n const { notification, destination } = arg;\n notification.observe(destination);\n this.unsubscribe();\n }\n scheduleMessage(notification) {\n const destination = this.destination;\n destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));\n }\n _next(value) {\n this.scheduleMessage(Notification.createNext(value));\n }\n _error(err) {\n this.scheduleMessage(Notification.createError(err));\n this.unsubscribe();\n }\n _complete() {\n this.scheduleMessage(Notification.createComplete());\n this.unsubscribe();\n }\n}\nexport class ObserveOnMessage {\n constructor(notification, destination) {\n this.notification = notification;\n this.destination = destination;\n }\n}\n","import { Subject } from './Subject';\nimport { queue } from './scheduler/queue';\nimport { Subscription } from './Subscription';\nimport { ObserveOnSubscriber } from './operators/observeOn';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nexport class ReplaySubject extends Subject {\n constructor(bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, scheduler) {\n super();\n this.scheduler = scheduler;\n this._events = [];\n this._infiniteTimeWindow = false;\n this._bufferSize = bufferSize < 1 ? 1 : bufferSize;\n this._windowTime = windowTime < 1 ? 1 : windowTime;\n if (windowTime === Number.POSITIVE_INFINITY) {\n this._infiniteTimeWindow = true;\n this.next = this.nextInfiniteTimeWindow;\n }\n else {\n this.next = this.nextTimeWindow;\n }\n }\n nextInfiniteTimeWindow(value) {\n if (!this.isStopped) {\n const _events = this._events;\n _events.push(value);\n if (_events.length > this._bufferSize) {\n _events.shift();\n }\n }\n super.next(value);\n }\n nextTimeWindow(value) {\n if (!this.isStopped) {\n this._events.push(new ReplayEvent(this._getNow(), value));\n this._trimBufferThenGetEvents();\n }\n super.next(value);\n }\n _subscribe(subscriber) {\n const _infiniteTimeWindow = this._infiniteTimeWindow;\n const _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();\n const scheduler = this.scheduler;\n const len = _events.length;\n let subscription;\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else if (this.isStopped || this.hasError) {\n subscription = Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n subscription = new SubjectSubscription(this, subscriber);\n }\n if (scheduler) {\n subscriber.add(subscriber = new ObserveOnSubscriber(subscriber, scheduler));\n }\n if (_infiniteTimeWindow) {\n for (let i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i]);\n }\n }\n else {\n for (let i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i].value);\n }\n }\n if (this.hasError) {\n subscriber.error(this.thrownError);\n }\n else if (this.isStopped) {\n subscriber.complete();\n }\n return subscription;\n }\n _getNow() {\n return (this.scheduler || queue).now();\n }\n _trimBufferThenGetEvents() {\n const now = this._getNow();\n const _bufferSize = this._bufferSize;\n const _windowTime = this._windowTime;\n const _events = this._events;\n const eventsCount = _events.length;\n let spliceCount = 0;\n while (spliceCount < eventsCount) {\n if ((now - _events[spliceCount].time) < _windowTime) {\n break;\n }\n spliceCount++;\n }\n if (eventsCount > _bufferSize) {\n spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);\n }\n if (spliceCount > 0) {\n _events.splice(0, spliceCount);\n }\n return _events;\n }\n}\nclass ReplayEvent {\n constructor(time, value) {\n this.time = time;\n this.value = value;\n }\n}\n","var charToInteger = {};\nvar integerToChar = {};\n'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n .split('')\n .forEach(function (char, i) {\n charToInteger[char] = i;\n integerToChar[i] = char;\n});\nfunction decode(string) {\n var result = [];\n var shift = 0;\n var value = 0;\n for (var i = 0; i < string.length; i += 1) {\n var integer = charToInteger[string[i]];\n if (integer === undefined) {\n throw new Error('Invalid character (' + string[i] + ')');\n }\n var hasContinuationBit = integer & 32;\n integer &= 31;\n value += integer << shift;\n if (hasContinuationBit) {\n shift += 5;\n }\n else {\n var shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n result.push(value === 0 ? -0x80000000 : -value);\n }\n else {\n result.push(value);\n }\n // reset\n value = shift = 0;\n }\n }\n return result;\n}\nfunction encode(value) {\n var result;\n if (typeof value === 'number') {\n result = encodeInteger(value);\n }\n else {\n result = '';\n for (var i = 0; i < value.length; i += 1) {\n result += encodeInteger(value[i]);\n }\n }\n return result;\n}\nfunction encodeInteger(num) {\n var result = '';\n if (num < 0) {\n num = (-num << 1) | 1;\n }\n else {\n num <<= 1;\n }\n do {\n var clamped = num & 31;\n num >>>= 5;\n if (num > 0) {\n clamped |= 32;\n }\n result += integerToChar[clamped];\n } while (num > 0);\n return result;\n}\n\nexport { decode, encode };\n","import { isPlatformBrowser, DatePipe, CommonModule } from '@angular/common';\nimport { Injectable, Inject, PLATFORM_ID, NgModule } from '@angular/core';\nimport { HttpRequest, HttpResponse, HttpBackend, HttpHeaders, HttpParams } from '@angular/common/http';\nimport { filter, map, retry, catchError, shareReplay, switchMap } from 'rxjs/operators';\nimport { decode } from 'vlq';\nimport { of } from 'rxjs';\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/common/http';\nimport * as ɵngcc2 from '@angular/common';\nclass NGXLoggerHttpService {\n /**\n * @param {?} httpBackend\n */\n constructor(httpBackend) {\n this.httpBackend = httpBackend;\n }\n /**\n * @param {?} url\n * @param {?} log\n * @param {?} options\n * @return {?}\n */\n logOnServer(url, log, options) {\n // HttpBackend skips all HttpInterceptors\n // They may log errors using this service causing circular calls\n /** @type {?} */\n const req = new HttpRequest('POST', url, log, options || {});\n return this.httpBackend.handle(req).pipe(filter((/**\n * @param {?} e\n * @return {?}\n */\n e => e instanceof HttpResponse)), map((/**\n * @param {?} httpResponse\n * @return {?}\n */\n (httpResponse) => httpResponse.body)));\n }\n}\nNGXLoggerHttpService.ɵfac = function NGXLoggerHttpService_Factory(t) { return new (t || NGXLoggerHttpService)(ɵngcc0.ɵɵinject(ɵngcc1.HttpBackend)); };\nNGXLoggerHttpService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NGXLoggerHttpService, factory: NGXLoggerHttpService.ɵfac });\n/** @nocollapse */\nNGXLoggerHttpService.ctorParameters = () => [\n { type: HttpBackend }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NGXLoggerHttpService, [{\n type: Injectable\n }], function () { return [{ type: ɵngcc1.HttpBackend }]; }, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/** @enum {number} */\nconst NgxLoggerLevel = {\n TRACE: 0,\n DEBUG: 1,\n INFO: 2,\n LOG: 3,\n WARN: 4,\n ERROR: 5,\n FATAL: 6,\n OFF: 7,\n};\nNgxLoggerLevel[NgxLoggerLevel.TRACE] = 'TRACE';\nNgxLoggerLevel[NgxLoggerLevel.DEBUG] = 'DEBUG';\nNgxLoggerLevel[NgxLoggerLevel.INFO] = 'INFO';\nNgxLoggerLevel[NgxLoggerLevel.LOG] = 'LOG';\nNgxLoggerLevel[NgxLoggerLevel.WARN] = 'WARN';\nNgxLoggerLevel[NgxLoggerLevel.ERROR] = 'ERROR';\nNgxLoggerLevel[NgxLoggerLevel.FATAL] = 'FATAL';\nNgxLoggerLevel[NgxLoggerLevel.OFF] = 'OFF';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass LoggerConfig {\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass NGXLoggerConfigEngine {\n /**\n * @param {?} config\n */\n constructor(config) {\n this.config = config;\n this._config = config;\n }\n /**\n * @param {?} config\n * @return {?}\n */\n updateConfig(config) {\n this._config = this._clone(config);\n }\n /**\n * @return {?}\n */\n getConfig() {\n return this._clone(this._config);\n }\n // TODO: add tests around cloning the config. updating an object passed into the config (or retrieving from the config)\n // should not update the active config, this is a shallow clone. If our config ever becomes hierarchical we must make\n // this a deep clone\n /**\n * @private\n * @param {?} object\n * @return {?}\n */\n _clone(object) {\n /** @type {?} */\n const cloneConfig = new LoggerConfig();\n Object.keys(object).forEach((/**\n * @param {?} key\n * @return {?}\n */\n (key) => {\n cloneConfig[key] = object[key];\n }));\n return cloneConfig;\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass NGXLoggerUtils {\n /**\n * @param {?} timestamp\n * @param {?} logLevel\n * @param {?} fileName\n * @param {?} lineNumber\n * @return {?}\n */\n static prepareMetaString(timestamp, logLevel, fileName, lineNumber) {\n /** @type {?} */\n const fileDetails = fileName ? ` [${fileName}:${lineNumber}]` : '';\n return `${timestamp} ${logLevel}${fileDetails}`;\n }\n /**\n * @param {?} level\n * @return {?}\n */\n static getColor(level) {\n switch (level) {\n case NgxLoggerLevel.TRACE:\n return 'blue';\n case NgxLoggerLevel.DEBUG:\n return 'teal';\n case NgxLoggerLevel.INFO:\n case NgxLoggerLevel.LOG:\n return 'gray';\n case NgxLoggerLevel.WARN:\n case NgxLoggerLevel.ERROR:\n case NgxLoggerLevel.FATAL:\n return 'red';\n case NgxLoggerLevel.OFF:\n default:\n return;\n }\n }\n /**\n * This allows us to see who called the logger\n * @return {?}\n */\n static getCallerDetails() {\n /** @type {?} */\n const err = (new Error(''));\n try {\n // this should produce the line which NGX Logger was called\n /** @type {?} */\n const callerLine = err.stack.split('\\n')[4].split('/');\n // returns the file:lineNumber\n /** @type {?} */\n const fileLineNumber = callerLine[callerLine.length - 1].replace(/[)]/g, '').split(':');\n return {\n fileName: fileLineNumber[0],\n lineNumber: fileLineNumber[1]\n };\n }\n catch (e) {\n return {\n fileName: null,\n lineNumber: null\n };\n }\n }\n /**\n * @param {?} message\n * @return {?}\n */\n static prepareMessage(message) {\n try {\n if (typeof message !== 'string' && !(message instanceof Error)) {\n message = JSON.stringify(message, null, 2);\n }\n }\n catch (e) {\n // additional = [message, ...additional];\n message = 'The provided \"message\" value could not be parsed with JSON.stringify().';\n }\n return message;\n }\n /**\n * @param {?} additional\n * @return {?}\n */\n static prepareAdditionalParameters(additional) {\n if (additional === null || additional === undefined) {\n return null;\n }\n return additional.map((/**\n * @param {?} next\n * @param {?} idx\n * @return {?}\n */\n (next, idx) => {\n try {\n // We just want to make sure the JSON can be parsed, we do not want to actually change the type\n if (typeof next === 'object') {\n JSON.stringify(next);\n }\n return next;\n }\n catch (e) {\n return `The additional[${idx}] value could not be parsed using JSON.stringify().`;\n }\n }));\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass LogPosition {\n /**\n * @param {?} fileName\n * @param {?} lineNumber\n * @param {?} columnNumber\n */\n constructor(fileName, lineNumber, columnNumber) {\n this.fileName = fileName;\n this.lineNumber = lineNumber;\n this.columnNumber = columnNumber;\n }\n /**\n * @return {?}\n */\n toString() {\n return this.fileName + ':' + this.lineNumber + ':' + this.columnNumber;\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass NGXMapperService {\n /**\n * @param {?} httpBackend\n */\n constructor(httpBackend) {\n this.httpBackend = httpBackend;\n // used to cache source maps\n this.logPositionRequests = new Map();\n }\n /*\n Static Functions\n */\n /**\n * @private\n * @return {?}\n */\n static getStackLine() {\n /** @type {?} */\n const error = new Error();\n try {\n // noinspection ExceptionCaughtLocallyJS\n throw error;\n }\n catch (e) {\n try {\n return error.stack.split('\\n')[5];\n }\n catch (e) {\n return null;\n }\n }\n }\n /**\n * @private\n * @param {?} stackLine\n * @return {?}\n */\n static getPosition(stackLine) {\n // strip base path, then parse filename, line, and column\n /** @type {?} */\n const positionStartIndex = stackLine.lastIndexOf('\\/');\n /** @type {?} */\n let positionEndIndex = stackLine.indexOf(')');\n if (positionEndIndex < 0) {\n positionEndIndex = undefined;\n }\n /** @type {?} */\n const position = stackLine.substring(positionStartIndex + 1, positionEndIndex);\n /** @type {?} */\n const dataArray = position.split(':');\n if (dataArray.length === 3) {\n return new LogPosition(dataArray[0], +dataArray[1], +dataArray[2]);\n }\n return new LogPosition('unknown', 0, 0);\n }\n /**\n * @private\n * @param {?} stackLine\n * @return {?}\n */\n static getTranspileLocation(stackLine) {\n /** @type {?} */\n let locationStartIndex = stackLine.indexOf('(');\n if (locationStartIndex < 0) {\n locationStartIndex = stackLine.lastIndexOf(' ');\n }\n /** @type {?} */\n let locationEndIndex = stackLine.indexOf(')');\n if (locationEndIndex < 0) {\n locationEndIndex = undefined;\n }\n return stackLine.substring(locationStartIndex + 1, locationEndIndex);\n }\n /**\n * @private\n * @param {?} stackLine\n * @return {?}\n */\n static getMapFilePath(stackLine) {\n /** @type {?} */\n const file = NGXMapperService.getTranspileLocation(stackLine);\n /** @type {?} */\n const mapFullPath = file.substring(0, file.lastIndexOf(':'));\n return mapFullPath.substring(0, mapFullPath.lastIndexOf(':')) + '.map';\n }\n /**\n * @private\n * @param {?} sourceMap\n * @param {?} position\n * @return {?}\n */\n static getMapping(sourceMap, position) {\n // => ';' indicates end of a line\n // => ',' separates mappings in a line\n // decoded mapping => [ generatedCodeColumn, sourceFileIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]\n /** @type {?} */\n let sourceFileIndex = 0;\n /** @type {?} */\n let // second field\n sourceCodeLine = 0;\n /** @type {?} */\n let // third field\n sourceCodeColumn = 0;\n // fourth field\n /** @type {?} */\n const lines = sourceMap.mappings.split(';');\n for (let lineIndex = 0; lineIndex < lines.length; lineIndex++) {\n // reset column position to 0 after each line\n /** @type {?} */\n let generatedCodeColumn = 0;\n // decode sections in line\n /** @type {?} */\n const columns = lines[lineIndex].split(',');\n for (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {\n /** @type {?} */\n const decodedSection = decode(columns[columnIndex]);\n if (decodedSection.length >= 4) {\n // update relative positions\n generatedCodeColumn += decodedSection[0];\n sourceFileIndex += decodedSection[1];\n sourceCodeLine += decodedSection[2];\n sourceCodeColumn += decodedSection[3];\n }\n // check if matching map\n if (lineIndex === position.lineNumber) {\n if (generatedCodeColumn === position.columnNumber) {\n // matching column and line found\n return new LogPosition(sourceMap.sources[sourceFileIndex], sourceCodeLine, sourceCodeColumn);\n }\n else if (columnIndex + 1 === columns.length) {\n // matching column not found, but line is correct\n return new LogPosition(sourceMap.sources[sourceFileIndex], sourceCodeLine, 0);\n }\n }\n }\n }\n // failed if reached\n return new LogPosition('unknown', 0, 0);\n }\n /**\n * does the http get request to get the source map\n * @private\n * @param {?} sourceMapLocation\n * @param {?} distPosition\n * @return {?}\n */\n _getSourceMap(sourceMapLocation, distPosition) {\n /** @type {?} */\n const req = new HttpRequest('GET', sourceMapLocation);\n if (!this.logPositionRequests.has(sourceMapLocation)) {\n /** @type {?} */\n const logPosition = this.httpBackend.handle(req).pipe(filter((/**\n * @param {?} e\n * @return {?}\n */\n e => (e instanceof HttpResponse))), map((/**\n * @param {?} httpResponse\n * @return {?}\n */\n (httpResponse) => httpResponse.body)), map((/**\n * @param {?} sourceMap\n * @return {?}\n */\n sourceMap => {\n // map generated position to source position\n return NGXMapperService.getMapping(sourceMap, distPosition);\n })), retry(3), \n // if there is an error getting the source, map fall back to the filename and line number of\n catchError((/**\n * @return {?}\n */\n () => {\n return of(distPosition);\n })), shareReplay(1));\n this.logPositionRequests.set(sourceMapLocation, logPosition);\n }\n return this.logPositionRequests.get(sourceMapLocation);\n }\n /**\n * Returns the LogPosition for the current log\n * If sourceMaps are enabled, it attemps to get the source map from the server, and use that to parse the file name\n * and number of the call\n * @param {?} sourceMapsEnabled\n * @return {?}\n */\n getCallerDetails(sourceMapsEnabled) {\n // parse generated file mapping from stack trace\n // parse generated file mapping from stack trace\n /** @type {?} */\n const stackLine = NGXMapperService.getStackLine();\n // if we were not able to parse the stackLine, just return an empty Log Position\n if (!stackLine) {\n return of(new LogPosition('', 0, 0));\n }\n return of([\n NGXMapperService.getPosition(stackLine),\n NGXMapperService.getMapFilePath(stackLine)\n ]).pipe(switchMap((/**\n * @param {?} __0\n * @return {?}\n */\n ([distPosition, sourceMapLocation]) => {\n // if source maps are not enabled, or if we've previously tried to get the source maps, but they failed,\n // then just use the position of the JS instead of the source\n if (!sourceMapsEnabled) {\n return of(distPosition);\n }\n // finally try to get the source map and return the position\n return this._getSourceMap(sourceMapLocation, distPosition);\n })));\n }\n}\nNGXMapperService.ɵfac = function NGXMapperService_Factory(t) { return new (t || NGXMapperService)(ɵngcc0.ɵɵinject(ɵngcc1.HttpBackend)); };\nNGXMapperService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NGXMapperService, factory: NGXMapperService.ɵfac });\n/** @nocollapse */\nNGXMapperService.ctorParameters = () => [\n { type: HttpBackend }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NGXMapperService, [{\n type: Injectable\n }], function () { return [{ type: ɵngcc1.HttpBackend }]; }, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/** @type {?} */\nconst Levels = [\n 'TRACE',\n 'DEBUG',\n 'INFO',\n 'LOG',\n 'WARN',\n 'ERROR',\n 'FATAL',\n 'OFF'\n];\nclass NGXLogger {\n /**\n * @param {?} mapperService\n * @param {?} httpService\n * @param {?} loggerConfig\n * @param {?} platformId\n * @param {?} datePipe\n */\n constructor(mapperService, httpService, loggerConfig, platformId, datePipe) {\n this.mapperService = mapperService;\n this.httpService = httpService;\n this.platformId = platformId;\n this.datePipe = datePipe;\n this._withCredentials = false;\n this._isIE = isPlatformBrowser(platformId) && navigator && navigator.userAgent &&\n !!(navigator.userAgent.indexOf('MSIE') !== -1 || navigator.userAgent.match(/Trident\\//) || navigator.userAgent.match(/Edge\\//));\n // each instance of the logger should have their own config engine\n this.config = new NGXLoggerConfigEngine(loggerConfig);\n this._logFunc = this._isIE ? this._logIE.bind(this) : this._logModern.bind(this);\n }\n /**\n * @param {?} message\n * @param {...?} additional\n * @return {?}\n */\n trace(message, ...additional) {\n this._log(NgxLoggerLevel.TRACE, message, additional);\n }\n /**\n * @param {?} message\n * @param {...?} additional\n * @return {?}\n */\n debug(message, ...additional) {\n this._log(NgxLoggerLevel.DEBUG, message, additional);\n }\n /**\n * @param {?} message\n * @param {...?} additional\n * @return {?}\n */\n info(message, ...additional) {\n this._log(NgxLoggerLevel.INFO, message, additional);\n }\n /**\n * @param {?} message\n * @param {...?} additional\n * @return {?}\n */\n log(message, ...additional) {\n this._log(NgxLoggerLevel.LOG, message, additional);\n }\n /**\n * @param {?} message\n * @param {...?} additional\n * @return {?}\n */\n warn(message, ...additional) {\n this._log(NgxLoggerLevel.WARN, message, additional);\n }\n /**\n * @param {?} message\n * @param {...?} additional\n * @return {?}\n */\n error(message, ...additional) {\n this._log(NgxLoggerLevel.ERROR, message, additional);\n }\n /**\n * @param {?} message\n * @param {...?} additional\n * @return {?}\n */\n fatal(message, ...additional) {\n this._log(NgxLoggerLevel.FATAL, message, additional);\n }\n /**\n * @param {?} headers\n * @return {?}\n */\n setCustomHttpHeaders(headers) {\n this._customHttpHeaders = headers;\n }\n /**\n * @param {?} params\n * @return {?}\n */\n setCustomParams(params) {\n this._customParams = params;\n }\n /**\n * @param {?} withCredentials\n * @return {?}\n */\n setWithCredentialsOptionValue(withCredentials) {\n this._withCredentials = withCredentials;\n }\n /**\n * @param {?} monitor\n * @return {?}\n */\n registerMonitor(monitor) {\n this._loggerMonitor = monitor;\n }\n /**\n * @param {?} config\n * @return {?}\n */\n updateConfig(config) {\n this.config.updateConfig(config);\n }\n /**\n * @return {?}\n */\n getConfigSnapshot() {\n return this.config.getConfig();\n }\n /**\n * @private\n * @param {?} level\n * @param {?} metaString\n * @param {?} message\n * @param {?} additional\n * @return {?}\n */\n _logIE(level, metaString, message, additional) {\n // Coloring doesn't work in IE\n // make sure additional isn't null or undefined so that ...additional doesn't error\n additional = additional || [];\n switch (level) {\n case NgxLoggerLevel.WARN:\n console.warn(`${metaString} `, message, ...additional);\n break;\n case NgxLoggerLevel.ERROR:\n case NgxLoggerLevel.FATAL:\n console.error(`${metaString} `, message, ...additional);\n break;\n case NgxLoggerLevel.INFO:\n console.info(`${metaString} `, message, ...additional);\n break;\n default:\n console.log(`${metaString} `, message, ...additional);\n }\n }\n /**\n * @private\n * @param {?} level\n * @param {?} metaString\n * @param {?} message\n * @param {?} additional\n * @return {?}\n */\n _logModern(level, metaString, message, additional) {\n /** @type {?} */\n const color = NGXLoggerUtils.getColor(level);\n // make sure additional isn't null or undefined so that ...additional doesn't error\n additional = additional || [];\n switch (level) {\n case NgxLoggerLevel.WARN:\n console.warn(`%c${metaString}`, `color:${color}`, message, ...additional);\n break;\n case NgxLoggerLevel.ERROR:\n case NgxLoggerLevel.FATAL:\n console.error(`%c${metaString}`, `color:${color}`, message, ...additional);\n break;\n case NgxLoggerLevel.INFO:\n console.info(`%c${metaString}`, `color:${color}`, message, ...additional);\n break;\n // Disabling console.trace since the stack trace is not helpful. it is showing the stack trace of\n // the console.trace statement\n // case NgxLoggerLevel.TRACE:\n // console.trace(`%c${metaString}`, `color:${color}`, message, ...additional);\n // break;\n // Disabling console.debug, because Has this hidden by default.\n // case NgxLoggerLevel.DEBUG:\n // console.debug(`%c${metaString}`, `color:${color}`, message, ...additional);\n // break;\n default:\n console.log(`%c${metaString}`, `color:${color}`, message, ...additional);\n }\n }\n /**\n * @private\n * @param {?} level\n * @param {?} message\n * @param {?=} additional\n * @param {?=} logOnServer\n * @return {?}\n */\n _log(level, message, additional = [], logOnServer = true) {\n /** @type {?} */\n const config = this.config.getConfig();\n /** @type {?} */\n const isLog2Server = logOnServer && config.serverLoggingUrl && level >= config.serverLogLevel;\n /** @type {?} */\n const isLogLevelEnabled = level >= config.level;\n if (!(message && (isLog2Server || isLogLevelEnabled))) {\n return;\n }\n /** @type {?} */\n const logLevelString = Levels[level];\n message = typeof message === 'function' ? message() : message;\n message = NGXLoggerUtils.prepareMessage(message);\n // only use validated parameters for HTTP requests\n /** @type {?} */\n const validatedAdditionalParameters = NGXLoggerUtils.prepareAdditionalParameters(additional);\n /** @type {?} */\n const timestamp = config.timestampFormat ?\n this.datePipe.transform(new Date(), config.timestampFormat) :\n new Date().toISOString();\n // const callerDetails = NGXLoggerUtils.getCallerDetails();\n this.mapperService.getCallerDetails(config.enableSourceMaps).subscribe((/**\n * @param {?} callerDetails\n * @return {?}\n */\n (callerDetails) => {\n /** @type {?} */\n const logObject = {\n message: message,\n additional: validatedAdditionalParameters,\n level: level,\n timestamp: timestamp,\n fileName: callerDetails.fileName,\n lineNumber: callerDetails.lineNumber.toString()\n };\n if (this._loggerMonitor && isLogLevelEnabled) {\n this._loggerMonitor.onLog(logObject);\n }\n if (isLog2Server) {\n // make sure the stack gets sent to the server\n message = message instanceof Error ? message.stack : message;\n logObject.message = message;\n /** @type {?} */\n const headers = this._customHttpHeaders || new HttpHeaders();\n headers.set('Content-Type', 'application/json');\n /** @type {?} */\n const options = {\n headers: headers,\n params: this._customParams || new HttpParams(),\n responseType: config.httpResponseType || 'json',\n withCredentials: this._withCredentials\n };\n // Allow logging on server even if client log level is off\n this.httpService.logOnServer(config.serverLoggingUrl, logObject, options).subscribe((/**\n * @param {?} res\n * @return {?}\n */\n (res) => {\n // I don't think we should do anything on success\n }), (/**\n * @param {?} error\n * @return {?}\n */\n (error) => {\n this._log(NgxLoggerLevel.ERROR, `FAILED TO LOG ON SERVER: ${message}`, [error], false);\n }));\n }\n // if no message or the log level is less than the environ\n if (isLogLevelEnabled && !config.disableConsoleLogging) {\n /** @type {?} */\n const metaString = NGXLoggerUtils.prepareMetaString(timestamp, logLevelString, callerDetails.fileName, callerDetails.lineNumber.toString());\n return this._logFunc(level, metaString, message, additional);\n }\n }));\n }\n}\nNGXLogger.ɵfac = function NGXLogger_Factory(t) { return new (t || NGXLogger)(ɵngcc0.ɵɵinject(NGXMapperService), ɵngcc0.ɵɵinject(NGXLoggerHttpService), ɵngcc0.ɵɵinject(LoggerConfig), ɵngcc0.ɵɵinject(PLATFORM_ID), ɵngcc0.ɵɵinject(ɵngcc2.DatePipe)); };\nNGXLogger.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NGXLogger, factory: NGXLogger.ɵfac });\n/** @nocollapse */\nNGXLogger.ctorParameters = () => [\n { type: NGXMapperService },\n { type: NGXLoggerHttpService },\n { type: LoggerConfig },\n { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },\n { type: DatePipe }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NGXLogger, [{\n type: Injectable\n }], function () { return [{ type: NGXMapperService }, { type: NGXLoggerHttpService }, { type: LoggerConfig }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: ɵngcc2.DatePipe }]; }, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * CustomNGXLoggerService is designed to allow users to get a new instance of a logger\n */\nclass CustomNGXLoggerService {\n /**\n * @param {?} mapperService\n * @param {?} httpService\n * @param {?} platformId\n * @param {?} datePipe\n */\n constructor(mapperService, httpService, platformId, datePipe) {\n this.mapperService = mapperService;\n this.httpService = httpService;\n this.platformId = platformId;\n this.datePipe = datePipe;\n }\n /**\n * @param {?} config\n * @param {?=} httpService\n * @param {?=} logMonitor\n * @param {?=} mapperService\n * @return {?}\n */\n create(config, httpService, logMonitor, mapperService) {\n // you can inject your own httpService or use the default,\n /** @type {?} */\n const logger = new NGXLogger(mapperService || this.mapperService, httpService || this.httpService, config, this.platformId, this.datePipe);\n if (logMonitor) {\n logger.registerMonitor(logMonitor);\n }\n return logger;\n }\n}\nCustomNGXLoggerService.ɵfac = function CustomNGXLoggerService_Factory(t) { return new (t || CustomNGXLoggerService)(ɵngcc0.ɵɵinject(NGXMapperService), ɵngcc0.ɵɵinject(NGXLoggerHttpService), ɵngcc0.ɵɵinject(PLATFORM_ID), ɵngcc0.ɵɵinject(ɵngcc2.DatePipe)); };\nCustomNGXLoggerService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: CustomNGXLoggerService, factory: CustomNGXLoggerService.ɵfac });\n/** @nocollapse */\nCustomNGXLoggerService.ctorParameters = () => [\n { type: NGXMapperService },\n { type: NGXLoggerHttpService },\n { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },\n { type: DatePipe }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CustomNGXLoggerService, [{\n type: Injectable\n }], function () { return [{ type: NGXMapperService }, { type: NGXLoggerHttpService }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: ɵngcc2.DatePipe }]; }, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass LoggerModule {\n /**\n * @param {?} config\n * @return {?}\n */\n static forRoot(config) {\n return {\n ngModule: LoggerModule,\n providers: [\n { provide: LoggerConfig, useValue: config || {} },\n NGXLogger,\n NGXLoggerHttpService,\n CustomNGXLoggerService,\n NGXMapperService\n ]\n };\n }\n /**\n * @return {?}\n */\n static forChild() {\n return {\n ngModule: LoggerModule,\n providers: [\n NGXLogger,\n NGXLoggerHttpService,\n CustomNGXLoggerService,\n NGXMapperService\n ]\n };\n }\n}\nLoggerModule.ɵfac = function LoggerModule_Factory(t) { return new (t || LoggerModule)(); };\nLoggerModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: LoggerModule });\nLoggerModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [\n NGXLogger,\n NGXLoggerHttpService,\n CustomNGXLoggerService,\n NGXMapperService,\n DatePipe\n ], imports: [CommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LoggerModule, [{\n type: NgModule,\n args: [{\n imports: [\n CommonModule\n ],\n providers: [\n NGXLogger,\n NGXLoggerHttpService,\n CustomNGXLoggerService,\n NGXMapperService,\n DatePipe\n ]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(LoggerModule, { imports: function () { return [CommonModule]; } }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @abstract\n */\nclass NGXLoggerMonitor {\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass NGXLogInterface {\n}\n\nexport { CustomNGXLoggerService, Levels, LoggerConfig, LoggerModule, NGXLogInterface, NGXLogger, NGXLoggerHttpService, NGXLoggerMonitor, NGXLoggerUtils, NGXMapperService, NgxLoggerLevel };\n\n","import { ReplaySubject } from '../ReplaySubject';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n let config;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n config = configOrBufferSize;\n }\n else {\n config = {\n bufferSize: configOrBufferSize,\n windowTime,\n refCount: false,\n scheduler,\n };\n }\n return (source) => source.lift(shareReplayOperator(config));\n}\nfunction shareReplayOperator({ bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, refCount: useRefCount, scheduler, }) {\n let subject;\n let refCount = 0;\n let subscription;\n let hasError = false;\n let isComplete = false;\n return function shareReplayOperation(source) {\n refCount++;\n let innerSub;\n if (!subject || hasError) {\n hasError = false;\n subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n innerSub = subject.subscribe(this);\n subscription = source.subscribe({\n next(value) {\n subject.next(value);\n },\n error(err) {\n hasError = true;\n subject.error(err);\n },\n complete() {\n isComplete = true;\n subscription = undefined;\n subject.complete();\n },\n });\n if (isComplete) {\n subscription = undefined;\n }\n }\n else {\n innerSub = subject.subscribe(this);\n }\n this.add(() => {\n refCount--;\n innerSub.unsubscribe();\n innerSub = undefined;\n if (subscription && !isComplete && useRefCount && refCount === 0) {\n subscription.unsubscribe();\n subscription = undefined;\n subject = undefined;\n }\n });\n };\n}\n","import { Subject } from './Subject';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\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 if (subscription && !subscription.closed) {\n subscriber.next(this._value);\n }\n return subscription;\n }\n getValue() {\n if (this.hasError) {\n throw this.thrownError;\n }\n else if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else {\n return this._value;\n }\n }\n next(value) {\n super.next(this._value = value);\n }\n}\n","import { canReportError } from './util/canReportError';\nimport { toSubscriber } from './util/toSubscriber';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nexport class Observable {\n constructor(subscribe) {\n this._isScalar = false;\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 { operator } = this;\n const sink = toSubscriber(observerOrNext, error, complete);\n if (operator) {\n sink.add(operator.call(sink, this.source));\n }\n else {\n sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?\n this._subscribe(sink) :\n this._trySubscribe(sink));\n }\n if (config.useDeprecatedSynchronousErrorHandling) {\n if (sink.syncErrorThrowable) {\n sink.syncErrorThrowable = false;\n if (sink.syncErrorThrown) {\n throw sink.syncErrorValue;\n }\n }\n }\n return sink;\n }\n _trySubscribe(sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n sink.syncErrorThrown = true;\n sink.syncErrorValue = err;\n }\n if (canReportError(sink)) {\n sink.error(err);\n }\n else {\n console.warn(err);\n }\n }\n }\n forEach(next, promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n let subscription;\n subscription = this.subscribe((value) => {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n if (subscription) {\n subscription.unsubscribe();\n }\n }\n }, reject, resolve);\n });\n }\n _subscribe(subscriber) {\n const { source } = this;\n return source && source.subscribe(subscriber);\n }\n [Symbol_observable]() {\n return this;\n }\n pipe(...operations) {\n if (operations.length === 0) {\n return this;\n }\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 if (!promiseCtor) {\n promiseCtor = config.Promise || Promise;\n }\n if (!promiseCtor) {\n throw new Error('no Promise impl found');\n }\n return promiseCtor;\n}\n","import { Subscriber } from '../Subscriber';\nimport { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';\nimport { empty as emptyObserver } from '../Observer';\nexport function toSubscriber(nextOrObserver, error, complete) {\n if (nextOrObserver) {\n if (nextOrObserver instanceof Subscriber) {\n return nextOrObserver;\n }\n if (nextOrObserver[rxSubscriberSymbol]) {\n return nextOrObserver[rxSubscriberSymbol]();\n }\n }\n if (!nextOrObserver && !error && !complete) {\n return new Subscriber(emptyObserver);\n }\n return new Subscriber(nextOrObserver, error, complete);\n}\n","import { Subscriber } from '../Subscriber';\nexport function canReportError(observer) {\n while (observer) {\n const { closed, destination, isStopped } = observer;\n if (closed || isStopped) {\n return false;\n }\n else if (destination && destination instanceof Subscriber) {\n observer = destination;\n }\n else {\n observer = null;\n }\n }\n return true;\n}\n","import { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport const empty = {\n closed: true,\n next(value) { },\n error(err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError(err);\n }\n },\n complete() { }\n};\n","import { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nexport class SubjectSubscriber extends Subscriber {\n constructor(destination) {\n super(destination);\n this.destination = destination;\n }\n}\nexport class Subject extends Observable {\n constructor() {\n super();\n this.observers = [];\n this.closed = false;\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n [rxSubscriberSymbol]() {\n return new SubjectSubscriber(this);\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n next(value) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n if (!this.isStopped) {\n const { observers } = this;\n const len = observers.length;\n const copy = observers.slice();\n for (let i = 0; i < len; i++) {\n copy[i].next(value);\n }\n }\n }\n error(err) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n this.hasError = true;\n this.thrownError = err;\n this.isStopped = true;\n const { observers } = this;\n const len = observers.length;\n const copy = observers.slice();\n for (let i = 0; i < len; i++) {\n copy[i].error(err);\n }\n this.observers.length = 0;\n }\n complete() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n this.isStopped = true;\n const { observers } = this;\n const len = observers.length;\n const copy = observers.slice();\n for (let i = 0; i < len; i++) {\n copy[i].complete();\n }\n this.observers.length = 0;\n }\n unsubscribe() {\n this.isStopped = true;\n this.closed = true;\n this.observers = null;\n }\n _trySubscribe(subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else {\n return super._trySubscribe(subscriber);\n }\n }\n _subscribe(subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else if (this.hasError) {\n subscriber.error(this.thrownError);\n return Subscription.EMPTY;\n }\n else if (this.isStopped) {\n subscriber.complete();\n return Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n return new SubjectSubscription(this, subscriber);\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 const { destination } = this;\n if (destination && destination.next) {\n destination.next(value);\n }\n }\n error(err) {\n const { destination } = this;\n if (destination && destination.error) {\n this.destination.error(err);\n }\n }\n complete() {\n const { destination } = this;\n if (destination && destination.complete) {\n this.destination.complete();\n }\n }\n _subscribe(subscriber) {\n const { source } = this;\n if (source) {\n return this.source.subscribe(subscriber);\n }\n else {\n return Subscription.EMPTY;\n }\n }\n}\n","import { Subscription } from './Subscription';\nexport class SubjectSubscription extends Subscription {\n constructor(subject, subscriber) {\n super();\n this.subject = subject;\n this.subscriber = subscriber;\n this.closed = false;\n }\n unsubscribe() {\n if (this.closed) {\n return;\n }\n this.closed = true;\n const subject = this.subject;\n const observers = subject.observers;\n this.subject = null;\n if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n return;\n }\n const subscriberIndex = observers.indexOf(this.subscriber);\n if (subscriberIndex !== -1) {\n observers.splice(subscriberIndex, 1);\n }\n }\n}\n","import { isFunction } from './util/isFunction';\nimport { empty as emptyObserver } from './Observer';\nimport { Subscription } from './Subscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport class Subscriber extends Subscription {\n constructor(destinationOrNext, error, complete) {\n super();\n this.syncErrorValue = null;\n this.syncErrorThrown = false;\n this.syncErrorThrowable = false;\n this.isStopped = false;\n switch (arguments.length) {\n case 0:\n this.destination = emptyObserver;\n break;\n case 1:\n if (!destinationOrNext) {\n this.destination = emptyObserver;\n break;\n }\n if (typeof destinationOrNext === 'object') {\n if (destinationOrNext instanceof Subscriber) {\n this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;\n this.destination = destinationOrNext;\n destinationOrNext.add(this);\n }\n else {\n this.syncErrorThrowable = true;\n this.destination = new SafeSubscriber(this, destinationOrNext);\n }\n break;\n }\n default:\n this.syncErrorThrowable = true;\n this.destination = new SafeSubscriber(this, destinationOrNext, error, complete);\n break;\n }\n }\n [rxSubscriberSymbol]() { return this; }\n static create(next, error, complete) {\n const subscriber = new Subscriber(next, error, complete);\n subscriber.syncErrorThrowable = false;\n return subscriber;\n }\n next(value) {\n if (!this.isStopped) {\n this._next(value);\n }\n }\n error(err) {\n if (!this.isStopped) {\n this.isStopped = true;\n this._error(err);\n }\n }\n complete() {\n if (!this.isStopped) {\n this.isStopped = true;\n this._complete();\n }\n }\n unsubscribe() {\n if (this.closed) {\n return;\n }\n this.isStopped = true;\n super.unsubscribe();\n }\n _next(value) {\n this.destination.next(value);\n }\n _error(err) {\n this.destination.error(err);\n this.unsubscribe();\n }\n _complete() {\n this.destination.complete();\n this.unsubscribe();\n }\n _unsubscribeAndRecycle() {\n const { _parentOrParents } = this;\n this._parentOrParents = null;\n this.unsubscribe();\n this.closed = false;\n this.isStopped = false;\n this._parentOrParents = _parentOrParents;\n return this;\n }\n}\nexport class SafeSubscriber extends Subscriber {\n constructor(_parentSubscriber, observerOrNext, error, complete) {\n super();\n this._parentSubscriber = _parentSubscriber;\n let next;\n let context = this;\n if (isFunction(observerOrNext)) {\n next = observerOrNext;\n }\n else if (observerOrNext) {\n next = observerOrNext.next;\n error = observerOrNext.error;\n complete = observerOrNext.complete;\n if (observerOrNext !== emptyObserver) {\n context = Object.create(observerOrNext);\n if (isFunction(context.unsubscribe)) {\n this.add(context.unsubscribe.bind(context));\n }\n context.unsubscribe = this.unsubscribe.bind(this);\n }\n }\n this._context = context;\n this._next = next;\n this._error = error;\n this._complete = complete;\n }\n next(value) {\n if (!this.isStopped && this._next) {\n const { _parentSubscriber } = this;\n if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._next, value);\n }\n else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {\n this.unsubscribe();\n }\n }\n }\n error(err) {\n if (!this.isStopped) {\n const { _parentSubscriber } = this;\n const { useDeprecatedSynchronousErrorHandling } = config;\n if (this._error) {\n if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._error, err);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, this._error, err);\n this.unsubscribe();\n }\n }\n else if (!_parentSubscriber.syncErrorThrowable) {\n this.unsubscribe();\n if (useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n hostReportError(err);\n }\n else {\n if (useDeprecatedSynchronousErrorHandling) {\n _parentSubscriber.syncErrorValue = err;\n _parentSubscriber.syncErrorThrown = true;\n }\n else {\n hostReportError(err);\n }\n this.unsubscribe();\n }\n }\n }\n complete() {\n if (!this.isStopped) {\n const { _parentSubscriber } = this;\n if (this._complete) {\n const wrappedComplete = () => this._complete.call(this._context);\n if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(wrappedComplete);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, wrappedComplete);\n this.unsubscribe();\n }\n }\n else {\n this.unsubscribe();\n }\n }\n }\n __tryOrUnsub(fn, value) {\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n this.unsubscribe();\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError(err);\n }\n }\n }\n __tryOrSetError(parent, fn, value) {\n if (!config.useDeprecatedSynchronousErrorHandling) {\n throw new Error('bad call');\n }\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n parent.syncErrorValue = err;\n parent.syncErrorThrown = true;\n return true;\n }\n else {\n hostReportError(err);\n return true;\n }\n }\n return false;\n }\n _unsubscribe() {\n const { _parentSubscriber } = this;\n this._context = null;\n this._parentSubscriber = null;\n _parentSubscriber.unsubscribe();\n }\n}\n","const UnsubscriptionErrorImpl = (() => {\n function UnsubscriptionErrorImpl(errors) {\n Error.call(this);\n this.message = errors ?\n `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}` : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n return this;\n }\n UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype);\n return UnsubscriptionErrorImpl;\n})();\nexport const UnsubscriptionError = UnsubscriptionErrorImpl;\n","import { isArray } from './util/isArray';\nimport { isObject } from './util/isObject';\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nexport class Subscription {\n constructor(unsubscribe) {\n this.closed = false;\n this._parentOrParents = null;\n this._subscriptions = null;\n if (unsubscribe) {\n this._ctorUnsubscribe = true;\n this._unsubscribe = unsubscribe;\n }\n }\n unsubscribe() {\n let errors;\n if (this.closed) {\n return;\n }\n let { _parentOrParents, _ctorUnsubscribe, _unsubscribe, _subscriptions } = this;\n this.closed = true;\n this._parentOrParents = null;\n this._subscriptions = null;\n if (_parentOrParents instanceof Subscription) {\n _parentOrParents.remove(this);\n }\n else if (_parentOrParents !== null) {\n for (let index = 0; index < _parentOrParents.length; ++index) {\n const parent = _parentOrParents[index];\n parent.remove(this);\n }\n }\n if (isFunction(_unsubscribe)) {\n if (_ctorUnsubscribe) {\n this._unsubscribe = undefined;\n }\n try {\n _unsubscribe.call(this);\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];\n }\n }\n if (isArray(_subscriptions)) {\n let index = -1;\n let len = _subscriptions.length;\n while (++index < len) {\n const sub = _subscriptions[index];\n if (isObject(sub)) {\n try {\n sub.unsubscribe();\n }\n catch (e) {\n errors = errors || [];\n if (e instanceof UnsubscriptionError) {\n errors = errors.concat(flattenUnsubscriptionErrors(e.errors));\n }\n else {\n errors.push(e);\n }\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n add(teardown) {\n let subscription = teardown;\n if (!teardown) {\n return Subscription.EMPTY;\n }\n switch (typeof teardown) {\n case 'function':\n subscription = new Subscription(teardown);\n case 'object':\n if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {\n return subscription;\n }\n else if (this.closed) {\n subscription.unsubscribe();\n return subscription;\n }\n else if (!(subscription instanceof Subscription)) {\n const tmp = subscription;\n subscription = new Subscription();\n subscription._subscriptions = [tmp];\n }\n break;\n default: {\n throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');\n }\n }\n let { _parentOrParents } = subscription;\n if (_parentOrParents === null) {\n subscription._parentOrParents = this;\n }\n else if (_parentOrParents instanceof Subscription) {\n if (_parentOrParents === this) {\n return subscription;\n }\n subscription._parentOrParents = [_parentOrParents, this];\n }\n else if (_parentOrParents.indexOf(this) === -1) {\n _parentOrParents.push(this);\n }\n else {\n return subscription;\n }\n const subscriptions = this._subscriptions;\n if (subscriptions === null) {\n this._subscriptions = [subscription];\n }\n else {\n subscriptions.push(subscription);\n }\n return subscription;\n }\n remove(subscription) {\n const subscriptions = this._subscriptions;\n if (subscriptions) {\n const subscriptionIndex = subscriptions.indexOf(subscription);\n if (subscriptionIndex !== -1) {\n subscriptions.splice(subscriptionIndex, 1);\n }\n }\n }\n}\nSubscription.EMPTY = (function (empty) {\n empty.closed = true;\n return empty;\n}(new Subscription()));\nfunction flattenUnsubscriptionErrors(errors) {\n return errors.reduce((errs, err) => errs.concat((err instanceof UnsubscriptionError) ? err.errors : err), []);\n}\n","let _enable_super_gross_mode_that_will_cause_bad_things = false;\nexport const config = {\n Promise: undefined,\n set useDeprecatedSynchronousErrorHandling(value) {\n if (value) {\n const error = new Error();\n console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \\n' + error.stack);\n }\n else if (_enable_super_gross_mode_that_will_cause_bad_things) {\n console.log('RxJS: Back to a better error behavior. Thank you. <3');\n }\n _enable_super_gross_mode_that_will_cause_bad_things = value;\n },\n get useDeprecatedSynchronousErrorHandling() {\n return _enable_super_gross_mode_that_will_cause_bad_things;\n },\n};\n","import { Subscriber } from './Subscriber';\nimport { Observable } from './Observable';\nimport { subscribeTo } from './util/subscribeTo';\nexport class SimpleInnerSubscriber extends Subscriber {\n constructor(parent) {\n super();\n this.parent = parent;\n }\n _next(value) {\n this.parent.notifyNext(value);\n }\n _error(error) {\n this.parent.notifyError(error);\n this.unsubscribe();\n }\n _complete() {\n this.parent.notifyComplete();\n this.unsubscribe();\n }\n}\nexport class ComplexInnerSubscriber extends Subscriber {\n constructor(parent, outerValue, outerIndex) {\n super();\n this.parent = parent;\n this.outerValue = outerValue;\n this.outerIndex = outerIndex;\n }\n _next(value) {\n this.parent.notifyNext(this.outerValue, value, this.outerIndex, this);\n }\n _error(error) {\n this.parent.notifyError(error);\n this.unsubscribe();\n }\n _complete() {\n this.parent.notifyComplete(this);\n this.unsubscribe();\n }\n}\nexport class SimpleOuterSubscriber extends Subscriber {\n notifyNext(innerValue) {\n this.destination.next(innerValue);\n }\n notifyError(err) {\n this.destination.error(err);\n }\n notifyComplete() {\n this.destination.complete();\n }\n}\nexport class ComplexOuterSubscriber extends Subscriber {\n notifyNext(_outerValue, innerValue, _outerIndex, _innerSub) {\n this.destination.next(innerValue);\n }\n notifyError(error) {\n this.destination.error(error);\n }\n notifyComplete(_innerSub) {\n this.destination.complete();\n }\n}\nexport function innerSubscribe(result, innerSubscriber) {\n if (innerSubscriber.closed) {\n return undefined;\n }\n if (result instanceof Observable) {\n return result.subscribe(innerSubscriber);\n }\n let subscription;\n try {\n subscription = subscribeTo(result)(innerSubscriber);\n }\n catch (error) {\n innerSubscriber.error(error);\n }\n return subscription;\n}\n","import { SubjectSubscriber } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nexport class ConnectableObservable extends Observable {\n constructor(source, subjectFactory) {\n super();\n this.source = source;\n this.subjectFactory = subjectFactory;\n this._refCount = 0;\n this._isComplete = false;\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 connect() {\n let connection = this._connection;\n if (!connection) {\n this._isComplete = false;\n connection = this._connection = new Subscription();\n connection.add(this.source\n .subscribe(new ConnectableSubscriber(this.getSubject(), this)));\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}\nexport const connectableObservableDescriptor = (() => {\n const connectableProto = ConnectableObservable.prototype;\n return {\n operator: { value: null },\n _refCount: { value: 0, writable: true },\n _subject: { value: null, writable: true },\n _connection: { value: null, writable: true },\n _subscribe: { value: connectableProto._subscribe },\n _isComplete: { value: connectableProto._isComplete, writable: true },\n getSubject: { value: connectableProto.getSubject },\n connect: { value: connectableProto.connect },\n refCount: { value: connectableProto.refCount }\n };\n})();\nclass ConnectableSubscriber extends SubjectSubscriber {\n constructor(destination, connectable) {\n super(destination);\n this.connectable = connectable;\n }\n _error(err) {\n this._unsubscribe();\n super._error(err);\n }\n _complete() {\n this.connectable._isComplete = true;\n this._unsubscribe();\n super._complete();\n }\n _unsubscribe() {\n const connectable = this.connectable;\n if (connectable) {\n this.connectable = null;\n const connection = connectable._connection;\n connectable._refCount = 0;\n connectable._subject = null;\n connectable._connection = null;\n if (connection) {\n connection.unsubscribe();\n }\n }\n }\n}\nclass RefCountOperator {\n constructor(connectable) {\n this.connectable = connectable;\n }\n call(subscriber, source) {\n const { connectable } = this;\n connectable._refCount++;\n const refCounter = new RefCountSubscriber(subscriber, connectable);\n const subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n }\n}\nclass RefCountSubscriber extends Subscriber {\n constructor(destination, connectable) {\n super(destination);\n this.connectable = connectable;\n }\n _unsubscribe() {\n const { connectable } = this;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n const refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n const { connection } = this;\n const sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n }\n}\n","import { of } from './of';\nimport { concatAll } from '../operators/concatAll';\nexport function concat(...observables) {\n return concatAll()(of(...observables));\n}\n","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\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 { Observable } from '../Observable';\nimport { subscribeTo } from '../util/subscribeTo';\nimport { scheduled } from '../scheduled/scheduled';\nexport function from(input, scheduler) {\n if (!scheduler) {\n if (input instanceof Observable) {\n return input;\n }\n return new Observable(subscribeTo(input));\n }\n else {\n return scheduled(input, scheduler);\n }\n}\n","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n else if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n else if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n else if (isIterable(input) || typeof input === 'string') {\n return scheduleIterable(input, scheduler);\n }\n }\n throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}\n","import { observable as Symbol_observable } from '../symbol/observable';\nexport function isInteropObservable(input) {\n return input && typeof input[Symbol_observable] === 'function';\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function scheduleObservable(input, scheduler) {\n return new Observable(subscriber => {\n const sub = new Subscription();\n sub.add(scheduler.schedule(() => {\n const observable = input[Symbol_observable]();\n sub.add(observable.subscribe({\n next(value) { sub.add(scheduler.schedule(() => subscriber.next(value))); },\n error(err) { sub.add(scheduler.schedule(() => subscriber.error(err))); },\n complete() { sub.add(scheduler.schedule(() => subscriber.complete())); },\n }));\n }));\n return sub;\n });\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function schedulePromise(input, scheduler) {\n return new Observable(subscriber => {\n const sub = new Subscription();\n sub.add(scheduler.schedule(() => input.then(value => {\n sub.add(scheduler.schedule(() => {\n subscriber.next(value);\n sub.add(scheduler.schedule(() => subscriber.complete()));\n }));\n }, err => {\n sub.add(scheduler.schedule(() => subscriber.error(err)));\n })));\n return sub;\n });\n}\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function isIterable(input) {\n return input && typeof input[Symbol_iterator] === 'function';\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function scheduleIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(subscriber => {\n const sub = new Subscription();\n let iterator;\n sub.add(() => {\n if (iterator && typeof iterator.return === 'function') {\n iterator.return();\n }\n });\n sub.add(scheduler.schedule(() => {\n iterator = input[Symbol_iterator]();\n sub.add(scheduler.schedule(function () {\n if (subscriber.closed) {\n return;\n }\n let value;\n let done;\n try {\n const result = iterator.next();\n value = result.value;\n done = result.done;\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 this.schedule();\n }\n }));\n }));\n return sub;\n });\n}\n","import { Observable } from '../Observable';\nimport { subscribeToArray } from '../util/subscribeToArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function fromArray(input, scheduler) {\n if (!scheduler) {\n return new Observable(subscribeToArray(input));\n }\n else {\n return scheduleArray(input, scheduler);\n }\n}\n","import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nconst toString = (() => Object.prototype.toString)();\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(map(args => isArray(args) ? resultSelector(...args) : resultSelector(args)));\n }\n return new Observable(subscriber => {\n function handler(e) {\n if (arguments.length > 1) {\n subscriber.next(Array.prototype.slice.call(arguments));\n }\n else {\n subscriber.next(e);\n }\n }\n setupSubscription(target, eventName, handler, subscriber, options);\n });\n}\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n let unsubscribe;\n if (isEventTarget(sourceObj)) {\n const source = sourceObj;\n sourceObj.addEventListener(eventName, handler, options);\n unsubscribe = () => source.removeEventListener(eventName, handler, options);\n }\n else if (isJQueryStyleEventEmitter(sourceObj)) {\n const source = sourceObj;\n sourceObj.on(eventName, handler);\n unsubscribe = () => source.off(eventName, handler);\n }\n else if (isNodeStyleEventEmitter(sourceObj)) {\n const source = sourceObj;\n sourceObj.addListener(eventName, handler);\n unsubscribe = () => source.removeListener(eventName, handler);\n }\n else if (sourceObj && sourceObj.length) {\n for (let i = 0, len = sourceObj.length; i < len; i++) {\n setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n }\n }\n else {\n throw new TypeError('Invalid event target');\n }\n subscriber.add(unsubscribe);\n}\nfunction isNodeStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\nfunction isEventTarget(sourceObj) {\n return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n}\n","import { Observable } from '../Observable';\nimport { isScheduler } from '../util/isScheduler';\nimport { mergeAll } from '../operators/mergeAll';\nimport { fromArray } from './fromArray';\nexport function merge(...observables) {\n let concurrent = Number.POSITIVE_INFINITY;\n let scheduler = null;\n let last = observables[observables.length - 1];\n if (isScheduler(last)) {\n scheduler = observables.pop();\n if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {\n concurrent = observables.pop();\n }\n }\n else if (typeof last === 'number') {\n concurrent = observables.pop();\n }\n if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable) {\n return observables[0];\n }\n return mergeAll(concurrent)(fromArray(observables, scheduler));\n}\n","import { isScheduler } from '../util/isScheduler';\nimport { fromArray } from './fromArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function of(...args) {\n let scheduler = args[args.length - 1];\n if (isScheduler(scheduler)) {\n args.pop();\n return scheduleArray(args, scheduler);\n }\n else {\n return fromArray(args);\n }\n}\n","import { Observable } from '../Observable';\nexport function throwError(error, scheduler) {\n if (!scheduler) {\n return new Observable(subscriber => subscriber.error(error));\n }\n else {\n return new Observable(subscriber => scheduler.schedule(dispatch, 0, { error, subscriber }));\n }\n}\nfunction dispatch({ error, subscriber }) {\n subscriber.error(error);\n}\n","import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function catchError(selector) {\n return function catchErrorOperatorFunction(source) {\n const operator = new CatchOperator(selector);\n const caught = source.lift(operator);\n return (operator.caught = caught);\n };\n}\nclass CatchOperator {\n constructor(selector) {\n this.selector = selector;\n }\n call(subscriber, source) {\n return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));\n }\n}\nclass CatchSubscriber extends SimpleOuterSubscriber {\n constructor(destination, selector, caught) {\n super(destination);\n this.selector = selector;\n this.caught = caught;\n }\n error(err) {\n if (!this.isStopped) {\n let result;\n try {\n result = this.selector(err, this.caught);\n }\n catch (err2) {\n super.error(err2);\n return;\n }\n this._unsubscribeAndRecycle();\n const innerSubscriber = new SimpleInnerSubscriber(this);\n this.add(innerSubscriber);\n const innerSubscription = innerSubscribe(result, innerSubscriber);\n if (innerSubscription !== innerSubscriber) {\n this.add(innerSubscription);\n }\n }\n }\n}\n","import { mergeMap } from './mergeMap';\nexport function concatMap(project, resultSelector) {\n return mergeMap(project, resultSelector, 1);\n}\n","import { Subscriber } from '../Subscriber';\nexport function filter(predicate, thisArg) {\n return function filterOperatorFunction(source) {\n return source.lift(new FilterOperator(predicate, thisArg));\n };\n}\nclass FilterOperator {\n constructor(predicate, thisArg) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n }\n call(subscriber, source) {\n return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n }\n}\nclass FilterSubscriber extends Subscriber {\n constructor(destination, predicate, thisArg) {\n super(destination);\n this.predicate = predicate;\n this.thisArg = thisArg;\n this.count = 0;\n }\n _next(value) {\n let result;\n try {\n result = this.predicate.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.destination.next(value);\n }\n }\n}\n","import { Subscriber } from '../Subscriber';\nexport function map(project, thisArg) {\n return function mapOperation(source) {\n if (typeof project !== 'function') {\n throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');\n }\n return source.lift(new MapOperator(project, thisArg));\n };\n}\nexport class MapOperator {\n constructor(project, thisArg) {\n this.project = project;\n this.thisArg = thisArg;\n }\n call(subscriber, source) {\n return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n }\n}\nclass MapSubscriber extends Subscriber {\n constructor(destination, project, thisArg) {\n super(destination);\n this.project = project;\n this.count = 0;\n this.thisArg = thisArg || this;\n }\n _next(value) {\n let result;\n try {\n result = this.project.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n }\n}\n","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Number.POSITIVE_INFINITY) {\n return mergeMap(identity, concurrent);\n}\n","import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function mergeMap(project, resultSelector, concurrent = Number.POSITIVE_INFINITY) {\n if (typeof resultSelector === 'function') {\n return (source) => source.pipe(mergeMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii))), concurrent));\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return (source) => source.lift(new MergeMapOperator(project, concurrent));\n}\nexport class MergeMapOperator {\n constructor(project, concurrent = Number.POSITIVE_INFINITY) {\n this.project = project;\n this.concurrent = concurrent;\n }\n call(observer, source) {\n return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));\n }\n}\nexport class MergeMapSubscriber extends SimpleOuterSubscriber {\n constructor(destination, project, concurrent = Number.POSITIVE_INFINITY) {\n super(destination);\n this.project = project;\n this.concurrent = concurrent;\n this.hasCompleted = false;\n this.buffer = [];\n this.active = 0;\n this.index = 0;\n }\n _next(value) {\n if (this.active < this.concurrent) {\n this._tryNext(value);\n }\n else {\n this.buffer.push(value);\n }\n }\n _tryNext(value) {\n let result;\n const index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.active++;\n this._innerSub(result);\n }\n _innerSub(ish) {\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination;\n destination.add(innerSubscriber);\n const innerSubscription = innerSubscribe(ish, innerSubscriber);\n if (innerSubscription !== innerSubscriber) {\n destination.add(innerSubscription);\n }\n }\n _complete() {\n this.hasCompleted = true;\n if (this.active === 0 && this.buffer.length === 0) {\n this.destination.complete();\n }\n this.unsubscribe();\n }\n notifyNext(innerValue) {\n this.destination.next(innerValue);\n }\n notifyComplete() {\n const buffer = this.buffer;\n this.active--;\n if (buffer.length > 0) {\n this._next(buffer.shift());\n }\n else if (this.active === 0 && this.hasCompleted) {\n this.destination.complete();\n }\n }\n}\nexport const flatMap = mergeMap;\n","import { Subscriber } from '../Subscriber';\nexport function refCount() {\n return function refCountOperatorFunction(source) {\n return source.lift(new RefCountOperator(source));\n };\n}\nclass RefCountOperator {\n constructor(connectable) {\n this.connectable = connectable;\n }\n call(subscriber, source) {\n const { connectable } = this;\n connectable._refCount++;\n const refCounter = new RefCountSubscriber(subscriber, connectable);\n const subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n }\n}\nclass RefCountSubscriber extends Subscriber {\n constructor(destination, connectable) {\n super(destination);\n this.connectable = connectable;\n }\n _unsubscribe() {\n const { connectable } = this;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n const refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n const { connection } = this;\n const sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n }\n}\n","import { concat } from '../observable/concat';\nimport { isScheduler } from '../util/isScheduler';\nexport function startWith(...array) {\n const scheduler = array[array.length - 1];\n if (isScheduler(scheduler)) {\n array.pop();\n return (source) => concat(array, source, scheduler);\n }\n else {\n return (source) => concat(array, source);\n }\n}\n","import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function switchMap(project, resultSelector) {\n if (typeof resultSelector === 'function') {\n return (source) => source.pipe(switchMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n }\n return (source) => source.lift(new SwitchMapOperator(project));\n}\nclass SwitchMapOperator {\n constructor(project) {\n this.project = project;\n }\n call(subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n }\n}\nclass SwitchMapSubscriber extends SimpleOuterSubscriber {\n constructor(destination, project) {\n super(destination);\n this.project = project;\n this.index = 0;\n }\n _next(value) {\n let result;\n const index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (error) {\n this.destination.error(error);\n return;\n }\n this._innerSub(result);\n }\n _innerSub(result) {\n const innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination;\n destination.add(innerSubscriber);\n this.innerSubscription = innerSubscribe(result, innerSubscriber);\n if (this.innerSubscription !== innerSubscriber) {\n destination.add(this.innerSubscription);\n }\n }\n _complete() {\n const { innerSubscription } = this;\n if (!innerSubscription || innerSubscription.closed) {\n super._complete();\n }\n this.unsubscribe();\n }\n _unsubscribe() {\n this.innerSubscription = undefined;\n }\n notifyComplete() {\n this.innerSubscription = undefined;\n if (this.isStopped) {\n super._complete();\n }\n }\n notifyNext(innerValue) {\n this.destination.next(innerValue);\n }\n}\n","import { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function take(count) {\n return (source) => {\n if (count === 0) {\n return empty();\n }\n else {\n return source.lift(new TakeOperator(count));\n }\n };\n}\nclass TakeOperator {\n constructor(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n call(subscriber, source) {\n return source.subscribe(new TakeSubscriber(subscriber, this.total));\n }\n}\nclass TakeSubscriber extends Subscriber {\n constructor(destination, total) {\n super(destination);\n this.total = total;\n this.count = 0;\n }\n _next(value) {\n const total = this.total;\n const count = ++this.count;\n if (count <= total) {\n this.destination.next(value);\n if (count === total) {\n this.destination.complete();\n this.unsubscribe();\n }\n }\n }\n}\n","import { innerSubscribe, SimpleInnerSubscriber, SimpleOuterSubscriber } from '../innerSubscribe';\nexport function takeUntil(notifier) {\n return (source) => source.lift(new TakeUntilOperator(notifier));\n}\nclass TakeUntilOperator {\n constructor(notifier) {\n this.notifier = notifier;\n }\n call(subscriber, source) {\n const takeUntilSubscriber = new TakeUntilSubscriber(subscriber);\n const notifierSubscription = innerSubscribe(this.notifier, new SimpleInnerSubscriber(takeUntilSubscriber));\n if (notifierSubscription && !takeUntilSubscriber.seenValue) {\n takeUntilSubscriber.add(notifierSubscription);\n return source.subscribe(takeUntilSubscriber);\n }\n return takeUntilSubscriber;\n }\n}\nclass TakeUntilSubscriber extends SimpleOuterSubscriber {\n constructor(destination) {\n super(destination);\n this.seenValue = false;\n }\n notifyNext() {\n this.seenValue = true;\n this.complete();\n }\n notifyComplete() {\n }\n}\n","export function noop() { }\n","import { Subscriber } from '../Subscriber';\nimport { noop } from '../util/noop';\nimport { isFunction } from '../util/isFunction';\nexport function tap(nextOrObserver, error, complete) {\n return function tapOperatorFunction(source) {\n return source.lift(new DoOperator(nextOrObserver, error, complete));\n };\n}\nclass DoOperator {\n constructor(nextOrObserver, error, complete) {\n this.nextOrObserver = nextOrObserver;\n this.error = error;\n this.complete = complete;\n }\n call(subscriber, source) {\n return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n }\n}\nclass TapSubscriber extends Subscriber {\n constructor(destination, observerOrNext, error, complete) {\n super(destination);\n this._tapNext = noop;\n this._tapError = noop;\n this._tapComplete = noop;\n this._tapError = error || noop;\n this._tapComplete = complete || noop;\n if (isFunction(observerOrNext)) {\n this._context = this;\n this._tapNext = observerOrNext;\n }\n else if (observerOrNext) {\n this._context = observerOrNext;\n this._tapNext = observerOrNext.next || noop;\n this._tapError = observerOrNext.error || noop;\n this._tapComplete = observerOrNext.complete || noop;\n }\n }\n _next(value) {\n try {\n this._tapNext.call(this._context, value);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(value);\n }\n _error(err) {\n try {\n this._tapError.call(this._context, err);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.error(err);\n }\n _complete() {\n try {\n this._tapComplete.call(this._context);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n return this.destination.complete();\n }\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function scheduleArray(input, scheduler) {\n return new Observable(subscriber => {\n const sub = new Subscription();\n let i = 0;\n sub.add(scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n return;\n }\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n sub.add(this.schedule());\n }\n }));\n return sub;\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","import { Action } from './Action';\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 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 = this.id || this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, id, delay = 0) {\n return 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 clearInterval(id);\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 = undefined;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = !!e && e || new Error(e);\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n _unsubscribe() {\n const id = this.id;\n const scheduler = this.scheduler;\n const actions = scheduler.actions;\n const index = actions.indexOf(this);\n this.work = null;\n this.state = null;\n this.pending = false;\n this.scheduler = null;\n if (index !== -1) {\n actions.splice(index, 1);\n }\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n }\n}\n","export class Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n this.SchedulerAction = SchedulerAction;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.SchedulerAction(this, work).schedule(state, delay);\n }\n}\nScheduler.now = () => Date.now();\n","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, () => {\n if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n return AsyncScheduler.delegate.now();\n }\n else {\n return now();\n }\n });\n this.actions = [];\n this.active = false;\n this.scheduled = undefined;\n }\n schedule(work, delay = 0, state) {\n if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n return AsyncScheduler.delegate.schedule(work, delay, state);\n }\n else {\n return super.schedule(work, delay, state);\n }\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 { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\nexport const $$iterator = iterator;\n","export const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();\n","export const rxSubscriber = (() => typeof Symbol === 'function'\n ? Symbol('rxSubscriber')\n : '@@rxSubscriber_' + Math.random())();\nexport const $$rxSubscriber = rxSubscriber;\n","const ArgumentOutOfRangeErrorImpl = (() => {\n function ArgumentOutOfRangeErrorImpl() {\n Error.call(this);\n this.message = 'argument out of range';\n this.name = 'ArgumentOutOfRangeError';\n return this;\n }\n ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype);\n return ArgumentOutOfRangeErrorImpl;\n})();\nexport const ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;\n","const ObjectUnsubscribedErrorImpl = (() => {\n function ObjectUnsubscribedErrorImpl() {\n Error.call(this);\n this.message = 'object unsubscribed';\n this.name = 'ObjectUnsubscribedError';\n return this;\n }\n ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype);\n return ObjectUnsubscribedErrorImpl;\n})();\nexport const ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;\n","export function hostReportError(err) {\n setTimeout(() => { throw err; }, 0);\n}\n","export function identity(x) {\n return x;\n}\n","export const isArray = (() => Array.isArray || ((x) => x && typeof x.length === 'number'))();\n","export const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');\n","export function isFunction(x) {\n return typeof x === 'function';\n}\n","export function isObject(x) {\n return x !== null && typeof x === 'object';\n}\n","export function isPromise(value) {\n return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\n","export function isScheduler(value) {\n return value && typeof value.schedule === 'function';\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 { subscribeToArray } from './subscribeToArray';\nimport { subscribeToPromise } from './subscribeToPromise';\nimport { subscribeToIterable } from './subscribeToIterable';\nimport { subscribeToObservable } from './subscribeToObservable';\nimport { isArrayLike } from './isArrayLike';\nimport { isPromise } from './isPromise';\nimport { isObject } from './isObject';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport const subscribeTo = (result) => {\n if (!!result && typeof result[Symbol_observable] === 'function') {\n return subscribeToObservable(result);\n }\n else if (isArrayLike(result)) {\n return subscribeToArray(result);\n }\n else if (isPromise(result)) {\n return subscribeToPromise(result);\n }\n else if (!!result && typeof result[Symbol_iterator] === 'function') {\n return subscribeToIterable(result);\n }\n else {\n const value = isObject(result) ? 'an invalid object' : `'${result}'`;\n const msg = `You provided ${value} where a stream was expected.`\n + ' You can provide an Observable, Promise, Array, or Iterable.';\n throw new TypeError(msg);\n }\n};\n","import { observable as Symbol_observable } from '../symbol/observable';\nexport const subscribeToObservable = (obj) => (subscriber) => {\n const obs = obj[Symbol_observable]();\n if (typeof obs.subscribe !== 'function') {\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n }\n else {\n return obs.subscribe(subscriber);\n }\n};\n","import { hostReportError } from './hostReportError';\nexport const subscribeToPromise = (promise) => (subscriber) => {\n promise.then((value) => {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, (err) => subscriber.error(err))\n .then(null, hostReportError);\n return subscriber;\n};\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nexport const subscribeToIterable = (iterable) => (subscriber) => {\n const iterator = iterable[Symbol_iterator]();\n do {\n let item;\n try {\n item = iterator.next();\n }\n catch (err) {\n subscriber.error(err);\n return subscriber;\n }\n if (item.done) {\n subscriber.complete();\n break;\n }\n subscriber.next(item.value);\n if (subscriber.closed) {\n break;\n }\n } while (true);\n if (typeof iterator.return === 'function') {\n subscriber.add(() => {\n if (iterator.return) {\n iterator.return();\n }\n });\n }\n return subscriber;\n};\n","export const subscribeToArray = (array) => (subscriber) => {\n for (let i = 0, len = array.length; i < len && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n};\n","'use strict';\n/**\n * @license Angular v<unknown>\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n/**\n * @fileoverview\n * @suppress {globalThis,undefinedVars}\n */\nZone.__load_patch('Error', (global, Zone, api) => {\n /*\n * This code patches Error so that:\n * - It ignores un-needed stack frames.\n * - It Shows the associated Zone for reach frame.\n */\n const zoneJsInternalStackFramesSymbol = api.symbol('zoneJsInternalStackFrames');\n const NativeError = global[api.symbol('Error')] = global['Error'];\n // Store the frames which should be removed from the stack frames\n const zoneJsInternalStackFrames = {};\n // We must find the frame where Error was created, otherwise we assume we don't understand stack\n let zoneAwareFrame1;\n let zoneAwareFrame2;\n let zoneAwareFrame1WithoutNew;\n let zoneAwareFrame2WithoutNew;\n let zoneAwareFrame3WithoutNew;\n global['Error'] = ZoneAwareError;\n const stackRewrite = 'stackRewrite';\n const zoneJsInternalStackFramesPolicy = global['__Zone_Error_BlacklistedStackFrames_policy'] ||\n global['__Zone_Error_ZoneJsInternalStackFrames_policy'] || 'default';\n function buildZoneFrameNames(zoneFrame) {\n let zoneFrameName = { zoneName: zoneFrame.zone.name };\n let result = zoneFrameName;\n while (zoneFrame.parent) {\n zoneFrame = zoneFrame.parent;\n const parentZoneFrameName = { zoneName: zoneFrame.zone.name };\n zoneFrameName.parent = parentZoneFrameName;\n zoneFrameName = parentZoneFrameName;\n }\n return result;\n }\n function buildZoneAwareStackFrames(originalStack, zoneFrame, isZoneFrame = true) {\n let frames = originalStack.split('\\n');\n let i = 0;\n // Find the first frame\n while (!(frames[i] === zoneAwareFrame1 || frames[i] === zoneAwareFrame2 ||\n frames[i] === zoneAwareFrame1WithoutNew || frames[i] === zoneAwareFrame2WithoutNew ||\n frames[i] === zoneAwareFrame3WithoutNew) &&\n i < frames.length) {\n i++;\n }\n for (; i < frames.length && zoneFrame; i++) {\n let frame = frames[i];\n if (frame.trim()) {\n switch (zoneJsInternalStackFrames[frame]) {\n case 0 /* FrameType.zoneJsInternal */:\n frames.splice(i, 1);\n i--;\n break;\n case 1 /* FrameType.transition */:\n if (zoneFrame.parent) {\n // This is the special frame where zone changed. Print and process it accordingly\n zoneFrame = zoneFrame.parent;\n }\n else {\n zoneFrame = null;\n }\n frames.splice(i, 1);\n i--;\n break;\n default:\n frames[i] += isZoneFrame ? ` [${zoneFrame.zone.name}]` :\n ` [${zoneFrame.zoneName}]`;\n }\n }\n }\n return frames.join('\\n');\n }\n /**\n * This is ZoneAwareError which processes the stack frame and cleans up extra frames as well as\n * adds zone information to it.\n */\n function ZoneAwareError() {\n // We always have to return native error otherwise the browser console will not work.\n let error = NativeError.apply(this, arguments);\n // Save original stack trace\n const originalStack = error['originalStack'] = error.stack;\n // Process the stack trace and rewrite the frames.\n if (ZoneAwareError[stackRewrite] && originalStack) {\n let zoneFrame = api.currentZoneFrame();\n if (zoneJsInternalStackFramesPolicy === 'lazy') {\n // don't handle stack trace now\n error[api.symbol('zoneFrameNames')] = buildZoneFrameNames(zoneFrame);\n }\n else if (zoneJsInternalStackFramesPolicy === 'default') {\n try {\n error.stack = error.zoneAwareStack = buildZoneAwareStackFrames(originalStack, zoneFrame);\n }\n catch (e) {\n // ignore as some browsers don't allow overriding of stack\n }\n }\n }\n if (this instanceof NativeError && this.constructor != NativeError) {\n // We got called with a `new` operator AND we are subclass of ZoneAwareError\n // in that case we have to copy all of our properties to `this`.\n Object.keys(error).concat('stack', 'message').forEach((key) => {\n const value = error[key];\n if (value !== undefined) {\n try {\n this[key] = value;\n }\n catch (e) {\n // ignore the assignment in case it is a setter and it throws.\n }\n }\n });\n return this;\n }\n return error;\n }\n // Copy the prototype so that instanceof operator works as expected\n ZoneAwareError.prototype = NativeError.prototype;\n ZoneAwareError[zoneJsInternalStackFramesSymbol] = zoneJsInternalStackFrames;\n ZoneAwareError[stackRewrite] = false;\n const zoneAwareStackSymbol = api.symbol('zoneAwareStack');\n // try to define zoneAwareStack property when zoneJsInternal frames policy is delay\n if (zoneJsInternalStackFramesPolicy === 'lazy') {\n Object.defineProperty(ZoneAwareError.prototype, 'zoneAwareStack', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this[zoneAwareStackSymbol]) {\n this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);\n }\n return this[zoneAwareStackSymbol];\n },\n set: function (newStack) {\n this.originalStack = newStack;\n this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);\n }\n });\n }\n // those properties need special handling\n const specialPropertyNames = ['stackTraceLimit', 'captureStackTrace', 'prepareStackTrace'];\n // those properties of NativeError should be set to ZoneAwareError\n const nativeErrorProperties = Object.keys(NativeError);\n if (nativeErrorProperties) {\n nativeErrorProperties.forEach(prop => {\n if (specialPropertyNames.filter(sp => sp === prop).length === 0) {\n Object.defineProperty(ZoneAwareError, prop, {\n get: function () {\n return NativeError[prop];\n },\n set: function (value) {\n NativeError[prop] = value;\n }\n });\n }\n });\n }\n if (NativeError.hasOwnProperty('stackTraceLimit')) {\n // Extend default stack limit as we will be removing few frames.\n NativeError.stackTraceLimit = Math.max(NativeError.stackTraceLimit, 15);\n // make sure that ZoneAwareError has the same property which forwards to NativeError.\n Object.defineProperty(ZoneAwareError, 'stackTraceLimit', {\n get: function () {\n return NativeError.stackTraceLimit;\n },\n set: function (value) {\n return NativeError.stackTraceLimit = value;\n }\n });\n }\n if (NativeError.hasOwnProperty('captureStackTrace')) {\n Object.defineProperty(ZoneAwareError, 'captureStackTrace', {\n // add named function here because we need to remove this\n // stack frame when prepareStackTrace below\n value: function zoneCaptureStackTrace(targetObject, constructorOpt) {\n NativeError.captureStackTrace(targetObject, constructorOpt);\n }\n });\n }\n const ZONE_CAPTURESTACKTRACE = 'zoneCaptureStackTrace';\n Object.defineProperty(ZoneAwareError, 'prepareStackTrace', {\n get: function () {\n return NativeError.prepareStackTrace;\n },\n set: function (value) {\n if (!value || typeof value !== 'function') {\n return NativeError.prepareStackTrace = value;\n }\n return NativeError.prepareStackTrace = function (error, structuredStackTrace) {\n // remove additional stack information from ZoneAwareError.captureStackTrace\n if (structuredStackTrace) {\n for (let i = 0; i < structuredStackTrace.length; i++) {\n const st = structuredStackTrace[i];\n // remove the first function which name is zoneCaptureStackTrace\n if (st.getFunctionName() === ZONE_CAPTURESTACKTRACE) {\n structuredStackTrace.splice(i, 1);\n break;\n }\n }\n }\n return value.call(this, error, structuredStackTrace);\n };\n }\n });\n if (zoneJsInternalStackFramesPolicy === 'disable') {\n // don't need to run detectZone to populate zoneJs internal stack frames\n return;\n }\n // Now we need to populate the `zoneJsInternalStackFrames` as well as find the\n // run/runGuarded/runTask frames. This is done by creating a detect zone and then threading\n // the execution through all of the above methods so that we can look at the stack trace and\n // find the frames of interest.\n let detectZone = Zone.current.fork({\n name: 'detect',\n onHandleError: function (parentZD, current, target, error) {\n if (error.originalStack && Error === ZoneAwareError) {\n let frames = error.originalStack.split(/\\n/);\n let runFrame = false, runGuardedFrame = false, runTaskFrame = false;\n while (frames.length) {\n let frame = frames.shift();\n // On safari it is possible to have stack frame with no line number.\n // This check makes sure that we don't filter frames on name only (must have\n // line number or exact equals to `ZoneAwareError`)\n if (/:\\d+:\\d+/.test(frame) || frame === 'ZoneAwareError') {\n // Get rid of the path so that we don't accidentally find function name in path.\n // In chrome the separator is `(` and `@` in FF and safari\n // Chrome: at Zone.run (zone.js:100)\n // Chrome: at Zone.run (http://localhost:9876/base/build/lib/zone.js:100:24)\n // FireFox: Zone.prototype.run@http://localhost:9876/base/build/lib/zone.js:101:24\n // Safari: run@http://localhost:9876/base/build/lib/zone.js:101:24\n let fnName = frame.split('(')[0].split('@')[0];\n let frameType = 1 /* FrameType.transition */;\n if (fnName.indexOf('ZoneAwareError') !== -1) {\n if (fnName.indexOf('new ZoneAwareError') !== -1) {\n zoneAwareFrame1 = frame;\n zoneAwareFrame2 = frame.replace('new ZoneAwareError', 'new Error.ZoneAwareError');\n }\n else {\n zoneAwareFrame1WithoutNew = frame;\n zoneAwareFrame2WithoutNew = frame.replace('Error.', '');\n if (frame.indexOf('Error.ZoneAwareError') === -1) {\n zoneAwareFrame3WithoutNew =\n frame.replace('ZoneAwareError', 'Error.ZoneAwareError');\n }\n }\n zoneJsInternalStackFrames[zoneAwareFrame2] = 0 /* FrameType.zoneJsInternal */;\n }\n if (fnName.indexOf('runGuarded') !== -1) {\n runGuardedFrame = true;\n }\n else if (fnName.indexOf('runTask') !== -1) {\n runTaskFrame = true;\n }\n else if (fnName.indexOf('run') !== -1) {\n runFrame = true;\n }\n else {\n frameType = 0 /* FrameType.zoneJsInternal */;\n }\n zoneJsInternalStackFrames[frame] = frameType;\n // Once we find all of the frames we can stop looking.\n if (runFrame && runGuardedFrame && runTaskFrame) {\n ZoneAwareError[stackRewrite] = true;\n break;\n }\n }\n }\n }\n return false;\n }\n });\n // carefully constructor a stack frame which contains all of the frames of interest which\n // need to be detected and marked as an internal zoneJs frame.\n const childDetectZone = detectZone.fork({\n name: 'child',\n onScheduleTask: function (delegate, curr, target, task) {\n return delegate.scheduleTask(target, task);\n },\n onInvokeTask: function (delegate, curr, target, task, applyThis, applyArgs) {\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n },\n onCancelTask: function (delegate, curr, target, task) {\n return delegate.cancelTask(target, task);\n },\n onInvoke: function (delegate, curr, target, callback, applyThis, applyArgs, source) {\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n }\n });\n // we need to detect all zone related frames, it will\n // exceed default stackTraceLimit, so we set it to\n // larger number here, and restore it after detect finish.\n // We cast through any so we don't need to depend on nodejs typings.\n const originalStackTraceLimit = Error.stackTraceLimit;\n Error.stackTraceLimit = 100;\n // we schedule event/micro/macro task, and invoke them\n // when onSchedule, so we can get all stack traces for\n // all kinds of tasks with one error thrown.\n childDetectZone.run(() => {\n childDetectZone.runGuarded(() => {\n const fakeTransitionTo = () => { };\n childDetectZone.scheduleEventTask(zoneJsInternalStackFramesSymbol, () => {\n childDetectZone.scheduleMacroTask(zoneJsInternalStackFramesSymbol, () => {\n childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, () => {\n throw new Error();\n }, undefined, (t) => {\n t._transitionTo = fakeTransitionTo;\n t.invoke();\n });\n childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, () => {\n throw Error();\n }, undefined, (t) => {\n t._transitionTo = fakeTransitionTo;\n t.invoke();\n });\n }, undefined, (t) => {\n t._transitionTo = fakeTransitionTo;\n t.invoke();\n }, () => { });\n }, undefined, (t) => {\n t._transitionTo = fakeTransitionTo;\n t.invoke();\n }, () => { });\n });\n });\n Error.stackTraceLimit = originalStackTraceLimit;\n});\n","/**\n * @license Angular v15.2.9\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, ɵ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\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 * A DI Token representing the main rendering context.\n * In a browser and SSR this is the DOM Document.\n * When using SSR, that document is created by [Domino](https://github.com/angular/domino).\n *\n * @publicApi\n */\nconst DOCUMENT = new InjectionToken('DocumentToken');\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.2.9\", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 *\n * @publicApi\n */\nclass BrowserPlatformLocation extends PlatformLocation {\n constructor(_doc) {\n super();\n this._doc = _doc;\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.2.9\", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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 * 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.2.9\", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @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.2.9\", 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.2.9\", ngImport: i0, type: HashLocationStrategy });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @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.2.9\", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });\nLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 if (!basePath || !url.startsWith(basePath)) {\n return url;\n }\n const strippedUrl = url.substring(basePath.length);\n if (strippedUrl === '' || ['/', ';', '?', '#'].includes(strippedUrl[0])) {\n return strippedUrl;\n }\n return 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/** @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 * 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\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\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 * @publicApi\n */\nclass NgLocalization {\n}\nNgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nNgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgLocaleLocalization });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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\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\nconst WS_REGEXP = /\\s+/;\nconst EMPTY_ARRAY = [];\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(\n // leaving references to differs in place since flex layout is extending NgClass...\n _iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {\n this._iterableDiffers = _iterableDiffers;\n this._keyValueDiffers = _keyValueDiffers;\n this._ngEl = _ngEl;\n this._renderer = _renderer;\n this.initialClasses = EMPTY_ARRAY;\n this.stateMap = new Map();\n }\n set klass(value) {\n this.initialClasses = value != null ? value.trim().split(WS_REGEXP) : EMPTY_ARRAY;\n }\n set ngClass(value) {\n this.rawClass = typeof value === 'string' ? value.trim().split(WS_REGEXP) : value;\n }\n /*\n The NgClass directive uses the custom change detection algorithm for its inputs. The custom\n algorithm is necessary since inputs are represented as complex object or arrays that need to be\n deeply-compared.\n \n This algorithm is perf-sensitive since NgClass is used very frequently and its poor performance\n might negatively impact runtime performance of the entire change detection cycle. The design of\n this algorithm is making sure that:\n - there is no unnecessary DOM manipulation (CSS classes are added / removed from the DOM only when\n needed), even if references to bound objects change;\n - there is no memory allocation if nothing changes (even relatively modest memory allocation\n during the change detection cycle can result in GC pauses for some of the CD cycles).\n \n The algorithm works by iterating over the set of bound classes, staring with [class] binding and\n then going over [ngClass] binding. For each CSS class name:\n - check if it was seen before (this information is tracked in the state map) and if its value\n changed;\n - mark it as \"touched\" - names that are not marked are not present in the latest set of binding\n and we can remove such class name from the internal data structures;\n \n After iteration over all the CSS class names we've got data structure with all the information\n necessary to synchronize changes to the DOM - it is enough to iterate over the state map, flush\n changes to the DOM and reset internal data structures so those are ready for the next change\n detection cycle.\n */\n ngDoCheck() {\n // classes from the [class] binding\n for (const klass of this.initialClasses) {\n this._updateState(klass, true);\n }\n // classes from the [ngClass] binding\n const rawClass = this.rawClass;\n if (Array.isArray(rawClass) || rawClass instanceof Set) {\n for (const klass of rawClass) {\n this._updateState(klass, true);\n }\n }\n else if (rawClass != null) {\n for (const klass of Object.keys(rawClass)) {\n this._updateState(klass, Boolean(rawClass[klass]));\n }\n }\n this._applyStateDiff();\n }\n _updateState(klass, nextEnabled) {\n const state = this.stateMap.get(klass);\n if (state !== undefined) {\n if (state.enabled !== nextEnabled) {\n state.changed = true;\n state.enabled = nextEnabled;\n }\n state.touched = true;\n }\n else {\n this.stateMap.set(klass, { enabled: nextEnabled, changed: true, touched: true });\n }\n }\n _applyStateDiff() {\n for (const stateEntry of this.stateMap) {\n const klass = stateEntry[0];\n const state = stateEntry[1];\n if (state.changed) {\n this._toggleClass(klass, state.enabled);\n state.changed = false;\n }\n else if (!state.touched) {\n // A class that was previously active got removed from the new collection of classes -\n // remove from the DOM as well.\n if (state.enabled) {\n this._toggleClass(klass, false);\n }\n this.stateMap.delete(klass);\n }\n state.touched = false;\n }\n }\n _toggleClass(klass, enabled) {\n if (ngDevMode) {\n if (typeof klass !== 'string') {\n throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${ɵstringify(klass)}`);\n }\n }\n klass = klass.trim();\n if (klass.length > 0) {\n klass.split(WS_REGEXP).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.2.9\", 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.2.9\", type: NgClass, isStandalone: true, selector: \"[ngClass]\", inputs: { klass: [\"class\", \"klass\"], ngClass: \"ngClass\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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.2.9\", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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\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 /**\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 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 this._trackByFn = fn;\n }\n get ngForTrackBy() {\n return this._trackByFn;\n }\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 * 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.2.9\", 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.2.9\", type: NgForOf, isStandalone: true, selector: \"[ngFor][ngForOf]\", inputs: { ngForOf: \"ngForOf\", ngForTrackBy: \"ngForTrackBy\", ngForTemplate: \"ngForTemplate\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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.2.9\", 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.2.9\", type: NgIf, isStandalone: true, selector: \"[ngIf]\", inputs: { ngIf: \"ngIf\", ngIfThen: \"ngIfThen\", ngIfElse: \"ngIfElse\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\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._defaultViews = [];\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 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.length > 0 && useDefault !== this._defaultUsed) {\n this._defaultUsed = useDefault;\n for (const defaultView of this._defaultViews) {\n defaultView.enforceState(useDefault);\n }\n }\n }\n}\nNgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgSwitch, isStandalone: true, selector: \"[ngSwitch]\", inputs: { ngSwitch: \"ngSwitch\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", type: NgSwitchCase, isStandalone: true, selector: \"[ngSwitchCase]\", inputs: { ngSwitchCase: \"ngSwitchCase\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", type: NgSwitchDefault, isStandalone: true, selector: \"[ngSwitchDefault]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @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._updateView(value);\n }\n addCase(value, switchView) {\n this._caseViews[value] = switchView;\n }\n _updateView(switchValue) {\n this._clearViews();\n const cases = Object.keys(this._caseViews);\n const key = getPluralCategory(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.2.9\", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });\nNgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgPlural, isStandalone: true, selector: \"[ngPlural]\", inputs: { ngPlural: \"ngPlural\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", type: NgPluralCase, isStandalone: true, selector: \"[ngPluralCase]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @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.2.9\", 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.2.9\", type: NgStyle, isStandalone: true, selector: \"[ngStyle]\", inputs: { ngStyle: \"ngStyle\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @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.2.9\", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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 * 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\nfunction invalidPipeArgumentError(type, value) {\n return new ɵRuntimeError(2100 /* RuntimeErrorCode.INVALID_PIPE_ARGUMENT */, ngDevMode && `InvalidPipeArgument: '${value}' for pipe '${ɵstringify(type)}'`);\n}\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.2.9\", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });\nAsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: AsyncPipe, isStandalone: true, name: \"async\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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.2.9\", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nLowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: \"lowercase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\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\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76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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-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD837[\\uDF00-\\uDF1E]|\\uD838[\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD4E\\uDE90-\\uDEAD\\uDEC0-\\uDEEB]|\\uD839[\\uDFE0-\\uDFE6\\uDFE8-\\uDFEB\\uDFED\\uDFEE\\uDFF0-\\uDFFE]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43\\uDD4B]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\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.2.9\", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nTitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: \"titlecase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nUpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: \"uppercase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UpperCasePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'uppercase',\n standalone: true,\n }]\n }] });\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 * 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.2.9\", 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.2.9\", ngImport: i0, type: DatePipe, isStandalone: true, name: \"date\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\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.2.9\", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });\nI18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: \"i18nPlural\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @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.2.9\", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nI18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: \"i18nSelect\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: I18nSelectPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'i18nSelect',\n pure: true,\n standalone: true,\n }]\n }] });\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.2.9\", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nJsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonPipe, isStandalone: true, name: \"json\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'json',\n pure: false,\n standalone: true,\n }]\n }] });\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.2.9\", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });\nKeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: \"keyvalue\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @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.2.9\", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\nDecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: DecimalPipe, isStandalone: true, name: \"number\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\nPercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: PercentPipe, isStandalone: true, name: \"percent\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 *\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.2.9\", 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.2.9\", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: \"currency\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @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.2.9\", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nSlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: SlicePipe, isStandalone: true, name: \"slice\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SlicePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'slice',\n pure: false,\n standalone: true,\n }]\n }] });\n\n/**\n * @module\n * @description\n * This module provides a set of common Pipes.\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// 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.2.9\", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: CommonModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\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 * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.2.9');\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 * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\nclass XhrFactory {\n}\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 * 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 * 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 * 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 * 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 const { src, width } = config;\n let urlSegments;\n if (width) {\n const params = `tr:w-${width}`;\n urlSegments = [path, params, src];\n }\n else {\n urlSegments = [path, src];\n }\n return urlSegments.join('/');\n}\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// 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 * 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 * 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.2.9\", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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// 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 for the\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.2.9\", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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 * @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.2.9\", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreloadLinkCreator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreloadLinkCreator, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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 assertNoNgSrcsetWithoutLoader(this, this.imageLoader);\n assertNoLoaderParamsWithoutLoader(this, 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 `data-ng-img` attribute flags an image as using the directive, to allow\n // for analysis of the directive's performance.\n this.setHostAttribute('ng-img', 'true');\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 'loaderParams',\n 'disableOptimizedSrcset',\n ]);\n }\n }\n callImageLoader(configWithoutCustomParams) {\n let augmentedConfig = configWithoutCustomParams;\n if (this.loaderParams) {\n augmentedConfig.loaderParams = this.loaderParams;\n }\n return this.imageLoader(augmentedConfig);\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.callImageLoader(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.callImageLoader({ 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.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);\n return finalSrcs.join(', ');\n }\n getFixedSrcset() {\n const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.callImageLoader({\n src: this.ngSrc,\n width: this.width * multiplier\n })} ${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.2.9\", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgOptimizedImage, isStandalone: true, selector: \"img[ngSrc]\", inputs: { ngSrc: \"ngSrc\", ngSrcset: \"ngSrcset\", sizes: \"sizes\", width: \"width\", height: \"height\", loading: \"loading\", priority: \"priority\", loaderParams: \"loaderParams\", 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.2.9\", 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 }], loaderParams: [{\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 const computedStyle = window.getComputedStyle(img);\n let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));\n let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));\n const boxSizing = computedStyle.getPropertyValue('box-sizing');\n if (boxSizing === 'border-box') {\n const paddingTop = computedStyle.getPropertyValue('padding-top');\n const paddingRight = computedStyle.getPropertyValue('padding-right');\n const paddingBottom = computedStyle.getPropertyValue('padding-bottom');\n const paddingLeft = computedStyle.getPropertyValue('padding-left');\n renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);\n renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);\n }\n const renderedAspectRatio = renderedWidth / renderedHeight;\n const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0;\n const intrinsicWidth = img.naturalWidth;\n const intrinsicHeight = 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 = 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 * Warns if ngSrcset is present and no loader is configured (i.e. the default one is being used).\n */\nfunction assertNoNgSrcsetWithoutLoader(dir, imageLoader) {\n if (dir.ngSrcset && imageLoader === noopImageLoader) {\n console.warn(ɵformatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`ngSrcset\\` attribute is present but ` +\n `no image loader is configured (i.e. the default one is being used), ` +\n `which would result in the same image being used for all configured sizes. ` +\n `To fix this, provide a loader or remove the \\`ngSrcset\\` attribute from the image.`));\n }\n}\n/**\n * Warns if loaderParams is present and no loader is configured (i.e. the default one is being\n * used).\n */\nfunction assertNoLoaderParamsWithoutLoader(dir, imageLoader) {\n if (dir.loaderParams && imageLoader === noopImageLoader) {\n console.warn(ɵformatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loaderParams\\` attribute is present but ` +\n `no image loader is configured (i.e. the default one is being used), ` +\n `which means that the loaderParams data will not be consumed and will not affect the URL. ` +\n `To fix this, provide a custom loader or remove the \\`loaderParams\\` attribute from the image.`));\n }\n}\n\n// These exports represent the set of symbols exposed as a public API.\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { APP_BASE_HREF, AsyncPipe, BrowserPlatformLocation, 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, 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","/**\n * @license Angular v15.2.9\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 * 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 * 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.entries(headers).forEach(([name, values]) => {\n let headerValues;\n if (typeof values === 'string') {\n headerValues = [values];\n }\n else if (typeof values === 'number') {\n headerValues = [values.toString()];\n }\n else {\n headerValues = values.map((value) => value.toString());\n }\n if (headerValues.length > 0) {\n const key = name.toLowerCase();\n this.headers.set(key, headerValues);\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, numbers 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' || typeof value === 'number') && !Array.isArray(value)) {\n throw new Error(`Unexpected value of the \\`${key}\\` header provided. ` +\n `Expecting either a string, a number or an array, but got: \\`${value}\\`.`);\n }\n }\n}\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 * 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 * 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 * 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 * 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.2.9\", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClient });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClient, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: HttpHandler }]; } });\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.2.9\", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpInterceptorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpInterceptorHandler });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpInterceptorHandler, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: HttpBackend }, { type: i0.EnvironmentInjector }]; } });\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 {@link HttpHandler}\n * @see {@link 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.2.9\", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nJsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonpClientBackend });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 {@link 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.2.9\", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nJsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonpInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonpInterceptor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });\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 {@link HttpHandler}\n * @see {@link 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.2.9\", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXhrBackend });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXhrBackend, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1.XhrFactory }]; } });\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.2.9\", 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.2.9\", ngImport: i0, type: HttpXsrfCookieExtractor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXsrfInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });\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 {@link withInterceptors}\n * @see {@link withInterceptorsFromDi}\n * @see {@link withXsrfConfiguration}\n * @see {@link withNoXsrfProtection}\n * @see {@link withJsonpSupport}\n * @see {@link 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 {@link HttpInterceptorFn}\n * @see {@link 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 {@link HttpInterceptor}\n * @see {@link HTTP_INTERCEPTORS}\n * @see {@link 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 {@link 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 {@link 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 {@link 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 {@link 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 * 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.2.9\", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientXsrfModule });\nHttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientModule });\nHttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientModule, providers: [\n provideHttpClient(withInterceptorsFromDi()),\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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()),\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.2.9\", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientJsonpModule });\nHttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientJsonpModule, providers: [\n withJsonpSupport().ɵproviders,\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientJsonpModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n withJsonpSupport().ɵproviders,\n ],\n }]\n }] });\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// This file is not used to build this module. It is only used during editing\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 { connectableObservableDescriptor } from '../observable/ConnectableObservable';\nexport function multicast(subjectOrSubjectFactory, selector) {\n return function multicastOperatorFunction(source) {\n let subjectFactory;\n if (typeof subjectOrSubjectFactory === 'function') {\n subjectFactory = subjectOrSubjectFactory;\n }\n else {\n subjectFactory = function subjectFactory() {\n return subjectOrSubjectFactory;\n };\n }\n if (typeof selector === 'function') {\n return source.lift(new MulticastOperator(subjectFactory, selector));\n }\n const connectable = Object.create(source, connectableObservableDescriptor);\n connectable.source = source;\n connectable.subjectFactory = subjectFactory;\n return connectable;\n };\n}\nexport class MulticastOperator {\n constructor(subjectFactory, selector) {\n this.subjectFactory = subjectFactory;\n this.selector = selector;\n }\n call(subscriber, source) {\n const { selector } = this;\n const subject = this.subjectFactory();\n const subscription = selector(subject).subscribe(subscriber);\n subscription.add(source.subscribe(subject));\n return subscription;\n }\n}\n","import { multicast } from './multicast';\nimport { refCount } from './refCount';\nimport { Subject } from '../Subject';\nfunction shareSubjectFactory() {\n return new Subject();\n}\nexport function share() {\n return (source) => refCount()(multicast(shareSubjectFactory)(source));\n}\n","/**\n * @license Angular v15.2.9\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\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\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\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\nfunction isEnvironmentProviders(value) {\n return value && !!value.ɵproviders;\n}\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 * 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 * 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/** 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// The functions in this file verify that the assumptions we are making\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 * 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 ngDevMode &&\n console.warn(`DEPRECATED: DI is instantiating a token \"${type.name}\" 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 \"${type.name}\" class.`);\n return def;\n }\n else {\n return null;\n }\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 * 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 * 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// 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\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\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`, `@SkipSelf`, 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 * 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 * 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/**\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 * 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\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/** 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 MyComponent {\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 baseDef = getNgDirectiveDef(componentDefinition);\n const def = {\n ...baseDef,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n template: componentDefinition.template,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null,\n pipeDefs: null,\n dependencies: baseDef.standalone && componentDefinition.dependencies || null,\n getStandaloneInjector: 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 schemas: componentDefinition.schemas || null,\n tView: null,\n };\n initFeatures(def);\n const dependencies = componentDefinition.dependencies;\n def.directiveDefs = extractDefListOrFactory(dependencies, /* pipeDef */ false);\n def.pipeDefs = extractDefListOrFactory(dependencies, /* pipeDef */ true);\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 = extractDefListOrFactory(directives, /* pipeDef */ false);\n def.pipeDefs = extractDefListOrFactory(pipes, /* pipeDef */ true);\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 */\nfunction ɵɵdefineDirective(directiveDefinition) {\n return noSideEffects(() => {\n const def = getNgDirectiveDef(directiveDefinition);\n initFeatures(def);\n return def;\n });\n}\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}\n/**\n * Checks whether a given Component, Directive or Pipe is marked as standalone.\n * This will return false if passed anything other than a Component, Directive, or Pipe class\n * See this guide for additional information: https://angular.io/guide/standalone-components\n *\n * @param type A reference to a Component, Directive or Pipe.\n * @publicApi\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}\nfunction getNgDirectiveDef(directiveDefinition) {\n const declaredInputs = {};\n return {\n type: directiveDefinition.type,\n providersResolver: null,\n factory: null,\n hostBindings: directiveDefinition.hostBindings || null,\n hostVars: directiveDefinition.hostVars || 0,\n hostAttrs: directiveDefinition.hostAttrs || null,\n contentQueries: directiveDefinition.contentQueries || null,\n declaredInputs,\n exportAs: directiveDefinition.exportAs || null,\n standalone: directiveDefinition.standalone === true,\n selectors: directiveDefinition.selectors || EMPTY_ARRAY,\n viewQuery: directiveDefinition.viewQuery || null,\n features: directiveDefinition.features || null,\n setInput: null,\n findHostDirectiveDefs: null,\n hostDirectives: null,\n inputs: invertObject(directiveDefinition.inputs, declaredInputs),\n outputs: invertObject(directiveDefinition.outputs),\n };\n}\nfunction initFeatures(definition) {\n definition.features?.forEach((fn) => fn(definition));\n}\nfunction extractDefListOrFactory(dependencies, pipeDef) {\n if (!dependencies) {\n return null;\n }\n const defExtractor = pipeDef ? getPipeDef$1 : extractDirectiveDef;\n return () => (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map(dep => defExtractor(dep))\n .filter(nonNull);\n}\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 * 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 * 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;\n}\nfunction isRootView(target) {\n return (target[FLAGS] & 256 /* LViewFlags.IsRoot */) !== 0;\n}\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\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 * 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 * 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\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\nconst SVG_NAMESPACE = 'svg';\nconst MATH_ML_NAMESPACE = 'math';\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\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 * 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 = [])).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\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\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/// 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 * 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 * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectAttribute(attrNameToInject) {\n return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\n}\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 * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Attribute = makeParamDecorator('Attribute', (attributeName) => ({ attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName) }));\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 * 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\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\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 * @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 * 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 * #########################\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 * 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\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 * 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 * 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 * 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\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'` because\n // Domino doesn't expose HTMLUnknownElement globally.\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 is undefined with domino.\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 * 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 * 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// 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 * 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 /** Component's parent view data. */\n get lView() {\n return getLViewById(this.lViewId);\n }\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}\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\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 * 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 * 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 * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular. It lazily constructs the Trusted Types policy, providing helper\n * utilities for promoting strings to Trusted Types. When Trusted Types are not\n * available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\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 * 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 * 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 * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular specifically for bypassSecurityTrust* and custom sanitizers. It\n * lazily constructs the Trusted Types policy, providing helper utilities for\n * promoting strings to Trusted Types. When Trusted Types are not available,\n * strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\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\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 * 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 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 }\n getInertBodyElement(html) {\n const templateEl = this.inertDocument.createElement('template');\n templateEl.innerHTML = trustedHTMLFromString(html);\n return templateEl;\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 * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation\n * contexts.\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:\n * (1) Either a protocol that is not javascript:, and that has valid characters\n * (alphanumeric or [+-.]).\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 = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\\/?#]*(?:[\\/?#]|$))/i;\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\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 * 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 * 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 * 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 * 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\nconst INJECTOR_DEF_TYPES = new InjectionToken('INJECTOR_DEF_TYPES');\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 * 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 * 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 * 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 /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\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 * 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 * 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\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 * 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 * 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 * 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 * @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.2.9');\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\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 * 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\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 *\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/** 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 * 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\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 // Indicates whether we are processing value from the implicit\n // attribute section (i.e. before the first marker in the array).\n let isImplicitAttrsSection = true;\n while (i < attrs.length) {\n let item = attrs[i++];\n if (typeof item === 'string' && isImplicitAttrsSection) {\n const value = attrs[i++];\n if (isProjectionMode && item === 'class') {\n // We found a `class` attribute in the implicit attribute section,\n // check if it matches the value of the `cssClassToMatch` argument.\n if (classIndexOf(value.toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\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 else if (typeof item === 'number') {\n // We've came across a first marker, which indicates\n // that the implicit attribute section is over.\n isImplicitAttrsSection = 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/** A special value which designates that a value has not changed. */\nconst NO_CHANGE = (typeof ngDevMode === 'undefined' || ngDevMode) ? { __brand__: 'NO_CHANGE' } : {};\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 * 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 * 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 * 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 * 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 * 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\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 * 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 * `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// 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 * @module\n * @description\n * The `di` module provides dependency injection container services.\n */\n\n/**\n * This file should not be necessary because node resolution should just default to `./di/index`!\n *\n * However it does not seem to work and it breaks:\n * - //packages/animations/browser/test:test_web_chromium-local\n * - //packages/compiler-cli/test:extract_i18n\n * - //packages/compiler-cli/test:ngc\n * - //packages/compiler-cli/test:perform_watch\n * - //packages/compiler-cli/test/diagnostics:check_types\n * - //packages/compiler-cli/test/transformers:test\n * - //packages/compiler/test:test\n * - //tools/public_api_guard:core_api\n *\n * Remove this file once the above is solved or wait until `ngc` is deleted and then it should be\n * safe to delete this file.\n */\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 * 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 tNode.prev = currentTNode;\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 tView: null,\n next: null,\n prev: 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 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 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}\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 * 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\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\nclass ViewRef$1 {\n get rootNodes() {\n const lView = this._lView;\n const tView = lView[TVIEW];\n return collectNativeNodes(tView, lView, tView.firstChild, []);\n }\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 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\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 get inputs() {\n return toRefArray(this.componentDef.inputs);\n }\n get outputs() {\n return toRefArray(this.componentDef.outputs);\n }\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 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 const childComponentLView = getComponentLViewByIndex(this._tNode.index, lView);\n markViewDirty(childComponentLView);\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\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 * 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 * 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\nfunction isIterable(obj) {\n return obj !== null && typeof obj === 'object' && obj[Symbol.iterator] !== 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 Symbol.iterator in obj); // JS Iterable have a Symbol.iterator prop\n}\nfunction areIterablesEqual(a, b, comparator) {\n const iterator1 = a[Symbol.iterator]();\n const iterator2 = b[Symbol.iterator]();\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[Symbol.iterator]();\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\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// 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 * 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 * 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 * 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\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.tView = 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/** 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 * 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\nfunction elementStartFirstCreatePass(index, tView, lView, 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 resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\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 tNode = tView.firstCreatePass ?\n elementStartFirstCreatePass(adjustedIndex, tView, lView, name, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace$1());\n const hasDirectives = isDirectiveHost(tNode);\n if (ngDevMode && tView.firstCreatePass) {\n validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);\n }\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 (hasDirectives) {\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\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 * 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 * 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 * 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 * 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\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 * 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// 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 * 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(classKeyValueArraySet, 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 * Class-binding-specific function for setting the `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 classKeyValueArraySet(keyValueArray, key, value) {\n // We use `classList.add` to eventually add the CSS classes to the DOM node. Any value passed into\n // `add` is stringified and added to the `class` attribute, e.g. even null, undefined or numbers\n // will be added. Stringify the key here so that our internal data structure matches the value in\n // the DOM. The only exceptions are empty strings and strings that contain spaces for which\n // the browser throws an error. We ignore such values, because the error is somewhat cryptic.\n const stringKey = String(key);\n if (stringKey !== '' && !stringKey.includes(' ')) {\n keyValueArraySet(keyValueArray, stringKey, value);\n }\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 === '') {\n // do nothing\n // Do not add the suffix if the value is going to be empty.\n // As it produce invalid CSS, which the browsers will automatically omit but Domino will not.\n // Example: `\"left\": \"px;\"` instead of `\"left\": \"\"`.\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 * 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 *\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 *\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 *\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 *\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 * 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 * 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// 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 * 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\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 * 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 * 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 * 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 * 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 * 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('tView') || 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('tView'), 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 * 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\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 * 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\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 * 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 * 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// 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 * 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 * This file re-exports all symbols contained in this directory.\n *\n * Why is this file not `index.ts`?\n *\n * There seems to be an inconsistent path resolution of an `index.ts` file\n * when only the parent directory is referenced. This could be due to the\n * node module resolution configuration differing from rollup and/or typescript.\n *\n * With commit\n * https://github.com/angular/angular/commit/d5e3f2c64bd13ce83e7c70788b7fc514ca4a9918\n * the `instructions.ts` file was moved to `instructions/instructions.ts` and an\n * `index.ts` file was used to re-export everything. Having had file names that were\n * importing from `instructions' directly (not the from the sub file or the `index.ts`\n * file) caused strange CI issues. `index.ts` had to be renamed to `all.ts` for this\n * to work.\n *\n * Jira Issue = FW-1184\n */\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 * 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 * 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 * 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 * 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.declaredInputs !== undefined &&\n obj.findHostDirectiveDefs !== 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 * 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 * 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 * 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/// <reference types=\"rxjs\" />\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\nfunction symbolIterator() {\n // @ts-expect-error accessing a private member\n return this._results[Symbol.iterator]();\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 * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n */\n get changes() {\n return this._changes || (this._changes = new EventEmitter());\n }\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 // [Symbol.iterator](): Iterator<T> { ... }\n const proto = QueryList.prototype;\n if (!proto[Symbol.iterator])\n proto[Symbol.iterator] = symbolIterator;\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 * 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.tView;\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.tView, 'TView must be allocated');\n return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));\n }\n return null;\n}\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-hierarchy).\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\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 * 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 * 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\nfunction patchModuleCompilation() {\n // Does nothing, but exists as a target for patching.\n}\n\nfunction isModuleWithProviders(value) {\n return value.ngModule !== undefined;\n}\nfunction isNgModule(value) {\n return !!getNgModuleDef(value);\n}\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 && 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 * 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 };\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\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 * 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 * @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 * This indirection is needed to free up Component, etc symbols in the public API\n * to be used by the decorator versions of these annotations.\n */\n\nfunction noop(...args) {\n // Do nothing.\n}\n\n/*\n * This file exists to support compilation of @angular/core in Ivy mode.\n *\n * When the Angular compiler processes a compilation unit, it normally writes imports to\n * @angular/core. When compiling the core package itself this strategy isn't usable. Instead, the\n * compiler writes imports to this file.\n *\n * Only a subset of such imports are supported - core is not allowed to declare components or pipes.\n * A check in ngtsc's `R3SymbolsImportRewriter` validates this condition. The rewriter is only used\n * when compiling @angular/core and is responsible for translating an external name (prefixed with\n * ɵ) to the internal symbol name as exported below.\n *\n * The below symbols are used for @Injectable and @NgModule compilation.\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 * 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 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\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 * 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 * 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 * 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 * 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\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\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\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 * 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 * 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\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;\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');\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');\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 /**\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 /** @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 * 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 * 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// Public API for Zone\n\n// Public API for render\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 * 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 * 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-hierarchy) 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// Public API for compiler\n\n// This file exists for easily patching NgModuleFactoryLoader in g3\nvar ng_module_factory_loader_impl = {};\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 for (const attr of element.attributes) {\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.includes(attr.name)) {\n attributes[attr.name] = 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\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\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\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\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 * 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 * @module\n * @description\n * Change detection enables data binding in Angular.\n */\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 * 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/** 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 * 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// clang-format off\n// clang-format on\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 * @module\n * @description\n * Entry point from which you should import all public core APIs.\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 * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/* This file is not used to build this module. It is only used during editing\n * by the TypeScript language service and during build for verification. `ngc`\n * replaces this file with production index.ts when it rewrites private symbol\n * names.\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, isStandalone, makeEnvironmentProviders, platformCore, reflectComponentType, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, 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, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isNgModule as ɵisNgModule, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, 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","import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { map } from '../operators/map';\nimport { isObject } from '../util/isObject';\nimport { from } from './from';\nexport function forkJoin(...sources) {\n if (sources.length === 1) {\n const first = sources[0];\n if (isArray(first)) {\n return forkJoinInternal(first, null);\n }\n if (isObject(first) && Object.getPrototypeOf(first) === Object.prototype) {\n const keys = Object.keys(first);\n return forkJoinInternal(keys.map(key => first[key]), keys);\n }\n }\n if (typeof sources[sources.length - 1] === 'function') {\n const resultSelector = sources.pop();\n sources = (sources.length === 1 && isArray(sources[0])) ? sources[0] : sources;\n return forkJoinInternal(sources, null).pipe(map((args) => resultSelector(...args)));\n }\n return forkJoinInternal(sources, null);\n}\nfunction forkJoinInternal(sources, keys) {\n return new Observable(subscriber => {\n const len = sources.length;\n if (len === 0) {\n subscriber.complete();\n return;\n }\n const values = new Array(len);\n let completed = 0;\n let emitted = 0;\n for (let i = 0; i < len; i++) {\n const source = from(sources[i]);\n let hasValue = false;\n subscriber.add(source.subscribe({\n next: value => {\n if (!hasValue) {\n hasValue = true;\n emitted++;\n }\n values[i] = value;\n },\n error: err => subscriber.error(err),\n complete: () => {\n completed++;\n if (completed === len || !hasValue) {\n if (emitted === len) {\n subscriber.next(keys ?\n keys.reduce((result, key, i) => (result[key] = values[i], result), {}) :\n values);\n }\n subscriber.complete();\n }\n }\n }));\n }\n });\n}\n","/**\n * @license Angular v15.2.9\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 * 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.2.9\", 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.2.9\", type: BaseControlValueAccessor, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: BuiltInControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nBuiltInControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: BuiltInControlValueAccessor, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\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.2.9\", ngImport: i0, type: CheckboxControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nCheckboxControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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\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.2.9\", 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.2.9\", 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.2.9\", 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\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 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 * @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 * @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 * @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// 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.2.9\", ngImport: i0, type: NgControlStatus, deps: [{ token: NgControl, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgControlStatus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", 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.2.9\", 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.2.9\", 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\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\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\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 * 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 * 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\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.2.9\", 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.2.9\", 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.2.9\", 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\nfunction removeListItem(list, el) {\n const index = list.indexOf(el);\n if (index > -1)\n list.splice(index, 1);\n}\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 * @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.2.9\", ngImport: i0, type: AbstractFormGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nAbstractFormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: AbstractFormGroupDirective, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: AbstractFormGroupDirective, decorators: [{\n type: Directive\n }] });\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\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.2.9\", 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.2.9\", type: NgModelGroup, selector: \"[ngModelGroup]\", inputs: { name: [\"ngModelGroup\", \"name\"] }, providers: [modelGroupProvider], exportAs: [\"ngModelGroup\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\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.2.9\", 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.2.9\", 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.2.9\", 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 * @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.2.9\", ngImport: i0, type: ɵNgNoValidate, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nɵNgNoValidate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: ɵNgNoValidate, selector: \"form:not([ngNoForm]):not([ngNativeValidate])\", host: { attributes: { \"novalidate\": \"\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵNgNoValidate, decorators: [{\n type: Directive,\n args: [{\n selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n host: { 'novalidate': '' },\n }]\n }] });\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.2.9\", ngImport: i0, type: NumberValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nNumberValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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\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.2.9\", ngImport: i0, type: RadioControlRegistryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nRadioControlRegistryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlRegistryModule });\nRadioControlRegistryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlRegistryModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: RadioControlRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRadioControlRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlRegistry, providedIn: RadioControlRegistryModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 this.setDisabledStateFired = false;\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 this.callSetDisabledState = inject(CALL_SET_DISABLED_STATE, { optional: true }) ?? setDisabledStateDefault;\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 /** @nodoc */\n setDisabledState(isDisabled) {\n /**\n * `setDisabledState` is supposed to be called whenever the disabled state of a control changes,\n * including upon control creation. However, a longstanding bug caused the method to not fire\n * when an *enabled* control was attached. This bug was fixed in v15 in #47576.\n *\n * This had a side effect: previously, it was possible to instantiate a reactive form control\n * with `[attr.disabled]=true`, even though the the corresponding control was enabled in the\n * model. This resulted in a mismatch between the model and the DOM. Now, because\n * `setDisabledState` is always called, the value in the DOM will be immediately overwritten\n * with the \"correct\" enabled value.\n *\n * However, the fix also created an exceptional case: radio buttons. Because Reactive Forms\n * models the entire group of radio buttons as a single `FormControl`, there is no way to\n * control the disabled state for individual radios, so they can no longer be configured as\n * disabled. Thus, we keep the old behavior for radio buttons, so that `[attr.disabled]`\n * continues to work. Specifically, we drop the first call to `setDisabledState` if `disabled`\n * is `false`, and we are not in legacy mode.\n */\n if (this.setDisabledStateFired || isDisabled ||\n this.callSetDisabledState === 'whenDisabledForLegacyCode') {\n this.setProperty('disabled', isDisabled);\n }\n this.setDisabledStateFired = true;\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.2.9\", 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.2.9\", 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.2.9\", 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\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.2.9\", ngImport: i0, type: RangeValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nRangeValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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 * 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 /**\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 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 /** @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.2.9\", 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.2.9\", 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.2.9\", 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\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.2.9\", 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.2.9\", 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.2.9\", 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\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.2.9\", 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.2.9\", type: FormGroupName, selector: \"[formGroupName]\", inputs: { name: [\"formGroupName\", \"name\"] }, providers: [formGroupNameProvider], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", type: FormArrayName, selector: \"[formArrayName]\", inputs: { name: [\"formArrayName\", \"name\"] }, providers: [formArrayNameProvider], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\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 /**\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 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 /** @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.2.9\", 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.2.9\", 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.2.9\", 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\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.2.9\", ngImport: i0, type: SelectControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nSelectControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", 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.2.9\", type: NgSelectOption, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\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.2.9\", ngImport: i0, type: SelectMultipleControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nSelectMultipleControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", 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.2.9\", type: ɵNgSelectMultipleOption, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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.2.9\", ngImport: i0, type: AbstractValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nAbstractValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: AbstractValidatorDirective, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: MaxValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: MinValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: RequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: CheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nCheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: EmailValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nEmailValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: MinLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMinLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: MaxLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMaxLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: PatternValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nPatternValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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\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.2.9\", ngImport: i0, type: ɵInternalFormsSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nɵInternalFormsSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: ɵInternalFormsSharedModule, imports: [RadioControlRegistryModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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\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 `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.2.9\", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormBuilder, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\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.2.9\", ngImport: i0, type: NonNullableFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNonNullableFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NonNullableFormBuilder, providedIn: 'root', useFactory: () => inject(FormBuilder).nonNullable });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NonNullableFormBuilder, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n useFactory: () => inject(FormBuilder).nonNullable,\n }]\n }] });\n/**\n * UntypedFormBuilder is the same as `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.2.9\", ngImport: i0, type: UntypedFormBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nUntypedFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UntypedFormBuilder, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UntypedFormBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the forms package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.2.9');\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.2.9\", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: FormsModule, declarations: [NgModel, NgModelGroup, NgForm], exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm] });\nFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormsModule, imports: [ɵInternalFormsSharedModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: ReactiveFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nReactiveFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: ReactiveFormsModule, imports: [ɵInternalFormsSharedModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @module\n * @description\n * This module is used for handling user input, by defining and building a `FormGroup` that\n * consists of `FormControl` objects, and mapping them onto the DOM. `FormControl`\n * objects can then be used to read information from the form DOM elements.\n *\n * Forms providers are not included in default providers; you must import these providers\n * explicitly.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\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","/**\n * @license Angular v15.2.9\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 * 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 * 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 * 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\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.2.9\", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserXhr });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserXhr, decorators: [{\n type: Injectable\n }] });\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((plugin) => {\n plugin.manager = this;\n });\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.2.9\", 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.2.9\", ngImport: i0, type: EventManager });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\nclass SharedStylesHost {\n constructor() {\n this.usageCount = new Map();\n }\n addStyles(styles) {\n for (const style of styles) {\n const usageCount = this.changeUsageCount(style, 1);\n if (usageCount === 1) {\n this.onStyleAdded(style);\n }\n }\n }\n removeStyles(styles) {\n for (const style of styles) {\n const usageCount = this.changeUsageCount(style, -1);\n if (usageCount === 0) {\n this.onStyleRemoved(style);\n }\n }\n }\n onStyleRemoved(style) { }\n onStyleAdded(style) { }\n getAllStyles() {\n return this.usageCount.keys();\n }\n changeUsageCount(style, delta) {\n const map = this.usageCount;\n let usage = map.get(style) ?? 0;\n usage += delta;\n if (usage > 0) {\n map.set(style, usage);\n }\n else {\n map.delete(style);\n }\n return usage;\n }\n ngOnDestroy() {\n for (const style of this.getAllStyles()) {\n this.onStyleRemoved(style);\n }\n this.usageCount.clear();\n }\n}\nSharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SharedStylesHost, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SharedStylesHost });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.styleRef = new Map();\n this.hostNodes = new Set();\n this.resetHostNodes();\n }\n onStyleAdded(style) {\n for (const host of this.hostNodes) {\n this.addStyleToHost(host, style);\n }\n }\n onStyleRemoved(style) {\n const styleRef = this.styleRef;\n const styleElements = styleRef.get(style);\n styleElements?.forEach(e => e.remove());\n styleRef.delete(style);\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n this.styleRef.clear();\n this.resetHostNodes();\n }\n addHost(hostNode) {\n this.hostNodes.add(hostNode);\n for (const style of this.getAllStyles()) {\n this.addStyleToHost(hostNode, style);\n }\n }\n removeHost(hostNode) {\n this.hostNodes.delete(hostNode);\n }\n addStyleToHost(host, style) {\n const styleEl = this.doc.createElement('style');\n styleEl.textContent = style;\n host.appendChild(styleEl);\n const styleElRef = this.styleRef.get(style);\n if (styleElRef) {\n styleElRef.push(styleEl);\n }\n else {\n this.styleRef.set(style, [styleEl]);\n }\n }\n resetHostNodes() {\n const hostNodes = this.hostNodes;\n hostNodes.clear();\n // Re-add the head element back since this is the default host.\n hostNodes.add(this.doc.head);\n }\n}\nDomSharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSharedStylesHost, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSharedStylesHost });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSharedStylesHost, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\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}`;\n/**\n * The default value for the `REMOVE_STYLES_ON_COMPONENT_DESTROY` DI token.\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = false;\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates whether styles\n * of destroyed components should be removed from DOM.\n *\n * By default, the value is set to `false`. This will be changed in the next major version.\n * @publicApi\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken('RemoveStylesOnCompDestory', {\n providedIn: 'root',\n factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT,\n});\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}\nclass DomRendererFactory2 {\n constructor(eventManager, sharedStylesHost, appId, removeStylesOnCompDestory) {\n this.eventManager = eventManager;\n this.sharedStylesHost = sharedStylesHost;\n this.appId = appId;\n this.removeStylesOnCompDestory = removeStylesOnCompDestory;\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 const renderer = this.getOrCreateRenderer(element, type);\n // Renderers have different logic due to different encapsulation behaviours.\n // Ex: for emulated, an attribute is added to the element.\n if (renderer instanceof EmulatedEncapsulationDomRenderer2) {\n renderer.applyToHost(element);\n }\n else if (renderer instanceof NoneEncapsulationDomRenderer) {\n renderer.applyStyles();\n }\n return renderer;\n }\n getOrCreateRenderer(element, type) {\n const rendererByCompId = this.rendererByCompId;\n let renderer = rendererByCompId.get(type.id);\n if (!renderer) {\n const eventManager = this.eventManager;\n const sharedStylesHost = this.sharedStylesHost;\n const removeStylesOnCompDestory = this.removeStylesOnCompDestory;\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated:\n renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId, removeStylesOnCompDestory);\n break;\n case ViewEncapsulation.ShadowDom:\n return new ShadowDomRenderer(eventManager, sharedStylesHost, element, type);\n default:\n renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type, removeStylesOnCompDestory);\n break;\n }\n renderer.onDestroy = () => rendererByCompId.delete(type.id);\n rendererByCompId.set(type.id, renderer);\n }\n return renderer;\n }\n ngOnDestroy() {\n this.rendererByCompId.clear();\n }\n begin() { }\n end() { }\n}\nDomRendererFactory2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: DomSharedStylesHost }, { token: APP_ID }, { token: REMOVE_STYLES_ON_COMPONENT_DESTROY }], target: i0.ɵɵFactoryTarget.Injectable });\nDomRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomRendererFactory2 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [REMOVE_STYLES_ON_COMPONENT_DESTROY]\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 // removeProperty has no effect when used on camelCased properties.\n el.style.removeProperty(style);\n }\n else {\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 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 (const style of styles) {\n const styleEl = document.createElement('style');\n styleEl.textContent = style;\n this.shadowRoot.appendChild(styleEl);\n }\n }\n nodeOrShadowRoot(node) {\n return node === this.hostEl ? this.shadowRoot : node;\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 destroy() {\n this.sharedStylesHost.removeHost(this.shadowRoot);\n }\n}\nclass NoneEncapsulationDomRenderer extends DefaultDomRenderer2 {\n constructor(eventManager, sharedStylesHost, component, removeStylesOnCompDestory, compId = component.id) {\n super(eventManager);\n this.sharedStylesHost = sharedStylesHost;\n this.removeStylesOnCompDestory = removeStylesOnCompDestory;\n this.rendererUsageCount = 0;\n this.styles = flattenStyles(compId, component.styles);\n }\n applyStyles() {\n this.sharedStylesHost.addStyles(this.styles);\n this.rendererUsageCount++;\n }\n destroy() {\n if (!this.removeStylesOnCompDestory) {\n return;\n }\n this.sharedStylesHost.removeStyles(this.styles);\n this.rendererUsageCount--;\n if (this.rendererUsageCount === 0) {\n this.onDestroy?.();\n }\n }\n}\nclass EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {\n constructor(eventManager, sharedStylesHost, component, appId, removeStylesOnCompDestory) {\n const compId = appId + '-' + component.id;\n super(eventManager, sharedStylesHost, component, removeStylesOnCompDestory, compId);\n this.contentAttr = shimContentAttribute(compId);\n this.hostAttr = shimHostAttribute(compId);\n }\n applyToHost(element) {\n this.applyStyles();\n this.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}\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.2.9\", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomEventsPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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.2.9\", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nKeyEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: KeyEventsPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: KeyEventsPlugin, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\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, REMOVE_STYLES_ON_COMPONENT_DESTROY]\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.2.9\", 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.2.9\", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] });\nBrowserModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserModule, providers: [\n ...BROWSER_MODULE_PROVIDERS,\n ...TESTABILITY_PROVIDERS\n ], imports: [CommonModule, ApplicationModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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 `<meta>` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `<meta>` 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 `<meta>` 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 `<meta>` 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 `<meta>` 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 `<meta>` 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 `<meta>` 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 `<meta>` 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 `<meta>` 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 `<meta>` 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 `<meta>` 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.2.9\", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nMeta.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Meta, providedIn: 'root', useFactory: createMeta, deps: [] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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 (`<html>` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `<title>` 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.2.9\", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nTitle.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Title, providedIn: 'root', useFactory: createTitle, deps: [] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * 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\nconst win = typeof window !== 'undefined' && window || {};\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\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\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 this.store = retrieveTransferredState(inject(DOCUMENT), inject(APP_ID));\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.2.9\", ngImport: i0, type: TransferState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nTransferState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TransferState, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TransferState, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\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.2.9\", ngImport: i0, type: BrowserTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserTransferStateModule });\nBrowserTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserTransferStateModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserTransferStateModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\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 * 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.2.9\", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nHammerGestureConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerGestureConfig });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", 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.2.9\", ngImport: i0, type: HammerGesturesPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHammerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerModule });\nHammerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", 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 * 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.2.9\", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nDomSanitizer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(function () { return DomSanitizerImpl; }) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomSanitizerImpl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [{ token: Injector }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @module\n * @description\n * Entry point for all public APIs of the platform-browser package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.2.9');\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\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, REMOVE_STYLES_ON_COMPONENT_DESTROY, 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","const EmptyErrorImpl = (() => {\n function EmptyErrorImpl() {\n Error.call(this);\n this.message = 'no elements in sequence';\n this.name = 'EmptyError';\n return this;\n }\n EmptyErrorImpl.prototype = Object.create(Error.prototype);\n return EmptyErrorImpl;\n})();\nexport const EmptyError = EmptyErrorImpl;\n","import { Subscriber } from './Subscriber';\nexport class OuterSubscriber extends Subscriber {\n notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n }\n notifyError(error, innerSub) {\n this.destination.error(error);\n }\n notifyComplete(innerSub) {\n this.destination.complete();\n }\n}\n","import { Subscriber } from './Subscriber';\nexport class InnerSubscriber extends Subscriber {\n constructor(parent, outerValue, outerIndex) {\n super();\n this.parent = parent;\n this.outerValue = outerValue;\n this.outerIndex = outerIndex;\n this.index = 0;\n }\n _next(value) {\n this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);\n }\n _error(error) {\n this.parent.notifyError(error, this);\n this.unsubscribe();\n }\n _complete() {\n this.parent.notifyComplete(this);\n this.unsubscribe();\n }\n}\n","import { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeTo } from './subscribeTo';\nimport { Observable } from '../Observable';\nexport function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber = new InnerSubscriber(outerSubscriber, outerValue, outerIndex)) {\n if (innerSubscriber.closed) {\n return undefined;\n }\n if (result instanceof Observable) {\n return result.subscribe(innerSubscriber);\n }\n return subscribeTo(result)(innerSubscriber);\n}\n","import { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { fromArray } from './fromArray';\nconst NONE = {};\nexport function combineLatest(...observables) {\n let resultSelector = undefined;\n let scheduler = undefined;\n if (isScheduler(observables[observables.length - 1])) {\n scheduler = observables.pop();\n }\n if (typeof observables[observables.length - 1] === 'function') {\n resultSelector = observables.pop();\n }\n if (observables.length === 1 && isArray(observables[0])) {\n observables = observables[0];\n }\n return fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));\n}\nexport class CombineLatestOperator {\n constructor(resultSelector) {\n this.resultSelector = resultSelector;\n }\n call(subscriber, source) {\n return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));\n }\n}\nexport class CombineLatestSubscriber extends OuterSubscriber {\n constructor(destination, resultSelector) {\n super(destination);\n this.resultSelector = resultSelector;\n this.active = 0;\n this.values = [];\n this.observables = [];\n }\n _next(observable) {\n this.values.push(NONE);\n this.observables.push(observable);\n }\n _complete() {\n const observables = this.observables;\n const len = observables.length;\n if (len === 0) {\n this.destination.complete();\n }\n else {\n this.active = len;\n this.toRespond = len;\n for (let i = 0; i < len; i++) {\n const observable = observables[i];\n this.add(subscribeToResult(this, observable, undefined, i));\n }\n }\n }\n notifyComplete(unused) {\n if ((this.active -= 1) === 0) {\n this.destination.complete();\n }\n }\n notifyNext(_outerValue, innerValue, outerIndex) {\n const values = this.values;\n const oldVal = values[outerIndex];\n const toRespond = !this.toRespond\n ? 0\n : oldVal === NONE ? --this.toRespond : this.toRespond;\n values[outerIndex] = innerValue;\n if (toRespond === 0) {\n if (this.resultSelector) {\n this._tryResultSelector(values);\n }\n else {\n this.destination.next(values.slice());\n }\n }\n }\n _tryResultSelector(values) {\n let result;\n try {\n result = this.resultSelector.apply(this, values);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n }\n}\n","import { Observable } from '../Observable';\nimport { from } from './from';\nimport { empty } from './empty';\nexport function defer(observableFactory) {\n return new Observable(subscriber => {\n let input;\n try {\n input = observableFactory();\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n const source = input ? from(input) : empty();\n return source.subscribe(subscriber);\n });\n}\n","import { Subscriber } from '../Subscriber';\nexport function defaultIfEmpty(defaultValue = null) {\n return (source) => source.lift(new DefaultIfEmptyOperator(defaultValue));\n}\nclass DefaultIfEmptyOperator {\n constructor(defaultValue) {\n this.defaultValue = defaultValue;\n }\n call(subscriber, source) {\n return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));\n }\n}\nclass DefaultIfEmptySubscriber extends Subscriber {\n constructor(destination, defaultValue) {\n super(destination);\n this.defaultValue = defaultValue;\n this.isEmpty = true;\n }\n _next(value) {\n this.isEmpty = false;\n this.destination.next(value);\n }\n _complete() {\n if (this.isEmpty) {\n this.destination.next(this.defaultValue);\n }\n this.destination.complete();\n }\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { Subscriber } from '../Subscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return (source) => {\n return source.lift(new ThrowIfEmptyOperator(errorFactory));\n };\n}\nclass ThrowIfEmptyOperator {\n constructor(errorFactory) {\n this.errorFactory = errorFactory;\n }\n call(subscriber, source) {\n return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));\n }\n}\nclass ThrowIfEmptySubscriber extends Subscriber {\n constructor(destination, errorFactory) {\n super(destination);\n this.errorFactory = errorFactory;\n this.hasValue = false;\n }\n _next(value) {\n this.hasValue = true;\n this.destination.next(value);\n }\n _complete() {\n if (!this.hasValue) {\n let err;\n try {\n err = this.errorFactory();\n }\n catch (e) {\n err = e;\n }\n this.destination.error(err);\n }\n else {\n return this.destination.complete();\n }\n }\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\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 { Subscriber } from '../Subscriber';\nexport function scan(accumulator, seed) {\n let hasSeed = false;\n if (arguments.length >= 2) {\n hasSeed = true;\n }\n return function scanOperatorFunction(source) {\n return source.lift(new ScanOperator(accumulator, seed, hasSeed));\n };\n}\nclass ScanOperator {\n constructor(accumulator, seed, hasSeed = false) {\n this.accumulator = accumulator;\n this.seed = seed;\n this.hasSeed = hasSeed;\n }\n call(subscriber, source) {\n return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n }\n}\nclass ScanSubscriber extends Subscriber {\n constructor(destination, accumulator, _seed, hasSeed) {\n super(destination);\n this.accumulator = accumulator;\n this._seed = _seed;\n this.hasSeed = hasSeed;\n this.index = 0;\n }\n get seed() {\n return this._seed;\n }\n set seed(value) {\n this.hasSeed = true;\n this._seed = value;\n }\n _next(value) {\n if (!this.hasSeed) {\n this.seed = value;\n this.destination.next(value);\n }\n else {\n return this._tryNext(value);\n }\n }\n _tryNext(value) {\n const index = this.index++;\n let result;\n try {\n result = this.accumulator(this.seed, value, index);\n }\n catch (err) {\n this.destination.error(err);\n }\n this.seed = result;\n this.destination.next(result);\n }\n}\n","import { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function takeLast(count) {\n return function takeLastOperatorFunction(source) {\n if (count === 0) {\n return empty();\n }\n else {\n return source.lift(new TakeLastOperator(count));\n }\n };\n}\nclass TakeLastOperator {\n constructor(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n call(subscriber, source) {\n return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n }\n}\nclass TakeLastSubscriber extends Subscriber {\n constructor(destination, total) {\n super(destination);\n this.total = total;\n this.ring = new Array();\n this.count = 0;\n }\n _next(value) {\n const ring = this.ring;\n const total = this.total;\n const count = this.count++;\n if (ring.length < total) {\n ring.push(value);\n }\n else {\n const index = count % total;\n ring[index] = value;\n }\n }\n _complete() {\n const destination = this.destination;\n let count = this.count;\n if (count > 0) {\n const total = this.count >= this.total ? this.total : this.count;\n const ring = this.ring;\n for (let i = 0; i < total; i++) {\n const idx = (count++) % total;\n destination.next(ring[idx]);\n }\n }\n destination.complete();\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 { Subscriber } from '../Subscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return (source) => source.lift(new TakeWhileOperator(predicate, inclusive));\n}\nclass TakeWhileOperator {\n constructor(predicate, inclusive) {\n this.predicate = predicate;\n this.inclusive = inclusive;\n }\n call(subscriber, source) {\n return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));\n }\n}\nclass TakeWhileSubscriber extends Subscriber {\n constructor(destination, predicate, inclusive) {\n super(destination);\n this.predicate = predicate;\n this.inclusive = inclusive;\n this.index = 0;\n }\n _next(value) {\n const destination = this.destination;\n let result;\n try {\n result = this.predicate(value, this.index++);\n }\n catch (err) {\n destination.error(err);\n return;\n }\n this.nextOrComplete(value, result);\n }\n nextOrComplete(value, predicateResult) {\n const destination = this.destination;\n if (Boolean(predicateResult)) {\n destination.next(value);\n }\n else {\n if (this.inclusive) {\n destination.next(value);\n }\n destination.complete();\n }\n }\n}\n","import { Subscriber } from '../Subscriber';\nexport function mapTo(value) {\n return (source) => source.lift(new MapToOperator(value));\n}\nclass MapToOperator {\n constructor(value) {\n this.value = value;\n }\n call(subscriber, source) {\n return source.subscribe(new MapToSubscriber(subscriber, this.value));\n }\n}\nclass MapToSubscriber extends Subscriber {\n constructor(destination, value) {\n super(destination);\n this.value = value;\n }\n _next(x) {\n this.destination.next(this.value);\n }\n}\n","import { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nexport function finalize(callback) {\n return (source) => source.lift(new FinallyOperator(callback));\n}\nclass FinallyOperator {\n constructor(callback) {\n this.callback = callback;\n }\n call(subscriber, source) {\n return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n }\n}\nclass FinallySubscriber extends Subscriber {\n constructor(destination, callback) {\n super(destination);\n this.add(new Subscription(callback));\n }\n}\n","/**\n * @license Angular v15.2.9\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, ɵisNgModule, isStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, Compiler, 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 * 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\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\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.2.9\", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nUrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\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 // If the set of commands does not apply anything to the primary outlet and the child segment is\n // an empty path primary segment on its own, we want to apply the commands to the empty child\n // path rather than here. The outcome is that the empty primary child is effectively removed\n // from the final output UrlTree. Imagine the following config:\n //\n // {path: '', children: [{path: '**', outlet: 'popup'}]}.\n //\n // Navigation to /(popup:a) will activate the child outlet correctly Given a follow-up\n // navigation with commands\n // ['/', {outlets: {'popup': 'b'}}], we _would not_ want to apply the outlet commands to the\n // root segment because that would result in\n // //(popup:a)(popup:b) since the outlet command got applied one level above where it appears in\n // the `ActivatedRoute` rather than updating the existing one.\n //\n // Because empty paths do not appear in the URL segments and the fact that the segments used in\n // the output `UrlTree` are squashed to eliminate these empty paths where possible\n // https://github.com/angular/angular/blob/13f10de40e25c6900ca55bd83b36bd533dacfa9e/packages/router/src/url_tree.ts#L755\n // it can be hard to determine what is the right thing to do when applying commands to a\n // `UrlSegmentGroup` that is created from an \"unsquashed\"/expanded `ActivatedRoute` tree.\n // This code effectively \"squashes\" empty path primary routes when they have no siblings on\n // the same level of the tree.\n if (!outlets[PRIMARY_OUTLET] && segmentGroup.children[PRIMARY_OUTLET] &&\n segmentGroup.numberOfChildren === 1 &&\n segmentGroup.children[PRIMARY_OUTLET].segments.length === 0) {\n const childrenOfEmptyChild = updateSegmentGroupChildren(segmentGroup.children[PRIMARY_OUTLET], startIndex, commands);\n return new UrlSegmentGroup(segmentGroup.segments, childrenOfEmptyChild.children);\n }\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\nconst IMPERATIVE_NAVIGATION = 'imperative';\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 is skipped.\n * This can happen for a couple reasons including onSameUrlHandling\n * is set to `ignore` and the navigation URL is not different than the\n * current state.\n *\n * @publicApi\n */\nclass NavigationSkipped extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /**\n * A description of why the navigation was skipped. For debug purposes only. Use `code`\n * instead for a stable skipped reason that can be used in production.\n */\n reason, \n /**\n * A code to indicate why the navigation was skipped. This 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 = 16 /* EventType.NavigationSkipped */;\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 16 /* EventType.NavigationSkipped */:\n return `NavigationSkipped(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\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 const tree = createUrlTree(a, currentUrlTree, commands, queryParams, fragment);\n if (NG_DEV_MODE$9) {\n const treeFromSnapshotStrategy = new CreateUrlTreeUsingSnapshot().createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment);\n if (treeFromSnapshotStrategy.toString() !== tree.toString()) {\n let warningString = `The navigation to ${tree.toString()} will instead go to ${treeFromSnapshotStrategy.toString()} in an upcoming version of Angular.`;\n if (!!relativeTo) {\n warningString += ' `relativeTo` might need to be removed from the `UrlCreationOptions`.';\n }\n tree._warnIfUsedForNavigation = warningString;\n }\n }\n return tree;\n }\n}\nLegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LegacyCreateUrlTree });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 (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.2.9\", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nCreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeUsingSnapshot });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{\n type: Injectable\n }] });\nclass CreateUrlTreeStrategy {\n}\nCreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nCreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: LegacyCreateUrlTree });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useClass: LegacyCreateUrlTree }]\n }] });\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 * 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 /** 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 /** @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 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\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\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 * 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.2.9\", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ChildrenOutletContexts, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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.2.9\", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nRouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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 * 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.2.9\", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.9\", 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.2.9\", 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 * 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 && ɵisNgModule(component)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` +\n `but it must be used with standalone components. Use 'loadChildren' instead.`);\n }\n else 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\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) {\n if (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 }\n // Clear the information about the attached component on the context but keep the reference to\n // the outlet. Clear even if outlet was not yet activated to avoid activating later with old\n // info\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\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 * 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\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\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\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\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\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\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\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\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 * 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\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() {\n this.componentLoaders = new WeakMap();\n this.childrenLoaders = new WeakMap();\n this.compiler = inject(Compiler);\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 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.2.9\", ngImport: i0, type: RouterConfigLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterConfigLoader, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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\nconst NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nclass NavigationTransitions {\n get hasRequestedNavigation() {\n return this.navigationId !== 0;\n }\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 /**\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 /** @internal */\n this.rootComponentType = null;\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 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_NAVIGATION,\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 onSameUrlNavigation = t.extras.onSameUrlNavigation ?? router.onSameUrlNavigation;\n if (!urlTransition && onSameUrlNavigation !== 'reload') {\n const reason = NG_DEV_MODE$4 ?\n `Navigation to ${t.rawUrl} was ignored because it is the same as the current Router URL.` :\n '';\n this.events.next(new NavigationSkipped(t.id, router.serializeUrl(overallTransitionState.rawUrl), reason, 0 /* NavigationSkippedCode.IgnoredSameUrlNavigation */));\n router.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\n if (router.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {\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, this.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 if (urlTransition &&\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 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, this.rootComponentType).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 const reason = NG_DEV_MODE$4 ?\n `Navigation was ignored because the UrlHandlingStrategy` +\n ` indicated neither the current URL ${router.rawUrlTree} nor target URL ${t.rawUrl} should be processed.` :\n '';\n this.events.next(new NavigationSkipped(t.id, router.serializeUrl(overallTransitionState.extractedUrl), reason, 1 /* NavigationSkippedCode.IgnoredByUrlHandlingStrategy */));\n router.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\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 */);\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 */);\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(() => this.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)), \n // Ensure that if some observable used to drive the transition doesn't\n // complete, the navigation still finalizes This should never happen, but\n // this is done as a safety measure to avoid surfacing this error (#49567).\n take(1), 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 */);\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_NAVIGATION, 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 // casting because `pipe` returns observable({}) when called with 8+ arguments\n }));\n }\n cancelNavigationTransition(t, reason, code) {\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.2.9\", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NavigationTransitions, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\nfunction isBrowserTriggeredNavigation(source) {\n return source !== IMPERATIVE_NAVIGATION;\n}\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.2.9\", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });\nDefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultTitleStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Title }]; } });\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.2.9\", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nDefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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 * @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.2.9\", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nDefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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 // 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 if (this.canceledNavigationResolution !== 'computed') {\n return undefined;\n }\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 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 * @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.\n * `provideRouter` has the `withNavigationErrorHandler` feature to make this easier.\n * @see `withNavigationErrorHandler`\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 * @deprecated URI parsing errors should be handled in the `UrlSerializer`.\n *\n * @see `RouterModule`\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 * A strategy for extracting and merging URLs.\n * Used for AngularJS to Angular migrations.\n *\n * @deprecated Configure using `providers` instead:\n * `{provide: UrlHandlingStrategy, useClass: MyStrategy}`.\n */\n this.urlHandlingStrategy = inject(UrlHandlingStrategy);\n /**\n * A strategy for re-using routes.\n *\n * @deprecated Configure using `providers` instead:\n * `{provide: RouteReuseStrategy, useClass: MyStrategy}`.\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 * @deprecated Configure using `providers` instead:\n * `{provide: TitleStrategy, useClass: MyStrategy}`.\n */\n this.titleStrategy = inject(TitleStrategy);\n /**\n * How to handle a navigation request to the current URL.\n *\n *\n * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see `withRouterConfig`\n * @see `provideRouter`\n * @see `RouterModule`\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 * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see `withRouterConfig`\n * @see `provideRouter`\n * @see `RouterModule`\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 * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see `withRouterConfig`\n * @see `provideRouter`\n * @see `RouterModule`\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 * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see `withRouterConfig`\n * @see `provideRouter`\n * @see `RouterModule`\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 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, null);\n this.navigationTransitions.setupNavigations(this).subscribe(t => {\n this.lastSuccessfulId = t.id;\n this.currentPageId = this.browserPageId ?? 0;\n }, e => {\n this.console.warn(`Unhandled Navigation Error: ${e}`);\n });\n }\n /** @internal */\n resetRootComponentType(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 = rootComponentType;\n this.navigationTransitions.rootComponentType = 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 const state = this.location.getState();\n this.navigateToSyncWithBrowser(this.location.path(true), IMPERATIVE_NAVIGATION, state);\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 this.navigateToSyncWithBrowser(event['url'], source, event.state);\n }, 0);\n }\n });\n }\n }\n /**\n * Schedules a router navigation to synchronize Router state with the browser state.\n *\n * This is done as a response to a popstate event and the initial navigation. These\n * two scenarios represent times when the browser URL/state has been updated and\n * the Router needs to respond to ensure its internal state matches.\n */\n navigateToSyncWithBrowser(url, source, state) {\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 = state?.navigationId ? 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 (state) {\n const stateCopy = { ...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(url);\n this.scheduleNavigation(urlTree, source, restoredState, extras);\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 (NG_DEV_MODE$2) {\n if (this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(`Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n }\n if (url instanceof UrlTree && url._warnIfUsedForNavigation) {\n this.console.warn(url._warnIfUsedForNavigation);\n }\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_NAVIGATION, 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 // 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 // Otherwise, targetPageId should be the next number in the event of a `pushState`\n // navigation.\n targetPageId = (this.browserPageId ?? 0) + 1;\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 if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {\n // replacements do not update the target page\n const currentBrowserPageId = this.browserPageId;\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, currentBrowserPageId)\n };\n this.location.replaceState(path, '', state);\n }\n else {\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, transition.targetPageId)\n };\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 currentBrowserPageId = this.browserPageId ?? this.currentPageId;\n const targetPagePosition = this.currentPageId - currentBrowserPageId;\n if (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.2.9\", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRouter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Router, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @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?.toLowerCase();\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.2.9\", 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.2.9\", 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.2.9\", 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 *\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 get isActive() {\n return this._isActive;\n }\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.2.9\", 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.2.9\", 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.2.9\", 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 * @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.2.9\", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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.2.9\", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoPreloading, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 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.2.9\", 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.2.9\", ngImport: i0, type: RouterPreloader, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\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.2.9\", ngImport: i0, type: RouterScroller, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\nRouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterScroller });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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\nvar NavigationResult;\n(function (NavigationResult) {\n NavigationResult[NavigationResult[\"COMPLETE\"] = 0] = \"COMPLETE\";\n NavigationResult[NavigationResult[\"FAILED\"] = 1] = \"FAILED\";\n NavigationResult[NavigationResult[\"REDIRECTING\"] = 2] = \"REDIRECTING\";\n})(NavigationResult || (NavigationResult = {}));\n/**\n * Performs the given action once the router finishes its next/current navigation.\n *\n * The navigation is considered complete under the following conditions:\n * - `NavigationCancel` event emits and the code is not `NavigationCancellationCode.Redirect` or\n * `NavigationCancellationCode.SupersededByNewNavigation`. In these cases, the\n * redirecting/superseding navigation must finish.\n * - `NavigationError`, `NavigationEnd`, or `NavigationSkipped` event emits\n */\nfunction afterNextNavigation(router, action) {\n router.events\n .pipe(filter((e) => e instanceof NavigationEnd || e instanceof NavigationCancel ||\n e instanceof NavigationError || e instanceof NavigationSkipped), map(e => {\n if (e instanceof NavigationEnd || e instanceof NavigationSkipped) {\n return NavigationResult.COMPLETE;\n }\n const redirecting = e instanceof NavigationCancel ?\n (e.code === 0 /* NavigationCancellationCode.Redirect */ ||\n e.code === 1 /* NavigationCancellationCode.SupersededByNewNavigation */) :\n false;\n return redirecting ? NavigationResult.REDIRECTING : NavigationResult.FAILED;\n }), filter((result) => result !== NavigationResult.REDIRECTING), take(1))\n .subscribe(() => {\n action();\n });\n}\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.complete();\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 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(router, () => {\n // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n // without a redirect.\n resolve(true);\n });\n injector.get(NavigationTransitions).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 * Provides the location strategy that uses the URL fragment instead of the history API.\n *\n * @usageNotes\n *\n * Basic example of how you can use the hash location option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withHashLocation())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n * @see `HashLocationStrategy`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withHashLocation() {\n const providers = [\n { provide: LocationStrategy, useClass: HashLocationStrategy },\n ];\n return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);\n}\n/**\n * Subscribes to the Router's navigation events and calls the given function when a\n * `NavigationError` happens.\n *\n * This function is run inside application's injection context so you can use the `inject` function.\n *\n * @usageNotes\n *\n * Basic example of how you can use the error handler option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withNavigationErrorHandler((e: NavigationError) =>\n * inject(MyErrorTracker).trackError(e)))\n * ]\n * }\n * );\n * ```\n *\n * @see `NavigationError`\n * @see `inject`\n * @see `EnvironmentInjector#runInContext`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withNavigationErrorHandler(fn) {\n const providers = [{\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: () => {\n const injector = inject(EnvironmentInjector);\n inject(Router).events.subscribe((e) => {\n if (e instanceof NavigationError) {\n injector.runInContext(() => fn(e));\n }\n });\n }\n }];\n return routerFeature(7 /* RouterFeatureKind.NavigationErrorHandlerFeature */, providers);\n}\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.2.9\", 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.2.9\", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });\nRouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", 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 * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.2.9');\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\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, NavigationSkipped, 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, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation, flatten as ɵflatten, withPreloading as ɵwithPreloading };\n"],"x_google_ignoreList":[76,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,148,149,150,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,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,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,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]}